NetworkManager applet shows wrong wired interface name

Bug #536826 reported by Roland Dreier
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Expired
Undecided
Unassigned
udev (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: network-manager

I'm running an up-to-date Lucid system, and I just noticed the following glitch; I'm not sure which version it might have started in. In any case, I have a workstation with two Intel gigabit NICs on-board, and I'm using a Chelsio dual-port PCIe add-on board as my actual network interface. To be precise:

$ for i in $(seq 0 3); do echo; echo == eth$i ==; ethtool -i eth$i; done

== eth0 ==
driver: e1000e
version: 1.0.2-k2
firmware-version: 0.15-5
bus-info: 0000:03:00.0

== eth1 ==
driver: e1000e
version: 1.0.2-k2
firmware-version: 0.5-7
bus-info: 0000:04:00.0

== eth2 ==
driver: cxgb3
version: 1.1.3-ko
firmware-version: T 7.4.0 TP 1.1.0
bus-info: 0000:06:00.0

== eth3 ==
driver: cxgb3
version: 1.1.3-ko
firmware-version: T 7.4.0 TP 1.1.0
bus-info: 0000:06:00.0

The actual port I am using is eth2 from the Chelsio cxgb3 NIC:

$ ifconfig eth2
eth2 Link encap:Ethernet HWaddr 00:07:43:05:37:2d
          inet addr:10.33.42.9 Bcast:10.33.42.255 Mask:255.255.255.0
          inet6 addr: 2001:420:4:e105:207:43ff:fe05:372d/64 Scope:Global
          inet6 addr: fe80::207:43ff:fe05:372d/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:18701 errors:0 dropped:0 overruns:0 frame:0
          TX packets:17444 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6690318 (6.6 MB) TX bytes:2824052 (2.8 MB)
          Interrupt:16 Memory:fafff000-faffffff

However, as the attached screenshot shows, the NM applet shows my active connection as being "Intel Corporation 82573L Gigabit Ethernet Controller" instead of as the Chelsio NIC as it should.

Perhaps there's an issue because the Chelsio NIC has two separate ports/netdevs but only one PCI device??

ProblemType: Bug
Architecture: amd64
CRDA: Error: [Errno 2] No such file or directory
Date: Wed Mar 10 10:19:30 2010
DistroRelease: Ubuntu 10.04
Gconf:

IpRoute:
 10.33.42.0/24 dev eth2 proto kernel scope link src 10.33.42.9 metric 1
 169.254.0.0/16 dev eth2 scope link metric 1000
 default via 10.33.42.1 dev eth2 proto static
Keyfiles: Error: [Errno 2] No such file or directory
Package: network-manager 0.8-0ubuntu2
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.32-16.25-generic
RfKill:

SourcePackage: network-manager
Uname: Linux 2.6.32-16-generic x86_64

Revision history for this message
Roland Dreier (roland.dreier) wrote :
Revision history for this message
TJ (tj) wrote :

I can confirm this. I've been noticing it over the last couple of weeks with a Sony Vaio VGN-FE41Z laptop that has an internal Intel Pro 100/VE and an external Intel 82573L Gigabit Ethernet Controller in the docking station.

I first noticed that nmapplet showed the names of these two devices transposed. Looking today I noticed that the Gigabit interface has the name of the Pro 100, but the Pro 100 just shows "eth1".

I've attached a screenshot.

$ sudo lshw -c network
  *-network
       description: Ethernet interface
       product: 82573L Gigabit Ethernet Controller
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       logical name: eth0
       version: 00
       serial: 00:13:a9:13:15:8a
       size: 100MB/s
       capacity: 1GB/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e1000e driverversion=1.0.2-k2 duplex=full firmware=0.5-1 ip=10.254.251.89 latency=0 link=yes multicast=yes port=twisted pair speed=100MB/s
       resources: irq:29 memory:ca000000-ca01ffff memory:c8000000-c83fffff ioport:3000(size=32)
  *-network
       description: Wireless interface
       product: PRO/Wireless 3945ABG [Golan] Network Connection
       vendor: Intel Corporation
       physical id: 0
       bus info: pci@0000:06:00.0
       logical name: wlan0
       version: 02
       serial: 00:19:d2:1a:18:49
       width: 32 bits
       clock: 33MHz
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
       configuration: broadcast=yes driver=iwl3945 ip=10.254.251.51 latency=0 multicast=yes wireless=IEEE 802.11abg
       resources: irq:30 memory:ce000000-ce000fff
  *-network
       description: Ethernet interface
       product: PRO/100 VE Network Connection
       vendor: Intel Corporation
       physical id: 8
       bus info: pci@0000:0a:08.0
       logical name: eth1
       version: 02
       serial: 00:13:a9:86:51:bd
       size: 10MB/s
       capacity: 100MB/s
       width: 32 bits
       clock: 33MHz
       capabilities: pm bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=e100 driverversion=3.5.24-k2-NAPI duplex=half firmware=N/A latency=64 link=no maxlatency=56 mingnt=8 multicast=yes port=MII speed=10MB/s
       resources: irq:20 memory:d6005000-d6005fff ioport:7000(size=64)

Changed in network-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
TJ (tj) wrote :
Download full text (4.5 KiB)

I suspected the problem was in libnm-glib/nm-device.c::nm_device_update_description() where it walks up the udev chain trying to find the vendor and device ID.

The devices are:

$ lspci -nn | grep Ethernet
02:00.0 Ethernet controller [0200]: Intel Corporation 82573L Gigabit Ethernet Controller [8086:109a]
0a:08.0 Ethernet controller [0200]: Intel Corporation PRO/100 VE Network Connection [8086:1092] (rev 02)

I then investigated the udev database and discovered that it appears to be incorrect:

ls -al /dev/.udev/db/net*
-rw-r--r-- 1 root root 155 2010-04-02 02:53 /dev/.udev/db/net:eth0
-rw-r--r-- 1 root root 173 2010-04-02 02:53 /dev/.udev/db/net:wlan0

cat /dev/.udev/db/net:eth0
E:ID_VENDOR_FROM_DATABASE=Intel Corporation
E:ID_MODEL_FROM_DATABASE=PRO/100 VE Network Connection
E:ID_BUS=pci
E:ID_VENDOR_ID=0x8086
E:ID_MODEL_ID=0x1092

There is no entry for eth1, and the entry for eth0 is the "Pro/100 VE" as reported by nmapplet.

Looking at the udev log I see the interface renaming operations:

KERNEL[1270173183.421930] add /devices/pci0000:00/0000:00:1c.0/0000:02:00.0/net/eth1 (net)
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/net/eth1
SUBSYSTEM=net
INTERFACE=eth1
IFINDEX=3
SEQNUM=1396

KERNEL[1270173183.427303] add /devices/pci0000:00/0000:00:1e.0/0000:0a:08.0/net/eth0 (net)
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:0a:08.0/net/eth0
SUBSYSTEM=net
INTERFACE=eth0
IFINDEX=2
SEQNUM=1481

Notice at this point eth1 is 02:00.0 (82573L Gigabit) and eth1 is 0a:08.0 ( PRO/100 VE).

KERNEL[1270173184.114691] move /devices/pci0000:00/0000:00:1c.0/0000:02:00.0/net/eth1_rename (net)
UDEV_LOG=3
ACTION=move
DEVPATH=/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/net/eth1_rename
SUBSYSTEM=net
DEVPATH_OLD=/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/net/eth1
INTERFACE=eth1_rename
IFINDEX=3
SEQNUM=1745

KERNEL[1270173185.187057] move /devices/pci0000:00/0000:00:1e.0/0000:0a:08.0/net/eth1 (net)
UDEV_LOG=3
ACTION=move
DEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:0a:08.0/net/eth1
SUBSYSTEM=net
DEVPATH_OLD=/devices/pci0000:00/0000:00:1e.0/0000:0a:08.0/net/eth0
INTERFACE=eth1
IFINDEX=2
SEQNUM=1769

At this point the Pro/100 VE is eth1 and the 82573L Gigabit is eth1_rename.

UDEV [1270173185.187821] add /devices/pci0000:00/0000:00:1e.0/0000:0a:08.0/net/eth1 (net)
UDEV_LOG=3
ACTION=add
DEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:0a:08.0/net/eth1
SUBSYSTEM=net
INTERFACE=eth1
IFINDEX=2
SEQNUM=1481
ID_VENDOR_FROM_DATABASE=Intel Corporation
ID_MODEL_FROM_DATABASE=PRO/100 VE Network Connection
ID_BUS=pci
ID_VENDOR_ID=0x8086
ID_MODEL_ID=0x1092
INTERFACE_OLD=eth0

UDEV [1270173185.188128] move /devices/pci0000:00/0000:00:1e.0/0000:0a:08.0/net/eth1 (net)
UDEV_LOG=3
ACTION=move
DEVPATH=/devices/pci0000:00/0000:00:1e.0/0000:0a:08.0/net/eth1
SUBSYSTEM=net
DEVPATH_OLD=/devices/pci0000:00/0000:00:1e.0/0000:0a:08.0/net/eth0
INTERFACE=eth1
IFINDEX=2
SEQNUM=1769

KERNEL[1270173185.217005] move /devices/pci0000:00/0000:00:1c.0/0000:02:00.0/net/eth0 (net)
UDEV_LOG=3
ACTION=move
DEVPATH=/devices/pci0000:00/0000:00:1c.0/0000:02:00.0/net/eth0
SUBSYSTEM=net
DEVPATH_OLD=/devices/pci0000:00/0000:00:1...

Read more...

Revision history for this message
TJ (tj) wrote :

For completeness here's /etc/udev/rules.d/70-persistent-net.rules:

# This file maintains persistent names for network interfaces.
# See udev(7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# file; however you are also free to add your own entries.

# PCI device 0x8086:0x4222 (iwl3945)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:19:d2:1a:18:49", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"

# PCI device 0x8086:0x109a (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:a9:13:15:8a", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x8086:0x1092 (e100)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:a9:86:51:bd", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

Revision history for this message
TJ (tj) wrote :

Scott, I've subscribed you in the hope you can tell whether or not udev is at fault here with the misnamed interfaces or this is something more subtle?

Revision history for this message
Evan Huus (eapache) wrote :

I am also seeing this bug, however I am specifically able to turn it on and off, so I may be able to shed a little more light on the situation.

I have a built-in Intel NIC, and two PCI-pluggable Realtek NICs.
When I installed lucid, my udev rules were:

# PCI device 0x10ec:0x8169 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0a:cd:17:f6:2b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x10ec:0x8169 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0a:cd:17:f6:3e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x8086:0x10c0 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:21:9b:05:a3:8f", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

Udev assigns the eth* names in order by MAC address (I think).
At this point, network-manager works fine.

After installation, I renamed and reordered the interfaces so that they are indexed in the order the ports actually physically are on the PC (I'm a stickler for order that way :D). My udev rules are now:

# PCI device 0x8086:0x10c0 (e1000e)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:21:9b:05:a3:8f", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

# PCI device 0x10ec:0x8169 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0a:cd:17:f6:3e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

# PCI device 0x10ec:0x8169 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0a:cd:17:f6:2b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

Network-manager now picks up eth0 as a Realtek card, and lists eth2 without any hardware information. Changing the file back to its original state, however, fixes the problem: I just end up with a naming order I don't particularly like.

My tentative conclusion is that when the order and names of the devices in the udev rules file are not what udev expects, then it gets confused.

TJ, could you try reordering and renaming your net rules and see if that helps or changes the situation?

Martin Pitt (pitti)
Changed in udev (Ubuntu):
status: New → Invalid
Revision history for this message
bujdi (sandor-bujdoso) wrote :

This glitch also affects me.
The funny thing is that nm-tool reports the correct speed while the gnome-applet does not.

Revision history for this message
Thomas Hood (jdthood) wrote :

@Roland, bujdi: Can you reproduce the problem in Ubuntu 12.04?

Changed in network-manager (Ubuntu):
status: Confirmed → Incomplete
summary: - Network Manager applet shows wrong wired interface name
+ NetworkManager applet shows wrong wired interface name
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for network-manager (Ubuntu) because there has been no activity for 60 days.]

Changed in network-manager (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.