When you encounter IPv4 connectivity problems, it can disrupt your ability to access the internet and network resources. This comprehensive guide provides a systematic approach to diagnose and resolve IPv4 connectivity issues, covering common problems from DHCP failures to firewall misconfigurations across Windows, macOS, and Linux systems.
If you're also experiencing IPv6 connectivity issues, see our dedicated guide for IPv6 troubleshooting.
Before diving into detailed troubleshooting, use this checklist to quickly assess your IPv4 connectivity status:
When IPv4 connectivity fails, you may experience:
IPv4 connectivity issues typically stem from:
Start here every time. Before making any changes, confirm that you have an IPv4 connectivity problem and understand its scope.
Visit test-ipv6.run to run comprehensive connectivity tests. This tool tests:
What the results mean:
If the test confirms IPv4 connectivity failure, proceed to the next steps to diagnose the root cause.
Physical connectivity issues are surprisingly common and should be ruled out first.
Check cable connections:
Test the cable:
Check signal strength:
Verify wireless is enabled:
Windows:
macOS:
Linux:
ip link show
Look for "state UP" on your network interface.
A valid IPv4 address is essential for network connectivity. Check your IP configuration across different operating systems.
View your IP address:
ipconfig /all
What to look for:
Problem indicators:
View your IP address:
ifconfig en0
Or for a summary:
ipconfig getifaddr en0
Check IP configuration in GUI:
Modern method (ip command):
ip addr show
View specific interface:
ip addr show eth0
Traditional method (ifconfig):
ifconfig
Check routing table:
ip route show
Look for a default route like: default via 192.168.1.1 dev eth0
Valid Private IPv4 Ranges:
APIPA (Automatic Private IP Addressing):
If you have an APIPA address, proceed to Step 4 to fix DHCP issues.
DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses to devices. When DHCP fails, you get an APIPA address or no connectivity.
DHCP server unavailable:
DHCP configuration errors:
Force your device to request a new IP address from the DHCP server.
Windows:
ipconfig /release
ipconfig /renew
macOS:
sudo ipconfig set en0 DHCP
Or through GUI:
Linux (DHCP client dependent):
For dhclient:
sudo dhclient -r eth0
sudo dhclient eth0
For NetworkManager:
sudo nmcli connection down "Connection Name"
sudo nmcli connection up "Connection Name"
Access your router:
Verify DHCP settings:
Check DHCP client list:
If DHCP continues to fail, temporarily configure a static IP to restore connectivity while troubleshooting.
Windows:
macOS:
Linux: Edit network configuration (method varies by distribution):
For NetworkManager-based systems:
sudo nmcli connection modify "Connection Name" ipv4.method manual ipv4.addresses 192.168.1.100/24 ipv4.gateway 192.168.1.1 ipv4.dns "8.8.8.8 8.8.4.4"
sudo nmcli connection up "Connection Name"
Important: Remember to switch back to DHCP after resolving the underlying issue.
The default gateway (your router) routes traffic between your local network and the internet. Gateway problems prevent external connectivity even when local network works.
Windows:
ipconfig | findstr /i "Gateway"
macOS:
netstat -nr | grep default
Or:
route -n get default
Linux:
ip route | grep default
Or:
route -n
The default gateway is typically 192.168.1.1, 192.168.0.1, or 10.0.0.1.
Ping your default gateway:
Windows/macOS/Linux:
ping 192.168.1.1
(Replace 192.168.1.1 with your actual gateway IP)
Expected results:
If ping fails:
Check router is powered on and functioning
Verify correct gateway IP
Check firewall blocking ICMP
Network path issues
Restart network equipment
If default gateway is missing from routing table:
Windows:
route add 0.0.0.0 mask 0.0.0.0 192.168.1.1
Linux:
sudo ip route add default via 192.168.1.1 dev eth0
macOS:
sudo route add default 192.168.1.1
DNS (Domain Name System) translates domain names to IP addresses. DNS failures prevent accessing websites by name even when internet connectivity works.
Symptoms of DNS failure:
Windows:
nslookup google.com
macOS/Linux:
nslookup google.com
Or using dig:
dig google.com
Expected output:
If DNS lookup fails:
Verify internet connectivity works without DNS:
Ping a public IP address:
ping 8.8.8.8
Results interpretation:
Clear stale or corrupted DNS cache entries.
Windows:
ipconfig /flushdns
macOS:
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
Linux: Depends on DNS caching service:
For systemd-resolved:
sudo systemd-resolve --flush-caches
For nscd:
sudo /etc/init.d/nscd restart
Switch to reliable public DNS servers to bypass problematic DNS configuration.
Public DNS options:
Google Public DNS:
Cloudflare DNS:
OpenDNS:
Windows:
macOS:
Linux:
For NetworkManager:
sudo nmcli connection modify "Connection Name" ipv4.dns "8.8.8.8 8.8.4.4"
sudo nmcli connection up "Connection Name"
Or edit /etc/resolv.conf (may be overwritten):
sudo nano /etc/resolv.conf
Add:
nameserver 8.8.8.8
nameserver 8.8.4.4
After changing DNS, test again:
nslookup google.com
IP address conflicts occur when multiple devices on the network use the same IP address, causing connectivity failures for both devices.
Windows automatically detects conflicts:
Check Windows Event Viewer:
Manual detection (all platforms):
If you suspect a conflict:
Windows:
ipconfig /all
macOS/Linux:
ip addr show
ifconfig
Use arp command to check MAC addresses:
arp -a | grep 192.168.1.100
(Replace with your IP)
If multiple MAC addresses appear for the same IP, you have a conflict.
For DHCP-assigned addresses:
Windows:
ipconfig /release
ipconfig /renew
macOS:
sudo ipconfig set en0 DHCP
Linux:
sudo dhclient -r
sudo dhclient
Windows:
netsh interface set interface "Ethernet" disable
netsh interface set interface "Ethernet" enable
macOS:
sudo ifconfig en0 down
sudo ifconfig en0 up
For static IP addresses:
Change to a different unused IP address
ping <new-ip>Reserve IP in DHCP server
Best practices:
Use DHCP reservations for devices needing static IPs
Separate static IP range from DHCP pool
Document static IP assignments
Firewalls can block legitimate IPv4 traffic, causing connectivity failures. Check firewall rules across different platforms.
Check firewall status:
netsh advfirewall show allprofiles
Temporarily disable to test (for troubleshooting only):
netsh advfirewall set allprofiles state off
If disabling firewall fixes connectivity:
netsh advfirewall set allprofiles state onView blocking rules:
Create allow rule:
Check firewall status:
sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate
Temporarily disable to test:
Configure firewall rules:
Check iptables rules:
sudo iptables -L -v -n
Check for blocking rules:
sudo iptables -L INPUT -v -n
sudo iptables -L OUTPUT -v -n
Temporarily disable iptables (Ubuntu/Debian):
sudo iptables -F
Temporarily disable firewalld (RHEL/CentOS/Fedora):
sudo systemctl stop firewalld
Allow specific traffic:
Allow HTTP (port 80):
sudo iptables -A INPUT -p tcp --dport 80 -j ACCEPT
Allow HTTPS (port 443):
sudo iptables -A INPUT -p tcp --dport 443 -j ACCEPT
Save iptables rules:
Ubuntu/Debian:
sudo netfilter-persistent save
RHEL/CentOS:
sudo service iptables save
Many security suites include firewalls that may interfere with connectivity:
Common issues:
Troubleshooting steps:
If basic troubleshooting hasn't resolved the issue, resetting the network stack clears corrupted configurations and restores default settings.
Complete network reset:
netsh winsock reset
netsh int ip reset
ipconfig /release
ipconfig /renew
ipconfig /flushdns
Reset specific protocols:
netsh int ipv4 reset
netsh int tcp reset
Restart your computer after running these commands.
Alternative: Windows Settings reset (Windows 10/11):
Remove network configuration files:
sudo cp /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist ~/backup-NetworkInterfaces.plist
sudo cp /Library/Preferences/SystemConfiguration/preferences.plist ~/backup-preferences.plist
sudo rm /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist
sudo rm /Library/Preferences/SystemConfiguration/preferences.plist
Restart Mac
Reconfigure network connections in System Preferences > Network
Renew DHCP and flush DNS:
sudo dscacheutil -flushcache
sudo killall -HUP mDNSResponder
Method 1: Restart NetworkManager:
sudo systemctl restart NetworkManager
Method 2: Reset interface:
sudo ip addr flush dev eth0
sudo systemctl restart networking
Method 3: Remove and reconfigure connection:
sudo nmcli connection delete "Connection Name"
sudo nmcli connection add type ethernet ifname eth0 con-name "Connection Name"
Flush routing table:
sudo ip route flush table main
Outdated, corrupted, or incompatible network drivers frequently cause IPv4 connectivity issues.
Method 1: Device Manager (automatic):
Method 2: Manufacturer website (recommended):
wmic nic get name, manufacturer
Method 3: Windows Update:
Uninstall and reinstall driver (if problematic):
macOS drivers are included in system updates:
For third-party adapters:
Update system packages:
Ubuntu/Debian:
sudo apt update
sudo apt upgrade
Fedora:
sudo dnf update
Arch:
sudo pacman -Syu
Check for hardware-specific drivers:
Ubuntu:
sudo ubuntu-drivers autoinstall
Reload network driver module:
Identify module:
lspci -k | grep -A 3 -i network
Reload module (example for e1000e driver):
sudo modprobe -r e1000e
sudo modprobe e1000e
Use these advanced tools for deeper troubleshooting when standard methods don't resolve the issue.
Traceroute shows the path packets take to reach a destination and where failures occur.
Windows:
tracert google.com
macOS/Linux:
traceroute google.com
Interpreting results:
Example interpretation:
1 1 ms 1 ms 1 ms 192.168.1.1 # Your router (success)
2 10 ms 10 ms 10 ms 10.0.0.1 # ISP gateway (success)
3 * * * Request timed out. # Problem at this hop
Problem is beyond your network, likely ISP-side.
pathping google.com
Provides detailed statistics on packet loss at each hop, useful for identifying intermittent issues.
Windows/Linux/macOS:
netstat -an
Show listening ports:
netstat -an | grep LISTEN
Show routing table:
netstat -rn
Display ARP cache:
Windows:
arp -a
macOS/Linux:
arp -n
Clear ARP cache:
Windows:
arp -d
Linux:
sudo ip -s -s neigh flush all
Test connectivity to specific service:
Test-NetConnection google.com -Port 80
Test TCP connection:
Test-NetConnection -ComputerName google.com -Port 443 -InformationLevel Detailed
┌─────────────────────────────────┐
│ Test at test-ipv6.run │
│ Does IPv4 work? │
└─────────────┬───────────────────┘
│
No │ Yes
┌─────────┴────────┐
│ │
▼ ▼
┌────────────────┐ ┌──────────────────┐
│ Check physical │ │ Issue is likely │
│ connections │ │ application or │
└───┬────────────┘ │ site-specific │
│ └──────────────────┘
│ OK Problem
│ ┌──────────┘
│ │
▼ ▼
┌──────────────┐ ┌────────────────────┐
│ Restart │ │ Do you have valid │
│ modem/router │ │ IPv4 address? │
└──────────────┘ └───┬────────────────┘
│
│ No (APIPA) Yes
┌────┴─────┐ │
│ │ │
▼ │ ▼
┌──────────────┐ │ ┌────────────────┐
│ Troubleshoot │ │ │ Can you ping │
│ DHCP issues │ │ │ default gateway?│
└──────────────┘ │ └───┬────────────┘
│ │ │
└─────────┘ │ No Yes
┌──────┘ │
│ │
▼ ▼
┌──────────────┐ ┌─────────────┐
│ Check gateway│ │ Can you │
│ connectivity │ │ resolve DNS?│
│ and routing │ └───┬─────────┘
└──────────────┘ │
│ │ No Yes
│ ┌────┴───┐ │
│ │ │ │
▼ ▼ │ ▼
┌──────────────┐ ┌────┐ │ ┌────────────┐
│ Check for IP │ │DNS │ │ │ Check │
│ conflicts │ │fix │ │ │ firewall │
└──────────────┘ └────┘ │ │ rules │
│ │ │ └────────────┘
└──────────┘ │ │
│ │ │
└─────────┴─────────┘
│
▼
┌────────────────────┐
│ Reset network │
│ stack & update │
│ drivers │
└────────────────────┘
Cause: Device has IPv4 configured but cannot reach the internet.
Solutions:
netsh winsock reset and netsh int ip resetipconfig /release then ipconfig /renewCause: Cannot communicate even on local network.
Solutions:
Cause: Cannot obtain IP address from DHCP server.
Solutions:
Cause: Cannot communicate with router.
Solutions:
ipconfigCause: Cannot reach configured DNS servers.
Solutions:
ipconfig /flushdns (Windows) or sudo dscacheutil -flushcache (macOS)ping 8.8.8.8Cause: Another device is using the same IP address.
Solutions:
ipconfig /release then ipconfig /renewRegular maintenance:
Restart network equipment monthly
Keep firmware and drivers updated
Monitor DHCP scope utilization
Document network configuration
Recommended DNS providers:
For speed: Cloudflare DNS (1.1.1.1, 1.0.0.1) For filtering: OpenDNS (208.67.222.222, 208.67.220.220) For reliability: Google DNS (8.8.8.8, 8.8.4.4)
Configure at router level for network-wide consistency.
For advanced users:
Test connectivity regularly:
Use monitoring tools:
Some IPv4 connectivity issues require ISP intervention. Contact your ISP if:
Modem cannot obtain IP address from ISP
Frequent connection drops
Cannot reach ISP gateway
Service outage in your area
Information to provide ISP support:
ipconfig /all (Windows) or ip addr show (Linux/macOS)After troubleshooting, verify IPv4 connectivity is fully restored:
Visit test-ipv6.run
Verify IP configuration
# Windows
ipconfig /all
# macOS/Linux
ip addr show
Ensure valid IP address, gateway, and DNS servers.
ping <your-gateway-ip>
ping 8.8.8.8
nslookup google.com
Troubleshooting IPv4 connectivity requires a systematic approach, starting with verification at test-ipv6.run and working through physical connections, IP configuration, DHCP, gateway connectivity, DNS, IP conflicts, and firewall rules. Most IPv4 connectivity issues stem from DHCP failures, gateway problems, or DNS misconfigurations, which are straightforward to resolve with the proper diagnostic steps.
By following this guide step-by-step and using the platform-specific commands provided, you can diagnose and resolve the vast majority of IPv4 connectivity problems. For persistent issues that survive all troubleshooting attempts, the problem likely lies beyond your network with your ISP or upstream providers.
Remember: Always test your connectivity at test-ipv6.run after each troubleshooting step to verify whether the issue is resolved. This immediate feedback helps you identify which specific change fixed the problem and confirms your network is functioning properly.
Regular maintenance, keeping firmware and drivers updated, and using reliable DNS servers will help prevent many IPv4 connectivity issues before they occur. When problems do arise, methodical troubleshooting combined with the diagnostic tools outlined in this guide will help you quickly restore connectivity.