From 94cea1d88644f71a9fd9ca1f1dfd5d78f1537d20 Mon Sep 17 00:00:00 2001 From: Bruce Dubbs Date: Sat, 24 Jun 2017 19:33:48 +0000 Subject: Remove section disussing configuration without a network card. Update boot scripts to unmount network file systems before bringing down the network. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11260 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter07/network.xml | 103 +++++++++++--------------------------------------- 1 file changed, 23 insertions(+), 80 deletions(-) (limited to 'chapter07') diff --git a/chapter07/network.xml b/chapter07/network.xml index 942276478..b5202fb62 100644 --- a/chapter07/network.xml +++ b/chapter07/network.xml @@ -13,7 +13,7 @@ network configuring - + Creating Network Interface Configuration Files @@ -31,20 +31,18 @@ usually depends on the files in /etc/sysconfig/. This directory should contain a file for each interface to be configured, such as - ifconfig.xyz, where xyz is required to - be a Network Card Interface name (e.g. eth0). Inside this file are - attributes to this interface, such as its IP address(es), subnet masks, and - so forth. It is necessary that the stem of the filename be - ifconfig. + ifconfig.xyz, where xyz should describe + the network card. The interface name (e.g. eth0) is usually appropriate. + Inside this file are attributes to this interface, such as its IP + address(es), subnet masks, and so forth. It is necessary that the stem of + the filename be ifconfig. If the procedure in the previous section was not used, Udev will assign network card interface names based on system physical characteristics such as enp2s1. If you are not sure what your interface - name is, you can always run ip link after you have - booted your system. Again, it is important that ifconfig.xyz is named - after correct network card interface name (e.g. ifconfig.enp2s1 or - ifconfig.eth0) or your network interface will not be initialized during - the boot process. + name is, you can always run ip link or ls + /sys/class/net after you have booted your system. + The following command creates a sample file for the eth0 device with a static IP address: @@ -98,64 +96,6 @@ EOF For more information see the ifup man page. - Creating the /etc/resolv.conf File @@ -163,11 +103,10 @@ EOF /etc/resolv.conf - If the system is going to be connected to the Internet, it will - need some means of Domain Name Service (DNS) name resolution to - resolve Internet domain names to IP addresses, and vice versa. This is - best achieved by placing the IP address of the DNS server, available - from the ISP or network administrator, into + The system will need some means of obtaining Domain Name Service + (DNS) name resolution to resolve Internet domain names to IP addresses, and + vice versa. This is best achieved by placing the IP address of the DNS + server, available from the ISP or network administrator, into /etc/resolv.conf. Create the file by running the following: @@ -192,7 +131,9 @@ EOF second nameserver line from the file. The IP address may also be a router on the local network. - The Google Public IPv4 DNS addresses are 8.8.8.8 and 8.8.4.4. + + The Google Public IPv4 DNS addresses are 8.8.8.8 and 8.8.4.4. + @@ -264,7 +205,7 @@ EOF Create the /etc/hosts file by running: cat > /etc/hosts << "EOF" -# Begin /etc/hosts (network card version) +# Begin /etc/hosts 127.0.0.1 localhost 127.0.1.1 <FQDN> <HOSTNAME> @@ -273,7 +214,7 @@ EOF ff02::1 ip6-allnodes ff02::2 ip6-allrouters -# End /etc/hosts (network card version) +# End /etc/hosts EOF The <192.168.1.1>, @@ -282,7 +223,9 @@ EOF changed for specific uses or requirements (if assigned an IP address by a network/system administrator and the machine will be connected to an existing network). The optional alias name(s) can be omitted. - + + -- cgit v1.2.3-54-g00ecf