W_DUPLEX_MISMATCH can never fire, and a forced line rate is not stored anywhere #1259
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge#1259
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
What happens
Two things in the engine can describe a link's physical behaviour and neither can be set:
Interface.duplexis'full'for every port in the catalogue and no command changes it. SoW_DUPLEX_MISMATCH— a warningdocs/CONNECTORS.mdpublishes in its code table — is unreachable. Onlytest/can trigger it, by passingduplexA/duplexBdirectly tovalidateLink.speedcommand.speed 100is refused as unrecognised, and a port that has been forcedto 100 Mb/s goes on describing itself as 1G: nothing stores it,
show running-configprints nothing,show interfacesprints nothing, and the link keeps running at its auto-negotiated rate.show interfacesalso never reports the rate or the duplex at all, which is the first thing you look at whena link is up but slow.
Expected
speed auto | <mbps>andduplex auto | full | halfin interface config, refused when the port cannot dothe rate — naming the port, the rate, and what it does support;
its serialisation delay and its warnings all follow;
show interfacesreports(forced)vs(auto), andthe rate the link negotiated when that differs;
W_DUPLEX_MISMATCHbecomes reachable once one end can be set to half against a full-duplex peer;not come up, and it says so;
show running-configprints what was set, and the config still replays byte-identically;duplex.
Found while doing it
Topology.revalidateFor(linkId)assumed the caller's A side waslink.a. Re-checking a cable from the otherend handed the validator its own port as "the peer", which came back as two
E_PORT_IN_USEerrors — a cablethat plainly exists looking like a second cable in the same socket.
Scope
Existing interface-config mechanism, existing validator, existing printer. No new commands beyond the two
standard ones whose rules were already modelled.
W_DUPLEX_MISMATCHcan now fire, and a forced line rate is stored (#1259) #1260