View previous topic :: View next topic |
Author |
Message |
alfred n00b


Joined: 14 Nov 2006 Posts: 9 Location: Berlin
|
Posted: Thu Apr 26, 2007 1:31 pm Post subject: Problems withs dhcpcd on a dedicated server hosted by Strato |
|
|
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 |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
 |
nixchecker n00b

Joined: 23 Feb 2005 Posts: 3
|
Posted: Mon Apr 30, 2007 4:42 pm Post subject: |
|
|
same provider, same problem  |
|
Back to top |
|
 |
eXtIO n00b


Joined: 26 Aug 2003 Posts: 46 Location: Germany
|
Posted: Tue May 01, 2007 9:43 am Post subject: |
|
|
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 |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
 |
alfred n00b


Joined: 14 Nov 2006 Posts: 9 Location: Berlin
|
Posted: Wed May 02, 2007 8:03 am Post subject: |
|
|
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 |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
 |
amost n00b

Joined: 04 Mar 2008 Posts: 7 Location: München, Germany
|
Posted: Wed Aug 25, 2010 9:38 am Post subject: |
|
|
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 |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
 |
arthapex n00b

Joined: 27 Sep 2010 Posts: 1 Location: Munich
|
Posted: Mon Sep 27, 2010 8:37 am Post subject: |
|
|
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 |
|
 |
UberLord Retired Dev


Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Sep 27, 2010 8:39 am Post subject: |
|
|
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 |
|
 |
|