several-subnets.json 2.59 KB
Newer Older
1 2 3
// This is an example configuration file for DHCPv4 server in Kea.
// It's a basic scenario with three IPv4 subnets configured. In each
// subnet, there's a smaller pool of dynamic addresses.
4 5 6

{ "Dhcp4":

Tomek Mrugalski's avatar
Tomek Mrugalski committed
7
{
8
// Kea is told to listen on ethX interface only.
9
  "interfaces-config": {
10 11
    "interfaces": [ "ethX" ]
  },
12

13 14 15 16
// We need to specify the the database used to store leases. As of
// September 2016, four database backends are supported: MySQL,
// PostgreSQL, Cassandra, and the in-memory database, Memfile.
// We'll use memfile  because it doesn't require any prior set up.
17 18 19 20
  "lease-database": {
    "type": "memfile"
  },

21 22 23 24 25
// Addresses will be assigned with a lifetime of 4000 seconds.
// The client is told to start renewing after 1000 seconds. If the server
// does not respond within 2000 seconds of the lease being granted, client
// is supposed to start REBIND procedure (emergency renewal that allows
// switching to a different server).
26 27 28 29
  "valid-lifetime": 4000,
  "renew-timer": 1000,
  "rebind-timer": 2000,

30 31 32
// RFC6842 says that the server is supposed to echo back client-id option.
// However, some older clients do not support this and are getting confused
// when they get their own client-id. Kea can disable RFC6842 support.
33 34
  "echo-client-id": false,

35 36 37 38 39 40
// Some clients don't use stable client identifier, but rather generate them
// during each boot. This may cause a client that reboots frequently to get
// multiple leases, which may not be desirable. As such, sometimes admins
// prefer to tell their DHCPv4 server to ignore client-id value altogether
// and rely exclusively on MAC address. This is a parameter that is defined
// globally, but can be overridden on a subnet level.
41 42
  "match-client-id": true,

43 44
// The following list defines subnets. Each subnet consists of at
// least subnet and pool entries.
45 46 47 48 49 50
  "subnet4": [
  {
      "pools": [ { "pool":  "192.0.2.1 - 192.0.2.200" } ],
      "subnet": "192.0.2.0/24"
  },
  {
51
// This particular subnet has match-client-id value changed.
52 53 54 55 56 57 58 59
      "pools": [ { "pool": "192.0.3.100 - 192.0.3.200" } ],
      "subnet": "192.0.3.0/24",
      "match-client-id": false
  },
  {
      "pools": [ { "pool": "192.0.4.1 - 192.0.4.254" } ],
      "subnet": "192.0.4.0/24"
  } ]
Tomek Mrugalski's avatar
Tomek Mrugalski committed
60 61
},

62 63 64
// The following configures logging. It assumes that messages with at
// least informational level (info, warn, error and fatal) should be
// logged to stdout.
Tomek Mrugalski's avatar
Tomek Mrugalski committed
65 66 67
"Logging": {
    "loggers": [
        {
Tomek Mrugalski's avatar
Tomek Mrugalski committed
68
            "name": "kea-dhcp4",
Tomek Mrugalski's avatar
Tomek Mrugalski committed
69 70
            "output_options": [
                {
71
                    "output": "stdout"
Tomek Mrugalski's avatar
Tomek Mrugalski committed
72 73
                }
            ],
74
            "severity": "INFO"
Tomek Mrugalski's avatar
Tomek Mrugalski committed
75 76
        }
    ]
77 78 79
}

}