Link state in vtysh doesn't reflect carrier state

Alasdair Muckart alasdairmuckart at catalyst.net.nz
Mon Nov 20 20:15:14 UTC 2023


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Hi all,

I'm seeing what feels like misleading reporting of interface state in the
'brief' version of 'show int' commands and wondering if it's intentional, a
bug, or if I'm missing something.

Platform is Ubuntu 22.04, FRR 9.0.1 installed from the frr apt repo,
kernel 5.14.0.

In the output of 'sh int brief' and 'sh int desc' 'Status' is the admin status
not the link status, so it shows interfaces as being 'up' when they have no
carrier.

This is inconsistent with how linux iproute2 tools report, and to me, it makes
the brief output of 'show int' misleading.

If there's only one 'status' column it should be the line protocol state not
the admin state because that's the most important one for knowing if the link
is actually up or not. The ideal would be to include both the way Cisco does.

In this example enp4s0 and enp11s0f0 are both NO-CARRIER but 'sh int br'
shows them as 'up':

- --- cut ---
rtr# sh int br
Interface       Status  VRF             Addresses
- ---------       ------  ---             ---------
enp2s0          up      default         202.XXX.XXX.19/25
                                        + 2404:XXX:X:XX:XXXX:XXXX:XXXX:da1b/64
enp3s0          down    default
enp4s0          up      default
enp5s0          down    default
enp6s0f0        down    default
enp6s0f1        down    default
enp6s0f2        down    default
enp6s0f3        down    default
enp10s0f0       down    default
enp10s0f1       down    default
enp11s0f0       up      default         192.168.144.3/24
                                        192.168.144.32/32
                                        192.168.144.33/32
                                        192.168.144.34/32
                                        192.168.144.35/32
                                        192.168.144.36/32
                                        192.168.144.37/32
                                        192.168.144.38/32
                                        192.168.144.39/32
                                        192.168.144.40/32
                                        192.168.144.41/32
                                        192.168.144.42/32
                                        192.168.144.43/32
                                        192.168.144.44/32
                                        192.168.144.45/32
                                        192.168.144.46/32
                                        192.168.144.47/32
enp11s0f1       down    default
lo              up      default         192.168.157.2/32
wg1             up      default         192.168.159.1/31
wg3             up      default         192.168.159.10/31
wg4             up      default         192.168.159.12/31
- --- cut ---

A non-brief 'show interface' shows that frr knows the line protocol is down:
- --- cut ---
rtr# show int enp4s0
Interface enp4s0 is up, line protocol is down
  Link ups:       0    last: (never)
  Link downs:     7    last: 2023/11/21 09:27:02.34
  vrf: default
  Description:
  OS Description: lldpd: was connected to
  index 4 metric 0 mtu 1500 speed 4294967295
  flags: <UP,BROADCAST,MULTICAST>
  Type: Ethernet
  HWaddr: 90:3c:b3:3f:da:1d
  Interface Type Other
  Interface Slave Type None
  protodown: off
- --- cut ---

iproute2 and systemd-networkd tools show the interfaces as having no carrier:
- --- cut ---
root at rtr:~# ip -br link
lo               UNKNOWN        00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
enp2s0           UP             90:3c:b3:3f:da:1b <BROADCAST,MULTICAST,UP,LOWER_UP>
enp3s0           DOWN           90:3c:b3:3f:da:1c <BROADCAST,MULTICAST>
enp4s0           DOWN           90:3c:b3:3f:da:1d <NO-CARRIER,BROADCAST,MULTICAST,UP>
enp5s0           DOWN           90:3c:b3:3f:da:1e <BROADCAST,MULTICAST>
enp6s0f0         DOWN           90:3c:b3:3f:da:1f <BROADCAST,MULTICAST>
enp6s0f1         DOWN           90:3c:b3:3f:da:20 <BROADCAST,MULTICAST>
enp6s0f2         DOWN           90:3c:b3:3f:da:21 <BROADCAST,MULTICAST>
enp6s0f3         DOWN           90:3c:b3:3f:da:22 <BROADCAST,MULTICAST>
enp10s0f0        DOWN           90:3c:b3:3f:da:23 <BROADCAST,MULTICAST>
enp10s0f1        DOWN           90:3c:b3:3f:da:24 <BROADCAST,MULTICAST>
enp11s0f0        DOWN           90:3c:b3:3f:da:25 <NO-CARRIER,BROADCAST,MULTICAST,UP>
enp11s0f1        DOWN           90:3c:b3:3f:da:26 <BROADCAST,MULTICAST>
wg1              UNKNOWN        <POINTOPOINT,NOARP,UP,LOWER_UP>
wg3              UNKNOWN        <POINTOPOINT,NOARP,UP,LOWER_UP>
wg4              UNKNOWN        <POINTOPOINT,NOARP,UP,LOWER_UP>

