Bug 437338 - NM defaults to the wrong device
Summary: NM defaults to the wrong device
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
: 438199 (view as bug list)
Depends On:
Blocks: NMF9Blockers
TreeView+ depends on / blocked
Reported: 2008-03-13 16:32 UTC by Bill Nottingham
Modified: 2014-03-17 03:12 UTC (History)
7 users (show)

Fixed In Version: 0.7.0-0.6.9.svn3675.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-07-09 21:47:30 UTC

Attachments (Terms of Use)
NM output (7.63 KB, text/plain)
2008-03-13 17:17 UTC, Bill Nottingham
no flags Details
[PATCH] don't use route and DNS for device that has no default gateway configuration (820 bytes, patch)
2008-04-21 23:37 UTC, Charles R. Anderson
no flags Details | Diff
Files relevant to the descibed network bug (767 bytes, application/octet-stream)
2008-06-17 09:40 UTC, A.J. Werkman
no flags Details

Description Bill Nottingham 2008-03-13 16:32:04 UTC
Description of problem:

I have two wired ethernet devices. NM consistently decides that everything
should go through the disconnected device configured with autoIP rather than the
device with a cable plugged in.

Even with multiple device support, it adds an address to the wired device with
link... and then brings up the other device in autoip and makes it the default

Version-Release number of selected component (if applicable):


How reproducible:

Every time.

Comment 1 Dan Williams 2008-03-13 17:09:12 UTC
Hmm; can't reproduce with SVN trunk; will try on a rawhide machine.  Can you
stop NM, then run /usr/sbin/NetworkManager --no-daemon, get it into this state,
and attach the output?

Comment 2 Bill Nottingham 2008-03-13 17:17:47 UTC
Created attachment 297958 [details]
NM output

Comment 3 Dan Williams 2008-03-13 17:42:08 UTC
So one of the devices can't DHCP and falls back to autoip; that's expected for
the version of NM you're running; though I've changed that and new versions of
NM will just fail the connection if DHCP fails.

I think the bug here is that even though there is an active non-IPv4-LL device,
it picks the IPv4LL device to be the default.  I'll fix that.

Comment 4 Dan Williams 2008-03-19 22:10:42 UTC
*** Bug 438199 has been marked as a duplicate of this bug. ***

Comment 5 David Woodhouse 2008-03-20 12:30:25 UTC
Looks better; thanks.

Comment 6 David Woodhouse 2008-03-20 12:34:05 UTC
I'm somewhat confused by the nm-applet behaviour though.

Now it seems to have two devices, both identically named "Wired Networks (PASemi
Unknown (0xa005))". And under each one I seem to have a _choice_ of which
network to join, each one offering me the choice of "System eth1" or "System eth0".

Shouldn't there be a _single_ option available for each physical device (at
least until/unless you start supporting VLAN), and shouldn't each device be

Comment 7 Dan Williams 2008-03-20 15:10:46 UTC
Have you MAC-locked the ifcfg files to their specific adapters?  If you have, NM
will (shortly, not quite yet) only show you the connections which apply to
specific devices.

Comment 8 David Woodhouse 2008-03-20 15:54:53 UTC
This is a completely fresh install (apart from fetching the newer NM and rebooting).

Comment 9 Dan Williams 2008-03-20 17:18:45 UTC
I think the installer bits that write out the ifcfg-eth0 and ifcfg-eth1 do stuff
the MAC into those files, so thats still probably what th issue is here.  It
should get magically fixed in a release quite soon.

Comment 10 Charles R. Anderson 2008-04-07 19:45:54 UTC
I have two NICs which were auto-configured by anaconda fresh install today from
rawhide 2008-04-07.  Here are the /etc/sysconfig/network-scripts/ifcfg-eth* files:

# Broadcom Corporation NetXtreme BCM5751 Gigabit Ethernet PCI Express

# Lite-On Communications Inc LNE100TX

In nm-applet, I see two sections for "Wired Networks" and under each there is a
"System eth0" and a "System eth1".  I'm having a problem with the default route
disappearing after awhile or not being set at all after bootup and login.

Comment 11 Dan Williams 2008-04-08 16:38:45 UTC
Do the latest rawhide updates fix this for you?  Anything over svn3527 should
ensure that the MAC-locking of the ifcfg is respected, both in NM and the applet.

Comment 12 Charles R. Anderson 2008-04-21 18:34:13 UTC
The behavior I'm seeing with latest rawhide is that both devices are brought up,
but the eth1 one, for which it receives NO default route via DHCP, is getting
selected as the "active" device to use for the default route.  As a result, this
is my routing table which is less than useful:

#netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface   U         0 0          0 eth0     U         0 0          0 eth1         U         0 0          0 eth1

It should instead be:

#netstat -nr
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface   U         0 0          0 eth0     U         0 0          0 eth1         UG        0 0          0 eth0

Comment 13 Charles R. Anderson 2008-04-21 23:37:22 UTC
Created attachment 303233 [details]
[PATCH] don't use route and DNS for device that has no default gateway configuration

Here is a patch that ignores devices without a default gateway when selecting
the best device to use for the default gateway and DNS information.  I tested
this and it seems to work nicely for my dual NIC scenario, one DHCP w/default
route, the other with no default route.

Comment 14 Dan Williams 2008-04-22 14:29:37 UTC
Thanks for the patch, variation committed upstream, in svn r3586.

Comment 15 Dan Williams 2008-04-28 04:34:23 UTC
Been pushed out in recent builds; definitely in latest koji 3614

Comment 16 Fedora Update System 2008-05-19 15:46:45 UTC
NetworkManager-0.7.0-0.6.8.svn3669.fc8 has been submitted as an update for Fedora 8

Comment 17 A.J. Werkman 2008-06-17 09:40:39 UTC
Created attachment 309585 [details]
Files relevant to the descibed network bug

I encountered this bug (again) on the release of F9.

I installed F9 from zero on a x86_64 machine with only one network adapter with
both static IPv4 and static IPv6 addresses. If I boot into the system I do not
have a default gateway. After doing "/etc/rc.d/init.d/network restart" I do see
a default gateway. This is reproduceable on every reboot.

nm-tools showes me "default gateway".

/etc/sysconfig/network and /etc/sysconfig/network-scripts/ifcfg-eth0 seem to be
normal and a default gateway should be expected.

Comment 18 A.J. Werkman 2008-06-17 09:42:47 UTC
Following comment #17 I think this bug should be reopened.

Comment 19 Fedora Update System 2008-07-09 21:47:11 UTC
NetworkManager-0.7.0-0.6.9.svn3675.fc8, NetworkManager-openvpn-0.7.0-10.svn3632.fc8, NetworkManager-vpnc-0.7.0-0.7.7.svn3627.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.