cli(trunk): a pair of VLAN ids prints as two ids, not a range #2414
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!2414
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "rev/1121-1128"
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?
Question. A trunk's allowed list is printed folded into ranges (
1-4,7,11,13-4094). When two consecutive ids meet —157and158— does the box write157-158, or two ids?Verdict: two ids. Three
show running-configcaptures spell pairs out —1,81,82,171,999(Cisco support doc 68100,w-backbone-6k),59,157,158,160(MEXSWP04-NAP#sh run int fa2/0/39, a 3750 stack) and55,56,59,155,157,158,160,200(MEXSW09-NAP#sh run int gi1/0/3) — while the c3550 TAC transcript folds a run of four (1-4,7,11,13-4094). The rule the samples fit is arithmetic: a range is written only where it is shorter than the comma list it replaces, so three or more consecutive ids fold and a pair does not (81-82is exactly as long as81,82).Change.
formatVlanList()inengine/vlan.jsemits a range only for three-plus;web/app.js's panel mirror follows. A backup of a port carrying 157 and 158 now readsswitchport trunk allowed vlan 59,157,158,160instead of59,157-158,160, and the console receipt and theswitchport:sentence match it.Tests.
test/running-config-allowed-vlan-two-id-run.test.js(12 checks: three captured pairs character for character, a run of three folding, a run of four folding, the whole five-linefa2/0/39block, the longgi1/0/3list, receipt/sentence/config agreement, re-typing the printed line).test/trunk-allowed-remove-from-all.test.js(47 checks; the assertion that pinned the old guess now pins the capture).test/switchport-agreement.test.jsgained pair-bearing lists and a range reader (13 checks). Full suite: 447 suites, 15,139 assertions, 0 failed.Unresolved. A device-computed run of exactly three (the
1-3,100sample may have been typed as a range) — ashow running-configafter aremoveleaving three consecutive ids would settle it. Recorded inresearch/trunk-allowed-two-id-run.md.fcdc206ef40c0c721458