Bug 617743

Summary: NetworkManager / DHCP: default route and resolve.conf are not updated on 11.3 RC1
Product: [openSUSE] openSUSE 11.3 Reporter: Thomas Frühbeck <fruehbeck>
Component: NetworkAssignee: Bin Li <bili>
Status: RESOLVED DUPLICATE QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: aguanteelcachorro, g.pr
Version: RC 1   
Target Milestone: ---   
Hardware: 64bit   
OS: openSUSE 11.3   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: the complete NetworkManager log file
NetworkManager logfile afterupgrade to factory
the latest lease file after upgrade to factory
output of NetworkManager --no-daemon
NetworkManager --no-daemon output

Description Thomas Frühbeck 2010-06-27 16:19:03 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.4) Gecko/20100527 SUSE/3.6.4-2.2 Firefox/3.6.4

I am using NetworkManager and DHCP at home
Everythings fine when working with 11.2!

Now I installed 11.3 RC1 on separate partition.
When connecting to local lan via NetworkManager the default route is not set.

I tried the following:

  - unplug eth0-connector
  - rm /etc/resolve.conf
  - rm /var/adm/netconfig/md5/etc/*
  - plugin eth0-connector

Unfortunately no success..

dhcpdcd-test:
happy:~ # dhcpcd-test eth0
info, eth0: hardware address = 00:25:b3:5a:0c:9b
info, eth0: broadcasting for a lease
debug, eth0: sending DHCP_DISCOVER with xid 0x61ccfb90
debug, eth0: waiting for 10 seconds
debug, eth0: got a packet with xid 0x61ccfb90
info, eth0: offered 10.0.0.3 from 10.0.0.138
DHCPGIADDR='10.0.0.138'
IPADDR='10.0.0.3'
NETMASK='255.255.255.0'
NETWORK='10.0.0.0'
BROADCAST='10.0.0.255'
ROUTES=''
GATEWAYS='10.0.0.138'
DNSDOMAIN='fruehbeck.at'
DNSSERVERS='10.0.0.138 195.3.96.67 195.3.96.68'
DHCPSID='10.0.0.138'
LEASETIME='4294967295'
RENEWALTIME='0'
REBINDTIME='0'
INTERFACE='eth0'
CLASSID='dhcpcd 3.2.3'
CLIENTID='01:00:25:b3:5a:0c:9b'
DHCPCHADDR='00:25:b3:5a:0c:9b'
NETBIOSNAMESERVER='10.0.0.138'
info, eth0: exiting


The following logs are created:
Jun 27 17:56:09 happy dhclient: Internet Systems Consortium DHCP Client 4.1.1-P1
Jun 27 17:56:09 happy dhclient: Copyright 2004-2010 Internet Systems Consortium.
Jun 27 17:56:09 happy dhclient: All rights reserved.
Jun 27 17:56:09 happy dhclient: For info, please visit https://www.isc.org/software/dhcp/
Jun 27 17:56:09 happy dhclient: 
Jun 27 17:56:09 happy dhclient: parse_option_param: Bad format a
Jun 27 17:56:09 happy dhclient: Listening on LPF/eth0/00:25:b3:5a:0c:9b
Jun 27 17:56:09 happy dhclient: Sending on   LPF/eth0/00:25:b3:5a:0c:9b
Jun 27 17:56:09 happy dhclient: Sending on   Socket/fallback
Jun 27 17:56:11 happy dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Jun 27 17:56:13 happy dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Jun 27 17:56:18 happy dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67
Jun 27 17:56:18 happy dhclient: DHCPACK from 10.0.0.138
Jun 27 17:56:18 happy dhclient: bound to 10.0.0.3 -- renewal in 2147483648 seconds.
Jun 27 17:56:18 happy avahi-daemon[1816]: Joining mDNS multicast group on interface eth0.IPv4 with address 10.0.0.3.
Jun 27 17:56:18 happy avahi-daemon[1816]: New relevant interface eth0.IPv4 for mDNS.
Jun 27 17:56:18 happy avahi-daemon[1816]: Registering new address record for 10.0.0.3 on eth0.IPv4.
Jun 27 17:56:19 happy dns-resolver: ATTENTION: You have modified /etc/resolv.conf. Leaving it untouched...
Jun 27 17:56:19 happy dns-resolver: You can find my version in /etc/resolv.conf.netconfig
Jun 27 17:56:19 happy if-up.d/21-dhcpcd-hook-samba: No dhcpcd info nor dhclient leases file found for eth0.
Jun 27 17:56:19 happy SuSEfirewall2: Setting up rules from /etc/sysconfig/SuSEfirewall2 ...
Jun 27 17:56:19 happy SuSEfirewall2: using default zone 'ext' for interface eth1
Jun 27 17:56:19 happy SuSEfirewall2: batch committing...
Jun 27 17:56:19 happy SuSEfirewall2: Firewall rules successfully set



Reproducible: Always

Steps to Reproduce:
1. unplug network connector
2. replug network connector
3.
Actual Results:  
no default route is set:
happy:~ # route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        *               255.255.255.0   U     1      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo


Expected Results:  
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        *               255.255.255.0   U     1      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         10.0.0.138      0.0.0.0         UG    0      0        0 eth0
Comment 1 Bin Li 2010-06-28 03:21:20 UTC
Thomas,

 Would mind attach your /var/log/NetworkManager when the route was not setting correctly?
Comment 2 Thomas Frühbeck 2010-06-28 20:27:05 UTC
Created attachment 372258 [details]
the complete NetworkManager log file

I hope this helps.
Best regards,
Thomas
Comment 3 Thomas Frühbeck 2010-06-30 05:34:53 UTC
file attached, didn't notice he checkbox below <:)
Thanks,
Thomas
Comment 5 Bin Li 2010-06-30 09:37:19 UTC
BTW,

 Could view the dhclient result?

 $ cat /var/lib/dhcp/dhclient*
Comment 6 Thomas Frühbeck 2010-06-30 21:05:55 UTC
Created attachment 373035 [details]
NetworkManager logfile afterupgrade to factory
Comment 7 Thomas Frühbeck 2010-06-30 21:09:03 UTC
Created attachment 373036 [details]
the latest lease file after upgrade to factory
Comment 8 Thomas Frühbeck 2010-06-30 21:14:05 UTC
I upgraded to factory, but unfortunately no improvement.

happy:~ # zypper tos
openSUSE-11.3-x86_64

happy:~ # zypper lr
# | Alias                                        | Name                                         | Enabled | Refresh
--+----------------------------------------------+----------------------------------------------+---------+--------
1 | Aktualisierungen für openSUSE 11.3 11.3-1.71 | Aktualisierungen für openSUSE 11.3 11.3-1.71 | Yes     | Yes    
2 | OpenSuSE_Factory                             | OpenSuSE Factory                             | Yes     | Yes    
3 | openSUSE-11.3 11.3-1.71                      | openSUSE-11.3 11.3-1.71                      | Yes     | No     
4 | repo-debug                                   | openSUSE-11.3-Debug                          | No      | Yes    
5 | repo-non-oss                                 | openSUSE-11.3-Non-Oss                        | Yes     | Yes    
6 | repo-oss                                     | openSUSE-11.3-Oss                            | Yes     | Yes    
7 | repo-source                                  | openSUSE-11.3-Source                         | No      | Yes    

happy:~ # zypper lu
Loading repository data...
Reading installed packages...
No updates found.

happy:~ # rpm -qa NetworkManager
NetworkManager-0.8-7.1.x86_64
Comment 9 Bin Li 2010-07-01 03:27:24 UTC
Show me the changelog. Thanks!

rpm -q NetworkManager --changelog | head
Comment 10 Bin Li 2010-07-01 03:43:44 UTC
Also please select to use the NetworkManager in Yast.
Comment 11 Thomas Frühbeck 2010-07-01 06:10:44 UTC
thomas@happy:~/Dokumente> rpm -q NetworkManager --changelog|head
* Mi Jun 30 2010 bili@novell.com
- Update NetworkManager-NIS.patch, init the variable(bnc#618599).

* Di Jun 29 2010 bili@novell.com
- Add NetworkManager-netconfig-exit-quick.patch, fix wrong return
  value when updating the DNS with netconfig(bnc#595708, bnc#544195,
  bnc#537907, bnc#596163).

* Do Jun 24 2010 bili@novell.com
- Add NetworkManager-NIS.patch, support NIS domain and servers


As I didnt touch this config, NetworkManager IS selected:

thomas@happy:~/Dokumente> cat /etc/sysconfig/network/config |grep MANAGER
NETWORKMANAGER="yes"

Why should NetworkManager start to change the network config, if it had not been selected to do so first place?

Can I help by sending some dump file?
If so please give me a hint how and what to do.

Regards,
Thomas
Comment 12 Bin Li 2010-07-01 08:11:16 UTC
Please stop the NetworkManager, delete the /etc/resolv.conf, and start it again with 'NetworkManager --no-daemon', if it still don't work, attach your log in terminal, thanks!
Comment 13 Jose Ricardo De Leon Solis 2010-07-03 05:46:22 UTC
Hi, I have issues with the default gateway too. when I run the route command I have the following output:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     1      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo

And of course I cannot connect to internet. When I run "route add default gw <gateway> eth0" I have the following output:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     1      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0

And I can now surf the web. Obviously NetworkManager doesn't set the gateway when configuring the connection. If I disconnect from my network and I reconnect to the same network the route output is the same as the first one, so I'm forced to re-run the route add command and everything works again. I hope this helps and if someone wants me to provide any other output I'll try to provide as quickly as I can.

Jose Ricardo.
Comment 14 Jose Ricardo De Leon Solis 2010-07-03 06:00:06 UTC
Ignore my last comment, I misread the reporter's feedback. Sorry
Comment 15 Jose Ricardo De Leon Solis 2010-07-03 06:14:19 UTC
Created attachment 373670 [details]
output of NetworkManager --no-daemon
Comment 16 Jose Ricardo De Leon Solis 2010-07-03 06:31:11 UTC
Hi I've stoped NetworkManager, I deleted my /etc/resolv.conf file and started it with --no-daemon and it didn't worked. I've submitted the output of the terminal. However I doubt that it's going to be useful. I should say that I had to stop the command with Shift+C after it displaying this: "NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) complete." I didn't say it before but I'm using 11.3 rc2 under virtualbox. If I can help with anything else please let me know.

Jose Ricardo.
Comment 17 Thomas Frühbeck 2010-07-03 13:22:34 UTC
Created attachment 373692 [details]
NetworkManager --no-daemon output
Comment 18 Thomas Frühbeck 2010-07-03 13:25:04 UTC
I did as you asked, commands and output please see attached log file.
The result again:

happy:~ # route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        *               255.255.255.0   U     1      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo

Regards,
Thomas
Comment 19 Bin Li 2010-07-05 09:39:57 UTC
Thomas,

 From your NetworkManager log I found the dhclient was not got the routers.

-----------------------------------------
 NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP4 Configure Get) started...
NetworkManager: <info>    address 10.0.0.3
NetworkManager: <info>    prefix 24 (255.255.255.0)
NetworkManager: <info>    nameserver '10.0.0.138'
NetworkManager: <info>    nameserver '195.3.96.67'
NetworkManager: <info>    nameserver '195.3.96.68'
NetworkManager: <info>    domain name 'fruehbeck.at'
-----------------------------------------

 And in my machine I found the 'gateway' keyword, so the NM could set it.

-----------------------------------------
NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP4 Configure Get) started...
NetworkManager: <info>    address 147.2.207.197
NetworkManager: <info>    prefix 24 (255.255.255.0)
NetworkManager: <info>    gateway 147.2.207.254
NetworkManager: <info>    nameserver '147.2.136.75'
NetworkManager: <info>    nameserver '137.65.1.1'
-----------------------------------------

 And from your 'dhcpcd-test eth0' I found the ROUTERS item is null.

 So do you make sure your dhcp Server already set the router in it's configuration, for dhcp-server the /etc/dhcpd.conf should include below line.

---------------------------------------------
subnet 147.2.207.0 netmask 255.255.255.0 {
        option domain-name "lab.bej.apac.novell.com";
        option domain-name-servers 147.2.136.75,137.65.1.1;
        option routers 147.2.207.254;
......
---------------------------------------------
Comment 20 Thomas Frühbeck 2010-07-05 21:00:29 UTC
I am no expert on this topic, so I cannot tell if this should be, but it works fine in 11.2, Ubuntu, WinXP, Vista and Win7 and anyway there is the item GATEWAYS which sounds very familiar when expecting the default gateway to be set.

Second I dont know how to set this parameter, there is none on my DHCP server on my router. I cannot really think of a reason to configure routing when I need simply a default gateway to be set (of course that's a routing topic, I know..). 

dhcpcd-test eth0
DHCPGIADDR='10.0.0.138'
IPADDR='10.0.0.3'
NETMASK='255.255.255.0'
NETWORK='10.0.0.0'
BROADCAST='10.0.0.255'
ROUTES=''
GATEWAYS='10.0.0.138'
DNSDOMAIN='fruehbeck.at'
DNSSERVERS='10.0.0.138 195.3.96.67 195.3.96.68'
DHCPSID='10.0.0.138'
LEASETIME='4294967295'
RENEWALTIME='0'
REBINDTIME='0'
INTERFACE='eth0'
CLASSID='dhcpcd 3.2.3'
CLIENTID='01:00:25:b3:5a:0c:9b'
DHCPCHADDR='00:25:b3:5a:0c:9b'
NETBIOSNAMESERVER='10.0.0.138'
Comment 21 Bin Li 2010-07-06 04:03:37 UTC
okay, so could attach the result of 'cat /var/lib/dhcp/dhclient*' ? Cause we use the dhclient to get these information in NM.
Comment 22 Thomas Frühbeck 2010-07-07 11:10:08 UTC
Hi,

I tried the DHCP in the office and finally found the 'routers' option, which you mentioned in the lease, examples provided below.
I understand, that my DHCP server doesn't provide this parameter. and that NetworkManager (at least in 11.3) insists on parsing for this _optional_ parameter.
I see a point in not accepting an implicit configuration of default routes by a malicious DHCP server, but if an attacker may design a DHCP response, this will be the least problem to solve. 

Still I cannot understand, why it has been decided to make NetworkManager (or the scripts it invokes) fail to configure a network connection without notice.
Is it possible, that it is common practice to accept the DHCP server as default GW if not otherwise requested? 

It seems, that I will have to dig deeply into telnet ADSL router configuration because of this decision.

Example DHCP Response OK:
lease {
  interface "eth0";
  fixed-address 10.229.0.170;
  option subnet-mask 255.255.254.0;
  option routers 10.229.1.254;
  option dhcp-lease-time 64800;
  option dhcp-message-type 5;
  ...
}

Example DHCP Response - no default gateway:
lease {
  interface "eth0";
  fixed-address 10.0.0.3;
  option subnet-mask 255.255.255.0;
  option dhcp-lease-time 4294967295;
  option dhcp-message-type 5;
  ...
}

Regards,
Thomas
Comment 23 Thomas Frühbeck 2010-07-07 11:18:12 UTC
Just one additional remark: it is of course up to you to decide on the actions to be taken, I think you may close this case if you think that it 'works as designed'.

Regards,
Thomas
Comment 24 Bin Li 2010-07-08 02:47:35 UTC
I think it should be a bug for dhclient, I focus more about it. and try to find the reason.
Comment 25 Bin Li 2010-07-08 02:49:48 UTC
Could you get the dhcpd's configuration which provide the dhcp for you?

Login the DHCP Server's machine, then

$ cat /etc/dhcpd.conf
Comment 26 Thomas Frühbeck 2010-07-08 06:45:39 UTC
Well I would, if it where that easy >:-(
This is a proprietary system, it's a DSL router with a restricted management interface similar Cisco appliances. I didnt want to study DSLRouter internals just to have DHCP available.

Just for illustration I will show you a sample session:

thomas@happy:~/Documents> telnet 10.0.0.138
Trying 10.0.0.138...
Connected to 10.0.0.138.
Escape character is '^]'.
Username : root
Password : *****
------------------------------------------------------------------------

                             ______  SpeedTouch 5x6
                         ___/_____/\ 
                        /         /\  5.3.9.2
                  _____/__       /  \ 
                _/       /\_____/___ \  Copyright (c) 1999-2005, THOMSON
               //       /  \       /\ \
       _______//_______/    \     / _\/______ 
      /      / \       \    /    / /        /\
   __/      /   \       \  /    / /        / _\__ 
  / /      /     \_______\/    / /        / /   /\
 /_/______/___________________/ /________/ /___/  \ 
 \ \      \    ___________    \ \        \ \   \  /
  \_\      \  /          /\    \ \        \ \___\/
     \      \/          /  \    \ \        \  /
      \_____/          /    \    \ \________\/
           /__________/      \    \  /
           \   _____  \      /_____\/
            \ /    /\  \    /___\/
             /____/  \  \  /
             \    \  /___\/
              \____\/

------------------------------------------------------------------------
 {root}=>?
Following command groups are available :

firewall        service         autopvc         connection      cwmp            
dhcp            dns             dsd             dyndns          eth             
adsl            atm             config          debug           env             
expr            grp             hostmgr         ids             igmp            
interface       ip              ipqos           label           language        
mbus            memm            mlp             nat             ppp             

{root}=>dhcp server pool
{root}[dhcp server pool]=>?
Following commands are available :

add              : Add a DHCP server pool
config           : Configure a DHCP server pool
delete           : Delete a DHCP server pool
rtadd            : Add a route to the DHCP server pool
rtdelete         : Delete a route from the DHCP server pool
optadd           : Add an option instance to the DHCP server pool
optdelete        : Delete an option instance from the DHCP server pool
ruleadd          : Add a selection rule to the DHCP server pool
ruledelete       : Delete a selection rule from the DHCP server pool
flush            : Flush all DHCP server pools
list             : List all DHCP server pools

{root}[dhcp server pool]=>optadd
name = LAN_private
instname = routers
Error : Invalid DHCP option instance name.

Well, all this is really not your problem, but sometime small changes have unpleasant consequences :-))

Best regards,
Thomas
Comment 27 Gerald Prommegger-Roth 2010-07-19 04:14:51 UTC
I am having the same problems here:

The router is a Thomson SpeedTouch 585, software version 5.3.9.0. The default gateway is not set via networkmanager and dhcp on os 11.3, x8-64. Works in Windows and worked in os 11.2, broken in 11.3.

Since the router config is pretty much factory default and everything worked well until os 11.2 and everything works well with ipup (dhcp works as expected) i must assume there is something wrong with networkmanager...

/var/lib/dhcp/dhclient...lease:

lease {
  interface "wlan0";
  fixed-address 10.0.0.2;
  option subnet-mask 255.255.255.0;
  option dhcp-lease-time 7200;
  option dhcp-message-type 5;
  option domain-name-servers 10.0.0.138;
  option dhcp-server-identifier 10.0.0.138;
  option rfc3442-classless-static-routes_raw 0,10,0,0,138;

dhclient seems to get the proper information, (default gw is 10.0.0.138)...

thanks in advance,

Gerald
Comment 28 Bin Li 2010-07-26 03:16:19 UTC
Dup.

*** This bug has been marked as a duplicate of bug 623409 ***