Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems withs dhcpcd on a dedicated server hosted by Strato
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
alfred
n00b
n00b


Joined: 14 Nov 2006
Posts: 9
Location: Berlin

PostPosted: Thu Apr 26, 2007 1:31 pm    Post subject: Problems withs dhcpcd on a dedicated server hosted by Strato Reply with quote

Hi,

I had some problems with the dhcpcd version 3.0.16-r1 on a dedicated server hosted by Strato (Berlin, Germany).

In normal cases these servers get the IP-Address and the routing table from a DHCP-Server.
Until the last reboot this morning I used a dhcpcd version 2.0.5-r1.

The addresses and routing tables resulted are:
Code:
0 sarah:~ # ip a
1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,10000> mtu 1500 qdisc pfifo_fast qlen 1000
    link/ether 00:30:48:56:c6:36 brd ff:ff:ff:ff:ff:ff
    inet 85.214.73.141/32 brd 85.214.73.141 scope global eth0
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
    link/ether 00:30:48:56:c6:37 brd ff:ff:ff:ff:ff:ff
0 sarah:~ # ip r
85.214.73.141 dev eth0  scope link
85.214.64.1 dev eth0  scope link
127.0.0.0/8 dev lo  scope link
default via 85.214.64.1 dev eth0

Some time ago I emerged version 3.0.16-r1 of dhcpcd.

After the reboot this morning my server got only an address, but no valid routing table, so
I had no network access to my server (only serial). After some confusion I reemerged
the old version of dhcpcd, 2.0.5-r1, started it, and everything works fine.

I think, a new version of dhcpcd should be able to handle this (little strange) network.

As a workaround I'm using now a static address and routing table.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Apr 26, 2007 4:39 pm    Post subject: Reply with quote

Could you email a wireshark trace of the dhcpcd-3 requests to me at uberlord@gentoo.org please?

From your routing table it looks like it added a "magic" route to the router.
The correct solution is for the ISP to provide a static host route or use CSR's.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
nixchecker
n00b
n00b


Joined: 23 Feb 2005
Posts: 3

PostPosted: Mon Apr 30, 2007 4:42 pm    Post subject: Reply with quote

same provider, same problem :(
Back to top
View user's profile Send private message
eXtIO
n00b
n00b


Joined: 26 Aug 2003
Posts: 46
Location: Germany

PostPosted: Tue May 01, 2007 9:43 am    Post subject: Reply with quote

We have the same problem, too :)

Do you still need a packet trace? We can create one for you, but our box has no X server. What tool can we use?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue May 01, 2007 11:38 am    Post subject: Reply with quote

Sorry, I do have the traces, but have been a little busy.
Anyway, the dhcp packet that comes back just contains the router, but no route to get to it.

The DHCP server needs to add a host route using the static routes option OR use CSRs.
Other ISPs do this, so there's no reason for Strato not too.

This is NOT a dhcpcd bug, it's an error in the DHCP server configuration.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
alfred
n00b
n00b


Joined: 14 Nov 2006
Posts: 9
Location: Berlin

PostPosted: Wed May 02, 2007 8:03 am    Post subject: Reply with quote

And why does the old version of dhcpcd work?
We don't have any influence of the configuration of the DHCP-Server.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed May 02, 2007 8:57 am    Post subject: Reply with quote

The old version of dhcpcd works because it added a magic host route to the router if it was unable to add a default route to the router.
Whilst this worked for the most part, it also caused other errors.

Aside from the older dhcpcd versions you will find no other dhcp clients in Gentoo that do this either.

If you don't have influence over the DHCP server then send an email to the people who run it
For reference
https://bugs.gentoo.org/show_bug.cgi?id=158867
https://forums.gentoo.org/viewtopic-t-521037-highlight-dhcpcd+route.html
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
amost
n00b
n00b


Joined: 04 Mar 2008
Posts: 7
Location: München, Germany

PostPosted: Wed Aug 25, 2010 9:38 am    Post subject: Reply with quote

This is a quite old thread but the problem is still present with dhcpcd-4.0.15 and Strato. Instead of using an explicit static route I added a dhcpcd hook that solves the routing problem for me. Just add the file /lib/dhcpcd/dhcpcd-hooks/02_buggyroute with the following content:

Code:
check_gateway()
{
    if ip route | grep -q 'default via'; then
      # we already have a default gateway
      :
    else
      ip route add $new_routers dev eth0 scope link
      ip route add default via $new_routers
    fi
}

case "${reason}" in
BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT)       check_gateway;;
esac


Don't forget to emerge sys-apps/iproute2. Alternatively it is also possible to use the old 'route' command and using these lines in the hook (I am too lazy to create and test the full script...)

Code:
route add $new_routers dev eth0
route add default gw $new_routers


The above script can certainly be improved (e.g. using $interface instead of eth0, checking $new_routers for a correct IP address, ...) but it works fine for me as it is.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Aug 25, 2010 2:14 pm    Post subject: Reply with quote

dhcpcd-5.2.3 upwards should work with this now.
We scan the routes given and if an unreachable router is there we add a host route to it, which should fix this.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
arthapex
n00b
n00b


Joined: 27 Sep 2010
Posts: 1
Location: Munich

PostPosted: Mon Sep 27, 2010 8:37 am    Post subject: Reply with quote

UberLord wrote:
dhcpcd-5.2.3 upwards should work with this now.
We scan the routes given and if an unreachable router is there we add a host route to it, which should fix this.

It does not here, using dhcpcd-5.2.7.
While using the two above route commands successfully establishes the connection.
Do you have some best practice advice? Do you need some more information to get it working right?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Sep 27, 2010 8:39 am    Post subject: Reply with quote

arthapex wrote:
UberLord wrote:
dhcpcd-5.2.3 upwards should work with this now.
We scan the routes given and if an unreachable router is there we add a host route to it, which should fix this.

It does not here, using dhcpcd-5.2.7.
While using the two above route commands successfully establishes the connection.
Do you have some best practice advice? Do you need some more information to get it working right?


A full tcpdump of the DHCP interaction from strato would be very helpful. Run this command in one terminal

tcpdump -s0 -w/tmp/dhcp.raw -ieth0

once that is running, then run dhcpcd in another terminal with the -dB options.
Once configured, either correctly or incorrectly send me the dhcpcd output and the dhcp.raw file to roy@marples.name.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum