Browse code

Update photon-admin-guide.md

Correct systemd/DHCP inconsistencies in documentation when dhcp files were moved to 99.

Change-Id: I77f97d5b57c52f8e76bdff683cf9e486ccf31a57
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5070
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Sharath George

Justin J. Novack authored on 2018/04/01 19:32:04
Showing 1 changed files
... ...
@@ -985,11 +985,11 @@ Using the `ip route` version of a command instead of the net-tools version often
985 985
 Network configuration files for systemd-networkd reside in /etc/systemd/network and /usr/lib/systemd/network. Example:
986 986
 
987 987
 	root@photon-rc [ ~ ]# ls /etc/systemd/network/
988
-	10-dhcp-en.network
988
+	99-dhcp-en.network
989 989
 
990
-By default, when Photon OS starts, it creates a DHCP network configuration file, or rule, which appears in /etc/systemd/network, the highest priority directory for network configuration files:
990
+By default, when Photon OS starts, it creates a DHCP network configuration file, or rule, which appears in /etc/systemd/network, the highest priority directory for network configuration files with the lowest priority filename:
991 991
 
992
-	cat /etc/systemd/network/10-dhcp-en.network
992
+	cat /etc/systemd/network/99-dhcp-en.network
993 993
 	[Match]
994 994
 	Name=e*
995 995
 
... ...
@@ -1001,7 +1001,7 @@ Network configuration files can also appear in the system network directory, /us
1001 1001
 	root@photon-rc [ ~ ]# updatedb
1002 1002
 	root@photon-rc [ ~ ]# locate systemd/network
1003 1003
 	/etc/systemd/network
1004
-	/etc/systemd/network/10-dhcp-en.network
1004
+	/etc/systemd/network/99-dhcp-en.network
1005 1005
 	/usr/lib/systemd/network
1006 1006
 	/usr/lib/systemd/network/80-container-host0.network
1007 1007
 	/usr/lib/systemd/network/80-container-ve.network
... ...
@@ -1061,9 +1061,8 @@ For more information, see the man page for systemd-networkd: `man systemd.networ
1061 1061
 
1062 1062
 ### Turning Off DHCP
1063 1063
 
1064
-By default, when Photon OS first starts, it creates a DHCP network configuration file, or rule, which appears in /etc/systemd/network, the highest priority directory for network configuration files:
1065
-
1066
-	cat /etc/systemd/network/10-dhcp-en.network
1064
+By default, when Photon OS first starts, it creates a DHCP network configuration file, or rule, which appears in /etc/systemd/network, the highest priority directory for network configuration files with the lowest priority filename:
1065
+	cat /etc/systemd/network/99-dhcp-en.network
1067 1066
 	[Match]
1068 1067
 	Name=e*
1069 1068
 
... ...
@@ -1074,6 +1073,8 @@ To turn off DHCP for all Ethernet interfaces, change the value of `DHCP` from `y
1074 1074
 
1075 1075
 	systemctl restart systemd-networkd
1076 1076
 
1077
+If you create a configuration file with a higher priority filename (e.g. `10-static-en.network`), it is not necessary but still recommended to turn off DHCP.
1078
+
1077 1079
 ### Adding a DNS Server 
1078 1080
 
1079 1081
 Photon OS resolves domain names, IP addresses, and network names for local applications by using systemd-resolved. The systemd-resolved daemon automatically creates and maintains the /etc/resolv.conf file, into which systemd-resolved places the IP address of the DNS server. You should therefore never modify the /etc/resolv.conf file.
... ...
@@ -1281,7 +1282,7 @@ You can then add a network link, such as the Ethernet connection, as the argumen
1281 1281
 	root@photon-rc [ ~ ]# networkctl status eth0
1282 1282
 	* 2: eth0
1283 1283
 	       Link File: /usr/lib/systemd/network/99-default.link
1284
-	    Network File: /etc/systemd/network/10-dhcp-en.network
1284
+	    Network File: /etc/systemd/network/99-dhcp-en.network
1285 1285
 	            Type: ether
1286 1286
 	           State: routable (configured)
1287 1287
 	            Path: pci-0000:02:01.0