<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link="#0563C1" vlink="#954F72" style='word-wrap:break-word'><div class=WordSection1><p class=MsoNormal>Dear colleagues, <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I ran into a bit of a challenge with the conversion of the config from ISC to Kea, namely this little class definition gem:<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-family:"Courier New"'>class "rpd-1" { match if v6relay( 1, option dhcp6.interface-id ) ~= "Md1:0/0.0$"; }<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>What it does, as you can tell, it matches on the inner relay interface-id field in the DHCPv6 messages. Nothing fancy, it does work as tested. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>I have been looking at the available options and nothing comes to mind so I used keama for automatic conversion and it generated something pretty complex, as follows. Additionally, it is commented out, so I assume this is a non-working configuration element (?)<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span style='font-family:"Courier New"'> "client-classes": [<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'> {<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'> "name": "rpd-1"<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// /// match if (v6relay(1, option dhcp6.interface-id)) ~= 'Md1:0/0.0$'<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// "match-if": {<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// "regex-match": {<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// "left": {<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// "v6relay": {<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// "relay": 1,<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// "relay-option": {<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// "option": {<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// "universe": "dhcp6",<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// "name": "interface-id",<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// "code": 18<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// }<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// }<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// }<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// },<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// "right": "Md1:0/0.0$"<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// }<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'>// }<o:p></o:p></span></p><p class=MsoNormal><span style='font-family:"Courier New"'> }]<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>If I try to remove the comment markup and apply it with Kea 2.4.1, the parser does not like the “match-if” statement for some reason. I cannot locate it in the list of Kea statements, so not sure why it would be generated by keama. However, the bigger question is on how to build a Kea-compatible match on such embedded message. Any help here would be really appreciated. <o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Apr 19 18:54:20 server-kea-node1 systemd[1]: Started Kea DHCPv6 Service.<o:p></o:p></p><p class=MsoNormal>Apr 19 18:54:20 server-kea-node1 kea-dhcp6[2099]: 2024-04-19 18:54:20.202 ERROR [kea-dhcp6.dhcp6/2099.841038976] DHCP6_INIT_FAIL failed to initialize Kea server: configuration error using file '/etc/kea/kea-dhcp6.conf': <span style='background:yellow;mso-highlight:yellow'>/etc/kea/kea-dhcp6.conf:118.9-18: syntax error, unexpected constant string, expecting }</span><o:p></o:p></p><p class=MsoNormal>Apr 19 18:54:20 server-kea-node1 systemd[1]: isc-kea-dhcp6-server.service: Main process exited, code=exited, status=1/FAILURE<o:p></o:p></p><p class=MsoNormal>Apr 19 18:54:20 server-kea-node1 systemd[1]: isc-kea-dhcp6-server.service: Failed with result 'exit-code'.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Regards<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Marek<o:p></o:p></p></div></body></html>