{

// DHCPv4 configuration starts here. This section will be read by DHCPv4 server
// and will be ignored by other components.
"Dhcp4": {
    // Add names of your network interfaces to listen on.
    "interfaces-config": {
        "interfaces": [ "ens4/192.168.201.10" ]
    },

   "control-socket": {
        "socket-type": "unix",
        "socket-name": "kea4-ctrl-socket"
    },

    "lease-database": {
        // Memfile is the simplest and easiest backend to use. It's an in-memory
        // C++ database that stores its state in CSV file.
        "type": "memfile",
        "lfc-interval": 3600
    },

    "expired-leases-processing": {
        "reclaim-timer-wait-time": 10,
        "flush-reclaimed-timer-wait-time": 25,
        "hold-reclaimed-time": 3600,
        "max-reclaim-leases": 100,
        "max-reclaim-time": 250,
        "unwarned-reclaim-cycles": 5
    },

    // Global timers specified here apply to all subnets, unless there are
    // subnet specific values defined in particular subnets.
    "renew-timer": 900,
    "rebind-timer": 1800,
    "valid-lifetime": 3600,

    "option-data": [
         {
             "name": "domain-name-servers",
             "code": 6,
             "csv-format": true,
             "space": "dhcp4",
             "data": "192.168.201.10"
         },
        // but it's a lot of writing, so it's easier to do this instead:
        //{
        //    "name": "domain-name-servers",
        //    "data": "192.0.2.1, 192.0.2.2"
        //},

        // Typically people prefer to refer to options by their names, so they
        // don't need to remember the code names. However, some people like
        // to use numerical values. For example, option "domain-name" uses
        // option code 15, so you can reference to it either by
        // "name": "domain-name" or "code": 15.
        {
            "code": 15,
            "data": "example.com"
        },

        {
            "name": "domain-search",
            "data": "example.com"
        },

    ],

    "subnet4": [
            {
            "id": 1,
            "subnet": "192.168.201.0/24",
            "pools": [ { "pool": "192.168.201.100 - 192.168.201.200" } ],
            "interface": "ens4",

            // "relay": {
            //    "ip-addresses": [ "10.0.0.1" ]
            // },


            // These are options that are subnet specific. In most cases,
            // you need to define at least routers option, as without this
            // option your clients will not be able to reach their default
            // gateway and will not have Internet connectivity.
            //"option-data": [
            //    {
            //        // For each IPv4 subnet you most likely need to specify at
            //        // least one router.
            //        "name": "routers",
            //        "data": "192.0.2.1"
            //    }
            //]
            // You can add more subnets there.    
            },
            { 
            "id": 2,
            "subnet": "192.168.200.0/24",
            "pools": [ { "pool": "192.168.200.100 - 192.168.200.200" } ],
            "interface": "ens4",
            "relay": {
            "ip-addresses": [ "192.168.201.1" ]
            }
            },
            ],

    "dhcp-ddns": {
    "enable-updates": true,
    "server-ip": "127.0.0.1",
    "server-port": 53001,
    },

    "ddns-qualifying-suffix": "example.com",
    "ddns-replace-client-name": "never",
    "ddns-update-on-renew": true,
    "ddns-conflict-resolution-mode": "no-check-without-dhcid",
    //"ddns-generated-prefix": "host",


    // There are many, many more parameters that DHCPv4 server is able to use.
    // They were not added here to not overwhelm people with too much
    // information at once.

    // Logging configuration starts here. Kea uses different loggers to log various
    // activities. For details (e.g. names of loggers), see Chapter 18.
    "loggers": [
    {
        // This section affects kea-dhcp4, which is the base logger for DHCPv4
        // component. It tells DHCPv4 server to write all log messages (on
        // severity INFO or more) to a file.
        "name": "kea-dhcp4",
        "output-options": [
            {
                // Specifies the output file. There are several special values
                // supported:
                // - stdout (prints on standard output)
                // - stderr (prints on standard error)
                // - syslog (logs to syslog)
                // - syslog:name (logs to syslog using specified name)
                // Any other value is considered a name of the file
                "output": "stdout",

                // Shorter log pattern suitable for use with systemd,
                // avoids redundant information
                "pattern": "%-5p %m\n",

                // This governs whether the log output is flushed to disk after
                // every write.
                // "flush": false,

                // This specifies the maximum size of the file before it is
                // rotated.
                // "maxsize": 1048576,

                // This specifies the maximum number of rotated files to keep.
                // "maxver": 8
            }
        ],
        // This specifies the severity of log messages to keep. Supported values
        // are: FATAL, ERROR, WARN, INFO, DEBUG
        "severity": "INFO",

        // If DEBUG level is specified, this value is used. 0 is least verbose,
        // 99 is most verbose. Be cautious, Kea can generate lots and lots
        // of logs if told to do so.
        "debuglevel": 0
    }
  ]
}
}
