Networking

Managed switch port-security causes VLAN clients to lose internet while gateway still pingable

Environment

Environment

Office network: single L3 gateway/router, 24-port managed switch running vendor OS with 802.1Q trunks; VLAN 10 for clients (access ports), native VLAN configured on uplink, port-security configured with sticky MAC and max-mac 2 on access ports.

Symptoms

Symptoms

Several laptops and VoIP phones on VLAN10 intermittently lose internet access (cannot reach external sites) but can still ping the local L3 gateway and other VLAN10 hosts for a short period. Issue occurs 2–3 times/day, affects different ports each time.

Observations

Observations

Affected clients keep IP and default gateway. Switch port LED remains green. Switch shows ports in 'errdisable' only rarely. switch MAC table sometimes shows multiple MACs associated with a single access port after incident. No CPU spikes on gateway; gateway ARP table shows entries for clients.

Already attempted

Already attempted

Cleared sticky MAC entries and rebooted switch; temporarily disabled port-security on one access port and problem stopped for devices on that port. Updated switch to latest stable OS two weeks ago. Captured switch logs around event times showing 'port-security violation' messages.

Question

Question

What root causes would lead port-security to cut client internet while allowing local pings, and how can I safely diagnose and prevent it without disrupting users?

COMMUNITY RESPONSES

Verified community troubleshooting

1 reply
0
astridapps Answer
user
Posted 4w ago • 0 confirmations

Check the switch port-security counters and the actual MACs learned on the affected ports first. On the switch CLI, note the per-port MAC count and recent violation timestamps (show port-security and MAC table). If the port is attached to a hypervisor or unmanaged switch that can present many MACs, raise the port's max‑mac setting or move that device to a trunk port so it can carry multiple VLANs properly. To avoid user impact, switch the port to a 'log only' or 'protect' mode (if your OS supports it) rather than outright shutdown, verify external access returns, then harden limits. If MAC flapping or STP events appear in logs, trace the physical cable and check for bridging loops. If the problem persists after adjusting max‑mac and verifying topology, collect switch logs and escalate to the switch vendor support with the MAC table and violation timestamps for deeper diagnostic tools.

Showing 1 of 1 community responses
AI DIAGNOSTICS

Incident analysis

Updated 4w ago• Trouble ID

Most likely causes

Port-security (sticky MAC / max-mac) exceeded on access port causing outbound frames to be dropped 85%
Downstream device (VM host or unmanaged switch) presents multiple MACs, exceeding per-port MAC limit 70%
Asymmetric learning: MAC seen on uplink then on access port (MAC flapping) triggers security policy 55%

Summary

Symptoms point to port-security blocking or limiting MACs on access ports while the hosts keep IP connectivity to local L2/L3 (ARP and local ping still working). Possible mechanisms: sticky MAC learning or max-mac exceeded causing the switch to drop outbound frames to the uplink, asymmetric MAC tables between switch and gateway, or storm-control/STP effects isolating forwarding to gateway. Another possibility is downstream device bridging multiple MACs (virtualization host) that exceeds per-port limit. The fact that disabling port-security on a port restored external connectivity supports a port-security mis-trigger as most likely.

Suggested Fixes

Diagnostic step 1
On a non-production port, reproduce by connecting the same device and intentionally exceeding max-mac to observe switch behavior; capture switch logs during reproduce.
Diagnostic step 2
Run 'show mac address-table dynamic' and 'show port-security interface <port>' to check current MAC counts and violation counters; collect before/after when issue occurs.
Diagnostic step 3
If devices behind a port are virtualization hosts or contain bridges, increase per-port max-mac to accommodate expected MACs or move that host to a dedicated trunk with proper VLAN tagging.

Continue troubleshooting

Matched from the title, description and tags