# Networking and udev issue with interface 'lo' [SOLVED]

## eno2001

I'm not exactly sure what happened, but I was just setting up my nc6220 laptop per a Gentoo Wiki HOWTO and everything was going fine. I decided to play with some USE flags and did a --newuse rebuild of system and world.  Things were going great until something caused my udev version to go from 087-r1 rto 100.  Then I started getting a bunch of errors on boot, my ipw2200 Wireless NIC stopped working, etc...  So I played around and unmerged some stuff and finally got myself back to udev-087-r1.  Nrealy everything that was a problem is cleared up except that I can't get my 'lo' interface to come up.  When I try, it complains about making sure I have the module loaded! ?  I also noticed that when I do an iwconfig for the wireless, it lists three eth devices when there are only two.  I have eth0 which I think is really my lo interface.  Then eth1 is the TG3 wired NIC and eth2 is the wireless.  My guess is that I've got some kind of boggled rule for udev somewhere on the system, but I'll be damned if I can find it.  I ran an etc-update to take care of the updated files after my most recent thrashing about and merged the few files that were there.  It was mostly unrelated and inconequential stuff for cups and bash.  The even weirder thing is that none of the 'lo' interface errors are conveyed in/var/log/messages.  I only see them on the console when booting.  Anyone ever run into this?Last edited by eno2001 on Sun Oct 22, 2006 4:18 am; edited 2 times in total

----------

## eno2001

It is as I expected.  My interface 'lo' has been renamed to 'eth0' somehow.  I suspect this is udev, but I'm not sure.  Here's how I've come to this conclusion:

nc6220 ~ # ifconfig eth0

eth0      Link encap:Local Loopback  

          LOOPBACK  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

If you pay close attention you'll notice that the Link encap is "Local Loopback".  So my lo interface is there, but it has the wrong name.  I suspect that some glitch in udev is somehow renaming lo to eth0 based on some strange rule.  Any ideas?

----------

## nixnut

Moved from Installing Gentoo to Networking & Security.

Networking problem, so moved here.

----------

## eno2001

Thanks to nixnut for moving my post to the right place.  Here's what I've found I can do to change things:

nc6220 ~ # ifconfig eth0 0.0.0.0 down

nc6220 ~ # nameif lo 00:00:00:00:00:00

nc6220 ~ # ifconfig lo 127.0.0.1 up

nc6220 ~ # ifconfig

eth1      Link encap:Ethernet  HWaddr 00:0E:35:C6:71:30  

          inet addr:192.168.20.21  Bcast:192.168.20.255  Mask:255.255.255.0

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:1300461 errors:0 dropped:8 overruns:0 frame:0

          TX packets:2865681 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:104918899 (100.0 Mb)  TX bytes:501271146 (478.0 Mb)

          Interrupt:21 Base address:0xe000 Memory:d0400000-d0400fff 

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

So that works after the fact, but why is my lo interface being configured as eth0 to begin with?  This has to have something to do with udev...

----------

## eno2001

Poking around the forum here I saw that someone mentioned a 'udevtest' script to check out what's going on with udev.  I tried it and it reproduced a few of the multitude of errors I'm seeing with udev-event at boot time.  I suspect that come config file involving udev somewhere on my system didn't get updated properly, but I haven't a clue which one.  See the output of udevtest below for my 'lo' interface:

nc6220 conf.d # udevtest /class/net/lo

add_to_rules: unknown key 'DRIVERS', in 'BUS'

add_to_rules: unknown key 'SUBSYSTEMS', in 'SUBSYSTEMS'

add_to_rules: unknown key 'SUBSYSTEMS', in 'SUBSYSTEMS'

add_to_rules: unknown key 'ATTRS{bInterfaceClass}', in 'SUBSYSTEMS'

add_to_rules: unknown key 'ATTRS{bInterfaceProtocol}', in 'SUBSYSTEMS'

add_to_rules: unknown key 'SUBSYSTEMS', in 'SUBSYSTEMS'

add_to_rules: unknown key 'ATTRS{bInterfaceClass}', in 'SUBSYSTEMS'

add_to_rules: unknown key 'ATTRS{bInterfaceProtocol}', in 'SUBSYSTEMS'

add_to_rules: unknown key 'DRIVERS', in 'DRIVERS'

add_to_rules: unknown key 'DRIVERS', in 'DRIVERS'

add_to_rules: unknown key 'DRIVERS', in 'DRIVERS'

add_to_rules: unknown key 'ATTRS{name}', in 'ATTRS{name}'

add_to_rules: unknown key 'ATTRS{modalias}', in 'ATTRS{modalias}'

add_to_rules: unknown key 'ATTRS{modalias}', in 'ATTRS{modalias}'

add_to_rules: unknown key 'ATTRS{removable}', in 'KERNEL'

add_to_rules: unknown key 'DRIVERS', in 'KERNEL'

add_to_rules: unknown key 'ATTRS{removable}', in 'KERNEL'

add_to_rules: unknown key 'ATTRS{ieee1394_id}', in 'KERNEL'

add_to_rules: unknown key 'ATTR{removable}', in 'KERNEL'

add_to_rules: unknown key 'DRIVERS', in 'SUBSYSTEM'

add_to_rules: unknown key 'ATTRS{address}', in 'SUBSYSTEM'

add_to_rules: unknown key 'DRIVERS', in 'ACTION'

add_to_rules: unknown key 'SUBSYSTEMS', in 'SUBSYSTEMS'

add_to_rules: unknown key 'SUBSYSTEMS', in 'SUBSYSTEMS'

add_to_rules: unknown key 'SUBSYSTEMS', in 'SUBSYSTEMS'

add_to_rules: unknown key 'SUBSYSTEMS', in 'SUBSYSTEMS'

main: looking at device '/class/net/lo' from subsystem 'net'

wait_for_sysfs: file '/sys/class/net/lo/address' appeared after 0 loops

udev_rules_get_name: rule applied, 'lo' becomes 'eth0'

rename_net_if: changing net interface name from 'lo' to 'eth0'

udev_add_device: renamed netif to 'eth0'

main: run: 'udev_run_devd net'

main: run: 'socket:/org/kernel/udev/monitor'

main: run: 'socket:/org/freedesktop/hal/udev_event'

It gets name eth0, and I believe it has something to do with all those "unknown key" errors.  Some portion of the udev conf system is not properly configured.  What I need to do now is somehow completely remove udev (including all configs) from my system and then re-install it in the hope that I will get a new set of configs that will work properly.  Does this sound like something anyone would recommend?

----------

## eno2001

The solution was cheesier than I would have liked because I don't know the exact problem.  But here's what I did:

1. emerge --umerge udev

2. mv /etc/udev* /root (for backup)

3. emerge udev

Then I rebooted and the system was fine except for some config changes I made while trying to solve the problem.  I suspect that when my system somehow upgraded udev from 087-r1 to 100 the /etc/udev/rules.d directory changed to accomodate the newer version of udev.  Then when I downgraded back to 087-r1, the newer rule files were left in place and the older version didn't know what to do with them.  Hence all the errors I noted when I ran 'udevtest'.  By completely removing /etc/udev* and letting emerge just rebuild those dirs, the odd files that were left over from the newer version of udev were wiped out.  So, that means that something is wrong about the unmerge for udev-100, in that it leaves config files behind.  At least, that is assuming the emerge --unmerge SHOULD remove config files at all.  I might be wrong about that assumption since it could wipe out custom configs.  I would suggest that it might be a good idea to note somewhere related to udev, that people should wipe out all udev configs when downgrading versions of udev.

----------

## Sput

Nice work eno2001, looks like you just kept me with Gentoo! It seems we were suffering with the same problem at the same time - but you had the patience to sort the problem out whereas I was just stomping around the room fuming.

I was cursing Gentoo since every time I do an emerge --update --deep world, I end up having to fix things for about a week. Although I think in this case my problems were down to my own stupidity; I'd run the above emerge with ACCEPT_KEYWORDS="~x86" because I was too lazy to edit package.keywords   :Embarassed:  . I'd run an emerge -e world to repair this but ended up in the same position as yourself.

Unmerging udev, and then re-emerging it as you suggested worked straight off - and it had the bonus of solving the problem that my nvidia driver wasn't loading. Top work again!   :Very Happy:  (So for the time being, I won't be defecting!)

----------

## eno2001

 *Sput wrote:*   

> Nice work eno2001, looks like you just kept me with Gentoo!

 

Shucks   :Embarassed:   and I'm new here too.  Well, I'm glad my post helped at least one person.  Glad to hear you're staying with Gentoo.  I'm in the middle of a little fixit hell on another system again because of an emerge --update --deep world...  So I hear your frustration.

----------

## albright

 *Quote:*   

> stomping around the room fuming

 

... I know the feeling (and had the same problem)  :Smile: 

----------

## ferreirafm

That's almost solved my problem also. After reboot, looback networking didn't work fine.

```

labrador ferreirafm # ifconfig -a

eth0       Encapsulamento do Link: Ethernet  Endereço de HW 00:08:54:24:83:48 

          inet end.: 192.168.12.37  Bcast:192.168.12.255  Masc:255.255.255.0

          UP BROADCASTRUNNING MULTICAST  MTU:1500  Métrica:1

          RX packets:134 errors:0 dropped:0 overruns:0 frame:0

          TX packets:86 errors:0 dropped:0 overruns:0 carrier:0

          colisões:0 txqueuelen:1000

          RX bytes:83567 (81.6 Kb)  TX bytes:8692 (8.4 Kb)

          IRQ:17 Endereço de E/S:0xec00

lo         Encapsulamento do Link: Loopback Local

          LOOPBACK MTU:16436  Métrica:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          colisões:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

```

So, I have to restart net.lo for the problem desappear.

```

labrador ferreirafm # /etc/init.d/net.eth0 restart

 * Service net.eth0 stopping

 * Service net.eth0 stopped

 * Service net.eth0 starting

 * Service net.eth0 started

labrador ferreirafm # ifconfig -a

eth0       Encapsulamento do Link: Ethernet  Endereço de HW 00:08:54:24:83:48 

          inet end.: 192.168.12.37  Bcast:192.168.12.255  Masc:255.255.255.0

          UP BROADCASTRUNNING MULTICAST  MTU:1500  Métrica:1

          RX packets:431 errors:0 dropped:0 overruns:0 frame:0

          TX packets:174 errors:0 dropped:0 overruns:0 carrier:0

          colisões:0 txqueuelen:1000

          RX bytes:190801 (186.3 Kb)  TX bytes:25493 (24.8 Kb)

          IRQ:17 Endereço de E/S:0xec00

lo         Encapsulamento do Link: Loopback Local

          inet end.: 127.0.0.1  Masc:255.0.0.0

          UP LOOPBACKRUNNING  MTU:16436  Métrica:1

          RX packets:567 errors:0 dropped:0 overruns:0 frame:0

          TX packets:567 errors:0 dropped:0 overruns:0 carrier:0

          colisões:0 txqueuelen:0

          RX bytes:200859 (196.1 Kb)  TX bytes:200859 (196.1 Kb)

```

Rebooting again makes the local network to stop.

Any clues are appreciated.

Thanks,

Fred

----------

## blackcell

Thanks for this thread! I too had been bitten by this udev-103 update. Luckily, followed some advice here and restored my system back to udev-087-r1. Damn, I nearly ran outta beer trying to figure out what in hell went wrong.

udev-103 ifconfig -a:

eth0      Link encap:UNSPEC  HWaddr 80-5B-06-00-DB-8F-87-00-00-00-00-00-00-00-00-00  

          inet addr:192.168.101.40  Bcast:192.168.0.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:148 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 b)  TX bytes:6720 (6.5 Kb)

eth1      Link encap:Ethernet  HWaddr 00:90:27:9D:35:22  

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:95 errors:0 dropped:0 overruns:0 frame:0

          TX packets:95 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:9570 (9.3 Kb)  TX bytes:9570 (9.3 Kb)

udev-087-r1 ifconfig -a:

eth0      Link encap:Ethernet  HWaddr 00:90:27:9D:35:22  

          inet addr:192.168.101.40  Bcast:192.168.0.255  Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:6 errors:0 dropped:0 overruns:0 frame:0

          TX packets:27 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:774 (774.0 b)  TX bytes:3058 (2.9 Kb)

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:4 errors:0 dropped:0 overruns:0 frame:0

          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:280 (280.0 b)  TX bytes:280 (280.0 b)

Now, I can take my time on figuring out this mess with udev.

Thanks!

----------

## ferreirafm

Just in case of someone run into problems like mine, raise the net.lo initscript from the boot level and the problem disappears.

----------

