Advertisement

VLAN can ping router but not internet: find the break fast

If a VLAN host can ping the router but not the internet, the gateway path is working. This article shows the shortest way to tell whether the break is DNS, routing, NAT, firewall, or the WAN side, so you can fix the right layer first.

Networking 9 min read
A network router sits in an office server rack with Ethernet cables plugged in.

If a VLAN host can ping the router but not the internet, the VLAN-to-gateway path is working. The break is usually in DNS, routing, NAT, firewall policy, or the WAN side. Start with gateway ping, then a public IP, then a domain name. That tells you which layer failed before you change anything. In practice, the safest first fixes are the DHCP default gateway, the VLAN tag, or the NAT rule for that subnet.

What the symptom actually tells you

This symptom means the host can reach its default gateway on the VLAN, so local Layer 2 and the first Layer 3 hop are probably fine. The router answers ping, but that does not prove it can forward traffic from that VLAN to the WAN.

What the result means depends on which test fails. If you can ping the router but not a public IP, the issue is usually routing, NAT, firewall policy, ACLs, or WAN reachability. If you can ping a public IP but not a domain name, the problem is usually DNS. If you cannot ping the router from that VLAN, the fault is earlier than internet access. It is usually VLAN tagging, switch port mode, host addressing, or the default gateway on the client.

The shortest diagnosis path is simple. Gateway ping proves local VLAN access. Public IP ping proves raw internet reachability without DNS. A domain lookup proves name resolution. That split matters because browser failures often make DNS, routing, and application problems look the same.

Before you start

Use a client that is actually in the affected VLAN, not a device on Wi-Fi or a different subnet. If possible, pick one working VLAN and one broken VLAN so you can compare them side by side.

Before changing router rules, confirm these basics first:

  • The client has an address in the expected subnet.
  • The client’s default gateway matches the VLAN interface or SVI for that subnet.
  • The switch port and trunk carry the VLAN tag you expect.
  • You can log in to the router or firewall that handles the VLAN.
  • You know whether internet access is supposed to be filtered by policy, proxy, or ACL.

If only one VLAN fails and other VLANs work, stay focused on that VLAN’s gateway, NAT, and policy rules. If every VLAN fails, suspect the WAN or upstream route before you spend time rewriting internal rules.

Three quick tests that split the fault

Use these in order. Each one tells you whether the problem is local, upstream, or just name resolution.

  1. Ping the VLAN gateway or router interface from a client on the affected VLAN.
Linux/macOS shell
ping <gateway-ip>
Windows PowerShell
ping <gateway-ip>

If this works, the host can reach the VLAN gateway and the basic VLAN path is up. If it fails, fix the client address, mask, VLAN tag, switch port mode, and default gateway before you look at internet access.

  1. Ping a public IP address, not a website name.
Linux/macOS shell
ping 1.1.1.1
Windows PowerShell
ping 1.1.1.1

If the gateway responds but this fails, the issue is usually routing, NAT, firewall policy, ACLs, or WAN reachability. If this works, the router can forward traffic out and the next thing to check is DNS.

  1. Test a domain name.
Linux/macOS shell
nslookup example.com
Windows PowerShell
Resolve-DnsName example.com

If the public IP works but the name fails, you likely have a DNS failure. If both fail, the issue is deeper than name resolution. If the name works and the public IP works but websites still fail, check proxy settings, captive portal behavior, or application-specific filtering.

A laptop is connected by Ethernet to an office network router on a desk.

The most likely causes and the safest fixes

Work from the client settings toward the router rules. That keeps you from changing advanced policies before you know whether the fault is actually there.

  1. Check the DHCP default gateway on a client in the affected VLAN.

The client should receive the router’s VLAN interface or SVI as its default gateway. If DHCP hands out the wrong gateway, the host can still talk locally but will never leave the subnet. If the gateway is wrong, fix the DHCP scope or the static client setting first and retest before touching anything else.

  1. Check VLAN tagging and the interface that serves the VLAN.

