[Kea-users] Option 121, multiple routes

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Kea-users] Option 121, multiple routes

Nepryakhin Ivan

Hello, please tell me how to send in the field option 121 several routes, at this time the configuration

"Option-def": [
      {

           "Name": "rfc3442-classless-static-routes",
           "Code": 121,
           "Space": "dhcp4",
           "Type": "record",
           "Array": false,
           "Record-types": "uint8, uint8, uint8, ipv4-address"
 }
]

.....

       {
           "Name": "rfc3442-classless-static-routes",
           "Code": 121,
           "Space": "dhcp4",
           "Csv-format": true,
           "Data": "9,10,0, 172.25.16.1"
        }

But so they tend to transmit only one route, the second is obtained only if I change
 "Record-types": "uint8, uint8, uint8, ipv4-addres, uint8, uint8, uint8, ipv4-addres, etc"

If more correct way?

--


Best regards,
Nepryakhin Ivan
System administrator





_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Kea-users] Option 121, multiple routes

Francis Dupont
Nepryakhin Ivan writes:

> Hello, please tell me how to send in the field option 121 several
> routes, at this time the configuration
>
> "Option-def": [
>        {
>
>             "Name": "rfc3442-classless-static-routes",
>             "Code": 121,
>             "Space": "dhcp4",
>             "Type": "record",
>             "Array": false,
>             "Record-types": "uint8, uint8, uint8, ipv4-address"
>   }
> ]

=> this definition is fine but as you found it can handle only one route
with a subnet which encodes into 3 bytes...
Unfortunately there is only one correct definition: say the layout
is binary (BTW it is the default for unknown options) and encode the
value manually...

Regards

Francis Dupont <[hidden email]>

PS: there is a pending ticket to extend option definitions to array and
record but it is for making the last field of the record an array.
 An alternative would be to accept arrays of records but there is no
interesting examples in standard options and in your case it doesn't
help because of the very specific encoding of subnets.
 Note binary definition always works and it is possible too to write
a dedicated code and to call it with a hook.
_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users
Loading...