show vlan printed VLAN 1 twice, and put every trunk in VLAN 1 (#1261) #1262
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1262
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/show-vlan"
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?
show vlanprinted VLAN 1 twice, and put every trunk in VLAN 1Fixes #1261.
What was wrong
The old table, from a lab with one access port in VLAN 20 and two trunks:
allwaspushed into VLAN 1 under a pseudo-key
all, and that key was then rendered as VLAN 1.intent, not what
classifyEgress()would forward.(n)/(t)/(trunk)decorations that realshow vlandoes not print.And
show spanning-treehad the same defect class as the counters in #1252: with no run it saidNo bridged ports: this device is not part of any L2 loop.— a claim about the lab, printed when the truthwas that nothing had computed the tree.
Now
vlanLib.classifyEgress()— the rule the data plane forwards by — so thetable cannot list a port the switch would drop for, or omit one it would forward to:
trunk (the belief that made a native-VLAN mismatch invisible);
alltrunk appears in every row.vlan <id> [name]or if a port uses it; a configured VLAN nothingcarries prints an empty Ports column rather than an invented port.
show vlan briefis the same table — no short form that disagrees with the long one.show spanning-treeprintsNot measured (no simulation run): nothing has computed the spanning treeuntil something has, and "no ports are bridging" only afterwards.
vlanLibis required once at module level rather than inside each branch that needed it.Evidence
test/show-vlan.test.js— 29 checks:allowed vlan 20,30is in 20 and 30 and not in VLAN 1; the all-VLAN trunk is in everyrow;
classifyEgress()forwards it — thetable and the data plane cannot diverge;
defaultfor VLAN 1, generatedVLAN0044for a VLAN that exists only because a portuses it, and the ports that really carry it;
show vlan brief== the full form row for row;show spanning-treedistinguishes "not measured" from "no loop", and a real loop reports a blocking portwith
traffic droppedwhile the device model has the same port blocked.Reverting
engine/cli.jsfails 10 of the 29.docs/CLI.mdgains "Readingshow vlan" and "Readingshow spanning-tree", plus the two commands in thecommand table.
Suite: 144 suites, 6,164 assertions, 0 failed.
show vlanprinted VLAN 1 twice, and put every trunk in VLAN 1 (#1261)no vlanreports work it did not do #1277noform, andno vlanstops lying (#1277) #1278