Digital Elephant

Network Configuration

There are a couple of configuration programs that try to help you out with the process of configuring network connections, but I have found that it helps to know what they are actually doing for you. Therefore, this section describes the lower-level steps that need to occur, rather than trying to provide a cookbook for the automated config programs. A glossary of terms is provided for newcomers; otherwise, these pages assume a fair knowledge of how networks operate.

Three things need to get set up for networking: 1. the driver to match the actual hardware interface; 2. the low-level interface configuration options; 3. network routing.

1. Under normal circumstances, the driver is selected when you build the system the first time, or when kudzu notices that a new piece of hardware has appeared. You can check to see which driver was loaded by examining the syslog message file after bootup. There should be a message from the kernel (near the end of its listings about all the hardware it has found) identifying the ethernet driver that is being used. If there is a problem, you may need to actually find the name of the driver, and install the driver module. The name goes into /etc/modules.conf as an alias, and the actual code file goes in /lib/modules/{kernel_version}/net/.

2. In order to bring up a network interface (say, eth0), the standard script /etc/rc.d/init.d/network needs to find a file /etc/sysconfig/network-scripts/ifcfg-eth0 which declares the variables needed to configure the interface. If you use static addressing, the configuration file should contain something like this:

varvalueexample
DEVICE interface name DEVICE=eth1
IPADDR dotted-decimal addr IPADDR=192.168.1.1
NETMASK corresponding netmask NETMASK=255.255.255.0
NETWORK network-number NETWORK=192.168.1.0
BROADCAST address to use for bcast BROADCAST=192.168.1.255
ONBOOT yes or no ONBOOT=yes
NAME longer i/f name NAME=ether1

In the case that you use dynamically-assigned addresses, supplied by the dhcpd daemon, the list is somewhat different:

varvalueexample
DEVICE interface name DEVICE=eth1
BOOTPROTO protocol name for IP BOOTPROTO=dhcp
ONBOOT yes or no ONBOOT=yes
NAME longer i/f name NAME=ether1

Specifying the boot protocol here will cause the script to figure out what IP address, netmask, network number and broadcast address to use by querying the dhcpd daemon. If that process fails, then more work is needed to debug the dhcpd configuration.

In addition, networking must be activated by putting a link to it in the correct runlevel directories. Several tools can make this process easier; my favorite is chkconfig.

Next: 3. Network Routing

Last updated January 29, 2007 Webmaster