dhcp4.spec 22.1 KB
Newer Older
1 2
{
  "module_spec": {
3
    "module_name": "Dhcp4",
4
    "module_description": "DHCPv4 server daemon",
5
    "config_data": [
6 7 8 9 10 11 12
      {
        "item_name": "hooks-libraries",
        "item_type": "list",
        "item_optional": true,
        "item_default": [],
        "list_item_spec":
        {
13 14
          "item_name": "hooks-library-spec",
          "item_type": "map",
15
          "item_optional": false,
16
          "item_default": {},
17 18 19
          "map_item_spec": [
             {
                "item_name": "library",
20 21 22
                "item_type": "string",
                "item_optional": false,
                "item_default": ""
23 24
             }
          ]
25 26
        }
      },
27

28 29
      { "item_name": "interfaces-config",
        "item_type": "map",
30
        "item_optional": false,
31 32
        "item_default": {},
        "map_item_spec": [
33
        {
34 35 36 37 38 39 40 41 42 43 44 45 46
            "item_name": "interfaces",
            "item_type": "list",
            "item_optional": false,
            "item_default": [ "*" ],
            "list_item_spec":
            {
                "item_name": "interface_name",
                "item_type": "string",
                "item_optional": false,
                "item_default": "*"
            }
        },

47
        { "item_name": "dhcp-socket-type",
48
          "item_type": "string",
49 50
          "item_optional": true,
          "item_default": ""
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 90 91 92 93 94 95 96 97

      { "item_name": "expired-leases-processing",
        "item_type": "map",
        "item_optional": false,
        "item_default": {},
        "map_item_spec": [
        {
            "item_name": "reclaim-timer-wait-time",
            "item_type": "integer",
            "item_optional": false,
            "item_default": 10
        },
        {
            "item_name": "flush-reclaimed-timer-wait-time",
            "item_type": "integer",
            "item_optional": false,
            "item_default": 25
        },
        {
            "item_name": "hold-reclaimed-time",
            "item_type": "integer",
            "item_optional": false,
            "item_default": 3600
        },
        {
            "item_name": "max-reclaim-leases",
            "item_type": "integer",
            "item_optional": false,
            "item_default": 100
        },
        {
            "item_name": "max-reclaim-time",
            "item_type": "integer",
            "item_optional": false,
            "item_default": 250
        },
        {
            "item_name": "unwarned-reclaim-cycles",
            "item_type": "integer",
            "item_optional": false,
            "item_default": 5
        }
        ]
      },
98
      
99 100
      { "item_name": "renew-timer",
        "item_type": "integer",
101
        "item_optional": true,
102 103 104 105 106
        "item_default": 1000
      },

      { "item_name": "rebind-timer",
        "item_type": "integer",
107
        "item_optional": true,
108 109 110 111 112 113 114 115 116
        "item_default": 2000
      },

      { "item_name": "valid-lifetime",
        "item_type": "integer",
        "item_optional": false,
        "item_default": 4000
      },

117 118 119
      { "item_name": "next-server",
        "item_type": "string",
        "item_optional": true,
Tomek Mrugalski's avatar
Tomek Mrugalski committed
120
        "item_default": ""
121 122
      },

123 124 125 126 127 128
      { "item_name": "echo-client-id",
        "item_type": "boolean",
        "item_optional": true,
        "item_default": true
      },

129
      { "item_name": "match-client-id",
130 131
        "item_type": "boolean",
        "item_optional": true,
132
        "item_default": true
133 134
      },

135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
      { "item_name": "option-def",
        "item_type": "list",
        "item_optional": false,
        "item_default": [],
        "list_item_spec":
        {
          "item_name": "single-option-def",
          "item_type": "map",
          "item_optional": false,
          "item_default": {},
          "map_item_spec": [
          {
            "item_name": "name",
            "item_type": "string",
            "item_optional": false,
            "item_default": ""
          },

          { "item_name": "code",
            "item_type": "integer",
            "item_optional": false,
156
            "item_default": 0
157 158 159 160 161
          },

          { "item_name": "type",
            "item_type": "string",
            "item_optional": false,
162
            "item_default": ""
163 164 165 166 167
          },

          { "item_name": "array",
            "item_type": "boolean",
            "item_optional": false,
168
            "item_default": false
169 170
          },

171
          { "item_name": "record-types",
172
            "item_type": "string",
173
            "item_optional": false,
174
            "item_default": ""
175 176 177 178 179 180
          },

          { "item_name": "space",
            "item_type": "string",
            "item_optional": false,
            "item_default": ""
181 182 183 184 185 186
          },

          { "item_name": "encapsulate",
            "item_type": "string",
            "item_optional": false,
            "item_default": ""
187 188 189 190
          } ]
        }
      },

191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
      { "item_name": "option-data",
        "item_type": "list",
        "item_optional": false,
        "item_default": [],
        "list_item_spec":
        {
          "item_name": "single-option-data",
          "item_type": "map",
          "item_optional": false,
          "item_default": {},
          "map_item_spec": [
          {
            "item_name": "name",
            "item_type": "string",
            "item_optional": false,
            "item_default": ""
          },

          { "item_name": "code",
            "item_type": "integer",
            "item_optional": false,
            "item_default": 0
          },
          { "item_name": "data",
            "item_type": "string",
            "item_optional": false,
            "item_default": ""
218 219 220 221
          },
          { "item_name": "csv-format",
            "item_type": "boolean",
            "item_optional": false,
222
            "item_default": false
223 224 225 226 227
          },
          { "item_name": "space",
            "item_type": "string",
            "item_optional": false,
            "item_default": "dhcp4"
228 229 230 231
          } ]
        }
      },

232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
      { "item_name": "lease-database",
        "item_type": "map",
        "item_optional": false,
        "item_default": {"type": "memfile"},
        "map_item_spec": [
            {
                "item_name": "type",
                "item_type": "string",
                "item_optional": false,
                "item_default": ""
            },
            {
                "item_name": "name",
                "item_type": "string",
                "item_optional": true,
                "item_default": ""
            },
            {
                "item_name": "user",
                "item_type": "string",
                "item_optional": true,
                "item_default": ""
            },
            {
                "item_name": "host",
                "item_type": "string",
                "item_optional": true,
                "item_default": ""
            },
            {
                "item_name": "password",
                "item_type": "string",
                "item_optional": true,
                "item_default": ""
266 267 268 269 270 271
            },
            {
                "item_name": "persist",
                "item_type": "boolean",
                "item_optional": true,
                "item_default": true
272 273 274 275 276 277
            },
            {
                "item_name": "lfc-interval",
                "item_type": "integer",
                "item_optional": true,
                "item_default": 0
278 279 280 281 282 283
            },
            {
                "item_name": "readonly",
                "item_type": "boolean",
                "item_optional": true,
                "item_default": false
284 285 286
            }
        ]
      },
287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351
      { "item_name": "client-classes",
        "item_type": "list",
        "item_optional": true,
        "item_default": [],
        "list_item_spec":
        {
            "item_name": "client-class",
            "item_type": "map",
            "item_optional": false,
            "item_default": {},
            "map_item_spec": [
                { "item_name": "name",
                  "item_type": "string",
                  "item_optional": false,
                  "item_default": ""
                },
                { "item_name": "test",
                  "item_type": "string",
                  "item_optional": true,
                  "item_default": ""
                },
                { "item_name": "option-data",
                  "item_type": "list",
                  "item_optional": true,
                  "item_default": [],
                  "list_item_spec":
                  {
                    "item_name": "single-option-data",
                    "item_type": "map",
                    "item_optional": false,
                    "item_default": {},
                    "map_item_spec": [
                    {
                      "item_name": "name",
                      "item_type": "string",
                      "item_optional": false,
                      "item_default": ""
                    },
                    {
                      "item_name": "code",
                      "item_type": "integer",
                      "item_optional": false,
                      "item_default": 0
                    },
                    {
                      "item_name": "data",
                      "item_type": "string",
                      "item_optional": false,
                      "item_default": ""
                    },
                    { "item_name": "csv-format",
                      "item_type": "boolean",
                      "item_optional": false,
                      "item_default": false
                      },
                    { "item_name": "space",
                      "item_type": "string",
                      "item_optional": false,
                      "item_default": "dhcp4"
                    } ]
                  }
                }
            ]
        }
      },
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369
      { "item_name": "subnet4",
        "item_type": "list",
        "item_optional": false,
        "item_default": [],
        "list_item_spec":
        {
            "item_name": "single-subnet4",
            "item_type": "map",
            "item_optional": false,
            "item_default": {},
            "map_item_spec": [

                { "item_name": "subnet",
                  "item_type": "string",
                  "item_optional": false,
                  "item_default": ""
                },

370 371 372 373 374 375
                { "item_name": "id",
                  "item_type": "integer",
                  "item_optional": false,
                  "item_default": 0
                },

376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
                { "item_name": "renew-timer",
                  "item_type": "integer",
                  "item_optional": false,
                  "item_default": 1000
                },

                { "item_name": "rebind-timer",
                  "item_type": "integer",
                  "item_optional": false,
                  "item_default": 2000
                },

                { "item_name": "valid-lifetime",
                  "item_type": "integer",
                  "item_optional": false,
                  "item_default": 7200
                },
393 394

                { "item_name": "next-server",
Tomek Mrugalski's avatar
Tomek Mrugalski committed
395 396 397
                  "item_type": "string",
                  "item_optional": true,
                  "item_default": "0.0.0.0"
398 399
                },

400
                { "item_name": "match-client-id",
401 402
                  "item_type": "boolean",
                  "item_optional": true,
403
                  "item_default": true
404 405
                },

406 407 408 409 410 411 412 413 414 415 416
                { "item_name": "pool",
                  "item_type": "list",
                  "item_optional": false,
                  "item_default": [],
                    "list_item_spec":
                    {
                        "item_name": "type",
                        "item_type": "string",
                        "item_optional": false,
                        "item_default": ""
                    }
417 418
                },

419 420 421 422 423 424 425
                { "item_name": "client-class",
                  "item_type": "string",
                  "item_optional": false,
                  "item_default": "",
                  "item_description" : "Restricts access to this subnet to specified client class (if defined)"
                },

426 427 428 429
                { "item_name": "relay",
                  "item_type": "map",
                  "item_optional": false,
                  "item_default": {},
Tomek Mrugalski's avatar
Tomek Mrugalski committed
430
                  "item_description" : "Structure holding relay information.",
431 432 433 434 435
                  "map_item_spec": [
                      {
                          "item_name": "ip-address",
                          "item_type": "string",
                          "item_optional": false,
436
                          "item_default": "0.0.0.0",
Tomek Mrugalski's avatar
Tomek Mrugalski committed
437
                          "item_description" : "IPv4 address of the relay (defaults to 0.0.0.0 if not specified)."
438 439 440
                      }
                   ]
                },
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468
                { "item_name": "option-data",
                  "item_type": "list",
                  "item_optional": false,
                  "item_default": [],
                  "list_item_spec":
                  {
                    "item_name": "single-option-data",
                    "item_type": "map",
                    "item_optional": false,
                    "item_default": {},
                    "map_item_spec": [
                    {
                      "item_name": "name",
                      "item_type": "string",
                      "item_optional": false,
                      "item_default": ""
                    },
                    {
                      "item_name": "code",
                      "item_type": "integer",
                      "item_optional": false,
                      "item_default": 0
                    },
                    {
                      "item_name": "data",
                      "item_type": "string",
                      "item_optional": false,
                      "item_default": ""
469 470
                    },
                    { "item_name": "csv-format",
471
                      "item_type": "boolean",
472
                      "item_optional": false,
473
                      "item_default": false
474 475 476 477 478
                      },
                    { "item_name": "space",
                      "item_type": "string",
                      "item_optional": false,
                      "item_default": "dhcp4"
479 480
                    } ]
                  }
481 482 483 484 485 486 487 488 489 490 491 492 493 494 495
                },
                { "item_name": "reservations",
                  "item_type": "list",
                  "item_optional": false,
                  "item_default": [],
                  "list_item_spec":
                  {
                      "item_name": "reservation",
                      "item_type": "map",
                      "item_optional": false,
                      "item_default": {},
                      "map_item_spec": [
                      {
                        "item_name": "hw-address",
                        "item_type": "string",
496
                        "item_optional": true,
497 498 499 500 501
                        "item_default": ""
                      },
                      {
                        "item_name": "duid",
                        "item_type": "string",
502
                        "item_optional": true,
503 504 505 506 507 508 509 510 511 512 513 514 515
                        "item_default": ""
                      },
                      {
                        "item_name": "hostname",
                        "item_type": "string",
                        "item_optional": false,
                        "item_default": ""
                      },
                      {
                        "item_name": "ip-address",
                        "item_type": "string",
                        "item_optional": false,
                        "item_default": "0.0.0.0"
516 517 518 519 520 521 522 523
                      },
                      {
                        "item_name": "next-server",
                        "item_type": "string",
                        "item_optional": true,
                        "item_default": "0.0.0.0"
                      },
                      {
524
                        "item_name": "server-hostname",
525 526 527 528 529 530 531 532 533
                        "item_type": "string",
                        "item_optional": true,
                        "item_default": ""
                      },
                      {
                        "item_name": "boot-file-name",
                        "item_type": "string",
                        "item_optional": true,
                        "item_default": ""
534 535 536 537 538 539
                      },
                      {
                        "item_name": "client-classes",
                        "item_type": "list",
                        "item_optional": true,
                        "item_default": [],
540
                        "item_description": "list of reserved classes for a client",
541 542 543 544 545
                        "list_item_spec":
                        {
                          "item_name": "client-class",
                          "item_type": "string",
                          "item_optional": false,
546 547
                          "item_default": "",
                          "item_description": "one of the classes reserved for a client"
548
                        }
549 550
                      } ]
                  }
Tomek Mrugalski's avatar
Tomek Mrugalski committed
551 552 553 554 555 556 557 558 559
                },
                {
                  "item_name": "reservation-mode",
                  "item_type": "string",
                  "item_optional": true,
                  "item_default": "all",
                  "item_description": "Specifies allowed host reservation types. Disabling unused modes may improve performance. Allowed values: disabled, off, out-of-pool, all"
                }
             ]
560
         }
561 562 563 564 565 566
      },

      { "item_name": "dhcp-ddns",
        "item_type": "map",
        "item_optional": false,
        "item_default": {"enable-updates": false},
567
        "item_description" : "Contains parameters pertaining DHCP-driven DDNS updates",
568 569 570 571 572
        "map_item_spec": [
            {
                "item_name": "enable-updates",
                "item_type": "boolean",
                "item_optional": false,
573
                "item_default": false,
574 575 576
                "item_description" : "Enables DDNS update processing"
            },
            {
577
                "item_name": "server-ip",
578 579 580
                "item_type": "string",
                "item_optional": true,
                "item_default": "127.0.0.1",
581
                "item_description" : "IP address of kea-dhcp-ddns (IPv4 or IPv6)"
582 583
            },
            {
584
                "item_name": "server-port",
585 586
                "item_type": "integer",
                "item_optional": true,
587
                "item_default": 53001,
588
                "item_description" : "port number of kea-dhcp-ddns"
589
            },
590 591 592 593 594
            {
                "item_name": "sender-ip",
                "item_type": "string",
                "item_optional": true,
                "item_default": "",
595
                "item_description" : "IP address from which to send to kea-dhcp-ddns (IPv4 or IPv6)"
596 597 598 599 600 601
            },
            {
                "item_name": "sender-port",
                "item_type": "integer",
                "item_optional": true,
                "item_default": 0,
602
                "item_description" : "port number from which to send to kea-dhcp-ddns"
603 604 605 606 607 608 609 610
            },
            {
                "item_name": "max-queue-size",
                "item_type": "integer",
                "item_optional": true,
                "item_default": 1024,
                "item_description" : "maximum number of requests allowed in the send queue"
            },
611
            {
612
                "item_name": "ncr-protocol",
613 614 615
                "item_type": "string",
                "item_optional": true,
                "item_default": "UDP",
616
                "item_description" : "Socket protocol to use with kea-dhcp-ddns"
617 618
            },
            {
619
                "item_name": "ncr-format",
620 621 622 623 624 625 626 627 628 629
                "item_type": "string",
                "item_optional": true,
                "item_default": "JSON",
                "item_description" : "Format of the update request packet"
            },
            {

                "item_name": "always-include-fqdn",
                "item_type": "boolean",
                "item_optional": true,
630 631
                "item_default": false,
                "item_description": "Enable always including the FQDN option in its response"
632 633 634 635 636 637 638 639 640 641 642 643
            },
            {
                "item_name": "override-no-update",
                "item_type": "boolean",
                "item_optional": true,
                "item_default": false,
                "item_description": "Do update, even if client requested no updates with N flag"
            },
            {
                "item_name": "override-client-update",
                "item_type": "boolean",
                "item_optional": true,
644
                "item_default": false,
645 646 647 648
                "item_description": "Server performs an update even if client requested delegation"
            },
            {
                "item_name": "replace-client-name",
649
                "item_type": "string",
650
                "item_optional": true,
651
                "item_default": "never",
652 653 654 655 656 657 658 659 660 661 662 663 664 665
                "item_description": "Should server replace the domain-name supplied by the client"
            },
            {
                "item_name": "generated-prefix",
                "item_type": "string",
                "item_optional": true,
                "item_default": "myhost",
                "item_description": "Prefix to use when generating the client's name"
            },

            {
                "item_name": "qualifying-suffix",
                "item_type": "string",
                "item_optional": true,
666
                "item_default": "",
667 668 669 670 671
                "item_description": "Fully qualified domain-name suffix if partial name provided by client"
            },
        ]
      },

672
    ],
673 674 675
    "commands": [
        {
            "command_name": "shutdown",
676 677 678 679 680 681 682 683
            "command_description": "Shuts down DHCPv4 server.",
            "command_args": [
                {
                    "item_name": "pid",
                    "item_type": "integer",
                    "item_optional": true
                }
            ]
684 685 686 687
        },

        {
            "command_name": "libreload",
688
            "command_description": "Reloads the current hooks libraries.",
689
            "command_args": []
690
        }
691

692
    ]
693 694
  }
}