Skip to content

Commit 11bad29

Browse files
committed
cli: layered show interface, IEEE 802.3.2-2025 ethernet model
Import ieee802-ethernet-interface@2025-09-10.yang, from IEEE 802.3.2-2025, and companion ieee802-ethernet-phy-type.yang, replacing the 2019 revision. Operational interface speed moves to ietf-interfaces:speed, RFC 8343, eth:speed is now obsolete. Bump infix-interfaces.yang revision to track the upgrade. The CLI 'show interface' command renders interfaces as bottom-up layered protocol rows. Ethernet interfaces a new IEEE link-mode row (1000baseT, 10GbaseLR, ...) is added with 'duplex: full|half' in the DATA column. Without link the ethernet row is the first row. Tunnels and wifi follow the same layering: gre/vxlan rows carry remote:/vni: tokens with optional ethernet sub-row for the L2-bearing variants; wifi rows carry 'station' or 'access-point' ssid:, signal:, stations: tokens. admin@bpi-76-8f-c2:/> show interface ⚑ INTERFACE PROTOCOL STATE DATA ⇅ lo loopback UP ipv4 127.0.0.1/8 (static) ipv6 ::1/128 (static) ⇅ br0 bridge DOWN │ ethernet 32:2e:3f:76:8f:c2 │ ipv4 192.168.0.1/24 (static) ⇅ ├ lan0 bridge LOWER-DOWN ⇅ ├ lan1 bridge LOWER-DOWN ⇅ ├ lan2 bridge LOWER-DOWN ⇅ └ lan3 bridge LOWER-DOWN ⇅ gre0 gre UP remote: 198.51.100.7 ipv4 10.255.0.1/30 (static) ⇅ sfp1 ethernet DOWN ca:59:f0:77:80:5b ⇅ wan 1000baseT UP duplex: full ethernet 32:2e:3f:76:8f:c2 ipv4 192.168.0.235/24 (dhcp) ipv6 fe80::302e:3fff:fe76:8fc2/64 (link-layer) ⇅ wan.10 vlan UP vid: 10 │ ipv4 10.0.10.1/24 (static) └ wan ⇅ wan.10.20 vlan UP vid: 20 │ ipv4 10.0.10.20/28 (static) └ wan.10 ⇅ wifi0 wifi UP station ssid: corp-net signal: good ethernet dc:a6:32:00:11:22 ipv4 192.168.7.42/24 (dhcp) The detailed interface view gains a 'link mode' row carrying the same label. yanger populates phy-type and pmd-type from a static ETHTOOL link-mode identity table keyed on (port, speed, duplex). Both leaves are populated for unambiguous media (copper, DAC, copper-T); for generic fiber where the (port, speed, duplex) tuple can map to multiple PMDs (SR vs LR vs ER, etc.) only the phy-type family identity is emitted — guessing the PMD would be misleading. Future SFP EEPROM reads (ethtool -m) could refine pmd-type at runtime. cli_pretty prefers pmd-type (specific) and falls back to phy-type (family) for display. yanger also emits ietf-interfaces:speed and fixes a long-standing 'auto-negotation' typo (yanger had never matched ethtool's correctly- spelled JSON field, so operational auto-negotiation always read 'unknown'). No config migration needed: the only config-true leaf in the ethernet container, auto-negotiation/enable, is unchanged across the model upgrade. Closes #530 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
1 parent 5cf180b commit 11bad29

19 files changed

Lines changed: 4169 additions & 1176 deletions

src/confd/yang/confd.inc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ MODULES=(
4444
"infix-meta@2025-12-10.yang"
4545
"infix-system@2026-03-09.yang"
4646
"infix-services@2026-03-20.yang"
47-
"ieee802-ethernet-interface@2019-06-21.yang"
48-
"infix-ethernet-interface@2024-02-27.yang"
47+
"ieee802-ethernet-interface@2025-09-10.yang"
48+
"ieee802-ethernet-phy-type@2025-09-10.yang"
49+
"infix-ethernet-interface@2026-05-18.yang"
4950
"infix-factory-default@2023-06-28.yang"
50-
"infix-interfaces@2026-05-13.yang -e vlan-filtering"
51+
"infix-interfaces@2026-05-18.yang -e vlan-filtering"
5152
"ietf-crypto-types -e cleartext-symmetric-keys"
5253
"infix-crypto-types@2026-02-14.yang"
5354
"ietf-keystore -e symmetric-keys"

0 commit comments

Comments
 (0)