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

remi rsd remi.salard at wabtec.com
Mon Nov 23 11:31:11 UTC 2020


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/


More information about the dhcp-users mailing list