Re[2]: How to - DHCP Relay and Server on same machine (FreeBSD)
test24
test24 at mail.ru
Wed Jun 17 14:52:13 UTC 2015
Среда, 17 июня 2015, 16:26 +02:00 от Roberto Innocente <inno at sissa.it>:
>
>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
>
man dhcpd says:
-p port
The udp port number on which dhcpd should listen. If unspeci-
fied dhcpd uses the default port of 67. This is mostly useful
for debugging purposes.
-s address
Specify an address or host name to which dhcpd should send
replies rather than the broadcast address (255.255.255.255).
This option is only supported in IPv4.
than dhcpd listen 10.10.10.1:77
man dhcp relay says:
-p PORT
Listen and transmit on port PORT. This is mostly useful for
debugging purposes. Default is port 67 for DHCPv4/BOOTP
dhcpd and relay cannot work on same socket on same machine, than i need to
say dhcpd to listen another port such as 77. and dchp relay forward all requests from 67 port to 77 port dhcpd
and shema is next:
clients ip*:67/68 port <-> all ifaces *:68/68 dhcp relay send/receive 77port <-> 10.10.10.1:77 port dhcpd
But this shema do not work on relay <-> dhcpd side - no any info in logs and any packets by dumping 10.10.10.1:77
>
>
>
>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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20150617/87992760/attachment-0001.html>
More information about the dhcp-users
mailing list