NIC names - confusion

Bug #49121 reported by Pazkooda
2
Affects Status Importance Assigned to Milestone
udev (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I'm not sure if it's appropriate package but...
On my computer there are 2 network card. On breezy their names were: eth0, eth1. After upgrade (first reboot) eth0 disappears, but eth2 appear and works as eth0... untill next reboot. Some time those to NICs swap (eth1->eth2, eth2->eth1, but still no eth0).

Some info:

<code> ip a </code>
1: lo: <LOOPBACK,UP> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:13:21:f3:e2:9e brd ff:ff:ff:ff:ff:ff
    inet 10.8.23.170/24 brd 10.8.23.255 scope global eth1
    inet6 fe80::213:21ff:fef3:e29e/64 scope link
       valid_lft forever preferred_lft forever
3: eth2: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:02:b3:96:a1:94 brd ff:ff:ff:ff:ff:ff
    inet 10.8.22.170/24 brd 10.8.22.255 scope global eth2
    inet6 fe80::202:b3ff:fe96:a194/64 scope link
       valid_lft forever preferred_lft forever
4: sit0: <NOARP> mtu 1480 qdisc noop
    link/sit 0.0.0.0 brd 0.0.0.0

<code> dmesg |grep -i eth </code>

[4294681.024000] eth0: Tigon3 [partno(BCM95752) rev 6001 PHY(5752)] (PCI Express) 10/100/1000BaseT Ethernet 00:13:21:f3:e2:9e
[4294681.024000] eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] Split[0] WireSpeed[1] TSOcap[1]
[4294681.024000] eth0: dma_rwctrl[76180000]
[4294681.649000] e100: eth0: e100_probe: addr 0xe0520000, irq 217, MAC addr 00:02:B3:96:A1:94
[4294836.798000] ADDRCONF(NETDEV_UP): eth1: link is not ready
[4294840.083000] e100: eth2: e100_watchdog: link up, 100Mbps, full-duplex
[4294851.032000] eth2: no IPv6 routers present
[4294884.030000] ADDRCONF(NETDEV_UP): eth1: link is not ready
[4294887.113000] tg3: eth1: Link is up at 1000 Mbps, full duplex.
[4294887.113000] tg3: eth1: Flow control is on for TX and on for RX.
[4294887.113000] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[4294897.255000] eth1: no IPv6 routers present
[4294996.588000] tg3: eth1: Link is down.
[4294998.113000] e100: eth2: e100_watchdog: link down
[4295052.917000] ADDRCONF(NETDEV_UP): eth2: link is not ready
[4295159.346000] ADDRCONF(NETDEV_UP): eth1: link is not ready
[4295252.954000] e100: eth2: e100_watchdog: link up, 100Mbps, full-duplex
[4295252.954000] ADDRCONF(NETDEV_CHANGE): eth2: link becomes ready
[4295263.090000] eth2: no IPv6 routers present
[4295266.821000] tg3: eth1: Link is up at 1000 Mbps, full duplex.
[4295266.821000] tg3: eth1: Flow control is on for TX and on for RX.
[4295266.822000] ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[4295277.462000] eth1: no IPv6 routers present

Strange, there is eth0 at start. But it's being "overwritten" by eth2.
Also network-monitor-gnome says: <i> No network connections present</i> but gnome-netstatus-applet finds both of those NICs.

One more thing - setting aliases in /etc/modprobe.d/aliases like that:
alias eth0 e100
alias eth1 tg3
doesn't change anything.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Edit your /etc/iftab file and ensure that there are two lines like:

eth0 mac 00:02:b3:96:a1:94 arp 1
eth1 mac 00:13:21:f3:e2:9e arp 1

Changed in udev:
status: Unconfirmed → Rejected
Revision history for this message
alrac (carla) wrote :

I guess the user is supposed to telepathically know what iftab is? /etc/iftab is part of the ifrename package, which is not part of the stock *buntu installation. Just install ifrename, then follow the above example. Works like a charm.

You cannot predict what order the kernel will bring up interfaces in, this is typical of any Linux, though usually it is consistent until you upgrade or make some other change.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

DO NOT install ifrename! You will render your installation unworkabke.

In Ubuntu the /etc/iftab file is generated by the installer and used by udev

In future releases we hope to have it kept up to date automatically.

Revision history for this message
Pazkooda (pazkooda) wrote :

Well,

In fact I have had one totally unknown entry in /etc/iftab with line:
eth0 mac {here totally random MAC}
and where it came from I don't know.

What have helped me was removing/commenting this entry. After this simple step everything goes smoothly (at least with NICs, I have another problem with no sound which have been working on Dapper Beta 1 but not with Final - but it's a different story).

[cite]In Ubuntu the /etc/iftab file is generated by the installer and used by udev[/cite]

I guess it's better to put those two lines with eth0, eth1 in /etc/iftab for future upgrades.

Thanks for explanations.

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.