Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 349486 - net-misc/dhcpcd-5.2.{8,9} gives no kernel routing table
Summary: net-misc/dhcpcd-5.2.{8,9} gives no kernel routing table
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-23 12:58 UTC by Peter Karlsson
Modified: 2010-12-25 01:46 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge_info.txt,5.24 KB, text/plain)
2010-12-23 13:00 UTC, Peter Karlsson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Karlsson 2010-12-23 12:58:01 UTC
After several attempts of trying to upgrade dhcpcd to >=5.2.8 (from 4.0.15) I'm close to giving up. The symptoms are:
1. dhcpcd seems to work fine at boot; gets an IP address lease fine.
2. login takes (from typing password to actual login) takes > 1 minute
3. No kernel routing table.

All the above is with gentoo-sources-2.6.36-r5.

I'm currently running gentoo-sources-2.6.34-r12 and I want to be able to upgrade to the latest and greatest stable gentoo-sources-2.6.36-r5. As far as I understand it dhcpcd-4.0.15 is incompatible with kernels >2.6.35 hence the need to upgrade dhcpcd.

Reproducible: Always

Steps to Reproduce:
1. Compile dhcpcd-5.2.{8,9}
2. Reboot
3. try to access network (very slow login)

Actual Results:  
No network access (no kernel routing table)

Expected Results:  
Functional kernel routing table/working network access
Comment 1 Peter Karlsson 2010-12-23 13:00:36 UTC
Created attachment 257869 [details]
emerge --info
Comment 2 Peter Karlsson 2010-12-23 13:02:05 UTC
Comment on attachment 257869 [details]
emerge --info

This is emerge --info with my working kernel/dhcpcd info (gentoo-sources <2.6.35 dhcpcd-4.0.15)
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2010-12-23 19:17:57 UTC
What output do you see from the init system? Anything in dmesg or the syslog?
Comment 4 Roy Marples 2010-12-23 21:13:29 UTC
please post the output of the following
dhcpcd -x
dhcpcd -dB

Then in another terminal, the routing table
route -n
Comment 5 Peter Karlsson 2010-12-24 07:52:52 UTC
(In reply to comment #3)
> What output do you see from the init system? Anything in dmesg or the syslog?
> 

I don't see anything in dmesg or syslog (/var/log/messages) related to dhcpcd unfortunately... The output from init does not look "suspicious":
dhcpcd version 5.2.8 starting...
rebinding lease 192.168.1.101 bla bla...

However, the error may be on my side, see comment below.
Comment 6 Peter Karlsson 2010-12-24 08:12:16 UTC
(In reply to comment #4)
> please post the output of the following
> dhcpcd -x
> dhcpcd -dB
> 
> Then in another terminal, the routing table
> route -n

Hm, this is embarassing but it seems the error is on my side. I have two network interfaces (eth0 and eth1). eth0 address is handled by dhcp and eth1 is static. So I do get a kernel routing table... but the order of the network interfaces is wrong, hence nameserver lookups goes to the wrong interface. With 4.0.15 I get a working kernel routing table (I just issue 'route'):
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     *               255.255.255.0   U     0      0        0 eth0
192.168.0.0     *               255.255.255.0   U     0      0        0 eth1
loopback        *               255.0.0.0       U     0      0        0 lo
default         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
default         server1         0.0.0.0         UG    1      0        0 eth1

(server1 = 192.168.0.1)

With 5.2.{8,9} I assumed I didn't get a routing table because the output of 'route' (without the -n flag) displays just the headings (I assume it's trying to lookup the name of 'server1' which gets the wrong ip) so I assumed there's no kernel routing table. I should have been more patient. Anyway, this is what the routing table looks like with 5.2.8:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     203    0        0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth1
0.0.0.0         192.168.1.1     0.0.0.0         UG    203    0        0 eth0

So it seems to be a configuration problem (as I thought from the beginning but haven't had the patience to resolve). Sorry for all the fuss. Should I close this as NOTABUG?
Comment 7 Roy Marples 2010-12-24 09:01:05 UTC
Well, it's NOTABUG with dhcpcd :)

So newer dhcpcd versions always use route metrics on Linux. It calculates the metric by the interface is wired, wireless, ppp and then interface number.
This allows us to have >1 default route and the kernel will always use the lowest numbered route by preference.

So to fix you need to set metric to zero in dhcpcd.conf OR set the metric in conf.d/net for your static interface to be above 203 generated by dhcpcd. Set it to something like 800.
Comment 8 Peter Karlsson 2010-12-24 09:34:14 UTC
(In reply to comment #7)
> Well, it's NOTABUG with dhcpcd :)

Thank you so much for that info; I would probably have grown quite a few grey hairs otherwise... :-)

Closing this bug as INVALID.

Again, sorry for bogus bug reporting and I wish you and all gentoo devs a merry xmas and a happy new year!
Comment 9 Jordan 2010-12-25 01:46:47 UTC
I added "metric 0" to /etc/dhcpcd.conf and installed 5.2.9, I still can't connect with networkmanager and dhcpcd takes a long time to start up. Does dbus autoload dhcpcd? I didn't add dhcpcd to the default runlevel.