Error Medic

No Internet Access But Connected: Complete Fix Guide (Wi-Fi & Ethernet)

Fix 'no internet access but connected' on Wi-Fi or Ethernet. Step-by-step DNS flush, TCP/IP reset, gateway checks, and driver fixes for Windows, macOS, Linux.

Last updated:
Last verified:
2,525 words
Key Takeaways
  • Root cause 1: IP address conflict or DHCP failure — your device gets a self-assigned (169.254.x.x) or duplicate IP, blocking real internet routing.
  • Root cause 2: DNS misconfiguration or corruption — your machine resolves no hostnames even though the physical connection and gateway are fine.
  • Root cause 3: Corrupted TCP/IP or Winsock stack — Windows network stack becomes inconsistent after updates, sleep cycles, or malware, showing 'No Internet Access' despite an active link.
  • Root cause 4: Router/modem firmware bug or overloaded NAT table — the upstream device stops forwarding packets even though it still hands out DHCP leases.
  • Quick fix summary: Flush DNS (ipconfig /flushdns), reset TCP/IP stack (netsh int ip reset), renew DHCP lease (ipconfig /renew), reboot router, then verify with ping 8.8.8.8 and nslookup google.com.
Fix Approaches Compared
MethodWhen to UseTimeRisk
Flush DNS & renew DHCPDNS errors, self-assigned IP, intermittent drops2 minNone
Netsh TCP/IP & Winsock resetPersistent 'No Internet' after updates or on Windows only5 min + rebootLow — restores defaults
Manual static IP + DNSDHCP server broken or misconfigured, office networks5 minMedium — wrong values break connectivity
Router reboot / factory resetMultiple devices affected, ISP DHCP lease exhaustion10–30 minMedium — resets custom router config
Network adapter driver rollback/updateIssue started after a Windows/driver update, Ethernet only10 minLow
MTU adjustmentVPN or ISP-specific packet fragmentation issues5 minLow
ISP modem replacement or line testAll above fixes fail, problem reproducible from modem WAN port1–4 hoursNone (ISP handles)

Understanding the 'No Internet Access But Connected' Error

When Windows displays the yellow exclamation mark on your network icon with the tooltip 'No Internet Access' — or macOS shows Wi-Fi connected but Safari/Chrome cannot load any page — your device has successfully established a Layer 2 (physical/data-link) connection but is failing somewhere at Layer 3 (IP routing) or Layer 7 (DNS). The symptom is identical whether you are on Wi-Fi or a wired Ethernet connection.

Common error messages you may encounter:

  • Windows: 'No Internet Access' or 'Limited connectivity'
  • Windows: 'Unidentified network'
  • macOS: 'Wi-Fi has the self-assigned IP address 169.254.x.x and will not be able to connect to the Internet'
  • Linux: 'Network is unreachable' from ping
  • Browser: ERR_NAME_NOT_RESOLVED or ERR_INTERNET_DISCONNECTED

Phase 1 — Rapid Triage (Under 2 Minutes)

Before touching any settings, determine the scope:

1.1 — Is only one device affected? Check another phone, tablet, or computer on the same network. If every device is down, the problem is the router or ISP — skip to Phase 4. If only your laptop or desktop is affected, continue with Phase 2.

1.2 — Can you ping the gateway? Open a terminal or Command Prompt and run:

ping 192.168.1.1

If this returns replies, your device is physically connected and the router is alive. If it times out, your IP configuration is broken (Phase 2). If it replies but ping 8.8.8.8 fails, your router has no WAN connection (Phase 4). If ping 8.8.8.8 works but ping google.com fails, this is a DNS-only issue (Phase 3, Step 3.1).

1.3 — Check your IP address Run ipconfig (Windows) or ip addr (Linux) or ifconfig (macOS). Look at the IPv4 address:

  • 169.254.x.x — APIPA/self-assigned. Your device could not reach the DHCP server. Follow Phase 2.
  • 192.168.x.x / 10.x.x.x / 172.16–31.x.x — Valid private IP. Move to Phase 3 (DNS/routing).
  • Blank or 0.0.0.0 — Adapter is not negotiating. Check driver or cable.

Phase 2 — Fix IP / DHCP Issues

Step 2.1 — Release and renew DHCP lease (Windows)

ipconfig /release
ipconfig /renew

After renewal, re-run ipconfig and confirm you have a valid IP. If the lease fails with error 'No operation can be performed on Local Area Connection while it has its media disconnected', your cable is unplugged or the Wi-Fi adapter is off.

Step 2.2 — Renew on macOS System Settings → Network → Wi-Fi → Details → TCP/IP tab → click Renew DHCP Lease.

Step 2.3 — Renew on Linux (NetworkManager)

