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 192.168.1.102 22   ——to Test Network Connectivity
curl -I www.xyz.com   ——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 www.xyz.com   ——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 144.232.20.158   —— hop times
tcpdump —- capture packets
nslookup —–  hostname lookup 
host 216.151.193.92 ——-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 yahoo.com   ———-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 192.168.1.254 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.