Commands and tools for Network debugging and troubleshooting

This post is about the list of commands and tools for network debugging and troubleshooting.

Below commands can be used to know many network issues that can be known using commands.

ifconfig   —for all interfaces
ethtool -S eth0  —–Link Status
netstat -i  —– Link Status

nc -v 80 —– Port scanning whether whether port is accessible or not (here using port 80 with local host)
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 and tagged . Bookmark the permalink.