dhpd and option-82 not working
I am trying to set up dhcpd server with option 82. There are my assuptions:
- if matching based on circuit-id and remote-id is sucessfull than client should be assigned 10.1.10.50 IP,
- in other case if matching is not sucessfull client should be assigned 10.1.10.90 IP
- client and dhcp server are connected to the same switch in the same VLAN
- there are no other switches connected
- option 82 is enabled on the switch
I have written classes and dhcpd server recognizes client very well however it send to the client improper IP address. Below you find my log with my comments:
Jun 18 13:28:48 cc1-mc1 dhcpd: AXIS --my log entry of client type (option vendor-class-identifier) just for information
Jun 18 13:28:48 cc1-mc1 dhcpd: DHCPDISCOVER from XX:XX:XX:XX:XX:XX via eth0.10 -- discovery from axis client via vlan 10
Jun 18 13:28:48 cc1-mc1 dhcpd: Circuit-ID -- my log entry
Jun 18 13:28:48 cc1-mc1 dhcpd: 07 -- circuit port on the switch which camera is connected
Jun 18 13:28:48 cc1-mc1 dhcpd: Remote-ID -- my log entry
Jun 18 13:28:48 cc1-mc1 dhcpd: 10.1.10.222 -- IP address of the switch which camera is connected
Jun 18 13:28:48 cc1-mc1 dhcpd: AXIS -- my log entry of client type
Jun 18 13:28:48 cc1-mc1 dhcpd: host matched, should assign IP: 10.1.10.50 -- information that matched is sucessfull, client should assign IP: 10.1.10.50
Jun 18 13:28:48 cc1-mc1 dhcpd: DHCPDISCOVER from XX:XX:XX:XX:XX:XX via 10.1.10.222 -- another discover from axis client via switch (switch IP 10.1.10.222)
Jun 18 13:28:48 cc1-mc1 dhcpd: DHCPOFFER on 10.1.10.90 to 00:40:8c:d2:6e:3a (axis-00408cd26e3a) via eth0.10 -- here are strange points, two DHCP offer packets, one for 10.1.10.90 via interface in VLAN 10
Jun 18 13:28:48 cc1-mc1 dhcpd: DHCPOFFER on 10.1.10.50 to 00:40:8c:d2:6e:3a (axis-00408cd26e3a) via 10.1.10.222 -- and second one with "theoretically" proper IP 10.1.10.50 via switch (10.1.10.222)
Jun 18 13:28:48 cc1-mc1 dhcpd: AXIS -- my log entry of client type
Jun 18 13:28:49 cc1-mc1 dhcpd: DHCPREQUEST for 10.1.10.90 (10.1.10.2) from XX:XX:XX:XX:XX:XX (axis-00408cd26e3a) via eth0.10 -- based on first offer there are DHCPPREQUEST packet for "theoretically" improper IP 10.1.10.90
Jun 18 13:28:49 cc1-mc1 dhcpd: DHCPACK on 10.1.10.90 to 00:40:8c:d2:6e:3a (axis-00408cd26e3a) via eth0.10 -- server send improper theoretically" improper IP 10.1.10.90 address
I also made second test with matching based on option vendor-class-identifier and it wortks very well, so the case is in relay-agent.
I would be very grateful for any help.
Thanks in advance.
Tom
|