[Kea-users] Assign subnet based on Option 82 sub option 2

iommiund iommiund at gmail.com
Sat Oct 13 13:20:16 UTC 2018

Dear all,

I'm running kea 1.3 and currently trying to assign IPs from different
subnets based on the agent remote id of option 82 (sub option 2).

Cisco access points are connected to a cisco wireless LAN controller, which
is relaying DHCPDISCOVER messages to kea. At this point, the WLC is
appending option 82 with some custom information.

Going through the Kea guide I've discovered that I can make a client-class
for option 82. Below is my current config:

"client-classes":[{"name": "marketing", "test": "option[82].hex ==

"subnet4": [
	"subnet": "",
	"id": 0001,
	"pools": [ { "pool": " -" } ],
	"relay": {"ip-address": ""},
	"client-class": "marketing",
			{ "name": "routers", "data": "" },
			{ "name": "broadcast-address", "data": "" },
			{ "name": "domain-name", "data": "test_domain.local" },
			{ "name": "domain-name-servers", "data": "" }


With this config I keep receiving DISCOVER messages but kea never replies
back, the kea log file shows the following:
2018-10-13 12:41:35.774 ERROR [kea-dhcp4.bad-packets/27813]
DHCP4_PACKET_NAK_0001 [hwtype=1 XX:XX:XX:XX:XX:XX],
cid=[XX:XX:XX:XX:XX:XX:XX], tid=0x65d50bae: failed to select a subnet for
incoming packet, src, type DHCPDISCOVER
Exporting tcpdump into wireshark I see that the DHCPDISCOVER is arriving
with suboption 2 of option 82 with the value 'marketing_AP'. I am also
receiving the agent circuit ID through sub option 1, but I do not need this.

I've gone through the majority of the kea guide but cannot locate any
information on how I can test on sub option 2.

Can someone please guide me to the right direction, or provide me with an

Thanks in advance.

Sent from: http://kea-users.7364.n8.nabble.com/

More information about the Kea-users mailing list