If the host, switch port, trunk, or SVI is mis-tagged, the device may reach a nearby router interface but still miss the correct routed path. This is a common cause when one VLAN works and another does not, because only one SVI or subinterface is wrong. If the tag is wrong, correct it before you change routing or NAT.

  1. Verify the router has a valid route toward the WAN.

The routing table should have a default route or another path to the internet. A missing or stale default route can make the VLAN look alive inside the office while traffic dies at the router. If the router has no valid route to the WAN, fix the edge routing or upstream next hop first; NAT will not help if the router cannot forward packets out.

  1. Check NAT for the affected subnet.

A common mistake is allowing one VLAN to translate out to the internet while forgetting the new VLAN. The router may accept pings to itself, but it will not rewrite source addresses for outbound traffic from that subnet. Add the missing subnet to the existing NAT rule or translation policy, then retest with a public IP.

  1. Review firewall rules, ACLs, and policy routing.

A rule can allow ICMP to the router’s own interface while blocking transit traffic to the WAN. Policy routing can also send return traffic somewhere unexpected, which creates failures that look random until you compare the working VLAN to the broken one. If you find a deny rule or a wrong policy route, change only the minimum needed and keep a rollback path.

  1. Compare the working VLAN to the broken one.

If another VLAN gets out fine, compare its DHCP scope, gateway, NAT match, and any zone or ACL policy first. That usually reveals the missing line or mismatched subnet faster than staring at the whole config. In a lot of office networks, the difference is a single subnet that never got added to NAT or a VLAN interface that points to the wrong rule set.

A safe first fix is usually the least invasive one: correct the default gateway in DHCP, fix a wrong VLAN tag, or add the missing subnet to the existing NAT rule. Save more advanced routing changes for last unless the test results already point there.

When the internet problem is outside the VLAN

Sometimes the VLAN is innocent. If the router itself cannot reach the internet, or only the affected VLAN fails while everything else on the same router works, the issue may be upstream: the ISP link, modem, upstream router, or a broken default route on the edge device.

A router can still answer ping from the VLAN even when its WAN path is down. That only proves the gateway interface is alive on the local side. It does not prove the modem has sync, the ISP path is healthy, or the router’s default route is pointing to a live next hop.

Look for these signs of an upstream problem:

  • Other internal devices also lose internet at the same time.
  • The router cannot ping a public IP from its own WAN side.
  • The WAN interface looks up locally but does not pass traffic.
  • The default route points to an unreachable next hop.

If only one VLAN fails and the others work, stay focused on that VLAN’s gateway, NAT, and policy rules. If everything behind the router fails, look outside the VLAN first: modem status, ISP handoff, WAN IP, and the router’s default route.

How to confirm it’s really fixed

A fix is real only if the VLAN can reach both raw IPs and names, and another device on the same VLAN sees the same result. Don’t stop at one successful ping to the router, because that was already working.

  1. Ping the gateway again from the affected VLAN.
Linux/macOS shell
ping <gateway-ip>
Windows PowerShell
ping <gateway-ip>

You should get replies just as before. If this fails now, the change affected local VLAN reachability and you need to roll it back or correct the VLAN settings.

  1. Ping a public IP such as 1.1.1.1 or another known reachable address.
Linux/macOS shell
ping 1.1.1.1
Windows PowerShell
ping 1.1.1.1

If this works, the VLAN can reach the internet at the IP layer. If it does not, the repair is not complete even if the router still answers ping.

  1. Run a DNS lookup for a normal domain name.
Linux/macOS shell
nslookup example.com
Windows PowerShell
Resolve-DnsName example.com

You should get a valid name resolution response. If the public IP works but DNS does not, the network is only partly fixed.

  1. Open a website from the same VLAN.

Use the same client if possible, then try a second device on the same VLAN. If one device works and another does not, recheck DHCP, static settings, and the host’s gateway. If both devices can reach a public IP and resolve names, the repair is probably real, not just a temporary mask.

Conclusion

If the VLAN can reach the gateway but not the internet, the fastest path is to separate client setup, DNS, routing, NAT, firewall policy, and WAN health with the three quick tests above. Fix the smallest obvious fault first, then verify with a second device on the same VLAN before you close the ticket.