dhcrelay does not relay answers back to client

Glenn Satchell glenn.satchell at uniq.com.au
Sat Mar 12 00:20:23 UTC 2011


On 03/12/11 10:36, Peter Daum wrote:
> --- Bruce Hudson<Bruce.Hudson at Dal.Ca>  wrote on Fr, 11.3.2011:
>
>>      This command tells the relay to listen on
>> "eth0", which is not the
>> interface that the replies from the dhcp server come in on.
>> Hence those
>> replies are ignored. You need to listen on the outside
>> interface as well.
>
> ... I also tried it it with additional "-i tun0" (the VPN tunnel,
> that the reply is coming from) without any difference. I am not
> sure whether "dhcrelay" does not ignore "tun0" anyway, because I
> always get a warning saying:
> tun0: unknown hardware address type 65534
>
> Regards,
>                         Peter

dhcrelay (and dhcpd) use raw sockets, and only work with broadcast 
capable interfaces like ethernet, token rign and fddi. You could try 
hacking around in the source to make it work on the tunnel devices. The 
trick is that the listening side that talks back to the dhcp server, 
doesn't need a raw socket.

Note that the correct usage is to listen on interface where client 
requests will be coming from *and* the inteface where replies from the 
server will also come from. Usually this means you want to listen on al 
lthe interfaces (the default behaviour).

A simple workaround is to run the dhcrelay on a different system on the 
lan behind gateway2. Here it can listen on eth0 and all should work as 
expected.

-- 
regards,
-glenn
--
Glenn Satchell                            |  Miss 9: What do you
Uniq Advances Pty Ltd, Sydney Australia   |  do at work Dad?
mailto:glenn.satchell at uniq.com.au         |  Miss 6: He just
http://www.uniq.com.au tel:0409-458-580   |  types random stuff.



More information about the dhcp-users mailing list