<div dir="ltr"><div><div><div><div>Hi.<br><br></div>I have two questions regarding running a relay over a DHCP client interface.<br></div><div>I am using ISC-DHCP <b>4.3.5.<br><br></b></div>My system and interfaces look like:<br><br></div><span style="font-family:monospace,monospace">BOX1                                  BOX2                BOX3(10.210.1.2)<br>---------------------------           ---------------     ---------------<br>eth0          eth1        |           | DHCP server |     | DHCP server |<br>DHCP client   DHCP client |<wireless> | for eth1    |<Eth>| for eth0    |<br>port 68       port 17787  |           | port 17787  |     | port 67     |<br>---------------------------           ---------------     ---------------<br>   \           /<br>     DHCP relay<br>      to BOX3</span><br><br></div><div>First, eth1 gets a lease from BOX2, configures itself, configures eth0 for its subnet (obtained as option)<br>and starts DHCP client on eth0 and DHCP relay between eth0 and eth1.<br></div><div>eth0 should get the IP from BOX3 which is accessible through established routes.<br><br></div><div>It goes like this:<br></div><div>1. eth1 get the lease from BOX2 and configures its IP/mask etc.<br></div><div>2. eth1 with a lease also gets a custom option which tells which subnet eth0 should be in,<br></div><div>and assigns last IP in eth0 subnet to the eth0<br></div><div>3. DHCP client on eth0 is restarted.<br></div><div>4. DHCP relay is restarted - there are few other eth0 VLAN interfaces included which are not DHCP clients.<br></div><div><br></div><div>Since I am not sure if I am doing this correctly, my questions are:<br><br></div><div>1. Since the relay can not run on interfaces without IP address how should I set up eth0?<br></div><div>Currently, I assign it a "reserved" IP from its expected subnet which is then updated when lease is obtained.<br></div><div>Is this how it should be done? Is there any other way so I would not have to use this "reserved" IP?<br><br></div><div>2. When eth1 gets a lease and restarts DHCP client on eth0, sometimes (one to 10) it happens that<br></div><div>eth0 just won't send out DHCPREQUEST, it sends one and that is it. No retries, no lease obtained.<br></div><div>Why would it stop sending requests?<br></div><div>Part of the log, eth1 got 192.168.1.3 from BOX2, eth0 sent only one DHCPREQUES and that was it:<span style="font-family:monospace,monospace"><br><br>Mar 22 21:38:53 (none) <a href="http://daemon.info">daemon.info</a> dhclient: DHCPACK from 192.168.1.1<br>Mar 22 21:38:56 (none) <a href="http://daemon.info">daemon.info</a> dhclient: bound to 192.168.1.3 -- renewal in 302912 seconds.<br>Mar 22 09:38:57 (none) <a href="http://daemon.info">daemon.info</a> dhclient: Killed old client process<br>binding to user-specified port 68<br>Mar 22 09:39:06 (none) <a href="http://daemon.info">daemon.info</a> dhclient: DHCPREQUEST on eth0 to 255.255.255.255 port 67<br>Requesting: mdl0 as upstream: Y downstream: N<br>Requesting: eth0.1150 as upstream: N downstream: Y<br>Requesting: eth0.1250 as upstream: N downstream: Y<br>Requesting: eth0.1350 as upstream: N downstream: Y<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: Internet Systems Consortium DHCP Relay Agent 4.3.5<br>Internet Systems Consortium DHCP Relay Agent 4.3.5<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: Copyright 2004-2016 Internet Systems Consortium.<br>Copyright 2004-2016 Internet Systems Consortium.<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: All rights reserved.<br>All rights reserved.<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: For info, please visit <a href="https://www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/</a><br>For info, please visit <a href="https://www.isc.org/software/dhcp/">https://www.isc.org/software/dhcp/</a><br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: Listening on LPF/eth0.1350/04:a3:16:e2:2e:b8<br>Listening on LPF/eth0.1350/04:a3:16:e2:2e:b8<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: Sending on   LPF/eth0.1350/04:a3:16:e2:2e:b8<br>Sending on   LPF/eth0.1350/04:a3:16:e2:2e:b8<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: Listening on LPF/eth0.1250/04:a3:16:e2:2e:b8<br>Listening on LPF/eth0.1250/04:a3:16:e2:2e:b8<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: Sending on   LPF/eth0.1250/04:a3:16:e2:2e:b8<br>Sending on   LPF/eth0.1250/04:a3:16:e2:2e:b8<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: Listening on LPF/eth0.1150/04:a3:16:e2:2e:b8<br>Listening on LPF/eth0.1150/04:a3:16:e2:2e:b8<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: Sending on   LPF/eth0.1150/04:a3:16:e2:2e:b8<br>Sending on   LPF/eth0.1150/04:a3:16:e2:2e:b8<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: Listening on LPF/mdl0/00:0d:ca:00:0e:15<br>Listening on LPF/mdl0/00:0d:ca:00:0e:15<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: Sending on   LPF/mdl0/00:0d:ca:00:0e:15<br>Sending on   LPF/mdl0/00:0d:ca:00:0e:15<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: Listening on LPF/eth0/04:a3:16:e2:2e:b8<br>Listening on LPF/eth0/04:a3:16:e2:2e:b8<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: Sending on   LPF/eth0/04:a3:16:e2:2e:b8<br>Sending on   LPF/eth0/04:a3:16:e2:2e:b8<br>Mar 22 09:39:09 (none) <a href="http://daemon.info">daemon.info</a> dhcrelay: Sending on   Socket/fallback</span><br></div><div><br></div><div>!!! LOG ends here ... no repeat to DHCPREQUEST on eth0???<br></div><div><br>May there be problem with my client config? But same scenario does not repeat every time, usually works ok.<br>dhclient.conf for eth0 has:<br><span style="font-family:monospace,monospace">timeout 300;<br>retry 60;<br>reboot 90;<br>select-timeout 0;<br>initial-interval 2;</span><br></div><div><br></div><div>DHCP clients and relay run like this:<br><font size="1"><span style="font-family:monospace,monospace">/usr/sbin/dhclient -nw -p 17788 -pf /var/run/dhclient-air.pid -cf /etc/dhcp/dhclient-air.conf -lf /home/db/dhclient-air.leases -sf /etc/dhclient-air-script eth1<br>/usr/sbin/dhclient -nw -p 68 -pf /var/run/dhclient.pid -cf /etc/dhcp/dhclient.conf -lf /home/db/dhclient.leases -sf /etc/dhclient-script eth0<br>/usr/sbin/dhcrelay -a -U eth0 -iu eth1 -id eth0.1150 -id eth0.1250 -id eth0.1350 10.210.1.2</span></font><br><br></div><div>Can someone please comment on this?<br></div><div>Thank you very much.<br><br></div><div>RegK<br></div></div>