On machine with two physical interfaces NM announces second interface up even though it is unplugged
Hi,
I have a physical machine with two ethernet interfaces. By default, I want users to use eth0 as primary interface. However, it should be possible to use eth1 (which is ens224 on the system) as a dedicated interface for another network (segment). This is facultative. (I'm using VMware to emulate this, it behaves exactly as the physical hardware. Summary on HW and OS below.)
-
eth0 is connected (cable plugged, DHCP) and working
-
eth1 (aka ens224) is NOT connected (NO cable plugged in)
-
User assigns an IP address, netmask, DNS, and gateway to eth1
-
NM tells me the interface is up [GENERAL.STATE: 100 (connected)], which is NOT true:
GENERAL.DEVICE: ens224
GENERAL.TYPE: ethernet
GENERAL.HWADDR: 00:0C:29:xx:xx:xx
GENERAL.MTU: 1500
GENERAL.STATE: 100 (connected)
GENERAL.CONNECTION: eth1
Interestingly, the kernel tells the truth (DOWN for ip link'' or a boolean
0'' for sysfs, respectively):
3: ens224: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
link/ether 00:0c:29:xx:xx:xx brd ff:ff:ff:ff:ff:ff
and
# cat /sys/class/net/ens224/carrier
0
So, why does NM tag this interface with a GENERAL.STATE: 100 (connected)?
When activating the interface (aka ``plugging in a cable'') it shows the appropriate log message:
Nov 24 12:07:21 funnyhostname kernel: IPv6: ADDRCONF(NETDEV_CHANGE): ens224: link becomes ready
This is vanilla Debian 10.6 (4.19.0-11-amd64 #1 (closed) SMP Debian 4.19.146-1 (2020-09-17) x86_64 GNU/Linux) running nm 1.14.6-2+deb10u1.
HW: Intel® I219-LM and Intel® I211-AT