summaryrefslogtreecommitdiffstats
path: root/doc/examples/kea4/vivso.json
blob: fe1ccec2f5ba6c391963a8dbf54d1bbf259fd114 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
// This is an example configuration file for the DHCPv4 server in Kea.
// The purpose of this example is to showcase how configure
// Vendor-Identifying Vendor-specific Information option
// (code 125) RFC 3925


{
    "Dhcp4": {
// If we want to send suboptions in option 125 first those have to be defined
// on global level
        "option-def": [
            {
                "array": false,
                "code": 2,
                "name": "vlanid",
// In case of suboption of option 125 space has to start with prefix "vendor-"
// in this case it's "vendor-" + vendor id from option 60 sent by client
// 339 is Siemens Industry Inc.
                "space": "vendor-339",
                "type": "uint32"
            },
            {
                "array": false,
                "code": 3,
                "name": "dls",
                "space": "vendor-339",
                "type": "string"
            }
        ],
        "client-classes": [
            {
// Kea needs classification based on option 60, you can either use name:
// VENDOR_CLASS_ + option 60 content (test parameter is not required than)
// or use any name and add "test" parameter accordingly e.g.
// "test": "substring(option[60].hex,0,9) == 'partial-content-of-option-60'"
                "name": "VENDOR_CLASS_339",
                "option-data": [
                    {
// In "option-data" list we have to configure option 125 with data parameter equal
// to vendor-id we are expecting, also it will tell Kea which vendor space
// encapsulate in suboptions.
                        "data": "339",
                        "name": "vivso-suboptions"
                    },
                    {
// And additionally we have to configure all previously defined suboptions
// with "space" parameter same as in option-def.
// Because Kea will send only option that client ask for, and there is no way
// to ask for suboptions parameter "always-send" with value set
// to true has also be included in all custom suboptions.
                        "always-send": true,
                        "data": "123",
                        "name": "vlanid",
                        "space": "vendor-339"
                    },
                    {
                        "always-send": true,
                        "data": "sdlp://192.0.2.11:18443",
                        "name": "dls",
                        "space": "vendor-339"
                    }
                ]
            }
        ],
// Kea is told to listen on eth0 interface only.
        "interfaces-config": {
            "interfaces": [
                "eth0"
            ]
        },
// We need to specify the database used to store leases.
        "lease-database": {
            "type": "memfile"
        },
// The following list defines subnets. We have only one subnet
// here. We tell Kea that it is directly available over local interface.
        "subnet4": [
            {
                "interface": "eth0",
                "pools": [
                    {
                        "pool": "192.0.2.50-192.0.2.50"
                    }
                ],
                "subnet": "192.0.2.0/24"
            }
        ]
    }
}