sudo dhclient -r && sudo dhclient
# or with NetworkManager:
nmcli con down "YourConnectionName" && nmcli con up "YourConnectionName"

Step 2.4 — Set a manual static IP (fallback) If DHCP keeps failing, assign a manual IP:

  • IP: 192.168.1.50 (or any unused address in your subnet)
  • Subnet mask: 255.255.255.0
  • Default gateway: 192.168.1.1 (your router IP)
  • DNS: 8.8.8.8 (Google) or 1.1.1.1 (Cloudflare)

On Windows: Control Panel → Network → adapter → Properties → IPv4 → Use the following address.


Phase 3 — Fix DNS and TCP/IP Stack

Step 3.1 — Flush and reset DNS (Windows)

ipconfig /flushdns
ipconfig /registerdns
nslookup google.com

Expected output of nslookup: Address: 142.250.x.x. If you get DNS request timed out or server can't find google.com, your DNS server is unreachable or misconfigured.

Step 3.2 — Change DNS servers Open adapter → Properties → IPv4 → set Preferred DNS to 8.8.8.8 and Alternate to 1.1.1.1. Test with nslookup google.com 8.8.8.8.

Step 3.3 — Reset Winsock and TCP/IP (Windows — requires admin)

netsh winsock reset
netsh int ip reset
netsh int ipv6 reset
netsh advfirewall reset
ipconfig /flushdns

Reboot after these commands. This is the most effective fix for corrupted network stacks after Windows Updates or antivirus interference.

Step 3.4 — Adjust MTU for VPN / ISP issues If you use a VPN or PPPoE connection, packet fragmentation can silently drop traffic:

netsh interface ipv4 set subinterface "Wi-Fi" mtu=1400 store=persistent

Test with: ping -f -l 1400 8.8.8.8. Increase MTU in steps of 10 until packets fragment, then subtract 28.

Step 3.5 — macOS DNS flush

sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder

Step 3.6 — Linux DNS flush

sudo systemd-resolve --flush-caches
sudo systemd-resolve --statistics | grep 'Current Cache Size'

Phase 4 — Router / ISP / Modem Issues

Step 4.1 — Reboot the router correctly Do NOT just press the reset button (that factory-resets). Power cycle: unplug power for 60 seconds, then plug back in. Wait 2 minutes for WAN re-negotiation before testing.

