Bug 480525 - Networkmanager sets wrong default gateway, resulting in no network/internet
Summary: Networkmanager sets wrong default gateway, resulting in no network/internet
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: NetworkManager
Version: 10
Hardware: x86_64
OS: Linux
high
high
Target Milestone: ---
Assignee: Dan Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-18 09:27 UTC by udo
Modified: 2009-10-15 04:21 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-10-15 04:21:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description udo 2009-01-18 09:27:58 UTC
Description of problem:
Networkmanager sets wrong default gateway.

Version-Release number of selected component (if applicable):
NetworkManager-gnome-0.7.0-1.git20090102.fc10.x86_64
NetworkManager-glib-0.7.0-1.git20090102.fc10.x86_64
NetworkManager-0.7.0-1.git20090102.fc10.x86_64


How reproducible:
My system has eth0 and usb0.
eth0 is the interface to the LAN with the firewall and internet.
usb0 is gadget-ethernet to the ipaq running Linux
$ cat ifcfg-eth0 
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:1f:d0:b1:f8:36
ONBOOT=yes
BROADCAST=192.168.10.255
IPADDR=192.168.10.70
NETMASK=255.255.255.0
NETWORK=192.168.10.0
TYPE=Ethernet
DNS1=192.168.10.98
SEARCH=hierzo
MTU=7200
GATEWAY=192.168.10.98
USERCTL=no
IPV6INIT=no
NM_CONTROLLED=yes
PEERDNS=yes
$ cat ifcfg-usb0 
DEVICE=usb0
ONBOOT=yes
BROADCAST=192.168.0.255
IPADDR=192.168.0.200
NETMASK=255.255.255.0
NETWORK=192.168.0.0
TYPE=Ethernet
DNS1=192.168.10.98
SEARCH=hierzo
BOOTPROTO=none
USERCTL=yes
IPV6INIT=no
NM_CONTROLLED=yes
PEERDNS=yes
HWADDR=16:dc:da:a4:48:0a
$ cat /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=surfplank2.hierzo


Steps to Reproduce:
1.configure box like above
2.reboot or `service network restart`
3.no internet due to wrong default gateway (ip of usb0 instead of 192.168.10.98)
  
Actual results:
no internet due to wrong default gateway (ip of usb0 instead of 192.168.10.98)

Expected results:
default gateway to 192.168.10.98 which is the firewall
so that I don't have to correct the routing manually.

Additional info:
'Network Configuration' applet shows correct default gateway for eth0.

