Sorry, forgot attachments
From: [email protected]
To: "kea-users" <[email protected]>
Sent: Thursday, August 26, 2021 11:18:33 AM
Subject: Shared network match
Hello.
I am trying to implement the following scenario:
DHCP will allocate ip addresses from different subnets acording to matching
client class.
Each PoP(router) will have own client class, based on suboption 150 of option
82.
I made a client class "GponTestMGM"(kea-dhcp4.conf in attachment)
{
"name":"GponTestMGM",
"test":"option[82].option[150].hex == 0x6441a000"
}
In the logs i see that kea matches dhcpdiscover to this client class(dhcp4 log
in attachment):
...EVAL_RESULT Expression GponTestMGM evaluated to 1
And also
...DHCP4_CLASS_ASSIGNED [hwtype=1 60:f1:8a:be:5c:18],
cid=[01:60:f1:8a:be:5c:18], tid=0x55155455: client packet has been assigned to
the following class(es): ALL, GponTestMGM, UNKNOWN
But the problem is that kea doesnt match shared network and subnet.
Configuration of shared network:
sharedred-networks": [
{
"subnet4": [
{
"id": 1,
"option-data": [{"name": "routers","data": "100.65.160.1"} ],
"pools": [{ "pool": "100.65.160.2 - 100.65.160.100"}],
"rebind-timer": 20,
"renew-timer": 10,
"subnet": "100.65.160.0/19",
"valid-lifetime": 30,
"client-class": "GponTestMGM"
}
],
"valid-lifetime": 200,
"interface":"eno3"
}
]
But in the logs i see:
...failed to select subnet for the client
What am i doing wrong?
THanks!
{
"Dhcp4": {
"interfaces-config": {
"interfaces": ["eno3"]
},
"control-socket": {
"socket-type": "unix",
"socket-name": "/tmp/kea4-ctrl-socket"
},
"lease-database": {
"type": "memfile",
"lfc-interval": 3600
},
"expired-leases-processing": {
"reclaim-timer-wait-time": 10,
"flush-reclaimed-timer-wait-time": 25,
"hold-reclaimed-time": 3600,
"max-reclaim-leases": 100,
"max-reclaim-time": 250,
"unwarned-reclaim-cycles": 5
},
"renew-timer": 900,
"rebind-timer": 1800,
"valid-lifetime": 3600,
"option-data": [
{
"name": "domain-name-servers",
"data": "192.0.2.2, 192.0.2.3"
},
{
"code": 15,
"data": "example.org"
},
{
"name": "domain-search",
"data": "mydomain.example.com, example.com"
},
{
"name": "boot-file-name",
"data": "EST5EDT4\\,M3.2.0/02:00\\,M11.1.0/02:00"
},
{
"name": "default-ip-ttl",
"data": "0xf0"
}
],
"client-classes": [
{
"name": "voiP",
"test": "substring(option[60].hex,0,6) == 'Aastra'",
"next-server": "192.0.2.254",
"server-hostname": "hal9000",
"boot-file-name": "/dev/null"
},
{
"name":"GponTestMGM",
"test":"option[82].option[150].hex == 0x6441a000"
}
],
"subnet4": [
{
"subnet": "192.0.2.0/24",
"pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
"option-data": [
{
"name": "routers",
"data": "192.0.2.1"
}
],
"reservations": [
{
"hw-address": "1a:1b:1c:1d:1e:1f",
"ip-address": "192.0.2.201"
},
{
"client-id": "01:11:22:33:44:55:66",
"ip-address": "192.0.2.202",
"hostname": "special-snowflake"
},
{
"duid": "01:02:03:04:05",
"ip-address": "192.0.2.203",
"option-data": [ {
"name": "domain-name-servers",
"data": "10.1.1.202, 10.1.1.203"
} ]
},
{
"client-id": "01:12:23:34:45:56:67",
"ip-address": "192.0.2.204",
"option-data": [
{
"name": "vivso-suboptions",
"data": "4491"
},
{
"name": "tftp-servers",
"space": "vendor-4491",
"data": "10.1.1.202, 10.1.1.203"
}
]
},
{
"client-id": "01:0a:0b:0c:0d:0e:0f",
"ip-address": "192.0.2.205",
"next-server": "192.0.2.1",
"server-hostname": "hal9000",
"boot-file-name": "/dev/null"
},
{
"flex-id": "'s0mEVaLue'",
"ip-address": "192.0.2.206"
}
]
},
sharedred-networks": [
{
"subnet4": [
{
"id": 1,
"option-data": [{"name": "routers","data": "100.65.160.1"}
],
"pools": [{ "pool": "100.65.160.2 - 100.65.160.100"}],
"rebind-timer": 20,
"renew-timer": 10,
"subnet": "100.65.160.0/19",
"valid-lifetime": 30,
"client-class": "GponTestMGM"
}
],
"valid-lifetime": 200,
"interface":"eno3"
}
],
],
"loggers": [
{
"name": "kea-dhcp4",
"output_options": [
{
"output": "/usr/local/var/log/kea-dhcp4.log"
}
],
"severity": "DEBUG",
"debuglevel": 99
}
]
}
}2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.packets/3818.140676329851072]
DHCP4_BUFFER_RECEIVED received buffer from 100.65.160.1:67 to 10.255.255.186:67
over interface eno3
2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.options/3818.140676329851072]
DHCP4_BUFFER_UNPACK parsing buffer received from 100.65.160.1 to 10.255.255.186
over interface eno3
2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.eval/3818.140676329851072]
EVAL_DEBUG_OPTION Pushing option 60 with value 0x
2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.eval/3818.140676329851072]
EVAL_DEBUG_STRING Pushing text string '0'
2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.eval/3818.140676329851072]
EVAL_DEBUG_STRING Pushing text string '6'
2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.eval/3818.140676329851072]
EVAL_DEBUG_SUBSTRING_EMPTY Popping length 6, start 0, string 0x pushing result
0x
2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.eval/3818.140676329851072]
EVAL_DEBUG_STRING Pushing text string 'Aastra'
2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.eval/3818.140676329851072]
EVAL_DEBUG_EQUAL Popping 0x416173747261 and 0x pushing result 'false'
2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.options/3818.140676329851072]
EVAL_RESULT Expression voiP evaluated to 0
2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.eval/3818.140676329851072]
EVAL_DEBUG_SUB_OPTION Pushing option 82 sub-option 150 with value 0x6441A000
2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.eval/3818.140676329851072]
EVAL_DEBUG_HEXSTRING Pushing hex string 0x6441A000
2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.eval/3818.140676329851072]
EVAL_DEBUG_EQUAL Popping 0x6441A000 and 0x6441A000 pushing result 'true'
2021-08-26 11:13:27.164 INFO [kea-dhcp4.options/3818.140676329851072]
EVAL_RESULT Expression GponTestMGM evaluated to 1
2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.packets/3818.140676329851072]
DHCP4_PACKET_RECEIVED [hwtype=1 60:f1:8a:be:5c:18], cid=[01:60:f1:8a:be:5c:18],
tid=0x55155455: DHCPDISCOVER (type 1) received from 100.65.160.1 to
10.255.255.186 on interface eno3
2021-08-26 11:13:27.164 DEBUG [kea-dhcp4.packets/3818.140676329851072]
DHCP4_QUERY_DATA [hwtype=1 60:f1:8a:be:5c:18], cid=[01:60:f1:8a:be:5c:18],
tid=0x55155455, packet details: local_address=10.255.255.186:67,
remote_address=100.65.160.1:67, msg_type=DHCPDISCOVER (1), transid=0x55155455,
options:
type=012, len=007: "HG8247U" (string)
type=053, len=001: 1 (uint8)
type=055, len=015: 1(uint8) 3(uint8) 6(uint8) 12(uint8) 15(uint8) 28(uint8)
33(uint8) 40(uint8) 41(uint8) 42(uint8) 43(uint8) 100(uint8) 120(uint8)
121(uint8) 249(uint8)
type=061, len=007: 01:60:f1:8a:be:5c:18
type=082, len=086:,
options:
type=001, len=006: 00:04:00:08:03:09
type=002, len=008: 00:06:bc:d2:95:fd:81:80
type=009, len=039:
00:00:00:09:22:0a:20:00:00:00:00:52:1a:01:06:78:70:6f:6e:2e:33:02:10:34:38:35:37:35:34:34:33:37:31:35:30:45:37:39:44
type=150, len=004: 64:41:a0:00
type=151, len=013: 00:70:72:6f:76:69:73:69:6f:6e:69:6e:67
type=152, len=004: 64:41:a0:01
2021-08-26 11:13:27.165 DEBUG [kea-dhcp4.packets/3818.140676329851072]
DHCP4_SUBNET_SELECTION_FAILED [hwtype=1 60:f1:8a:be:5c:18],
cid=[01:60:f1:8a:be:5c:18], tid=0x55155455: failed to select subnet for the
client
2021-08-26 11:13:27.165 DEBUG [kea-dhcp4.dhcp4/3818.140676329851072]
DHCP4_CLASS_ASSIGNED [hwtype=1 60:f1:8a:be:5c:18], cid=[01:60:f1:8a:be:5c:18],
tid=0x55155455: client packet has been assigned to the following class(es):
UNKNOWN
2021-08-26 11:13:27.165 DEBUG [kea-dhcp4.dhcp4/3818.140676329851072]
DHCP4_CLASS_ASSIGNED [hwtype=1 60:f1:8a:be:5c:18], cid=[01:60:f1:8a:be:5c:18],
tid=0x55155455: client packet has been assigned to the following class(es):
ALL, GponTestMGM, UNKNOWN
2021-08-26 11:13:27.165 ERROR [kea-dhcp4.bad-packets/3818.140676329851072]
DHCP4_PACKET_NAK_0001 [hwtype=1 60:f1:8a:be:5c:18], cid=[01:60:f1:8a:be:5c:18],
tid=0x55155455: failed to select a subnet for incoming packet, src
100.65.160.1, type DHCPDISCOVER_______________________________________________
ISC funds the development of this software with paid support subscriptions.
Contact us at https://www.isc.org/contact/ for more information.
To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.
Kea-users mailing list
[email protected]
https://lists.isc.org/mailman/listinfo/kea-users