Linux Network troubleshooting step by step

Hi after working for 3 years in M3-consulting i have been looking for a job change. I am looking for a job
in Data Centers where i can gain knowledge and also get maximum exposure. I have got calls from IBM,TCS,Oracle and  Kanak, Hexagrid in Hyderabad  in one of the interview they asked me how can you  troubleshoot a network.

Here we go into the topic.

1- First check that your interface (Network adapter ) is enabled or not using:         ifconfig

2- To make sure there is no internal problem.
     ping to the loop back address  ping 127.0.0.1
   if there is no response  service network restart if same repeats check network settings again.

3- check cable problem from ethtool eth0 
         if everything is fine then last line will show
 
                Link detected: yes
 
    
     if link is not detected plug it or change the cable according to need and problem
 
4-check the gateway settings in 
 
/etc/network    and
 /etc/sysconfig/network-scripts/ifcfg-eth0
 
And check DNS settings in
 
 /etc/resolv.conf 
 
system-config-network 
netstat
route 
service iptables stop

( only disable the firewall for testing and dont forget to turn it on)

check boot messages if eth card is detected at boot time or not

cat /var/log/dmesg | grep -i eth0

or

dmesg | grep -i eth0

to check table of network interfaces

netstat -i


for more advanced troubleshooting

lspci | less

or
lspci | grep ethernet

to check all PCI buses and devices connected to them

These are enough to troubleshoot if still problem persist try installing drivers , check kernel related problems , check is there any need to recompile the kernel etc


No comments: