# This document will have the list of commands that could be # used for troubleshooting linux networking purposes. $ ifconfig The ifconfig command without any arguments gives you all the active interfaces on your system. Interfaces will not appear if they are shut down, with -a will show all the info. --------- Testing Link Status from the Command Line: ========================================== Both the mii-tool and ethtool commands command will provide reports on the link status and duplex settings for supported NICs When used without any switches, the mii-tool gives a very brief report. Use it with the -v switch because it provides more information on the supported autonegotiation speeds of the NIC and this can be useful in troubleshooting speed and duplex issues. The ethtool command provides much more information than mii-tool and should be your command of choice, especially because mii-tool will be soon deprecated in Linux. In both of the following examples the NICs are operating at 100Mbps, full duplex and the link is ok. $ mii-tool -v enp5s0f0 $ ethtool enp5s0f0 ---------------------------- Viewing NIC Errors: =================== Errors are a common symptom of slow connectivity due to poor configuration or excessive bandwidth utilization. They should always be corrected whenever possible. Error rates in excess of 0.5% can result in noticeable sluggishness # Ifconfig Error Output $ ifconfig RX packets:2924 errors:0 dropped:0 overruns:0 frame:0 TX packets:2287 errors:0 dropped:0 overruns:0 carrier:0 # ethtool Error Output: The ethtool command can provide a much more detailed report when used with the -S switch. $ ethtool -S enp5s0f0 # netstat Error Output: The netstat command is very versatile and can provide a limited report when used with the -i switch. This is useful for systems where mii-tool or ethtool are not available. $ netstat -i --------------------------------- How to See MAC Addresses: ========================= General Notes: DHCP clients automatically give their NICs and IP address starting with 169.254.x.x until they can make contact with their DHCP server. When contact is made they reconfigure their IP addresses to the values provided by the DHC server. An interface with a 169.254.x.x address signifies a failure to communicate with the DHCP server. Check your cabling, routing and DHCP server configuration to rectify such a problem. References: Network troubleshooting: - http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch04_:_Simple_Network_Troubleshooting#.WAkqxrMsFQI