Unix Linux Network Configuration and Troubleshooting
Configure your Linux Network example. Change IP address, netmask and
default route (your gateway) to your own settings. If the ip addresses
are dynamically distributed with the DHCP protocol, you should only need
to run.
# dhclient eth0 (or the name of your nic)
If static, read here.
$ su -
Change to root account
The # is the symbol for root user
# ifconfig eth0 192.168.0.1 netmask 255.255.255.0 (ip address and netmask)
# route add default gw 192.168.0.3 (default router setting)
# ping 192.168.0.3 (check if you can connect to your router)
If everything works ok, you should get echo replies.
[salt@mimir ~]$ ping 192.168.0.3
PING 192.168.0.3 (192.168.0.3) 56(84) bytes of data.
64 bytes from 192.168.0.3: icmp_seq=0 ttl=255 time=3.26 ms
Troubleshooting a Linux Network LAN
# ifconfig eth0 down (take down network interface eth0)
# ifconfig eth0 up (take up network interface eth0)
# ping localhost
# dmesg | grep eth0 (check if eth0 was starting ok at boot up)
# tail -f /var/log/messages (tail messages while troubleshooting)
# check your cables (Don't laugh, this is more common than you
think)
In a production network, check with the administrator if there is any Access List on MAC
addresses in the switch.
Check if you need to have an entry in the networks DHCP servers configuration.
If wireless, check your WEP, WPA, WPA2, ESSID values.
# iwcondfig wlan0 essid (value)