How to - DHCP Relay and Server on same machine (FreeBSD)

test24 test24 at mail.ru
Wed Jun 17 12:24:16 UTC 2015


 Hello!

I need to use DHCP Relay and DHCP Server  on same machine, but while compile and try to use with lot of options - no positive result.

But how to compile with right options

Setup:
Freebsd 9.x
CLIENTS <---> [ Multi igb0,1,2,3,4, em0,1, multiple vlans] (relay agent) <---> DHCP Server ]

The relay agent *runs on ALL interfaces that faces the client and DHCP server runs and listen other port such as 77 and

rc.conf

dhcpd_enable="YES"
dhcpd_flags="-p 77"
dhcpd_ifaces="igb1"

dhcrelay_enable="YES"
dhcrelay_flags="-a -d -D"
dhcrelay_servers="10.10.10.1"  # DHCPD IP on igb1 iface
dhcrelay_ifaces=""

dhcpd.conf

local-address 10.10.10.1;

stash-agent-options true;
# for debug
allow unknown-clients;

if exists agent.circuit-id

{
log (
info, concat( " Lease for ", binary-to-ascii (10, 8, ".", leased-address),
 " Swith port: ", binary-to-ascii (10, 8, ".", option agent.circuit-id),
 " Switch MAC: ", binary-to-ascii (16, 8, ":", suffix ( option agent.remote-id, 6)),
 " Switch IP: ", binary-to-ascii(10, 8, ".", packet(24, 4)),
 " VLAN: ", binary-to-ascii (10, 16, "", substring( option agent.circuit-id, 2, 2)),
 " MAC on the port: ", binary-to-ascii (16, 8, ":", substring(hardware, 1, 6))
)
);


With classic dhcp server ONLY - all work ok

When dhcp relay and server starts both on same machine - no errors due to misconfiguration or 
already socket listen - at that point all ok

I see incoming packets from clients on dhcp relay side but not see packets on dhcp server side
Where is mistake and how to ./configure and make dhcp relay and server with right options ?

Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20150617/f2ef91e2/attachment.html>


More information about the dhcp-users mailing list