Step 4.2 — Check NAT / DHCP lease table Log into your router admin panel (usually http://192.168.1.1 or http://192.168.0.1). Navigate to DHCP clients or connected devices. If the table is full (common on cheap routers with many IoT devices), reduce lease time or reboot router.

Step 4.3 — Verify WAN IP on the router In the router's WAN status page, confirm there is a public IP (not 0.0.0.0 or a private RFC1918 address, which indicates ISP issue). If WAN IP is missing, contact your ISP — this is a line or provisioning problem.

Step 4.4 — Check for ISP outage Use a mobile hotspot to access your ISP's status page or a site like downdetector.com to confirm a regional outage.


Phase 5 — Driver and Adapter Issues (Ethernet & Laptop Wi-Fi)

Step 5.1 — Update or roll back network driver (Windows) Device Manager → Network Adapters → right-click your adapter → Update Driver or Roll Back Driver. Ethernet adapters (Intel, Realtek) often receive bad driver updates that break connectivity.

Step 5.2 — Disable/re-enable the adapter

netsh interface set interface "Wi-Fi" disabled
netsh interface set interface "Wi-Fi" enabled

Step 5.3 — Disable IPv6 if causing conflicts

Get-NetAdapterBinding -Name "Wi-Fi" | Where-Object {$_.ComponentID -eq "ms_tcpip6"}
Disable-NetAdapterBinding -Name "Wi-Fi" -ComponentID ms_tcpip6

Step 5.4 — Check for IP address conflict Run arp -a and look for duplicate MAC addresses sharing the same IP. If found, change your IP or ask your network admin to identify the conflicting device.


Phase 6 — Advanced: Windows Network Diagnostics & Firewall

Step 6.1 — Run Windows Network Troubleshooter programmatically

msdt.exe /id NetworkDiagnosticsNetworkAdapter

Step 6.2 — Temporarily disable Windows Firewall to test

netsh advfirewall set allprofiles state off
ping 8.8.8.8
netsh advfirewall set allprofiles state on

If connectivity restores with the firewall off, a firewall rule is blocking outbound traffic. Check third-party antivirus firewall modules.

Step 6.3 — Check for proxy settings injected by malware or VPN

netsh winhttp show proxy

To reset: netsh winhttp reset proxy

Also check: Internet Options → Connections → LAN settings → ensure 'Use a proxy server' is unchecked unless intentional.


When to Escalate

  • Problem persists across multiple different computers on the same network → ISP or router hardware failure.
  • You see valid IPs and can ping 8.8.8.8 but HTTPS sites fail → possible SSL inspection proxy, transparent firewall, or captive portal (common in hotels, offices).
  • Ethernet works but Wi-Fi does not (or vice versa) → hardware-specific adapter or driver fault.
  • Issue started immediately after a Windows Feature Update → roll back driver, run netsh winsock reset, or use System Restore.

Frequently Asked Questions

bash
#!/usr/bin/env bash
# ============================================================
# Network Connectivity Diagnostic & Auto-Fix Script
# Works on: Linux (bash) | Adapt commands for Windows below
# ============================================================

GATEWAY=$(ip route | awk '/default/ {print $3; exit}')
DNS_SERVER="8.8.8.8"
TEST_HOST="google.com"

echo "======================================="
echo " Network Diagnostic Tool"
echo "======================================="
echo ""

# --- Step 1: Check IP address ---
echo "[1] Current IP configuration:"
ip addr show | grep -E 'inet |state'
echo ""

# --- Step 2: Check default gateway ---
echo "[2] Default gateway: $GATEWAY"
if [ -z "$GATEWAY" ]; then
  echo "  ERROR: No default gateway found. DHCP may have failed."
  echo "  Fix: sudo dhclient -r && sudo dhclient"
else
  ping -c 3 -W 2 "$GATEWAY" > /dev/null 2>&1
  if [ $? -eq 0 ]; then
    echo "  OK: Gateway $GATEWAY is reachable."
  else
    echo "  FAIL: Cannot reach gateway $GATEWAY."
    echo "  Fix: Check cable/Wi-Fi association, reboot router."
  fi
fi
echo ""

# --- Step 3: Ping external IP (no DNS) ---
echo "[3] Testing external IP connectivity (no DNS):"
ping -c 3 -W 2 "$DNS_SERVER" > /dev/null 2>&1
if [ $? -eq 0 ]; then
  echo "  OK: Can reach $DNS_SERVER. Routing works."
else
  echo "  FAIL: Cannot reach $DNS_SERVER."
  echo "  Possible cause: ISP issue, firewall blocking ICMP, or NAT failure."
fi
echo ""

# --- Step 4: Test DNS resolution ---
echo "[4] Testing DNS resolution:"
NSLOOKUP_RESULT=$(nslookup "$TEST_HOST" "$DNS_SERVER" 2>&1)
if echo "$NSLOOKUP_RESULT" | grep -q 'Address:'; then
  echo "  OK: DNS resolves $TEST_HOST successfully."
else
  echo "  FAIL: DNS resolution failed for $TEST_HOST."
  echo "  Fix: Change DNS to 8.8.8.8 or 1.1.1.1"
  echo "  Command: sudo sed -i 's/^nameserver.*/nameserver 8.8.8.8/' /etc/resolv.conf"
fi
echo ""

# --- Step 5: Flush DNS cache (Linux/systemd) ---
echo "[5] Flushing DNS cache (systemd-resolved):"
sudo systemd-resolve --flush-caches 2>/dev/null && echo "  DNS cache flushed." || echo "  systemd-resolved not running, skipping."
echo ""

# --- Step 6: MTU check ---
echo "[6] MTU check (testing 1500 byte packets):"
ping -c 2 -s 1472 -M do "$DNS_SERVER" > /dev/null 2>&1
if [ $? -eq 0 ]; then
  echo "  OK: MTU 1500 works fine."
else
  echo "  WARNING: Large packets are being dropped. Consider reducing MTU to 1400."
  echo "  Fix: sudo ip link set dev eth0 mtu 1400"
fi
echo ""

echo "======================================="
echo " Windows equivalents (run as Admin):"
echo "======================================="
echo " ipconfig /release"
echo " ipconfig /renew"
echo " ipconfig /flushdns"
echo " netsh winsock reset"
echo " netsh int ip reset"
echo " netsh int ipv6 reset"
echo " netsh advfirewall reset"
echo " netsh winhttp reset proxy"
echo " ping 8.8.8.8"
echo " nslookup google.com 8.8.8.8"
echo " arp -a  (check for IP conflicts)"
echo "======================================="
echo "Diagnostic complete. Reboot if resets were applied."
E

Error Medic Editorial

The Error Medic Editorial team is composed of senior DevOps engineers, SREs, and network administrators with 10+ years of experience diagnosing and resolving connectivity, infrastructure, and operating system issues. We write practical, command-driven troubleshooting guides tested across Windows 10/11, macOS Ventura/Sonoma, and major Linux distributions including Ubuntu, Debian, and RHEL. Our guides are reviewed against official Microsoft, Apple, and Linux kernel documentation before publication.

Sources

Related Articles in Other No Internet Access But Connected

Explore More wifi Guides