From 52c021ee0b0c6ad2128ed550c694aad0d11d4c3f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 21 Apr 2024 16:53:22 +0200 Subject: Adding upstream version 2.5.7. Signed-off-by: Daniel Baumann --- doc/examples/kea4/several-subnets.json | 86 ++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 doc/examples/kea4/several-subnets.json (limited to 'doc/examples/kea4/several-subnets.json') diff --git a/doc/examples/kea4/several-subnets.json b/doc/examples/kea4/several-subnets.json new file mode 100644 index 0000000..6a9e1f5 --- /dev/null +++ b/doc/examples/kea4/several-subnets.json @@ -0,0 +1,86 @@ +// 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. + +{ "Dhcp4": + +{ +// Kea is told to listen on eth0 interface only. + "interfaces-config": { + "interfaces": [ "eth0" ] + }, + +// We need to specify the database used to store leases. As of +// June 2022, three database backends are supported: MySQL, +// PostgreSQL and the in-memory database, Memfile. +// We'll use memfile because it doesn't require any prior set up. + "lease-database": { + "type": "memfile" + }, + +// 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). + "valid-lifetime": 4000, + "renew-timer": 1000, + "rebind-timer": 2000, + +// 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. + "echo-client-id": false, + +// 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. + "match-client-id": true, + + // By default, Kea ignores requests by clients for unknown IP addresses, + // because other non-cooperating DHCP servers could reside on the same + // network (RFC 2131). This parameter is defined globally, but can be + // overridden on a subnet level + "authoritative": false, + +// The following list defines subnets. Each subnet consists of at +// least subnet and pool entries. + "subnet4": [ + { + "pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ], + "id": 1, + "subnet": "192.0.2.0/24" + }, + { +// This particular subnet has match-client-id value changed. + "pools": [ { "pool": "192.0.3.100 - 192.0.3.200" } ], + "id": 2, + "subnet": "192.0.3.0/24", + "match-client-id": false + }, + { + "pools": [ { "pool": "192.0.4.1 - 192.0.4.254" } ], + "id": 3, + "subnet": "192.0.4.0/24" + } ], + +// The following configures logging. It assumes that messages with at +// least informational level (info, warn, error and fatal) should be +// logged to stdout. + "loggers": [ + { + "name": "kea-dhcp4", + "output-options": [ + { + "output": "stdout" + } + ], + "severity": "INFO" + } + ] +} + +} -- cgit v1.2.3