This guide provides a systematic, version-aware approach to diagnosing and fixing network problems across RHEL 7 through RHEL 10.
1. Identify the Network Problem
Start by identifying what exactly is failing.
Symptom Possible Cause
No network connectivity → Interface down, cable, driver
Cannot reach gateway → Routing issue
DNS not resolving → DNS configuration
Network slow → Duplex / MTU / congestion
Interface missing → Driver or udev issue
Network fails after reboot → NetworkManager config
Services unreachable → Firewall or SELinux
2. Check Network Interface Status
List Interfaces
# ip link show
Check Interface IP
# ip addr show
Bring Interface Up
# ip link set eth0 up
3. Verify Network Services (RHEL Differences)
RHEL Version Network Service
RHEL 7 → NetworkManager / network
RHEL 8+ → NetworkManager only
Check NetworkManager
# systemctl status NetworkManager
Restart if needed:
# systemctl restart NetworkManager
4. Test Basic Connectivity
Test Loopback
# ping 127.0.0.1
Test Gateway
# ping <gateway-ip>
Test External IP
# ping 8.8.8.8
If IP works but hostname fails → DNS issue.
5. Check Routing Table
# ip route show
Ensure a default route exists:
default via <gateway> dev eth0
Add route (temporary):
# ip route add default via <gateway>
6. DNS Troubleshooting
Check DNS Configuration
# cat /etc/resolv.conf
Test DNS Resolution
# nslookup google.com
# dig google.com
NetworkManager DNS
# nmcli dev show | grep DNS
7. NetworkManager (nmcli) Troubleshooting
Show Connections
# nmcli connection show
Check Active Connection
# nmcli device status
Restart Connection
# nmcli connection down <conn-name>
# nmcli connection up <conn-name>
8. Fix Network Issues After Reboot
Check auto-connect:
# nmcli connection show <conn-name> | grep autoconnect
Enable:
# nmcli connection modify <conn-name> connection.autoconnect yes
9. Firewall Issues (firewalld)
Check Firewall Status
# firewall-cmd --state
List Rules
# firewall-cmd --list-all
Allow Service or Port
# firewall-cmd --add-service=ssh --permanent
# firewall-cmd --add-port=8080/tcp --permanent
# firewall-cmd --reload
10. SELinux Network-Related Issues
SELinux can block network connections.
Check SELinux Status
# getenforce
Identify Denials
# ausearch -m avc -ts recent
Enable Required Boolean
# setsebool -P httpd_can_network_connect on
11. Interface Missing or Renamed
List NICs
# lspci | grep -i ethernet
Check Drivers
# lsmod | grep <driver>
Predictable Interface Names
# ip link
Example: ens192 instead of eth0
12. MTU and Performance Issues
Check MTU
# ip link show eth0
Set MTU (Temporary)
# ip link set dev eth0 mtu 9000
Make Permanent
# nmcli connection modify <conn-name> 802-3-ethernet.mtu 9000
13. Bonding / Teaming Issues
Check Bond Status
# cat /proc/net/bonding/bond0
Restart Bond
# nmcli connection down bond0
# nmcli connection up bond0
14. Network Logs and Debugging
Kernel Messages
# dmesg | grep -i network
NetworkManager Logs
# journalctl -u NetworkManager
15. Network Storage Impact (NFS / iSCSI)
Network failures may affect storage mounts.
# showmount -e server_ip
# iscsiadm -m session
16. Best Practices to Prevent Network Issues
- Use NetworkManager consistently
- Validate firewall rules
- Document static IP settings
- Monitor network latency
- Test changes before reboot
- Keep NIC drivers updated
Network troubleshooting in RHEL 7, 8, 9, and 10 follows the same fundamentals:
- Verify interfaces and IPs
- Check routing and DNS
- Validate NetworkManager
- Review firewall and SELinux
No comments:
Post a Comment