show interfaces <port> switchport says the port is missing: a view word after a real port is read as part of its name #1834

Closed
opened 2026-11-17 11:38:35 +00:00 by jaylouisw · 0 comments
Owner

A view word typed after a real port is read as part of the port name, so the console says the port does not exist.

s1# show interfaces Fa0/1 switchport
% No interface Fa0/1 switchport on Switch (L2)-s1
s1# show interfaces Fa0/1 counters
% No interface Fa0/1 counters on Switch (L2)-s1
s1# show interfaces Fa0/1 counters errors
% No interface Fa0/1 counters errors on Switch (L2)-s1
s1# show interfaces Fa0/1 ?
% No interface Fa0/1 ? on Switch (L2)-s1

show interfaces [<port>] switchport and show interfaces [<port>] counters are the port-first spellings of the same IOS views, and Fa0/1 is right there. #1443/#1449 fixed the keyword-first form (show interfaces switchport -> "is a view, not a port", show interfaces counters errors -> reported as the counters view); the port-first half of the same door still answers with the sentence a mistyped port name gets, so the operator goes hunting for a typo in a socket name that was never wrong. The ? key lands in the same sentence.

Expected: recognise the port prefix by the same table interface Fa0/1 uses, and report the trailing word as the view it is — pointing at show interfaces <port>, which prints the status, address, switchport line and counters — instead of claiming a port named "Fa0/1 counters" is missing.

Pinned locally: test/show-interfaces-view-keywords.test.js (a port followed by a view word is still the view, not a missing port).

A view word typed **after** a real port is read as part of the port name, so the console says the port does not exist. ``` s1# show interfaces Fa0/1 switchport % No interface Fa0/1 switchport on Switch (L2)-s1 s1# show interfaces Fa0/1 counters % No interface Fa0/1 counters on Switch (L2)-s1 s1# show interfaces Fa0/1 counters errors % No interface Fa0/1 counters errors on Switch (L2)-s1 s1# show interfaces Fa0/1 ? % No interface Fa0/1 ? on Switch (L2)-s1 ``` `show interfaces [<port>] switchport` and `show interfaces [<port>] counters` are the port-first spellings of the same IOS views, and Fa0/1 is right there. #1443/#1449 fixed the keyword-first form (`show interfaces switchport` -> "is a view, not a port", `show interfaces counters errors` -> reported as the `counters` view); the port-first half of the same door still answers with the sentence a mistyped port name gets, so the operator goes hunting for a typo in a socket name that was never wrong. The `?` key lands in the same sentence. Expected: recognise the port prefix by the same table `interface Fa0/1` uses, and report the trailing word as the view it is — pointing at `show interfaces <port>`, which prints the status, address, switchport line and counters — instead of claiming a port named "Fa0/1 counters" is missing. Pinned locally: `test/show-interfaces-view-keywords.test.js` (a port followed by a view word is still the view, not a missing port).
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#1834
No description provided.