Log:
messages-20090118:Jan 14 19:52:51 surfplank2 NetworkManager: <info>  starting...
messages-20090118:Jan 14 19:52:51 surfplank2 NetworkManager: <WARN>  nm_generic_enable_loopback(): error -17 returned from rtnl_addr_add():#012Sucess#012
messages-20090118:Jan 14 19:52:51 surfplank2 NetworkManager: <info>  usb0: driver is 'cdc_subset'.
messages-20090118:Jan 14 19:52:51 surfplank2 NetworkManager: <info>  Found new Ethernet device 'usb0'.
messages-20090118:Jan 14 19:52:51 surfplank2 NetworkManager: <info>  (usb0): exported as /org/freedesktop/Hal/devices/net_16_dc_da_a4_48_0a
messages-20090118:Jan 14 19:52:51 surfplank2 NetworkManager: <info>  eth0: driver is 'r8169'.
messages-20090118:Jan 14 19:52:51 surfplank2 NetworkManager: <info>  Found new Ethernet device 'eth0'.
messages-20090118:Jan 14 19:52:51 surfplank2 NetworkManager: <info>  (eth0): exported as /org/freedesktop/Hal/devices/net_00_1f_d0_b1_f8_36
messages-20090118:Jan 14 19:52:51 surfplank2 NetworkManager: <info>  Trying to start the supplicant...
messages-20090118:Jan 14 19:52:51 surfplank2 NetworkManager: <info>  Trying to start the system settings daemon...
messages-20090118:Jan 14 19:52:51 surfplank2 NetworkManager: <info>  (eth0): carrier now ON (device state 1)
messages-20090118:Jan 14 19:52:51 surfplank2 NetworkManager: <info>  (usb0): carrier now ON (device state 1)
messages-20090118:Jan 14 19:52:51 surfplank2 nm-system-settings: Loaded plugin ifcfg-rh: (c) 2007 - 2008 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (usb0): device state change: 1 -> 2
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (usb0): preparing device.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (usb0): deactivating device (reason: 2).
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (eth0): device state change: 1 -> 2
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (eth0): preparing device.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (eth0): deactivating device (reason: 2).
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <WARN>  check_one_route(): (eth0) error -34 returned from rtnl_route_del(): Sucess#012
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (usb0): device state change: 2 -> 3
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (eth0): device state change: 2 -> 3
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) starting connection 'System usb0'
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (usb0): device state change: 3 -> 4
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 1 of 5 (Device Prepare) scheduled...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) starting connection 'System eth0'
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (eth0): device state change: 3 -> 4
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 1 of 5 (Device Prepare) started...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 2 of 5 (Device Configure) scheduled...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 1 of 5 (Device Prepare) complete.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 1 of 5 (Device Prepare) started...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 1 of 5 (Device Prepare) complete.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 2 of 5 (Device Configure) starting...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (usb0): device state change: 4 -> 5
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 2 of 5 (Device Configure) successful.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 3 of 5 (IP Configure Start) scheduled.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 2 of 5 (Device Configure) complete.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) starting...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (eth0): device state change: 4 -> 5
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) successful.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) complete.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 3 of 5 (IP Configure Start) started...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (usb0): device state change: 5 -> 7
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 4 of 5 (IP Configure Get) scheduled...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 3 of 5 (IP Configure Start) complete.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 3 of 5 (IP Configure Start) started...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  (eth0): device state change: 5 -> 7
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) scheduled...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 4 of 5 (IP Configure Get) started...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 5 of 5 (IP Configure Commit) scheduled...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 4 of 5 (IP Configure Get) complete.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) started...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) scheduled...
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) complete.
messages-20090118:Jan 14 19:52:55 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 5 of 5 (IP Configure Commit) started...
messages-20090118:Jan 14 19:52:56 surfplank2 NetworkManager: <info>  (usb0): device state change: 7 -> 8
messages-20090118:Jan 14 19:52:56 surfplank2 NetworkManager: <info>  Policy set 'System usb0' (usb0) as default for routing and DNS.
messages-20090118:Jan 14 19:52:56 surfplank2 NetworkManager: <info>  Activation (usb0) successful, device activated.
messages-20090118:Jan 14 19:52:56 surfplank2 NetworkManager: <info>  Activation (usb0) Stage 5 of 5 (IP Configure Commit) complete.
messages-20090118:Jan 14 19:52:56 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) started...
messages-20090118:Jan 14 19:52:57 surfplank2 NetworkManager: <info>  Policy set 'System usb0' (usb0) as default for routing and DNS.
messages-20090118:Jan 14 19:52:57 surfplank2 NetworkManager: <info>  (eth0): device state change: 7 -> 8
messages-20090118:Jan 14 19:52:57 surfplank2 NetworkManager: <info>  Activation (eth0) successful, device activated.
messages-20090118:Jan 14 19:52:57 surfplank2 NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) complete.
messages-20090118:Jan 14 19:53:06 surfplank2 avahi-daemon[2857]: Network interface enumeration completed.

Priority is set to high because no network is deadly, desktop is useless without network. ALso the issue is a very basic one which shouldn't be an issue.

Comment 1 udo 2009-01-18 09:52:40 UTC
Same wird eth0 message `NetworkManager: <WARN> 
check_one_route(): (eth0) error -34 returned from rtnl_route_del(): Sucess#012
` appears here: https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/293228 as well as other places and appears to be connected to a number of network issues preventing a correct network setup.
How can we investigate and fix this issue?
What info do you need besides what I posted?

Comment 2 udo 2009-01-18 10:27:19 UTC
Also see https://bugzilla.redhat.com/show_bug.cgi?id=477916
This is different behaviour, though.
system-config-network-tui etc think config is OK.

Comment 3 Dan Williams 2009-02-12 23:47:26 UTC
So to select a *specific* network device as the default, you need to set "GATEWAYDEV=<defualt device>" in /etc/sysconfig/network; this is true with the normal network service as well.  Does that fix the problem for you?

Comment 4 udo 2009-02-14 12:47:10 UTC
Without adding the GATEWAYDEV (which I just did add) it worked OK for the past few reboots. (I don't do that every day)
SO: at this moment I can't reproduce the issue although I did not modify the ifcfg files, except add one for usb1.
I'll pay attention next time the box has to reboot.

Comment 5 Dan Williams 2009-02-14 19:48:22 UTC
Ok, let me know.

Comment 6 Jessica Sterling 2009-03-06 21:53:54 UTC
This bug has been triaged

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 7 udo 2009-06-15 13:42:18 UTC
On F11 now; I did not see the problem reoccur.

Comment 8 Dan Williams 2009-10-15 04:21:34 UTC
Ok, thanks; GATEWAYDEV is the only way to ensure that the configuration you specify gets the default route.  Otherwise, even with ifup/ifdown (ie, no NetworkManager involved) the last config you 'ifup' will get the default route.  Same with NM; if there is no GATEWAYDEV set the last device of the same class wins, essentially.

Let me know if the ordering gets messed up again, if (of course) you've set GATEWAYDEV. Thanks!


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