Network Interface Configuration in Linux
Checking the configuration of a network server can mean reading configuration file as well as actively running test. Red Hat systems store the basic network interface configuration in files in /etc/sysconfig. To check the configuration of Ethernet interface eth0 as an example for Red Hat system, you could list the /etc/sysconf/network file and the /etc/sysconfig/network-scripts/ifcfg-eth0 file as well. $ cat /etc/sysconfig/network NETWORKING=yes FORWARD_IPV4=false HOSTNAME=vins.vinsky2002.org DOMAINNAME=vinsky2002.org GATEWAY=172.16.12.254 GATEWAYDEV=eth0 $ cat /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO= IPADDR=172.16.12.3 NETMASK=255.255.255.0 NETWORK=172.16.12.0 BROADCAST=172.16.12.255 USERCTL=no TYPE=Ethernet The arguments in these files are not the same on every Red Hat system. Many systems use DHCP, which is indicated in the ifcfg-eth0 file when BOOTPROTO=dhcp is set. If BOOTPROTO is set to dhcp, the DHCP server should provide the correct configuration. IF it doesn't, the server configuration needs to be checked, and the network path from the client to the server needs to be checked. IF a DHCP server is not used, the basic configuration values of hostname, IP address, network mask, network address, broadcast address and default gateway should be set in the files above. |

