dhcpd and dhcrelay
Chuck Anderson
cra at WPI.EDU
Tue Sep 30 17:02:24 UTC 2008
On Tue, Sep 30, 2008 at 03:56:38PM +0400, Elena Timoshkina wrote:
> Hi,
> I have a problem to solve. I have a dhcpd server and now I need a
> dhcprelay on the same server.
Why? Where will you be relaying packets from/to if the packets are
arriving at the dhcpd server already?
> Dhcpd in vlan39 interface. I binded Dhcpd in vlan39 to
> add to dhcpd.conf file:
> local-address 10.1.1.254;
Did you start dhcpd daemon with the "vlan39" parameter so it only
listens on that one interface? This is a separate requirement from
using local-address.
> Dhcrelay in vlan667 interface.
> grep dhcrelay /etc/rc.conf :
> dhcrelay_enable="YES"
> dhcrelay_servers="10.97.5.2" # dhcrelay server(s)
> dhcrelay_ifaces="vlan667"
It makes no sense to run dhcrelay with a single interface. You need
two interfaces that dhcrelay will relay the packets between.
> Dhcpd works fine.
>
> When I try to run dhcrelay :
> /usr/local/etc/rc.d/isc-dhcrelay start
> Starting dhcrelay.
> Internet Systems Consortium DHCP Relay Agent V3.0.5
> Copyright 2004-2006 Internet Systems Consortium.
> All rights reserved.
> For info, please visit http://www.isc.org/sw/dhcp/
> Listening on BPF/vlan667/00:08:02:f0:25:81
> Sending on BPF/vlan667/00:08:02:f0:25:81
> Sending on Socket/fallback
>
> Dhcrelay starts. But sockstat tells me:
>
> root dhcrelay 69409 4 udp4 *:67 *:*
> dhcpd dhcpd 68725 5 udp4 10.1.1.254:67 *:*
>
> Dhcpd binded in address 10.1.1.254
> But dhcrelay not binded in interface vlan667. How can I do it - to
> bind dhcrelay in address 10.97.7.18 only?
dhcrelay doesn't bind to IP addresses, but rather physical interfaces.
This is because the DHCP protocol needs to handle broadcasts from
unaddressed hosts (0.0.0.0 source address) and send to all-ones
broadcast 255.255.255.255.
More information about the dhcp-users
mailing list