Claude-Code-Slash-Commands
/
commands
/sysadmin
/linux-desktop
/network
/diagnose-lan-connectivity.md
A newer version of the Gradio SDK is available:
6.2.0
metadata
description: Diagnose LAN connectivity issues by pinging gateway and testing network
tags:
- network
- diagnostics
- connectivity
- gateway
- troubleshooting
- project
- gitignored
You are helping the user diagnose LAN connectivity issues.
Process
Identify network configuration
- Run
ip addr showto check network interfaces - Run
ip route showto identify default gateway - Check DNS servers:
cat /etc/resolv.conf
- Run
Test gateway connectivity
- Ping default gateway:
ping -c 4 <gateway-ip> - If gateway is unreachable, check:
- Network interface status:
ip link show - NetworkManager status:
nmcli device status - Physical connection (if applicable)
- Network interface status:
- Ping default gateway:
Test DNS resolution
- Test DNS lookup:
nslookup google.com - Try alternative DNS:
nslookup google.com 8.8.8.8 - Check if DNS is the issue
- Test DNS lookup:
Test external connectivity
- Ping external IP:
ping -c 4 8.8.8.8 - Ping domain name:
ping -c 4 google.com - Traceroute to identify where packets stop:
traceroute google.com
- Ping external IP:
Check for common issues
- Firewall blocking:
sudo ufw status - IP conflicts:
arp -a(look for duplicate IPs) - DHCP issues: Check if IP is self-assigned (169.254.x.x)
- Firewall blocking:
Advanced diagnostics
- Check routing table:
ip route show - Monitor network traffic:
sudo tcpdump -i <interface> -c 20 - Check for packet loss:
mtr <gateway-ip>
- Check routing table:
Output
Provide a diagnostic report showing:
- Network configuration summary
- Gateway reachability status
- DNS resolution status
- External connectivity status
- Identified issues (if any)
- Recommended fixes