Network Troubleshooting
Network diagnostics and troubleshooting for enterprise environments
Table of Contents
Systematic approach to diagnosing and resolving network connectivity issues in MSP environments.
The OSI Model Troubleshooting Approach
Always troubleshoot from Layer 1 (Physical) upward:
- Physical Layer: Cables, ports, lights
- Data Link Layer: MAC addresses, switches, VLANs
- Network Layer: IP addresses, routing, gateways
- Transport Layer: TCP/UDP ports, firewalls
- Application Layer: Services, protocols, authentication
Layer 1: Physical Connectivity
Check Physical Connection
Visual Inspection
- Check cable connections (seated properly?)
- Check link lights on NIC and switch
- Look for damaged cables or bent pins
Test Commands
1# Windows: Check adapter status
2Get-NetAdapter | Select-Object Name, Status, LinkSpeed
3
4# Check cable diagnostics (if supported)
5Get-NetAdapterAdvancedProperty -Name "Ethernet" | Where-Object {$_.DisplayName -like "*Cable*"}1# Linux: Check link status
2ip link show
3ethtool eth0
4
5# Check interface statistics for errors
6ip -s link show eth0Common Physical Issues
- No Link Lights: Bad cable, bad port, disabled interface
- Amber/Orange Lights: Speed/duplex mismatch, errors
- Green Lights: Good connection
- Flashing Lights: Active traffic (normal)
Layer 2: Data Link Issues
VLAN Configuration
Check VLAN Assignment
1# Cisco switch: Show VLAN info
2show vlan brief
3show interfaces trunk
4
5# Show MAC address table
6show mac address-tableWindows VLAN Tagging
1# Check VLAN ID
2Get-NetAdapterAdvancedProperty -Name "Ethernet" -DisplayName "VLAN ID"
3
4# Set VLAN ID
5Set-NetAdapterAdvancedProperty -Name "Ethernet" -DisplayName "VLAN ID" -DisplayValue "10"MAC Address Issues
Find MAC Address
1# Windows
2Get-NetAdapter | Select-Object Name, MacAddress
3ipconfig /all
4
5# Linux
6ip link show
7ifconfig -aCheck ARP Cache
1# Windows
2arp -a
3
4# Clear ARP cache
5arp -d *1# Linux
2ip neigh show
3
4# Clear ARP cache
5ip neigh flush allSwitch Port Issues
Check Switch Port Status (Cisco)
1show interface status
2show interface Gi0/1
3show interface Gi0/1 switchport
4
5# Check for errors
6show interfaces counters errorsCommon Switch Port Problems
- err-disabled: Port shut down due to error (port security, spanning tree)
- notconnect: Physical layer down
- disabled: Administratively down
Re-enable err-disabled Port
1# Cisco
2conf t
3interface GigabitEthernet0/1
4shutdown
5no shutdown
6exitLayer 3: IP Connectivity
Check IP Configuration
Windows
1ipconfig /allLinux
1ip addr show
2ip route showTest Connectivity
Ping Tests
1# Test loopback (confirms TCP/IP stack working)
2ping 127.0.0.1
3
4# Test local IP (confirms NIC working)
5ping YOUR_IP_ADDRESS
6
7# Test default gateway (confirms local network)
8ping GATEWAY_IP
9
10# Test external DNS (confirms internet connectivity)
11ping 8.8.8.8
12
13# Test external hostname (confirms DNS working)
14ping google.comTraceroute
1# Windows
2tracert google.com
3
4# Linux/Mac
5traceroute google.comStatic Route Issues
View Routing Table
1# Windows
2route print
3
4# Linux
5ip route show
6netstat -rnAdd Static Route
1# Windows (persistent)
2route -p ADD 10.0.0.0 MASK 255.255.255.0 192.168.1.1
3
4# Linux (persistent, add to /etc/network/interfaces or NetworkManager)
5ip route add 10.0.0.0/24 via 192.168.1.1MTU Issues
Test MTU Size
1# Windows (1472 + 28 header = 1500 MTU)
2ping -f -l 1472 google.com
3
4# Linux
5ping -M do -s 1472 google.comSet MTU
1# Windows
2Set-NetIPInterface -InterfaceAlias "Ethernet" -NlMtuBytes 1500
3
4# Linux
5ip link set dev eth0 mtu 1500Layer 4: Port and Firewall Issues
Check Listening Ports
Windows
1# Show all listening ports
2netstat -ano
3
4# Show specific port
5netstat -ano | findstr :443
6
7# PowerShell alternative
8Get-NetTCPConnection -State ListenLinux
1# Show all listening ports
2ss -tulpn
3netstat -tulpn
4
5# Check specific port
6ss -tulpn | grep :443Test Port Connectivity
Telnet Test
1# Test if port is open
2telnet webserver.com 443PowerShell Test
1# Test TCP connection
2Test-NetConnection -ComputerName webserver.com -Port 443
3
4# More detailed test
5Test-NetConnection -ComputerName webserver.com -Port 443 -InformationLevel DetailedNmap Port Scan (from external system)
1# Scan specific ports
2nmap -p 80,443 webserver.com
3
4# Scan common ports
5nmap -F webserver.com
6
7# Full port scan
8nmap -p- webserver.comWindows Firewall
Check Firewall Status
1Get-NetFirewallProfile | Select-Object Name, Enabled
2
3# Show firewall rules
4Get-NetFirewallRule | Where-Object {$_.Enabled -eq 'True'}
5
6# Check specific port rule
7Get-NetFirewallRule | Where-Object {$_.DisplayName -like "*Port 443*"}Add Firewall Rule
1# Allow inbound port
2New-NetFirewallRule -DisplayName "Allow Port 443" -Direction Inbound -LocalPort 443 -Protocol TCP -Action Allow
3
4# Block outbound connection
5New-NetFirewallRule -DisplayName "Block Telnet" -Direction Outbound -LocalPort 23 -Protocol TCP -Action BlockDisable Firewall (Temporarily for testing)
1Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled FalseDNS Troubleshooting
Check DNS Configuration
Windows
1Get-DnsClientServerAddress
2
3# Test DNS resolution
4Resolve-DnsName google.com
5nslookup google.com
6
7# Flush DNS cache
8Clear-DnsClientCache
9ipconfig /flushdns
10
11# View DNS cache
12Get-DnsClientCacheLinux
1# View DNS servers
2cat /etc/resolv.conf
3
4# Test DNS
5nslookup google.com
6dig google.com
7host google.comAdvanced DNS Testing
Query Specific DNS Server
1nslookup google.com 8.8.8.8Query Specific Record Types
1# A record (IPv4)
2nslookup -type=A google.com
3
4# AAAA record (IPv6)
5nslookup -type=AAAA google.com
6
7# MX record (mail)
8nslookup -type=MX google.com
9
10# NS record (nameservers)
11nslookup -type=NS google.comUsing dig (more detailed)
1# Simple query
2dig google.com
3
4# Query specific server
5dig @8.8.8.8 google.com
6
7# Trace DNS resolution path
8dig +trace google.com
9
10# Reverse DNS lookup
11dig -x 8.8.8.8DHCP Issues
Windows DHCP Client
Release and Renew
1ipconfig /release
2ipconfig /renew
3
4# Show DHCP lease info
5ipconfig /allCheck DHCP Server
1Get-NetIPConfiguration | Select-Object InterfaceAlias, DHCPServerLinux DHCP Client
Release and Renew
1# dhclient
2dhclient -r eth0
3dhclient eth0
4
5# NetworkManager
6nmcli connection down "Wired connection 1"
7nmcli connection up "Wired connection 1"Wi-Fi Specific Issues
Check Wireless Signal
Windows
1netsh wlan show interfacesLinux
1iwconfig
2iw dev wlan0 linkWireless Troubleshooting
Reset Wireless Adapter
1# Windows
2Restart-NetAdapter -Name "Wi-Fi"
3
4# Reset wireless stack
5netsh winsock reset
6netsh int ip resetForget Network
1# Windows
2netsh wlan delete profile name="NetworkName"VPN Troubleshooting
Check VPN Connection
Windows
1Get-VpnConnection
2
3# Test VPN connectivity
4Test-NetConnection -ComputerName vpn.company.com -Port 443Common VPN Issues
Split Tunnel Problems
1# Check routing table for VPN routes
2route print
3
4# Add route for split tunnel
5route ADD 10.0.0.0 MASK 255.255.0.0 VPN_GATEWAY_IPIPsec/IKEv2 Issues
1# Check IPsec policies
2Get-NetIPsecMainModeSA
3Get-NetIPsecQuickModeSANetwork Performance Issues
Bandwidth Testing
iPerf Test (requires iPerf server)
1# Client test
2iperf3 -c server.company.com
3
4# With specific duration and parallel streams
5iperf3 -c server.company.com -t 30 -P 4Packet Loss Testing
Continuous Ping
1# Windows
2ping -t google.com
3
4# Linux
5ping google.comPathPing (Windows - combines ping + traceroute)
1pathping google.comCheck for Packet Drops
Windows
1Get-NetAdapterStatistics | Select-Object Name, ReceivedBytes, SentBytes, ReceivedUnicastPackets, ReceivedDiscardedPacketsLinux
1ip -s link show eth0
2ethtool -S eth0Common Network Problems & Solutions
| Issue | Cause | Solution |
|---|---|---|
| No internet, local network works | Default gateway/routing | Check gateway, routes |
| Intermittent connectivity | DHCP lease expiring | Set static IP or check DHCP |
| Slow performance | Bandwidth saturation, QoS | Check bandwidth usage, QoS policies |
| Can ping IP but not hostname | DNS failure | Check DNS servers, hosts file |
| Connection times out | Firewall blocking | Check firewall rules |
| Port unreachable | Service not listening | Check service status, binding |
Network Documentation Template
When troubleshooting, document:
Date/Time:
Issue:
User/Computer:
IP Address:
MAC Address:
VLAN:
Switch/Port:
Tests Performed:
- [ ] Physical connectivity
- [ ] IP configuration
- [ ] Gateway ping
- [ ] DNS resolution
- [ ] Specific port test
Results:
Resolution:Essential Tools
- ping: Basic connectivity testing
- traceroute/tracert: Path discovery
- nslookup/dig: DNS queries
- netstat/ss: Port and connection status
- tcpdump/Wireshark: Packet capture and analysis
- nmap: Port scanning and discovery
- iperf: Bandwidth testing
- curl: HTTP testing