[Kea-users] Custom option 191 - string

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Kea-users] Custom option 191 - string

Chris Slater-Walker
I want to create DHCPv4 option 191 for a certain subnet.

This option allows Extreme Networks WiNG wireless access points to discover their WLAN controller at the IP address specified in option 191.

The same option also gives the access point information about a proprietary protocol called MINT.

According to Extreme Networks, the format of the option is as follows:

pool1=1.2.3.4;level=1


That's it; I need to give this to DHCP clients as a simple ascii text string but I can't find a piece of documentation which tells me how to do this. My attempts at configuring it always end up with an error.

This is what I currently have:

"subnet4": [
        {
            "subnet": "192.168.2.0/24",
                     "option-data": [
                {
                    "name": "AP-option",
                    "code": 191,
                    "data": "pool1=192.168.2.249;level=1"
                }
            ],...
        }

I'd be grateful for any help about how I can configure this.

--ChrisSW.

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

Re: [Kea-users] Custom option 191 - string

Brian Candler
On 27/11/2019 10:09, [hidden email] wrote:
That's it; I need to give this to DHCP clients as a simple ascii text string but I can't find a piece of documentation which tells me how to do this. My attempts at configuring it always end up with an error.

What kind of error - does KEA itself report an error?  If so, what does the error message actually say?

Or does KEA accept it, but your client device doesn't receive the attribute, or not in the format it expects?  In that case, what does tcpdump show?


This is what I currently have:

"subnet4": [
        {
            "subnet": "192.168.2.0/24",
                     "option-data": [
                {
                    "name": "AP-option",
                    "code": 191,
                    "data": "pool1=192.168.2.249;level=1"
                }
            ],...
        }

https://kea.readthedocs.io/en/v1_6_0/arm/dhcp4-srv.html#custom-dhcpv4-options

Try:

"Dhcp4": {
    "option-def": [
        {
            "name": "AP-option",
            "code": 191,
            "type": "string",
            "array": false,
            "space": "dhcp4",
        }, ...

Then under the subnet:

    "option-data": [
        {
            "name": "AP-option",
            "code": 191,
            "space": "dhcp4",
            "data": "pool1=192.168.2.249;level=1"
        }, ...

(Aside: I don't know why the code and space are duplicated in option-data, even though they've already been defined in option-def, but that's what the examples show)

HTH,

Brian.


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

Re: [Kea-users] Custom option 191 - string

Chris Slater-Walker

Thanks, I've sorted it out.

First of all you need an option-def entry in the config to make the option "available for use" if that makes sense:

"Dhcp4": {
    "option-def": [
        {
            "name": "AP-option",
            "code": 191,
            "type": "string",
            "space": "dhcp4",
            "array": false,
            "encapsulate": ""
        }
    ],.....

Then within the subnet section you use the option:

    "subnet4": [
        {
            "subnet": "192.168.*.*/24",
            "pools": [
                {
                    "pool": "192.168.*.* - 192.168.*.*"
                }
            ],
            "option-data": [
                {
                    "name": "AP-option",
                    "data": "pool1=192.168.x.y;level=1"
                },



On Wed, Nov 27, 2019 at 11:24, Brian Candler <[hidden email]> wrote:
On 27/11/2019 10:09, [hidden email] wrote:
That's it; I need to give this to DHCP clients as a simple ascii text string but I can't find a piece of documentation which tells me how to do this. My attempts at configuring it always end up with an error.

What kind of error - does KEA itself report an error?  If so, what does the error message actually say?
Or does KEA accept it, but your client device doesn't receive the attribute, or not in the format it expects?  In that case, what does tcpdump show?



This is what I currently have:

"subnet4": [
        {
            "subnet": "192.168.2.0/24",
                     "option-data": [
                {
                    "name": "AP-option",
                    "code": 191,
                    "data": "pool1=192.168.2.249;level=1"
                }
            ],...
        }

https://kea.readthedocs.io/en/v1_6_0/arm/dhcp4-srv.html#custom-dhcpv4-options
Try:
"Dhcp4": {
    "option-def": [
        {
            "name": "AP-option",
            "code": 191,
            "type": "string",
            "array": false,
            "space": "dhcp4",
        }, ...

Then under the subnet:

    "option-data": [
        {
            "name": "AP-option",
            "code": 191,
            "space": "dhcp4",
            "data": "pool1=192.168.2.249;level=1"
        }, ...
(Aside: I don't know why the code and space are duplicated in option-data, even though they've already been defined in option-def, but that's what the examples show)

HTH,
Brian.


_______________________________________________
Kea-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/kea-users