<div dir="ltr"><div dir="ltr"><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 17, 2020 at 10:18 AM Александр Сандецкий <<a href="mailto:alexander.sandetsky@gmail.com">alexander.sandetsky@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi!<div><br></div><div>I have a problem with option 82 configuration.</div><div><br></div><div>I have managed switch with IP 10.10.0.38 (managed VLAN 100). There is additional VLANs configured for clients: VLAN 3000 and 3010. There is option 82 and DHCP relay configured on the switch.</div><div><br></div><div>I have DHCP server placed in VLAN 3000 with IP 172.18.0.101</div><div><br></div><div>I want to DHCP server serves the VLAN 3010 (and other) on per-VLAN basis.</div><div><br></div><div>The part of dhcpd.conf</div><div><br></div><div>class "VLAN3010" {<br>        match if binary-to-ascii(10, 8, "", substring(option agent.circuit-id, 2, 2)) = "3010"<br>    }<br><br><br>subnet 172.18.10.0 netmask 255.255.255.0 {<br>    option routers  172.18.0.1;<br><br>    pool {<br>            range 172.18.10.51 172.18.10.250;<br>            allow members of "VLAN3010";<br>    }<br>}</div><div><br></div><div><br></div><div>The server receives request as  </div><div>DHCPDISCOVER from 2c:27:d7:b1:a2:85 via <a href="http://10.10.0.38" target="_blank">10.10.0.38</a>: network <a href="http://10.10.0.0/24" target="_blank">10.10.0.0/24</a>: no free leases</div><div><br></div></div></blockquote><div> </div><div>The packet came from <a href="http://10.10.0.38/" target="_blank">10.10.0.38</a>, which is not in the subnet, so even if the class matched, it would not get an IP from that subnet.</div><div>As it says, network <a href="http://10.10.0.0/24" target="_blank">10.10.0.0/24</a> has no free leases<br></div><div><br></div><div>-- </div><div>Bob Harold</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div></div><div><br></div><div><br></div><div>I have checked with Wireshark</div><div><br></div><div>   Option: (82) Agent Information Option<br>        Length: 18<br>        Option 82 Suboption: (1) Agent Circuit ID<br>            Length: 6<br>            Agent Circuit ID: 00040bc20003<br>        Option 82 Suboption: (2) Agent Remote ID<br>            Length: 8<br>            Agent Remote ID: 00068026897b2b40</div><div><br></div><div>There is binary encoded agent circuit id that contains "0bc2" bytes that equal to "3010" in decimal.</div><div><br></div><div>Why my class definition does not accept this request? What is wrong?</div><div><br></div><div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div><br></div><div>Regards,</div><div>Alexander </div></div></div></div>
_______________________________________________<br>
dhcp-users mailing list<br>
<a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
<a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/listinfo/dhcp-users</a><br>
</blockquote></div></div>