%general-entities; ]> Configuring the network script network configuring This section only applies if you're going to configure a network card. If you don't have any network cards, you are most likely not going to create any configuration files relating to network cards. If that is the case, you must remove the network symlinks from all the run-level directories (/etc/rc.d/rc*.d) Creating network interface configuration files Which interfaces are brought up and down by the network script depends on the files in the /etc/sysconfig/network-devices directory. This directory should contain subdirectories in the form of ifconfig.xyz, where xyz is a network interface name (such as eth0) If you decide to rename or move this /etc/sysconfig/network-devices directory, make sure you update the /etc/sysconfig/rc file as well and update the network_devices by providing it with the new path. Now, new files are created in that directory. The following command creates a sample ipv4 file for the eth0 device: cd /etc/sysconfig/network-devices && mkdir ifconfig.eth0 && cat > ifconfig.eth0/ipv4 << "EOF" ONBOOT=yes SERVICE=ipv4-static IP=192.168.1.1 GATEWAY=192.168.1.2 PREFIX=24 BROADCAST=192.168.1.255 EOF Of course, the values of those variables have to be changed in every file to match the proper setup. If the ONBOOT variable is set to yes, the network script will bring up the equivalent interface during the booting of the system. If set to anything but yes, the equivalent interface will be ignored by the network script and not brought up. The SERVICE entry defines the method of obtaining the IP address. The LFS bootscripts have a modular IP assignment format, and by creating additional files in /etc/sysconfig/network-devices/services, you can allow other IP assignment methods. This would commonly be used if you need DHCP, which is addressed in the BLFS book. Of course, GATEWAY should contain the IP of your default gateway, if you have one. If not, then don't include the GATEWAY line in the configuration file. Creating the /etc/resolv.conf file /etc/resolv.conf If you're going to be connected to the Internet then most likely you'll need some means of DNS name resolution to resolve Internet domain names to IP addresses. This is best achieved by placing the IP address of your assigned DNS resolver, available from your ISP (Internet Service Provider) or network administrator, into /etc/resolv.conf. Create the file by running the following: cat > /etc/resolv.conf << "EOF" # Begin /etc/resolv.conf domain {[Your Domain Name]} nameserver [IP address of your nameserver] # End /etc/resolv.conf EOF Of course, replace [IP address of your nameserver] with the IP address of the DNS resolver assigned for your use. There will often be more than one entry (requirements demand secondary servers for fallback capability). The IP address may even be a router on your local network.