[vpnc-devel] Dhcp and host-route

Bertho Stultiens bertho at akhphd.au.dk
Wed Feb 2 00:09:11 CET 2005


[snip]
> I am running tcpdump on eth0 and tun0 for details. I will post them as
> soon as I have more details.

I now have dumps from both interfaces.

The broadcast to rebind is correctly sent through eth0 directly to the
outside net. The problem here is that I sometimes miss the answer. This is
obviously a problem in the communication between me and the ISP and not vpnc.

However, the unicast request to renew is, as predicted, sent through the
tunnel (my net 82.x.x.x/19, dhcp server 130.y.y.y/32). This can only be
solved by adding an explicit host-route to the original default gateway.

So the problem boils down to getting the correct address of the dhcp-server.
It is possible to find the lease in /var/lib/dhcp/dhclient-eth0.leases (on
my system) and then extract "dhcp-server-identifier" from that. Something
like this would do the trick:

$ grep dhcp-server-identifier /var/lib/dhcp/dhclient-eth0.leases | \
     head -1 | awk '{ print substr($3, 0, length($3)-1) }'

How generic this is, I don't know. Anyhow, at least it needs to be
discovered first that dhcp is used at all for the particular interface.


-- 
Greetings Bertho

NOTE: Dear Outlook users: Please remove me from your address books.
      Read this article and you know why:
      http://newsforge.com/article.pl?sid=03/08/21/143258



-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/


More information about the vpnc-devel mailing list