A port moved to another VLAN keeps its old MAC entries, and a stale row reads as live #1255
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1255
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What happens
Move a port from one VLAN to another and the switch keeps every MAC it learned there, forever:
A VLAN-1 entry on a port that is access VLAN 20 is not a forwarding decision any switch could make, and
nothing in this engine ever removes it: MAC entries are learned and overwritten but never aged out, and a
membership change does not touch them.
The second half is presentation. Every row looks identical whether its port is up, shut, uncabled, or does
not exist, so a stale row reads as a live one. (Same defect as
show arpbefore #1253.)What a real switch does
Flushes the dynamic entries for a port whose VLAN membership changes, and ages the rest out on a timer.
This engine has no aging, so the flush is the fix and the marking is what covers the rest.
Checked, and not a defect
Before filing this I chased the dangerous version of it — does the stale entry forward a VLAN-1 frame into a
VLAN-20 port? Measured: no. The switch drops with
no egress ports in VLAN 1, and the only frame a movedhost receives is the switch's own LLDP. VLAN isolation holds; this is a table that lies, not a leak.
Expected
Device.flushMacsOnPort(name)— one call, every VLAN — invoked whenever a port's membership changes:switchport access vlan,switchport mode,switchport trunk native vlan,switchport trunk allowed vlan, andno switchport/switchportreset;show mac address-tablemarks a row whose port cannot carry a frame (with the reason, the same sentenceshow arpuses), and a row whose VLAN the port does not carry, as(vlan mismatch);(name: gone)rather than printing[object Object]ornothing;
Scope
The existing table and the existing switchport commands. No new commands.