The list that blinded both ends of a cable #1458

Merged
jaylouisw merged 1 commit from fix/lldp-across-trunk into main 2026-11-12 01:59:54 +00:00
Owner

Closes #1457

s1(config-if)# switchport trunk allowed vlan 10
s1# show lldp neighbors
  (none - no LLDP has been heard on any port)

s1# show interfaces Fa0/1
  peer: s2/Fa0/1
  switchport: trunk · native 1 · allowed 10
  1 drop (VLAN 1 not allowed on egress)

Trimming a trunk's allowed list is routine. It emptied both ends' neighbour tables: the LLDPDU was classified into the port's native VLAN and refused by the egress VLAN filter in _emitFrame, leaving a drop counter on a healthy port that blamed VLAN 1 for something no VLAN had done.

LLDP is a link protocol, not customer traffic — untagged, to the nearest-bridge multicast group, terminated one hop away. The allowed list decides which switched frames the link carries, not whether its two ends may describe themselves to each other. _emitFrame now sends a link-scoped frame untagged without consulting the allowed list.

Deliberately unchanged

  • The exemption is LLDP only. A customer frame in VLAN 1 out the same trunk is still refused with the same VLAN 1 not allowed on egress and never reaches the wire; the test asserts the refusal event, the sentence, the port and the empty wire, frame for frame.
  • A shut port still announces nothing, and a known neighbour is annotated down: peer shut down rather than forgotten.
  • Access ports in any VLAN still advertise; a default trunk is untouched.
  • The announcement is counted: 1 packets output, and no drop line — a counter names what actually happened.

Evidence

test/lldp-across-trunk.test.js, 32 checks: discovery both ways under allowed vlan 10 and under native vlan 20 + allowed vlan 10; the frame is untagged on the wire (wireTagged === false, wireVid === null); the far end records it on the arriving port and names the sender; customer frames in an excluded VLAN are still refused and never queued; the port carries no phantom drop and counts one output; shut-port annotation and recovery; and the default-trunk and access-port cases as regression guards.

Reverting engine/simulator.js fails 16/32.

Neighbours green: lldp 27, show-lldp 23, vlan 59, switchport-mismatch 26, counters-agreement 32, flood-refusal-reason 24, flood-port-state 19, link-state 69, stp-port-state 31.

Docs: docs/ARCHITECTURE.md § "The list that blinded both ends of a cable".

Closes #1457 ``` s1(config-if)# switchport trunk allowed vlan 10 s1# show lldp neighbors (none - no LLDP has been heard on any port) s1# show interfaces Fa0/1 peer: s2/Fa0/1 switchport: trunk · native 1 · allowed 10 1 drop (VLAN 1 not allowed on egress) ``` Trimming a trunk's allowed list is routine. It emptied both ends' neighbour tables: the LLDPDU was classified into the port's native VLAN and refused by the egress VLAN filter in `_emitFrame`, leaving a drop counter on a healthy port that blamed VLAN 1 for something no VLAN had done. LLDP is a link protocol, not customer traffic — untagged, to the nearest-bridge multicast group, terminated one hop away. The allowed list decides which switched frames the link carries, not whether its two ends may describe themselves to each other. `_emitFrame` now sends a link-scoped frame untagged **without** consulting the allowed list. ### Deliberately unchanged * **The exemption is LLDP only.** A customer frame in VLAN 1 out the same trunk is still refused with the same `VLAN 1 not allowed on egress` and never reaches the wire; the test asserts the refusal event, the sentence, the port and the empty wire, frame for frame. * A shut port still announces nothing, and a known neighbour is annotated `down: peer shut down` rather than forgotten. * Access ports in any VLAN still advertise; a default trunk is untouched. * The announcement is counted: `1 packets output`, and no drop line — a counter names what actually happened. ### Evidence `test/lldp-across-trunk.test.js`, **32 checks**: discovery both ways under `allowed vlan 10` and under `native vlan 20 + allowed vlan 10`; the frame is untagged on the wire (`wireTagged === false`, `wireVid === null`); the far end records it on the arriving port and names the sender; customer frames in an excluded VLAN are still refused and never queued; the port carries no phantom drop and counts one output; shut-port annotation and recovery; and the default-trunk and access-port cases as regression guards. Reverting `engine/simulator.js` fails 16/32. Neighbours green: `lldp` 27, `show-lldp` 23, `vlan` 59, `switchport-mismatch` 26, `counters-agreement` 32, `flood-refusal-reason` 24, `flood-port-state` 19, `link-state` 69, `stp-port-state` 31. Docs: `docs/ARCHITECTURE.md` § *"The list that blinded both ends of a cable"*.
The list that blinded both ends of a cable (#1457)
Some checks failed
CI / Classify the change (pull_request) Successful in 12s
PR rebase / Rebase onto main and arm auto-merge (pull_request) Successful in 15s
CI / Test (Node 18) (pull_request) Failing after 21s
CI / Test (Node 20) (pull_request) Successful in 2m59s
CI / Test (Node 22) (pull_request) Successful in 2m47s
CI / Server smoke test (pull_request) Successful in 23s
CI / Docker build (pull_request) Successful in 45s
0c88930bf4
s1(config-if)# switchport trunk allowed vlan 10
  s1# show lldp neighbors
    (none - no LLDP has been heard on any port)

  s1# show interfaces Fa0/1
    peer: s2/Fa0/1
    switchport: trunk · native 1 · allowed 10
    1 drop (VLAN 1 not allowed on egress)

Trimming a trunk's allowed list is routine. It emptied both ends' neighbour
tables, because the announcement went out through the egress VLAN filter: the
LLDPDU was classified into the port's native VLAN, the allowed list did not
contain it, and the frame was refused - leaving a drop counter on a healthy port
that blamed VLAN 1 for something no VLAN had done.

LLDP is a link protocol, not customer traffic. It goes untagged to the
nearest-bridge multicast group, and the allowed list decides which switched
frames the link carries, not whether its two ends may describe themselves to each
other. _emitFrame now sends a link-scoped frame untagged without consulting the
allowed list.

Deliberately unchanged:
  * the exemption is LLDP only - a customer frame in VLAN 1 out the same trunk is
    still refused with the same sentence and never reaches the wire;
  * a shut port announces nothing, and a known neighbour is annotated
    'down: peer shut down' rather than forgotten;
  * access ports in any VLAN still advertise; a default trunk is untouched;
  * the announcement is counted: 1 packets output, no drop line.

Evidence: test/lldp-across-trunk.test.js, 32 checks; reverting
engine/simulator.js fails 16. Suite 229 suites, 8597 assertions, 0 failed.
jaylouisw scheduled this pull request to auto merge when all checks succeed 2026-11-12 01:59:51 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge!1458
No description provided.