Changeset f67f5cf for chapter07/network.xml
- Timestamp:
- 06/19/2004 04:54:58 PM (20 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- 8250be1
- Parents:
- 8ad7980
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/network.xml
r8ad7980 rf67f5cf 17 17 <para>If you don't have any network cards, you are most likely not going to 18 18 create any configuration files relating to network cards. If that is the 19 case, you must remove the <filename >network</filename> symlinks from all the19 case, you must remove the <filename class="symlink">network</filename> symlinks from all the 20 20 run-level directories 21 21 (<filename class="directory">/etc/rc.d/rc*.d</filename>)</para> … … 25 25 26 26 <para>Which interfaces are brought up and down by the network script depends on 27 the files in the /etc/sysconfig/network-devicesdirectory. This28 directory should contain files in the form of ifconfig.xyz, where xyzis a27 the files in the <filename class="directory">/etc/sysconfig/network-devices</filename> directory. This 28 directory should contain files in the form of <filename>ifconfig.xyz</filename>, where <quote>xyz</quote> is a 29 29 network interface name (such as eth0 or eth0:1)</para> 30 30 31 <para>If you decide to rename or move this /etc/sysconfig/network-devices32 directory, make sure you update the /etc/sysconfig/rcfile as well and33 update the network_devicesby providing it with the new path.</para>31 <para>If you decide to rename or move this <filename class="directory">/etc/sysconfig/network-devices</filename> 32 directory, make sure you update the <filename>/etc/sysconfig/rc</filename> file as well and 33 update the <quote>network_devices</quote> by providing it with the new path.</para> 34 34 35 35 <para>Now, new files are created in that directory. 36 The following command creates a sample ifconfig.eth0file:</para>36 The following command creates a sample <filename>ifconfig.eth0</filename> file:</para> 37 37 38 <screen><userinput>cat > /etc/sysconfig/network-devices/ifconfig.eth0 << "EOF" </userinput>38 <screen><userinput>cat > /etc/sysconfig/network-devices/ifconfig.eth0 << "EOF" 39 39 ONBOOT=yes 40 40 SERVICE=static … … 43 43 NETMASK=255.255.255.0 44 44 BROADCAST=192.168.1.255 45 <userinput>EOF</userinput></screen>45 EOF</userinput></screen> 46 46 47 47 <para>Of course, the values of those variables have to be changed 48 48 in every file to match the proper setup. If the ONBOOT variable is set 49 to yes, the network script will bring up the equivalent NIC (Network Interface Card)49 to <quote>yes</quote>, the network script will bring up the equivalent NIC (Network Interface Card) 50 50 during the booting of the system. 51 If set to anything but yes, the equivalent NIC will be ignored by the network script51 If set to anything but <quote>yes</quote>, the equivalent NIC will be ignored by the network script 52 52 and not brought up.</para> 53 53 54 54 <para>The SERVICE entry defines the method of obtaining the IP address. 55 55 The LFS bootscripts have a modular IP assignment format, and by creating 56 additional files in /etc/sysconfig/network-devices/services, you can allow56 additional files in <filename class="directory">/etc/sysconfig/network-devices/services</filename>, you can allow 57 57 other IP assignment methods. This would commonly be used if you need DHCP, 58 58 which is addressed in the BLFS book.</para> … … 63 63 </sect2> 64 64 65 <sect2 >65 <sect2 id="resolv.conf"> 66 66 <title>Creating the /etc/resolv.conf file</title> 67 <indexterm zone="resolv.conf"><primary sortas="e-/etc/resolv.conf">/etc/resolv.conf</primary></indexterm> 67 68 68 69 <para>If you're going to be connected to the Internet then most likely you'll … … 72 73 following:</para> 73 74 74 <screen><userinput>cat > /etc/resolv.conf << "EOF" </userinput>75 <screen><userinput>cat > /etc/resolv.conf << "EOF" 75 76 # Begin /etc/resolv.conf 76 77 77 nameserver <IP address of your nameserver>78 nameserver <replaceable>[IP address of your nameserver]</replaceable> 78 79 79 80 # End /etc/resolv.conf 80 <userinput>EOF</userinput></screen>81 EOF</userinput></screen> 81 82 82 <para>Of course, replace <IP address of your nameserver>with the IP83 <para>Of course, replace <replaceable>[IP address of your nameserver]</replaceable> with the IP 83 84 address of the DNS most appropriate for your setup. There will often be 84 85 more than one entry (requirements demand secondary servers for fallback capability). The IP address may even be a router on your local network.</para>
Note:
See TracChangeset
for help on using the changeset viewer.