summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorWlodek Wencel <wlodek@isc.org>2021-01-25 12:28:14 +0100
committerWlodek Wencel <wlodek@isc.org>2021-01-25 13:54:28 +0100
commit459159ad9115b7fddcd3948f08c24b85091cc1ea (patch)
tree742ad77c9e27367678b46ef49c9cf6a75000b32d /doc
parent[#1656] 1.9.4 release: clarify release checklist (diff)
downloadkea-459159ad9115b7fddcd3948f08c24b85091cc1ea.tar.xz
kea-459159ad9115b7fddcd3948f08c24b85091cc1ea.zip
[#1546] examples for option 43 and 125
Diffstat (limited to 'doc')
-rw-r--r--doc/Makefile.am2
-rw-r--r--doc/examples/kea4/vendor-specific.json92
-rw-r--r--doc/examples/kea4/vivso.json88
3 files changed, 182 insertions, 0 deletions
diff --git a/doc/Makefile.am b/doc/Makefile.am
index f153e2b68c..89d5e0fad1 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -34,6 +34,8 @@ nobase_dist_doc_DATA += examples/kea4/several-subnets.json
nobase_dist_doc_DATA += examples/kea4/shared-network.json
nobase_dist_doc_DATA += examples/kea4/single-subnet.json
nobase_dist_doc_DATA += examples/kea4/with-ddns.json
+nobase_dist_doc_DATA += examples/kea4/vivso.json
+nobase_dist_doc_DATA += examples/kea4/vendor-specific.json
nobase_dist_doc_DATA += examples/kea6/advanced.json
nobase_dist_doc_DATA += examples/kea6/all-keys.json
nobase_dist_doc_DATA += examples/kea6/all-keys-netconf.json
diff --git a/doc/examples/kea4/vendor-specific.json b/doc/examples/kea4/vendor-specific.json
new file mode 100644
index 0000000000..26a6c5aa5f
--- /dev/null
+++ b/doc/examples/kea4/vendor-specific.json
@@ -0,0 +1,92 @@
+// 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 have to be defined on class level, if we planing
+// to send single value define it's type accordingly, if this option
+// should encapsulate other suboptions "space" parameter should be the same
+// as included suboptions and "type" set to empty
+ "code": 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://11.11.11.11:18443",
+ "name": "dls",
+ "space": "339"
+ }
+ ]
+ }
+ ],
+// Kea is told to listen on ethX interface only.
+ "interfaces-config": {
+ "interfaces": ["ethX"]
+ },
+// We need to specify the 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": "ethX",
+ "pools": [
+ {
+ "pool": "192.168.50.50-192.168.50.50"
+ }
+ ],
+ "subnet": "192.168.50.0/24"
+ }
+ ]
+ }
+}
diff --git a/doc/examples/kea4/vivso.json b/doc/examples/kea4/vivso.json
new file mode 100644
index 0000000000..0b2b110357
--- /dev/null
+++ b/doc/examples/kea4/vivso.json
@@ -0,0 +1,88 @@
+// 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 send 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
+ "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://11.11.11.11:18443",
+ "name": "dls",
+ "space": "vendor-339"
+ }
+ ]
+ }
+ ],
+// Kea is told to listen on ethX interface only.
+ "interfaces-config": {
+ "interfaces": [
+ "ethX"
+ ]
+ },
+// We need to specify the 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": "ethX",
+ "pools": [
+ {
+ "pool": "192.168.50.50-192.168.50.50"
+ }
+ ],
+ "subnet": "192.168.50.0/24"
+ }
+ ]
+ }
+}