Linux Distributed Switch Architecture with Local Option82 ISC DHCP server/DHCP relay

glenn.satchell at uniq.com.au glenn.satchell at uniq.com.au
Mon Nov 23 21:48:49 UTC 2020


Hi Remi

So it looks like the circuit-id is not matching. Can you do a packet 
trace and verify the exact content of the circuit-id values? Perhaps 
there is a trailing non-print character? Is it possible the initial 
packet is getting through - the one without the added circuit-id?

I can see the customer's hardware limitations, but it seems to me a 
different switch with inbuilt dhcp-relay would make this a very simple 
solution. :(

regards,
Glenn

On 2020-11-23 22:31, remi rsd wrote:
> Hello Simon. Thanks for your messages.
> Some news from the field.
> 
> 
> Option82 was effectively "sold" to the customer. Mandatory.
> Switch cannot be replaced by another one.
> For the moment, I would like to avoid any monitoring daemon.
> 
> 
> I applied your recommendation about declaring shared-network (and 
> hacked a
> bit dhcrelay for debugging purpose):
> effectively, now DHCPd receive relayed packets with circuit-id
> 
> 
> I found also this http://www.miquels.cistron.nl/isc-dhcpd/
> Added the patch patch in order to log circuit-id info.
> 
> Then I updated my config:
> 
> 
> first try:
> 
> stash-agent-options true;
> 
> log-facility local7;
> 
> if exists agent.circuit-id
> {
> log (info, concat("Lease for ", option agent.circuit-id));
> }
> 
> host port1 {
>    host-identifier option agent.circuit-id "port1";
>    fixed-address 192.168.1.31;
> }
> 
> host port2 {
>    host-identifier option agent.circuit-id "port2";
>    fixed-address 192.168.1.32;
> }
> 
> host port3 {
>    host-identifier option agent.circuit-id "port3";
>    fixed-address 192.168.1.33;
> }
> 
> host port4 {
>    host-identifier option agent.circuit-id "port4";
>    fixed-address 192.168.1.34;
> }
> 
> shared-network my_bridge {
>    subnet 172.20.31.0 netmask 255.255.255.0 {}
>    subnet 172.20.32.0 netmask 255.255.255.0 {}
>    subnet 172.20.33.0 netmask 255.255.255.0 {}
>    subnet 172.20.34.0 netmask 255.255.255.0 {}
> 
>    subnet 192.168.1.0 netmask 255.255.255.0 {
>       option routers 192.168.1.20;
>       option broadcast-address 192.168.1.255;
>       option domain-name-servers 192.168.1.20;
>       option domain-name "bus-1";
>    }
> }
> 
> Result:
> "DHCPDISCOVER from 28:d2:44:50:a5:05 via dsa_br0: network my_bridge: no 
> free
> leases"
> 
> => No lease
> 
> If I add a default pool, lease provided and a log for circuit-id is
> displayed, confirming that DHCPd received packet from relay agent
> 
> 
> I tried another way:
> 
> shared-network my_bridge {
>    subnet 172.20.31.0 netmask 255.255.255.0 {}
>    subnet 172.20.32.0 netmask 255.255.255.0 {}
>    subnet 172.20.33.0 netmask 255.255.255.0 {}
>    subnet 172.20.34.0 netmask 255.255.255.0 {}
> 
>    subnet 192.168.1.0 netmask 255.255.255.0 {
>       option routers 192.168.1.20;
>       option broadcast-address 192.168.1.255;
>       option domain-name-servers 192.168.1.20;
>       option domain-name "bus-1";
> 
> 
> 			class "port1" {
> 				match if option agent.circuit-id = "port1";
> 			}
> 			pool {
> 				allow members of "port1";
> 				range 192.168.1.31;
> 			}
> 
> 			class "port2" {
> 				match if option agent.circuit-id = "port2";
> 			}
> 			pool {
> 				allow members of "port2";
> 				range 192.168.1.32;
> 			}
> 
> 			class "port3" {
> 				match if option agent.circuit-id = "port3";
> 			}
> 			pool {
> 				allow members of "port3";
> 				range 192.168.1.33;
> 			}
> 
> 			class "port4" {
> 				match if option agent.circuit-id = "port4";
> 			}
> 			pool {
> 				allow members of "port4";
> 				range 192.168.1.34;
> 			}
>    }
> }
> 
> Result:
> "DHCPDISCOVER from 28:d2:44:50:a5:05 via dsa_br0: network my_bridge: no 
> free
> leases"
> 
> => same result, no lease.
> 
> 
> The difference with the example un in the link above is the HW address.
> Is it really necessary to declare HW address of device ? Circut-id 
> match is
> not enough ?
> 
> 
> 
> 
> 
> 
> --
> Sent from: http://isc-dhcp-users.2343191.n4.nabble.com/
> _______________________________________________
> ISC funds the development of this software with paid support
> subscriptions. Contact us at https://www.isc.org/contact/ for more
> information.
> 
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users


More information about the dhcp-users mailing list