relay - discover interfaces.

Glenn Satchell Glenn.Satchell at
Fri Aug 11 13:40:23 UTC 2006

>Date: Thu, 10 Aug 2006 15:50:25 -0700 (PDT)
>From: foomail123 <foomail123 at>
>Subject: relay - discover interfaces.
>To: dhcp-users at
>Does relay always expect interfaces to be up 
>before relay is run ?


>Is there a way for relay to smartly detect interfaces?

It does - sort of. The algorithm is to get all interfaces that are up,
then remove loopback, any non-broadcast interface types, and point to
point, then use whatever is left. If you specify any interfaces on the
command line then it starts with those and goes through the same
elimination process. See the discover_interfaces() function in
common/discover.c in the source distribution.

>When interfaces go down or change IP address, how
>does relay get notified ?

System dependant. In linux you can use the ifup/ifdown scripts to
restart dhcrelay. Restarting is ok as dhcrelay does not store any state
and usually starts very quickly. Mostly though it probably doesn't get

It doesn't make much sense for dhcrelay to use unconfigured interfaces,
since it needs the IP address assigned to that interface so that it can
add it to the packet it is forwarding to the dhcp server. If the
interface is not up then the IP address either isn't assigned yet, or
it could change as it is brought up.

If you have interfaces going up and down on your dhcp server you may
want to rethink your network design, and come up with a way for the
interfaces to always be up. Perhaps a small switch or hub on some of
the interfaces would allow them to always be up?


More information about the dhcp-users mailing list