root at rtr:~# networkctl
IDX LINK      TYPE      OPERATIONAL SETUP
  1 lo        loopback  routable    unmanaged
  2 enp2s0    ether     routable    configured
  3 enp3s0    ether     off         unmanaged
  4 enp4s0    ether     no-carrier  configuring
  5 enp5s0    ether     off         unmanaged
  6 enp6s0f0  ether     off         unmanaged
  7 enp6s0f1  ether     off         unmanaged
  8 enp6s0f2  ether     off         unmanaged
  9 enp6s0f3  ether     off         unmanaged
 10 enp10s0f0 ether     off         unmanaged
 11 enp10s0f1 ether     off         unmanaged
 12 enp11s0f0 ether     no-carrier  unmanaged
 13 enp11s0f1 ether     off         unmanaged
 14 wg1       wireguard routable    unmanaged
 15 wg3       wireguard routable    unmanaged
 16 wg4       wireguard routable    unmanaged
- --- cut ---

Thanks.

- -- 
Alasdair Muckart (he/him)
Network Infrastructure Architect
Catalyst.Net Limited - Expert Open Source Solutions

Catalyst.Net Ltd - a Catalyst IT group company
DDI: +64 4 897 7794 | Mobile: +64 22 638 5141 | Tel: +64 4 499 2267 | www.catalyst.net.nz

CONFIDENTIALITY NOTICE: This email is intended for the named
recipients only. It may contain privileged, confidential or copyright
information. If you are not the named recipient, any use, reliance
upon, disclosure or copying of this email or its attachments is
unauthorised. If you have received this email in error, please reply
via email or call +64 4 499 2267.
-----BEGIN PGP SIGNATURE-----

iQJUBAEBCgA+FiEEu4g3jwJ68cPCdgH9iBAgH4ERwwMFAmVbxiQgHGFsYXNkYWly
bXVja2FydEBjYXRhbHlzdC5uZXQubnoACgkQiBAgH4ERwwP1sQ//azguDZLHt5ur
rNjZYqoovQw1aKkxhYPIWjykqX7bvVpI4CkeaYMsUQEyBktPIBUjfTAmjQ7qTCn1
HLZsizWjI1ZxEfj0uIMb582mUd0hOr5NTDromwHnM53W3R6kHwXXzB3ton76p9nx
D5xBfvjFlGvk70YxwRXHz1ObA+RjXXYZ2rMrHvUq54r0vcroMO1pHPbIh/Z7ovAs
h4gZ+D5kwPTYfga+47a/DRMs/vmNuqX9RB5qRGoDJ62qMnjYssB5IHj4xTxoVvZ+
8XRNpP1KNrXRPfPzTSQizDB5thqPqHplraVCuw7izUt25ACZLxmkHX4FgJVFyVnl
0Nq4fT9M8+RAUd0AlUFDvCFKH0UFV69wmVO2oXX3DecXaLttqiw6dYrDu1zNdmkM
pJtvmkoYiJMhiloAH3vuc/K2cBkSOrE7dyiV0XV9nSRlQ23vkTRe3PEMc7TIMxq5
o3M67TnWbkrzDjfZH268retgHess7xRs9yqnrGtWGJ1mq093HgmjPqRfyuU4R3EP
bcdFAHDscUXw7ZiLZ9D3KZQC7bADPz2Uhxs0BXliO9O7rm5f79Z5rkbNGG3AsFgm
LtvkMF2Aj9PeYiMJo4F1YlI/SaUvi574Ky19g4ktY+Ni+agZXWH/iKb0Q4Y4UwWA
FDN/g2a5xafBH2PtLrENwIXh0jeYqtw=
=3qCF
-----END PGP SIGNATURE-----



More information about the frog mailing list