route2open

Network Troubleshooting Commands

This cheat sheet serves as a quick reference for IT professionals and network administrators, enabling efficient and effective network troubleshooting and management.

Network Troubleshooting Commands

This cheat sheet provides a comprehensive collection of essential commands for diagnosing and resolving network issues across different operating systems. It covers a range of tools and techniques used for checking connectivity, analyzing network traffic, managing network interfaces, and inspecting ports and services. Whether you're troubleshooting connectivity problems, verifying network configurations, or performing advanced diagnostics, these commands will help streamline the troubleshooting process and enhance your network management capabilities.

Subnetting CIDR Essentials Cheat Sheet

General Commands

  • ping [hostname/IP] Tests connectivity to a specific hostname or IP.
  • traceroute [hostname/IP] Displays the route packets take to a network host.
  • nslookup [hostname] Queries DNS to obtain domain name or mapping IP.
  • whois [domain] Retrieves domain registration information.
  • dig [domain] Performs a DNS query for a domain and returns detailed information.

Network Interface Commands

  • ifconfig Displays network interface configuration.
  • ip a Shows all IP addresses assigned to interfaces.
  • ip link show Displays the status of network interfaces.
  • ip route show Displays the routing table.
  • ifup [interface] / ifdown [interface] Activates or deactivates a network interface.
  • ifstatus [interface] Displays the status of a network interface.

Connection and Port Commands

  • netstat Displays network connections, routing tables.
  • ss Displays socket statistics.
  • telnet [hostname] [port] Tests connectivity to a specific port on a server.
  • nc -zv [hostname] [port] Checks if a specific port is open on a server.
  • nmap [options] [hostname/IP] Network exploration and security auditing.
  • lsof -i Lists open files and network connections.

Wireless Networking Commands

  • ifconfig Displays wireless network interface configuration.
  • iwlist [interface] scan Scans for available wireless networks.
  • nmcli Command-line tool for managing NetworkManager.
  • rfkill list Lists all available radio devices (WiFi, Bluetooth).

Advanced Diagnostics

  • tcpdump Captures and analyzes network packets.
  • wireshark GUI tool for analyzing network packets.
  • mtr [hostname/IP] Combines ping and traceroute functionality.
  • ethtool [interface] Displays or changes Ethernet device settings.

Additional Useful Commands

  • arp -a Displays the ARP table.
  • route Displays/manipulates the IP routing table.
  • hostname Displays the system’s hostname.
  • curl [URL] Transfers data from or to a server.
  • wget [URL] Retrieves content from web servers.
  • scp [source] [destination] Copies files over SSH.
  • systemctl status [service] Checks the status of a specific service.
  • service [service] status Checks the status of a specific service (alternative)

Network Security Commands

  • fail2ban-client status Checks the status of the fail2ban service.
  • ufw status Displays the status of the Uncomplicated Firewall.
  • iptables -L Lists current firewall rules.
  • nmap -sV [hostname/IP] Scans for open ports and identifies services.
  • nmap -O [hostname/IP] Detects the operating system of the target host.

Performance Monitoring

  • top Displays real-time system processes and resource.
  • htop Interactive process viewer with more features.
  • vmstat Reports virtual memory statistics.
  • iostat Reports CPU and I/O statistics.
  • netstat -s Displays network statistics, including errors and protocol statistics.

What is Troubleshooting in Networking?

Troubleshooting in Networking is the process of identifying, diagnosing, and resolving problems within a network. This involves systematically analyzing and addressing issues related to connectivity, performance, and configuration to restore normal network operations.

Network Troubleshooting Tips

  • Identify the Issue: Gather details and symptoms from affected users.
  • Check Connections: Ensure cables and hardware are secure and powered.
  • Test Connectivity: Use ping and traceroute to check reachability and routes.
  • Verify IP Settings: Confirm IP address, subnet mask, gateway, and DNS are correct.
  • Analyze Traffic: Use tcpdump or Wireshark to check for anomalies.
  • Check Interfaces: Use ifconfig or ipconfig to review interface status.
  • Test Ports: Use telnet or nc to check port access and firewall settings.
  • Review Routing: Check the routing table with netstat -r or route print.
  • Restart Devices: Reboot routers, switches, and affected systems.
  • Check Logs: Look at system and network device logs for errors.
  • Update Software: Ensure firmware and drivers are up to date.
  • Seek Help: Consult documentation or contact support if needed.

GNS3 Knowledge Base

Discover a wealth of information and expert tips in our GNS3 Knowledge Base, your go-to resource for mastering network simulations. Whether you need detailed tutorials, expert tips, or troubleshooting advice, our Knowledge Base has everything to enhance your skills and solve any challenges. Dive in now to enhance your skills and troubleshoot any challenges with ease!

Explore more

Share the Knowledge: Spread the Word About Our Network Troubleshooting Cheat Sheet!

If you find this page helpful for your networking knowledge and skills, please consider sharing it with your friends, colleagues, and social media followers. Your support helps us create more valuable resources and enhance our courses.

You can share this page on your social media accounts like Facebook, LinkedIn, Twitter, and any related networking and programming forums or blogs. By sharing, you assist other networking enthusiasts in their learning journey, making their work easier and more efficient. So, if you'd like to help others, kindly share this page.

For more in-depth networking knowledge, visit our route2open courses.

Linux Cheat Sheet!

Simply provide us with your name and email address, and we’ll send you our cheat sheet straight to your inbox

Network Troubleshooting Cheat Sheet!

Simply provide us with your name and email address, and we’ll send you our cheat sheet straight to your inbox