Network Configuration Using Red Hat netcfg
by Tammy Fox
Last Modified: Wednesday, 19-May-2004 11:54:12 EDT
|
Introduction
|
   
Red Hat has two graphical programs for configuring your network, netcfg and linuxconf. I find netcfg to be very easy to use and less prone to errors than linuxconf. However, netcfg will not help you load the module for your ethernet card. You can easily load it through the command line though.
|
|
Loading the Network Card Module
|
- Determine the proper module(driver) for your ethernet card:
The list of compiled ethernet card drivers that come with your system are usually located under /lib/modules/2.2.14-5.0/net where 2.2.14-5.0 is your kernel version. The source code for these drivers are usually located at /usr/src/linux-2.2.14/drivers/net again where 2.2.14 is the kernel version you are running. Sometimes the comments at the beginning of the source code file will tell you which ethernet cards the driver is for. Some distributions will find it during installation and automatically load the driver for you. To see if this is the case, view the file /etc/modules.conf or /etc/conf.modules depending on your distribution. If you see a line that looks similar to alias eth0 ne2k-pci, then the third item on the line is the module being used for your ethernet card. In this example, ne2k-pci, the NE2000 driver is being used. To verify the module has been loaded successfully, issue the command /sbin/lsmod. This will display all modules successfully loaded in the system. Once your module is loaded, you are ready to move to the next step.
If the module is not loaded, but you know what module your network card uses, issue the following steps as root:
- Make sure the network is stopped by issuing
/etc/rc.d/init.d/network stop.
- Manually load the module by issuing
/sbin/insmod ne2k-pci replacing ne2k-pci with whatever your module is. This module must be present in the /lib/modules/2.2.14-5.0/net directory for lsmod to find it.
- Verify it loaded successfully by issuing
/sbin/lsmod.
- Activate the eth0 device by issuing
/etc/rc.d/init.d/network start
- Use
netcfg to configure your network settings.
|
|
Using netcfg
|
- As root, start the program
netcfg.
- Set the hostname, domain, and DNS nameservers as shown below:

- Click Save. Click the Interfaces Button. If eth0 is not listed, Click Add, choose Ethernet, enter your IP address and subnet mask or choose DHCP from the Interface configuration protocol for DHCP. Click Done. It should then look as follows:

If eth0 is listed, click Edit to verify the settings and make any necessary changes as shown below:

- Click Save. Click the Routing button. Enter the default gateway as shown below:

- Click Save. Click the Interfaces Button again. Highlight the eth0 line. Click Activate. The status should change from inactive to active if you are successful.
- Ping the gateway and other computers on the network to verify settings.
- Click Quit to exit
netcfg.
|
|
What's Related
|
|
|
|
|
|
|
All Rights Reserved Linux Headquarters © 2000-2007
Linux is a registered trademark of Linus Torvalds
All logos are registered trademarks of their respective owners
Last modified: Wednesday, May 19, 2004
|
|
|