Commands and tools for Network debugging and troubleshooting

A list of  widely used commands for debugging and troubleshooting networks with very brief description.

ifconfig   —for all interfaces
ethtool -S eth0  —–Link Status
netstat -i  —– Link Status
ifconfig -a  —- see MAC address
ping        ——Test Network Connectivity
telnet 22   ——to Test Network Connectivity
curl -I   ——acts like a text based Web browser in which you can select to see either the header or complete body of a Web page’s HTML code
wget -N   ——download a Web site’s Web pages
netstat -an   —— lists all the TCP ports on which your Linux server is listening including all the active network connections to and from your server
iptables -L -n
            # iptables -L -n
            # tail -f /var/log/messages
            # /etc/init.d/iptables stop   ——– Check firewall log
traceroute -I   —— hop times
tcpdump —- capture packets
nslookup —–  hostname lookup 
host ——-host Command to Test DNS
nmap   ———– to determine all the TCP/IP ports on which a remote server is listening
netcat /nc -l 7777 ————-to Test Network Bandwidth
whois   ———-Determining the Source of an Attack
last -100 ——-Who Has Used My System?
who ———–to see who is currently logged in
        # route
        # route add default gw eth0  ————Add default route.
cat/etc/resolv.conf  ——make sure you have correct DNS name servers setup if hostname not pinging and ip is pinging
This entry was posted in Computer Networking. Bookmark the permalink.