<div dir="ltr">Hi, SImon.<div><br></div><div>Thank you for detailed description.</div><div><br></div><div>Actually I do not fully understand how it works. My hardware vendor say me that Option 82 MUST be configured on the edge (client access ) switches but you says (as I can understand) that it must be configured somewhere on the "main" (core) ROUTER, not every switch. Your concept more prefferable for me. It more manageable and more simple for configuration. I will try it.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">пт, 17 апр. 2020 г. в 21:04, Simon Hobson <<a href="mailto:dhcp1@thehobsons.co.uk">dhcp1@thehobsons.co.uk</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Александр Сандецкий <<a href="mailto:alexander.sandetsky@gmail.com" target="_blank">alexander.sandetsky@gmail.com</a>> wrote:<br>
<br>
> I have a problem with option 82 configuration.<br>
<br>
Actually, I suspect the thing you do not have a problem with is Option 82 !<br>
<br>
> 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.<br>
> <br>
> I have DHCP server placed in VLAN 3000 with IP 172.18.0.101<br>
> <br>
> I want to DHCP server serves the VLAN 3010 (and other) on per-VLAN basis.<br>
<br>
Does the ROUTER serving the VLANs have IP addresses in those VLANs ? Do you even have routing set up yet ? Note that a MANAGED SWITCH is not the same thing as a ROUTER - though you can get devices (typically called something like "Layer 3 switch") that include both functions. Without a router (or routing function built into the switch), what the VLAN config gives you is a stack of separate LANs - almost as though you had a stack of switches, one per LAN.<br>
Before trying to sort out the DHCP - make sure you have the routing sorted. If you manually configure a client on the 3010 VLAN (I assume this will be an access port) in the <a href="http://172.18.10.0/24" rel="noreferrer" target="_blank">172.18.10.0/24</a>, can it ping the server at 172.18.0.101 ? If not, fix that first; if it can, use traceroute and check that it is in fact routing via a router and not accidentally going direct (there are ways of making the cross-subnet traffic work other than routing it).<br>
<br>
Summary : You will need a router configured with interfaces in VLAN 3000 and VLAN 3010, with IPs in the <a href="http://172.18.0.0/24" rel="noreferrer" target="_blank">172.18.0.0/24</a> and <a href="http://172.18.10.0/24" rel="noreferrer" target="_blank">172.18.10.0/24</a> subnets respectively. it will probably also have an interface on VLAN 100 in subnet <a href="http://10.10.0.0/" rel="noreferrer" target="_blank">10.10.0.0/</a>?? to allow you access to manage the switch.<br>
When you have this working, and you configure the DHCP Relay agent, then things should "just work".<br>
<br>
> The part of dhcpd.conf<br>
> <br>
> 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>
> }<br>
<br>
That is not how you serve VLANs. For the VLAN stated, all you need is :<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>
}<br>
}<br>
When requests come from a relay agent in the <a href="http://172.18.10.0/24" rel="noreferrer" target="_blank">172.18.10.0/24</a> subnet, it will automagically select the right subnet and hand out a suitable address. Note that the relay agent does not have to be in the router, but it MUST have an IP address in the network it's serving - it's just that this is usually most conveniently done as an integral part of the routing.<br>
<br>
> The server receives request as <br>
> DHCPDISCOVER from 2c:27:d7:b1:a2:85 via <a href="http://10.10.0.38" rel="noreferrer" target="_blank">10.10.0.38</a>: network <a href="http://10.10.0.0/24" rel="noreferrer" target="_blank">10.10.0.0/24</a>: no free leases<br>
<br>
This suggests to me that you have not correctly configured your switch and router. For that client, you should NOT see a request coming from <a href="http://10.10.0.0/24" rel="noreferrer" target="_blank">10.10.0.0/24</a> subnet.<br>
<br>
Simon<br>
<br>
_______________________________________________<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><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div><br></div><div>С Уважением,</div><div>Сандецкий Александр</div></div>