{
  "Dhcp4": {
    "interfaces-config": {
      "interfaces": [ "ens160" ]
    },
    "lease-database": {
      "type": "memfile",
      "persist": true,
      "name": "/tmp/leases.csv"
    },
    "reservations-global": false,
    "reservations-in-subnet": true,
    "reservations-out-of-pool": true,
    "min-valid-lifetime": 432000,
    "valid-lifetime": 604800,
    "max-valid-lifetime": 604800,
    "calculate-tee-times": true,
    "hooks-libraries": [
      {
        "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_lease_cmds.so"
      },
      {
        "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_ha.so",
			"parameters": {
          "high-availability": [
            {
              "this-server-name": "kea1",
              "mode": "load-balancing",
              "multi-threading": {
                "enable-multi-threading": true,
                "http-dedicated-listener": true
              },
              "peers": [
                {
                  "name": "kea1",
                  "url": "http://172.17.100.251:8001/",
                  "role": "primary",
                  "auto-failover": true
                },
                {
                  "name": "kea2",
                  "url": "http://172.17.100.252:8001/",
                  "role": "secondary",
                  "auto-failover": true
                }
              ]
            }
          ]
        }
      }
    ],
    "option-data": [
      {
        "name": "domain-name-servers",
        "data": "8.8.8.8, 1.1.1.1"
      }
    ],
    "option-def": [
      {
        "space": "Rks",
        "name": "scg",
        "code": 6,
        "type": "string"
      },
      {
        "space": "TP",
        "name": "omada",
        "code": 138,
        "type": "ipv4-address"
      }
    ],
    "client-classes": [
      {
        "name": "Rks",
        "test": "option[60].hex == 'Ruckus CPE'",
        "option-def": [
          {
            "name": "vendor-encapsulated-options",
            "code": 43,
            "type": "empty",
            "encapsulate": "Rks"
          }
        ],
        "option-data": [
          {
            "name": "vendor-encapsulated-options",
            "code": 43
          },
          {
            "space": "Rks",
            "name": "scg",
            "code": 6,
            "data": "1.2.8.6"
          }
        ]
      },
      {
        "name": "TP",
        "test": "option[60].hex == 'TP-LINK'",
        "option-data": [
          {
            "code": 138,
            "data": "3.2.1.2",
            "name": "capwap-ac-v4"
          }
        ]
      },
         {
           "name": "3016",
           "test": "option[60].hex == 'TL-SX3016F_1.0'",
         },
		 {
           "name": "3452",
           "test": "option[60].hex == 'TL-SG3452XP_2.0'",
         },
         {
           "name": "Switches",
           "test": "member('3452') and member('3016')",
        "option-data": [
          {
            "code": 138,
            "data": "3.2.1.2",
            "name": "capwap-ac-v4"
          }
         ]
	    },
         {
           "name": "TL2",
           "test": "not member('TP')",
		 }
    ],
    "subnet4": [
      {
        "subnet": "172.17.100.0/24",
        "pools": [
          {
            "pool": "172.17.100.200 - 172.17.100.250",
          }
        ],
        "option-data": [
          {
            "name": "ntp-servers",
            "code": 42,
            "data": "216.239.35.0"
          },
          {
            "name": "domain-name",
            "code": 15,
            "data": "lan.local"
          },
          {
            "name": "domain-name-servers",
            "code": 6,
            "data": "172.17.100.1"
          },
          {
            "name": "routers",
            "data": "172.17.100.1"
          }
        ],
        "reservations": [
          {
            "hw-address": "1a:1b:1c:00:ac:43",
            "ip-address": "172.17.100.2"
          },
          {
            "hw-address": "1a:1b:1c:00:ad:43",
            "ip-address": "172.17.100.4"
          }
        ]
      },
      {
        "subnet": "172.18.0.0/24",
        "pools": [
          {
            "pool": "172.18.0.200 - 172.18.0.250",
			"client-class": "TP"
          }
        ],
        "option-data": [
          {
            "name": "ntp-servers",
            "code": 42,
            "data": "216.239.35.0"
          },
          {
            "name": "domain-name",
            "code": 15,
            "data": "lan.local"
          },
          {
            "name": "domain-name-servers",
            "code": 6,
            "data": "172.18.0.1"
          },
          {
            "name": "routers",
            "data": "172.18.0.1"
          }
        ]
      },
      {
        "subnet": "10.11.1.0/24",
        "pools": [
          {
            "pool": "10.11.1.200 - 10.11.1.250"
          }
        ],
        "option-data": [
          {
            "name": "routers",
            "data": "10.11.1.1"
          }
        ],
        "reservations": [
          {
            "hw-address": "8c:b8:7e:29:36:87",
            "ip-address": "10.11.1.2"
          }
        ]
      }
    ],
    "loggers": [
      {
        "name": "kea-dhcp4",
        "severity": "INFO",
        "output_options": [
          {
            "output": "/var/log/kea/dhcp4.log",
            "maxver": 10
          }
        ]
      },
      {
        "name": "kea-dhcp4.dhcpsrv",
        "severity": "INFO",
        "output_options": [
          {
            "output": "/var/log/kea/dhcp4-dhcpsrv.log",
            "maxver": 10
          }
        ]
      },
      {
        "name": "kea-dhcp4.leases",
        "severity": "INFO",
        "output_options": [
          {
            "output": "/var/log/kea/dhcp4-leases.log",
            "maxver": 10
          }
        ]
      },
      {
        "name": "kea-dhcp4.ha-hooks",
        "severity": "INFO",
        "output_options": [
          {
            "output": "/var/log/kea/dhcp4-ha-hooks.log",
            "maxver": 10
          }
        ]
      },
      {
        "name": "kea-dhcp4.commands",
        "severity": "INFO",
        "output_options": [
          {
            "output": "/var/log/kea/dhcp4-commands.log",
            "maxver": 10
          }
        ]
      },
      {
        "name": "kea-dhcp4.dhcp4",
        "severity": "INFO",
        "output_options": [
          {
            "output": "/var/log/kea/dhcp4-dhcp4.log",
            "maxver": 10
          }
        ]
      },
      {
        "name": "kea-dhcp4.hooks",
        "severity": "INFO",
        "output_options": [
          {
            "output": "/var/log/kea/dhcp4-hooks.log",
            "maxver": 10
          }
        ]
      },
      {
        "name": "kea-dhcp4.alloc-engine",
        "severity": "INFO",
        "output_options": [
          {
            "output": "/var/log/kea/dhcp4-alloc-engine.log",
            "maxver": 10
          }
        ]
      }
    ]
  }
}
