Monday 11 May 2009

Troubleshooting a NIC

All the computers in a data center are connected together to form a network . A NIC (Network Interface Card) provides a connection point for a computer. Plug in a network cable, adjust some NIC configuration and some routing configuration and the computer is ready to talk.

When a network goes bad, you need a set of commands to find fast the problem.

First off, obviously is to connect to the server with the problem. If you can't use ssh (or even telnet) to connect through to the management interface, then try logging in to the terminal server. From there you can begin troubleshooting;

run a prtdiag and see if there any hardware issues on the interfaces

check the /var/adm/messages file - for example, if a link keeps going down then up - where does the issue lie? With a cable, a switch port? A NIC?

ndd - for example
ndd /dev/bge1 adv_100fdx_cap link_status link_speed
where
# ndd /dev/interfacename \? --- displays all command options for ndd
# ndd /dev/interfacename link_status --- 0 is down,1 is up.
# ndd /dev/interfacename link_speed --- 0 means 10mbps, 1 means 100mbps
# ndd /dev/hme interfacename --- 0 means half duplex, 1 means full duplex

run a snoop
snoop -d interfacename
this gets all the oputput in promiscuous mode - if transfers are good you get SUCCESS, which would be encouraging...

ifconfig -a
this shows the status of the interface - needs to be UP, RUNNING, BROADCAST, MULTICAST - to determine it is working okay

Look at the traffic that is being seen by that interface. There may be plenty of traffic that is being ignored because it is meant for other hosts. This could mean the cable has been attachd to the wrong virtual network ie. the cable has been plugged into the wrong socket on the firewall.
root@ersds12:>snoop -v -d bge0
Using device /dev/bge (promiscuous mode)
ETHER: ----- Ether Header -----
ETHER:
ETHER: Packet 1 arrived at 11:39:1.67
...
IP: ----- IP Header -----
IP:
IP: Version = 4
...
IP: Source address = 192.168.18.2, 192.168.18.2
IP: Destination address = 224.0.0.18, 224.0.0.18
IP: No options
...



an excellent link for this sort of stuff;
http://www.planetlarg.net/closed-source/net-solaris-health.htm

No comments: