[lang]

Present Perfect

Personal
Projects
Packages
Patches
Presents
Linux

Picture Gallery
Present Perfect

NetworkManager confusion

Filed under: Hacking — Thomas @ 17:51

2009-02-23
17:51

We'd been getting a long for a while, but now I'm just really confused again.

Since a while, my home machine boots up setting its own IP address as the default gateway. I have no idea why.

After poking at it for the nth time, I noticed that choosing 'Auto Ethernet' works (gets IP and gateway from DHCP) and 'System eth0' does not.

Here's the message spew for the working one:

Feb 23 17:39:56 ana NetworkManager: (eth0): device state change: 8 -> 3
Feb 23 17:39:56 ana NetworkManager:
(eth0): deactivating device (reason: 0).
Feb 23 17:39:56 ana NetworkManager: check_one_route(): (eth0) error -34 returned from rtnl_route_del(): Sucess#012
Feb 23 17:39:56 ana avahi-daemon[3122]: Withdrawing address record for 192.168.1.12 on eth0.
Feb 23 17:39:56 ana avahi-daemon[3122]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.1.12.
Feb 23 17:39:56 ana avahi-daemon[3122]: Interface eth0.IPv4 no longer relevant for mDNS.
Feb 23 17:39:56 ana NetworkManager: Activation (eth0) starting connection 'Auto Ethernet'
Feb 23 17:39:57 ana NetworkManager:
(eth0): device state change: 3 -> 4
Feb 23 17:39:57 ana NetworkManager:
Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...
Feb 23 17:39:57 ana NetworkManager:
Activation (eth0) Stage 1 of 5 (Device Prepare) started...
Feb 23 17:39:57 ana NetworkManager:
Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...
Feb 23 17:39:57 ana NetworkManager:
Activation (eth0) Stage 1 of 5 (Device Prepare) complete.
Feb 23 17:39:57 ana NetworkManager:
Activation (eth0) Stage 2 of 5 (Device Configure) starting...
Feb 23 17:39:57 ana NetworkManager:
(eth0): device state change: 4 -> 5
Feb 23 17:39:57 ana NetworkManager:
Activation (eth0) Stage 2 of 5 (Device Configure) successful.
Feb 23 17:39:57 ana NetworkManager:
Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.
Feb 23 17:39:57 ana NetworkManager:
Activation (eth0) Stage 2 of 5 (Device Configure) complete.
Feb 23 17:39:57 ana NetworkManager:
Activation (eth0) Stage 3 of 5 (IP Configure Start) started...
Feb 23 17:39:57 ana NetworkManager:
(eth0): device state change: 5 -> 7
Feb 23 17:39:57 ana NetworkManager:
Activation (eth0) Beginning DHCP transaction.
Feb 23 17:39:57 ana NetworkManager:
dhclient started with pid 5969
Feb 23 17:39:57 ana NetworkManager:
Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
Feb 23 17:39:57 ana dhclient: Internet Systems Consortium DHCP Client 4.0.0
Feb 23 17:39:57 ana dhclient: Copyright 2004-2007 Internet Systems Consortium.
Feb 23 17:39:57 ana dhclient: All rights reserved.
Feb 23 17:39:57 ana dhclient: For info, please visit http://www.isc.org/sw/dhcp/
Feb 23 17:39:57 ana dhclient:
Feb 23 17:39:57 ana NetworkManager:
DHCP: device eth0 state changed normal exit -> preinit
Feb 23 17:39:57 ana dhclient: Listening on LPF/eth0/00:1d:7d:04:a2:74
Feb 23 17:39:57 ana dhclient: Sending on LPF/eth0/00:1d:7d:04:a2:74
Feb 23 17:39:57 ana dhclient: Sending on Socket/fallback
Feb 23 17:39:58 ana ntpd[2930]: Deleting interface #12 eth0, 192.168.1.12#123, interface stats: received=0, sent=4, dropped=0, active_time=38 secs
Feb 23 17:40:00 ana dhclient: DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
Feb 23 17:40:00 ana dhclient: DHCPOFFER from 192.168.1.1
Feb 23 17:40:00 ana dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Feb 23 17:40:00 ana dhclient: DHCPACK from 192.168.1.1
Feb 23 17:40:00 ana dhclient: bound to 192.168.1.12 -- renewal in 9409 seconds.
Feb 23 17:40:00 ana NetworkManager:
DHCP: device eth0 state changed preinit -> bound
Feb 23 17:40:00 ana NetworkManager:
Activation (eth0) Stage 4 of 5 (IP Configure Get) scheduled...
Feb 23 17:40:00 ana NetworkManager:
Activation (eth0) Stage 4 of 5 (IP Configure Get) started...
Feb 23 17:40:00 ana NetworkManager:
address 192.168.1.12
Feb 23 17:40:00 ana NetworkManager:
prefix 24 (255.255.255.0)
Feb 23 17:40:00 ana NetworkManager:
gateway 192.168.1.254
Feb 23 17:40:00 ana NetworkManager:
nameserver '192.168.1.1'
Feb 23 17:40:00 ana NetworkManager:
nameserver '157.193.40.42'
Feb 23 17:40:00 ana NetworkManager:
domain name 'amantes'
Feb 23 17:40:00 ana NetworkManager:
Activation (eth0) Stage 5 of 5 (IP Configure Commit) scheduled...
Feb 23 17:40:00 ana NetworkManager:
Activation (eth0) Stage 4 of 5 (IP Configure Get) complete.
Feb 23 17:40:00 ana NetworkManager:
Activation (eth0) Stage 5 of 5 (IP Configure Commit) started...
Feb 23 17:40:00 ana avahi-daemon[3122]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.12.
Feb 23 17:40:00 ana avahi-daemon[3122]: New relevant interface eth0.IPv4 for mDNS.
Feb 23 17:40:00 ana avahi-daemon[3122]: Registering new address record for 192.168.1.12 on eth0.IPv4.
Feb 23 17:40:01 ana NetworkManager:
(eth0): device state change: 7 -> 8
Feb 23 17:40:01 ana NetworkManager:
Policy set 'Auto Ethernet' (eth0) as default for routing and DNS.
Feb 23 17:40:01 ana NetworkManager:
Activation (eth0) successful, device activated.
Feb 23 17:40:01 ana NetworkManager:
Activation (eth0) Stage 5 of 5 (IP Configure Commit) complete.
Feb 23 17:40:01 ana ntpd[2930]: Listening on interface #13 eth0, 192.168.1.12#123 Enabled

And the spew for System eth0, the non-working one:

Feb 23 17:40:11 ana NetworkManager: (eth0): device state change: 8 -> 3
Feb 23 17:40:11 ana NetworkManager:
(eth0): deactivating device (reason: 0).
Feb 23 17:40:11 ana NetworkManager:
eth0: canceled DHCP transaction, dhcp client pid 5969
Feb 23 17:40:13 ana NetworkManager: check_one_route(): (eth0) error -34 returned from rtnl_route_del(): Sucess#012
Feb 23 17:40:13 ana avahi-daemon[3122]: Withdrawing address record for 192.168.1.12 on eth0.
Feb 23 17:40:13 ana NetworkManager: Activation (eth0) starting connection 'System eth0'
Feb 23 17:40:13 ana NetworkManager:
(eth0): device state change: 3 -> 4
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 1 of 5 (Device Prepare) started...
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 1 of 5 (Device Prepare) complete.
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 2 of 5 (Device Configure) starting...
Feb 23 17:40:13 ana NetworkManager:
(eth0): device state change: 4 -> 5
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 2 of 5 (Device Configure) successful.
Feb 23 17:40:13 ana avahi-daemon[3122]: Leaving mDNS multicast group on interface eth0.IPv4 with address 192.168.1.12.
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 2 of 5 (Device Configure) complete.
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 3 of 5 (IP Configure Start) started...
Feb 23 17:40:13 ana NetworkManager:
(eth0): device state change: 5 -> 7
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 4 of 5 (IP Configure Get) scheduled...
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 4 of 5 (IP Configure Get) started...
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 5 of 5 (IP Configure Commit) scheduled...
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 4 of 5 (IP Configure Get) complete.
Feb 23 17:40:13 ana NetworkManager:
Activation (eth0) Stage 5 of 5 (IP Configure Commit) started...
Feb 23 17:40:13 ana avahi-daemon[3122]: Interface eth0.IPv4 no longer relevant for mDNS.
Feb 23 17:40:13 ana avahi-daemon[3122]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.1.12.
Feb 23 17:40:13 ana avahi-daemon[3122]: New relevant interface eth0.IPv4 for mDNS.
Feb 23 17:40:13 ana avahi-daemon[3122]: Registering new address record for 192.168.1.12 on eth0.IPv4.
Feb 23 17:40:14 ana NetworkManager:
(eth0): device state change: 7 -> 8
Feb 23 17:40:14 ana NetworkManager:
Policy set 'System eth0' (eth0) as default for routing and DNS.
Feb 23 17:40:14 ana NetworkManager:
Activation (eth0) successful, device activated.
Feb 23 17:40:14 ana NetworkManager:
Activation (eth0) Stage 5 of 5 (IP Configure Commit) complete.

I had never actually tried to make sense of what Auto Ethernet and System eth0 mean and why you would want to choose one over the other (major usability fail to allow the user to choose between two seemingly meaningless options). It seems that, when I configure connections, I can actually see System eth0 to be configured with that fixed gateway of 192.168.1.12, but everything's grayed out, and according to NetworkManager I 'never' used the profile, which is of course a lie.

But at least I can now go on and browse some text config files for that gateway.

Anyone know what System eth0 actually is ? According to some posts it looks like a config that NetworkManager automatically generates the first time it runs.

3 Comments »

  1. “System eth0” represent your (suprise!) system configuration. In case of RH-like system, it reflects the content of /etc/sysconfig/network-scripts/ifcfg-eth0 or similar. “Auto eth0” just fires up dhcp client on interface.

    Comment by Tomasz — 2009-02-23 @ 18:04

  2. Thomas, I second that the NM config dialog is confusing as hell… in some cases it’s even hard to correctly set what you need *if* you know exactly what everything is for (which is a shame).

    Comment by Michael — 2009-02-23 @ 18:20

  3. Samsung N150 Mobile Broadband in Linux / KDE…

    If you have Mobile Broadband tab disabled (or greyed out) in the Network Manager in KDE, install the package modemmanager in your favourite package manager. Or do it manually from a command line as shown below: sudo apt-get install modemmanager After r…

    Trackback by Ambience — 2010-09-24 @ 21:06

RSS feed for comments on this post. TrackBack URL

Leave a comment

picture