Top 10 Network Troubleshooting Commands.pdf

243 views 13 slides Dec 20, 2024
Slide 1
Slide 1 of 13
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13

About This Presentation

Identify key network troubleshooting commands
Learn common command arguments
Execute commands in a command-Line Interface
Practical application of troubleshooting commands
Troubleshooting using command argument


Slide Content

TechPrane
technology for good
Top 10 Network Troubleshooting Commands
Mulenga Yumba
Joe Nyirenda

Learning Objectives
●Identify key network troubleshooting commands
●Learn common command arguments
●Execute commands in a command-Line Interface
●Practical application of troubleshooting commands
●Troubleshooting using command argument

Command #1: Ping - Test basic connectivity
Purpose: To check if the host is reachable and measures response time

Command (Windows) Command (Linux)Example (Linux) Description
-t -c ping -c 5 google.com Continuous ping or specify the number of packets
-a -a ping -a 8.8.8.8 Resolve the IP address to the hostname
-l -s ping -s 1000 google.com Specify packet size

Command #2: traceroute/ tracert - Trace packet
path
Purpose: Display the packet path to reach the destination and identifies problematic hops.
Command (Windows)Command (Linux) Example(Linux) Description
tracert traceroute -n traceroute google.com Show numerical IP addresses only (skip DNS resolutions)
tracert -h traceroute -h traceroute -h 10 google Specify the maximum number of hops
tracert -w traceroute -w traceroute -w 1000 google.comSet a timeout for each response

Command #3: ipconfig/ifconfig -network
configurations
Purpose: View IP address, subnet, gateway, and DNS details.
Command (Windows)Command (Linux) Example(Linux) Description
ipconfig /all ifconfig ifconfig Display all network details
ifconfig eth0 ifconfig eth0 Shows details for a specific interface
ifconfig down/up ifconfig eth0 down Disable or enable a network interface

Command #4: nslookup - Diagnose DNS issues
Purpose: Resolves domain names to IP addresses
Command (Windows)Command (Linux) Example(Linux) Description
nslookup nslookup nslookup google.com 8.8.8.8 Specify a DNS to query
nslookup -type=mx nslookup -type=mx nslookup -type=mx gmail.com Query specific DNS record types
nslookup -debug nslookup -debug nslookup -debug gmail.com Show detailed query information

Command #5: netstat - Active connections and ports
Purpose: View active connections, listening ports, and network stats
Command (Windows)Command (Linux) Example(Linux) Description
netstat -a netstat -a netstat -a Show all active connections and listening ports
netstat -an netstat -an netstat -an Display addresses in numerical form (skip name resolution)
netstat -b Show executable involved in each connection

Command #6: arp - ARP table for IP-MAC mapping
Purpose: ARP maps IP addresses to MAC addresses.

Command (Windows)Command (Linux) Example(Linux) Description
arp -a arp -a arp -a Display ARP table
arp -d arp -d arp -d 192.168.1.1 Delete an entry from the ARP cache
arp -s arp -s arp -s 192.168.1.10 00-1A-2B-3C-4D-5E Add a static ARP entry

Command #7: route - View and modify routing table
Purpose: Display and modify routing table.


Command (Windows)Command (Linux) Example(Linux) Description
route print route -n route -n Displays the routing table
route add route add route add 192.168.1.0 mask 255.255.255.0 Add a static route
route delete route delete route delete 192.168.1.0 Remove a specific route

Command #8: dig - Advanced DNS query tool
Purpose: detailed DNS troubleshooting

Command (Windows)Command (Linux) Example(Linux) Description
dig @ dig @8.8.8.8 google.com Query a specific DNS server
dig <domain name> +short dig google.com +short Display a short, summarized output
dig -t MX dig -t MX gmail.com Query specific record type

Command #9: tcpdump - Capture and analyze
packets
Purpose: Captures packets in real time for diagnostic

Command (Windows)Command (Linux) Example(Linux) Description
tcpdump -i <interface> tcpdump -i eth0 Specify the network interface to monitor
tcpdump -n tcpdump -n Show IP address instead of resolving hostnames
tcpdump <port number> tcpdump port 80 Filter packets by a specific port

Command #10: curl/ wget - Test HTTP/HTTPS
Purpose: Test access to web servers or APIs

Command (Windows)Command (Linux)Example(Linux) Description
curl -I curl -I curl -I https://google.com Fetch HTTP headers only (curl)
curl -o curl -o curl -o page.html
https://example.com
Save output to a file
wget —-spider wget –-spider https://google.com Check connectivity without downloading

Conclusion
Practice these commands to build confidence in troubleshooting your networks
Master these tools, and you will be solving networking issues like a pro