<HTML><BODY><br><br><br>Среда, 17 июня 2015, 16:26 +02:00 от Roberto Innocente <inno@sissa.it>:<br>
<blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;"><div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_14345512160000000929_BODY"><br>
client<br>
listen on 68 sends to port 67 ---><br>
                       relay listen on 67 forwards on 67<br>
                                     --> server listen on 67 replies to <br>
68 or 67 (if its a relay)<br><br>
cant work unless you change ports used<br><br></div></div></div></div></blockquote>man dhcpd says:<br><br>       -p port<br>              The  udp  port number on which dhcpd should listen.  If unspeci-<br>              fied dhcpd uses the default port of 67.  This is  mostly  useful<br>              for debugging purposes.<br><br>       -s address<br>              Specify  an  address  or  host  name  to which dhcpd should send<br>              replies rather than  the  broadcast  address  (255.255.255.255).<br>              This option is only supported in IPv4.<br><br><br>than dhcpd  listen 10.10.10.1:77 <br><br>man dhcp relay says:<br><br>-p PORT<br>              Listen  and  transmit  on  port PORT.  This is mostly useful for<br>              debugging purposes.  Default is port  67  for  DHCPv4/BOOTP<br><br><br>dhcpd and relay cannot work on same socket on same machine, than i need to<br>say dhcpd to listen another port such as 77. and dchp relay forward all requests from 67 port to 77 port dhcpd<br><br><br>and shema is next:<br><br>clients ip*:67/68 port <-> all ifaces *:68/68 dhcp relay send/receive 77port <-> 10.10.10.1:77 port dhcpd<br><br>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<br><br><br><br><br><br><blockquote style="border-left:1px solid #0857A6; margin:10px; padding:0 0 0 10px;"><div id=""><div class="js-helper js-readmsg-msg"><div><div id="style_14345512160000000929_BODY"><br><br><br>
On 2015-06-17 14:24, test24 wrote:<br>
> Hello!<br>
> <br>
> I need to use DHCP Relay and DHCP Server on same machine, but while<br>
> compile and try to use with lot of options - no positive result.<br>
> <br>
> But how to compile with right options<br>
> <br>
> Setup:<br>
> Freebsd 9.x<br>
> CLIENTS <---> [ Multi igb0,1,2,3,4, em0,1, multiple vlans] (relay<br>
> agent) <---> DHCP Server ]<br>
> <br>
>  The relay agent *runs on ALL interfaces that faces the client and<br>
> DHCP server runs and listen other port such as 77 and<br>
> <br>
> rc.conf<br>
> <br>
> dhcpd_enable="YES"<br>
> dhcpd_flags="-p 77"<br>
> dhcpd_ifaces="igb1"<br>
> <br>
> dhcrelay_enable="YES"<br>
> dhcrelay_flags="-a -d -D"<br>
> dhcrelay_servers="10.10.10.1" # DHCPD IP on igb1 iface<br>
> dhcrelay_ifaces=""<br>
> <br>
> dhcpd.conf<br>
> <br>
> local-address 10.10.10.1;<br>
> <br>
> stash-agent-options true;<br>
> # for debug<br>
> allow unknown-clients;<br>
> <br>
> if exists agent.circuit-id<br>
> <br>
> {<br>
> log (<br>
> info, concat( " Lease for ", binary-to-ascii (10, 8, ".",<br>
> leased-address),<br>
>  " Swith port: ", binary-to-ascii (10, 8, ".", option<br>
> agent.circuit-id),<br>
>  " Switch MAC: ", binary-to-ascii (16, 8, ":", suffix ( option<br>
> agent.remote-id, 6)),<br>
>  " Switch IP: ", binary-to-ascii(10, 8, ".", packet(24, 4)),<br>
>  " VLAN: ", binary-to-ascii (10, 16, "", substring( option<br>
> agent.circuit-id, 2, 2)),<br>
>  " MAC on the port: ", binary-to-ascii (16, 8, ":",<br>
> substring(hardware, 1, 6))<br>
> )<br>
> );<br>
> <br>
> With classic dhcp server ONLY - all work ok<br>
> <br>
> When dhcp relay and server starts both on same machine - no errors due<br>
> to misconfiguration or<br>
> already socket listen - at that point all ok<br>
> <br>
> I see incoming packets from clients on dhcp relay side but not see<br>
> packets on dhcp server side<br>
> Where is mistake and how to ./configure and make dhcp relay and server<br>
> with right options ?<br>
> <br>
> Thanks<br>
> <br>
> _______________________________________________<br>
> dhcp-users mailing list<br>
> <a href="/compose?To=dhcp%2dusers@lists.isc.org">dhcp-users@lists.isc.org</a><br>
> <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br><br>
-- <br>
Roberto Innocente - SISSA<br><a href="/compose?To=inno@sissa.it">inno@sissa.it</a> - +39 40 3787541<br></div></div></div></div></blockquote>
<br></BODY></HTML>