DHCP Relay Interface

Denys Vlasenko vda.linux at googlemail.com
Mon Apr 13 03:12:41 UTC 2009


On Monday 23 March 2009 11:40, Jaya Dhanesh wrote:
> Hi,
> 
> I have a 2 interfaces on a FC4 system, a eth0 and eth1. This system has the
> busybox code running as DHCP relay.
> The dhcp client sends the request to the eth1 and the server is connected to
> eth0. The DHCP Discover is sent from the
> client to server. The server replies with a DHCP Offer, but a unicast
> traffic.

With which exactly IP/ethernet address? Can you show this event
in tcpdump?

> This has the destination address as the address 
> that is offered to the client. The relay is not able to receive the packets
> on eth0, though ethereal is able to capture the Offer
> packets on eth0.
> 
> Should I change the busy box configuration?

This may be a bug, here in dhcprelay.c:

                                if (udhcp_read_interface(clients[i-1], NULL, &dhcp_msg.giaddr, NULL))
                                        dhcp_msg.giaddr = gw_ip;

We slap IP of our client-facing iface into "gateway address"
in DHCP packet before we pass it to server.
If server can't route this IP back to us (broken or unusual routing?),
it will not work.
Can you try replacing it with just this?

                                dhcp_msg.giaddr = gw_ip;

It will use IP of our _server-facing_ iface instead.
--
vda


More information about the busybox mailing list