Basic Network Config

The following files may be touched by configuring a computer name, IP, network, or domain.
This is for a fixed IP:
/etc/hosts
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
/etc/resolv.conf
DHCP setup:
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth0
The RedHat setup command Look in /etc to see which files were modified by setup using ls -lt to sort by time stamp.
 % ls -lt | head
You will also find that /etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0 were modified.

To bring up the network, specifying IP, netmask, and broadcast using the ifconfig command:

# ifconfig eth0 10.2.135.201 netmask 255.255.255.0 broadcast 10.1.255.255 up
Then you will need to set the default router:
# route add default gw 10.2.135.1

The netstat command

Check the kernel routing tables:

# netstat -nr
Kernel IP routing table
Destination   Gateway       Genmask        Flags  MSS Window  irtt Iface
192.168.1.0   0.0.0.0       255.255.255.0  U       40 0         0 eth0
127.0.0.0     0.0.0.0       255.0.0.0      U       40 0         0 lo
0.0.0.0       192.168.1.1   0.0.0.0        UG      40 0         0 eth0

Netstat Flags

Check interface statistics:

$ netstat -i
Kernel Interface table
Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVR   TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0   1500   0  944869      0      0      0 1399218      0      0      0 BMRU
lo    16436   0   25770      0      0      0   25770      0      0      0 LRU

Display sockets waiting for connections on your machine, also established connections.

# netstat -ta
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address     State
tcp        0      0 *:32768                 *:*                 LISTEN
tcp        0      0 *:sunrpc                *:*                 LISTEN
tcp        0      0 *:x11                   *:*                 LISTEN
tcp        0      0 ns:domain               *:*                 LISTEN
tcp        0      0 oaxaca:domain           *:*                 LISTEN
tcp        0      0 *:ssh                   *:*                 LISTEN
tcp        0      0 oaxaca:rndc             *:*                 LISTEN
tcp        0      0 oaxaca:x11-ssh-offset   *:*                 LISTEN
tcp        0      0 oaxaca:ssh              ponto:34429         ESTABLISHED

Connectivity tests:

# ping 10.2.135.201
# ping 10.2.135.1
# ping 172.20.2.15

How does your system restart the network services?
How do these services start at boot time? Which run-levels support networking?

# service network restart
or
# /etc/init.d/network restart
Is DNS Resolving hostnames?
# nslookup google.com
Non-authoritative answer:
Name:   google.com
Address: 216.239.35.100
Name:   google.com
Address: 216.239.51.100
Check your nameserver config file:
# cat /etc/resolv.conf
search miracosta.edu
nameserver 172.20.2.15
nameserver 172.20.2.10
Loading kernel modules Network Card Drivers Location modprobe is the preferred way to load a module insmod requires the full path to the module for loading modules     Options can be used with the insmod command, here we support the I/O port address depmod computes module dependencies
# depmod -a
lsmod to list loaded kernel modules
# lsmod
rmmod to remove (unload) kernel modules
# rmmod <module-name>
The /etc/modules.conf file