Practical Troubleshooting
Real-World Network Troubleshooting Scenarios
Scenario-Based Problem Solving
graph TD
A[Network Problem Detected] --> B{Identify Problem Type}
B --> |Connectivity| C[Connectivity Troubleshooting]
B --> |Configuration| D[Network Configuration Fix]
B --> |Performance| E[Network Performance Optimization]
Common VM Network Issues and Solutions
1. No Network Connectivity
Diagnostic Steps
## Check network interface status
sudo ip link show
## Verify network manager
systemctl status NetworkManager
## Restart network services
sudo systemctl restart NetworkManager
2. IP Address Configuration Problems
Issue |
Solution |
Command |
No IP Address |
Renew DHCP |
sudo dhclient -r && sudo dhclient |
Static IP Conflict |
Reconfigure IP |
sudo netplan apply |
3. DNS Resolution Failures
## Check DNS configuration
cat /etc/resolv.conf
## Test DNS resolution
nslookup google.com
## Flush DNS cache
sudo systemd-resolve --flush-caches
Network Configuration Repair Techniques
Netplan Configuration Repair
## Edit network configuration
sudo nano /etc/netplan/01-netcfg.yaml
## Example Netplan Configuration
network:
version: 2
renderer: networkd
ethernets:
enp0s3:
dhcp4: true
Firewall and Security Configuration
## Check UFW status
sudo ufw status
## Allow specific network ports
sudo ufw allow 22/tcp
sudo ufw enable
Advanced Troubleshooting Techniques
Network Namespace Debugging
## Create isolated network namespace
sudo ip netns add debugns
## Execute diagnostic commands in namespace
sudo ip netns exec debugns ping 8.8.8.8
## Test network bandwidth
iperf3 -c server_address
## Check network latency
ping -c 5 google.com
LabEx Recommended Troubleshooting Workflow
- Systematic problem identification
- Comprehensive diagnostic analysis
- Targeted intervention
- Verification and documentation
Tool |
Purpose |
Key Features |
tcpdump |
Packet capture |
Low-level network analysis |
wireshark |
Protocol analysis |
Detailed network inspection |
netstat |
Connection tracking |
Network socket information |
Best Practices
- Maintain systematic approach
- Document all troubleshooting steps
- Use minimal invasive solutions
- Understand network layer interactions
- Continuously update diagnostic skills
Preventive Measures
- Regular network configuration audits
- Implement robust monitoring
- Keep network drivers updated
- Use version-controlled network configurations
- Develop comprehensive troubleshooting documentation