summaryrefslogtreecommitdiffstats
path: root/doc/examples/kea4/vendor-specific.json
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:36:04 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 11:36:04 +0000
commit040eee1aa49b49df4698d83a05af57c220127fd1 (patch)
treef635435954e6ccde5eee9893889e24f30ca68346 /doc/examples/kea4/vendor-specific.json
parentInitial commit. (diff)
downloadisc-kea-040eee1aa49b49df4698d83a05af57c220127fd1.tar.xz
isc-kea-040eee1aa49b49df4698d83a05af57c220127fd1.zip
Adding upstream version 2.2.0.upstream/2.2.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'doc/examples/kea4/vendor-specific.json')
-rw-r--r--doc/examples/kea4/vendor-specific.json95
1 files changed, 95 insertions, 0 deletions
diff --git a/doc/examples/kea4/vendor-specific.json b/doc/examples/kea4/vendor-specific.json
new file mode 100644
index 0000000..431c04e
--- /dev/null
+++ b/doc/examples/kea4/vendor-specific.json
@@ -0,0 +1,95 @@
+// This is an example configuration file for the DHCPv4 server in Kea.
+// The purpose of this example is to showcase how configure
+// Vendor Specific Information (code 43) RFC 2132 section 8.4
+{
+ "Dhcp4": {
+ "option-def": [
+ {
+// Two options that we are planning to include in option 43 as suboptions
+// should be defined on global level
+ "array": false,
+ "code": 2,
+ "name": "vlanid",
+// suboptions should have space configured and it can't start with 'vendor-'
+// otherwise those will be included in 125 option not 43
+ "space": "339",
+ "type": "uint32"
+ },
+ {
+ "array": false,
+ "code": 3,
+ "name": "dls",
+ "space": "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-def": [
+ {
+// Vendor-specific option has to be defined on the class level, if we're planning
+// to send a single value, then define its type accordingly. If this option
+// should encapsulate other suboptions, the "space" parameter should be the same
+// as included suboptions and "type" set to empty
+ "code": 43,
+// Using the "encapsulate" direction, Kea is told to include options from
+// the "339" namespace. We have defined several such options earlier.
+// This way, the sub-options are "glued" to this option 43.
+ "encapsulate": "339",
+ "name": "vendor-encapsulated-options",
+ "type": "empty"
+ }
+ ],
+ "option-data": [
+ {
+// vendor-encapsulated-options and defined option on global level should
+// be also configured with proper "data" parameters in "option-data" list.
+// 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
+ "name": "vendor-encapsulated-options"
+ },
+ {
+ "always-send": true,
+ "data": "123",
+ "name": "vlanid",
+ "space": "339"
+ },
+ {
+ "always-send": true,
+ "data": "sdlp://192.0.2.11:18443",
+ "name": "dls",
+ "space": "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"
+ }
+ ]
+ }
+}