Before examining the routing setup, it is a good idea to check that the operating system believes that everything is in order. There are three parts to this: whether the interfaces are activated, and whether routing is correctly specified, and whether there are any firewall rules installed that could get in your way.
1. After boot-up, check the system log file to make sure that there were no complaints about the network cards or their initialization. Very early in the boot-up log, there should be some lines like this:
Feb 30 15:14:19 foo kernel: Linux NET4.0 for Linux 2.2 Feb 30 15:14:19 foo kernel: Based upon Swansea University Computer Society NET3.039 Feb 30 15:14:19 foo kernel: NET4: Unix domain sockets 1.0 for Linux NET4.0. Feb 30 15:14:19 foo kernel: NET4: Linux TCP/IP 1.0 for NET4.0 Feb 30 15:14:19 foo kernel: IP Protocols: ICMP, UDP, TCP, IGMP Feb 30 15:14:19 foo kernel: TCP: Hash tables configured (ehash 131072 bhash 65536)
These indicate that the necessary TCP/IP support code has been started.
Further down in the initialization, after the swap space is added, there should be some initialization messages about each network interface. The details vary depending on the driver that handles the network interface. These messages indicate whether the interface was recognized and initialized properly, but do not, by themselves, indicate whether networking is active.
Shortly after the runlevel changes (to 3 or 5, usually), there will be more messages, indicating that network processing is enabled. These messages look like this:
Feb 30 11:55:58 foo init: Entering runlevel: 3 Feb 30 11:56:14 foo kudzu: succeeded Feb 30 11:56:14 foo network: Bringing up interface lo succeeded Feb 30 11:56:15 foo network: Bringing up interface eth0 succeeded Feb 30 11:56:15 foo network: Bringing up interface eth1 succeeded Feb 30 11:56:15 foo network: Enabling IPv4 packet forwarding succeeded
If these log entries do not appear, it is likely that networking has not been enabled. Verify that networking should be started in runlevels 3, 4, and 5, either using chkconfig or one of the graphic tools that examine system services.
After reviewing the system log for any problems, the next thing to check is whether network routing is configured correctly. You can examine the routing table like this:
[root@foo]# netstat -rn Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface 22.214.171.124 0.0.0.0 255.255.255.0 U 0 0 0 eth1 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0 127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo 0.0.0.0 126.96.36.199 0.0.0.0 UG 0 0 0 eth1 [root@foo]#
If there are entries flagged with UH and with destination fields equal to the IP addresses of your system's interfaces, they are superfluous. Details about how to get rid of them may be found here. There should be a line marked U for each network interface, showing the correct network-number and mask for that network segment. The interface lo is the internal loopback interface; it should always have the parameters shown. Finally, there should be one default route (marked UG), pointing the way to the rest of the Internet, if you have an Internet connection. The Gateway Address for this route should be the address of the other end of your access link to your ISP; if you have a dial-up connection, this may change with every dial-in; a daemon called pump will help take care of the bookkeeping.