The inspector header says "28 ports · 28 up" on a switch with nothing plugged in #1299

Closed
opened 2026-11-09 23:45:12 +00:00 by jaylouisw · 0 comments
Owner

The inspector's interface header counts enabled and calls the result up.

On a switch with nothing plugged in:

Interfaces  28 ports · 28 up        ← the panel
1/1/1  ... down  down               ← `show ip interface brief`
front panel: every socket painted `notconnect` / "down (no cable)"

Three surfaces, two answers — and the wrong one is the summary: the single line people read. It also counts as
"up":

  • a port whose peer has shut down (down (peer shut down)) — the top cause of "the link is up but nothing
    passes", because the local end is enabled and the panel says so;
  • a port whose cable was taken down (down (link down));
  • and it silently drops shut ports from the accounting rather than naming them, so 28 ports · 27 up on a
    device with one shut port and nothing plugged in tells you neither that 27 are dead nor that one is
    administratively down.

Measured before the fix, on a PoE switch (CX 6000), panel vs show ip interface brief:

situation panel console
nothing plugged in 28 up 0 up
one cable to a live peer 28 up 1 up
cable to a peer whose port is shut 28 up 0 up
cable whose link was taken down 28 up 0 up
one cabled port shut down 27 up 0 up
a router with one live cable 3 up 1 up

The rule already exists and every other surface uses it: PFFaceplate.portState() / portVerdict() (#1238).
The header was the one place that re-derived the answer.

What it must say instead

28 ports · 1 up · 27 down (no cable)
28 ports · 0 up · 27 down (no cable) · 1 down (link down)
28 ports · 0 up · 27 down (no cable) · 1 administratively down
  • the up-count comes from the same portVerdict() the rows, the faceplate, the tooltip and the status bar use;
  • every port that is not up is accounted for by the reason the console prints, so the summary and the rows
    cannot disagree;
  • the reason labels are the console's own words (down (no cable), down (peer shut down), down (link down),
    administratively down), not a second vocabulary;
  • at most four segments, so the summary stays a summary;
  • if the state rule is missing entirely (a deployment where web/faceplate.js failed to load) the header must
    say unknown (no state rule loaded) — not fall back to enabled, which is the guess that caused this.
The inspector's interface header counts `enabled` and calls the result **up**. On a switch with nothing plugged in: ``` Interfaces 28 ports · 28 up ← the panel 1/1/1 ... down down ← `show ip interface brief` front panel: every socket painted `notconnect` / "down (no cable)" ``` Three surfaces, two answers — and the wrong one is the summary: the single line people read. It also counts as "up": * a port whose peer has shut down (`down (peer shut down)`) — the top cause of "the link is up but nothing passes", because the local end *is* enabled and the panel says so; * a port whose cable was taken down (`down (link down)`); * and it silently drops shut ports from the accounting rather than naming them, so `28 ports · 27 up` on a device with one shut port and nothing plugged in tells you neither that 27 are dead nor that one is administratively down. Measured before the fix, on a PoE switch (`CX 6000`), panel vs `show ip interface brief`: | situation | panel | console | |---|---|---| | nothing plugged in | 28 up | 0 up | | one cable to a live peer | 28 up | 1 up | | cable to a peer whose port is shut | 28 up | 0 up | | cable whose link was taken down | 28 up | 0 up | | one cabled port shut down | 27 up | 0 up | | a router with one live cable | 3 up | 1 up | The rule already exists and every other surface uses it: `PFFaceplate.portState()` / `portVerdict()` (#1238). The header was the one place that re-derived the answer. ## What it must say instead ``` 28 ports · 1 up · 27 down (no cable) 28 ports · 0 up · 27 down (no cable) · 1 down (link down) 28 ports · 0 up · 27 down (no cable) · 1 administratively down ``` * the up-count comes from the same `portVerdict()` the rows, the faceplate, the tooltip and the status bar use; * every port that is not up is accounted for **by the reason the console prints**, so the summary and the rows cannot disagree; * the reason labels are the console's own words (`down (no cable)`, `down (peer shut down)`, `down (link down)`, `administratively down`), not a second vocabulary; * at most four segments, so the summary stays a summary; * if the state rule is missing entirely (a deployment where `web/faceplate.js` failed to load) the header must say `unknown (no state rule loaded)` — **not** fall back to `enabled`, which is the guess that caused this.
Sign in to join this conversation.
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#1299
No description provided.