Skip to Content

Quick Diagnosis

# Check network interface status ip link show # Check IP addresses ip addr show # Test network connectivity ping -c 4 8.8.8.8 # Test DNS resolution ping -c 4 www.google.com # Check NetworkManager status nmcli general status

Wired Network

Network card not recognized

# Check Ethernet devices lspci | grep -i ethernet ip link show | grep -E "^[0-9]" # If the network card is not shown, check the driver sudo dmesg | grep -i eth sudo dmesg | grep -i r8169 # Common Realtek driver

No IP address obtained

# Have NetworkManager re-request an address (dhclient is no longer shipped) sudo nmcli device reapply enp0s3 # On systemd-networkd systems use instead: sudo networkctl renew enp0s3 # Or reconnect the interface sudo nmcli device connect enp0s3 # Manually configure a static IP sudo nmcli con mod "Wired connection 1" \ ipv4.addresses 192.168.1.100/24 \ ipv4.gateway 192.168.1.1 \ ipv4.dns "8.8.8.8,1.1.1.1" \ ipv4.method manual sudo nmcli con up "Wired connection 1"

Wireless Network

Wi-Fi adapter not detected

# Check wireless devices (iwconfig is deprecated; use iw) iw dev nmcli device wifi list # Check if disabled by RF switch rfkill list all sudo rfkill unblock wifi

Cannot connect to Wi-Fi

# Scan for available networks nmcli device wifi rescan nmcli device wifi list # Connect to Wi-Fi nmcli device wifi connect "SSID_NAME" password "PASSWORD" # View saved connections nmcli connection show # Delete a problematic connection and re-add nmcli connection delete "CONNECTION_NAME"

Frequent disconnections

# Check if power management turned off Wi-Fi iw dev wlan0 get power_save # Disable Wi-Fi power management sudo iw dev wlan0 set power_save off # Make it permanent echo 'options iwlwifi power_save=0' | sudo tee /etc/modprobe.d/iwlwifi-powersave.conf

DNS Issues

Symptom: Can ping IPs but cannot resolve domain names

# Test DNS nslookup www.google.com dig www.google.com # Check current DNS configuration resolvectl status # Check systemd-resolved status systemctl status systemd-resolved

Change DNS Servers

# Temporary change (lost after reboot) sudo resolvectl dns enp0s3 8.8.8.8 1.1.1.1 # Permanent change through NetworkManager sudo nmcli con mod "CONNECTION_NAME" ipv4.dns "8.8.8.8 1.1.1.1" sudo nmcli con mod "CONNECTION_NAME" ipv4.ignore-auto-dns yes sudo nmcli con up "CONNECTION_NAME"
ProviderPrimary DNSSecondary DNS
Google8.8.8.88.8.4.4
Cloudflare1.1.1.11.0.0.1
Quad99.9.9.9149.112.112.112
OpenDNS208.67.222.222208.67.220.220

Firewall Issues

# Check UFW status sudo ufw status verbose # Temporarily disable firewall for testing sudo ufw disable # Allow specific ports sudo ufw allow 80/tcp sudo ufw allow 443/tcp

Proxy Settings

System Proxy

# Set environment variables export http_proxy="http://127.0.0.1:7890" export https_proxy="http://127.0.0.1:7890" export no_proxy="localhost,127.0.0.1" # Write to ~/.bashrc for permanence

APT Proxy

sudo nano /etc/apt/apt.conf.d/proxy.conf
Acquire::http::Proxy "http://127.0.0.1:7890"; Acquire::https::Proxy "http://127.0.0.1:7890";

Reset Network Configuration

# Restart NetworkManager sudo systemctl restart NetworkManager # Completely reset network configuration sudo rm /etc/NetworkManager/system-connections/* sudo systemctl restart NetworkManager
Last updated on