How to - DHCP Relay and Server on same machine (FreeBSD)
Roberto Innocente
inno at sissa.it
Wed Jun 17 14:26:50 UTC 2015
client
listen on 68 sends to port 67 --->
relay listen on 67 forwards on 67
--> server listen on 67 replies to
68 or 67 (if its a relay)
cant work unless you change ports used
On 2015-06-17 14:24, test24 wrote:
> 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
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users
--
Roberto Innocente - SISSA
inno at sissa.it - +39 40 3787541
More information about the dhcp-users
mailing list