Bug 437338 - NM defaults to the wrong device
NM defaults to the wrong device
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
: 438199 (view as bug list)
Depends On:
Blocks: NMF9Blockers
  Show dependency treegraph
Reported: 2008-03-13 12:32 EDT by Bill Nottingham
Modified: 2014-03-16 23:12 EDT (History)
7 users (show)

See Also:
Fixed In Version: 0.7.0-0.6.9.svn3675.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-07-09 17:47:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
NM output (7.63 KB, text/plain)
2008-03-13 13:17 EDT, 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 19:37 EDT, Charles R. Anderson
no flags Details | Diff
Files relevant to the descibed network bug (767 bytes, application/octet-stream)
2008-06-17 05:40 EDT, A.J. Werkman
no flags Details

  None (edit)
Description Bill Nottingham 2008-03-13 12:32:04 EDT
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 13:09:12 EDT
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 13:17:47 EDT
Created attachment 297958 [details]
NM output
Comment 3 Dan Williams 2008-03-13 13:42:08 EDT
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 18:10:42 EDT
*** Bug 438199 has been marked as a duplicate of this bug. ***
Comment 5 David Woodhouse 2008-03-20 08:30:25 EDT
Looks better; thanks.
Comment 6 David Woodhouse 2008-03-20 08:34:05 EDT
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 11:10:46 EDT
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 11:54:53 EDT
This is a completely fresh install (apart from fetching the newer NM and rebooting).
Comment 9 Dan Williams 2008-03-20 13:18:45 EDT
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 15:45:54 EDT
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 12:38:45 EDT
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 14:34:13 EDT
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 19:37:22 EDT
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 10:29:37 EDT
Thanks for the patch, variation committed upstream, in svn r3586.
Comment 15 Dan Williams 2008-04-28 00:34:23 EDT
Been pushed out in recent builds; definitely in latest koji 3614
Comment 16 Fedora Update System 2008-05-19 11:46:45 EDT
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 05:40:39 EDT
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 05:42:47 EDT
Following comment #17 I think this bug should be reopened.
Comment 19 Fedora Update System 2008-07-09 17:47:11 EDT
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.