123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- # This is an example configuration file for DHCPv6 server in Kea.
- # It demonstrates simple configuration of the options for a subnet.
- { "Dhcp6":
- {
- # Kea is told to listen on ethX interface only.
- "interfaces-config": {
- "interfaces": [ "ethX" ]
- },
- # 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.
- "lease-database": {
- "type": "memfile"
- },
- # Addresses will be assigned with preferred and valid lifetimes
- # being 3000 and 4000, respectively. Client is told to start
- # renewing after 1000 seconds. If the server does not respond
- # after 2000 seconds since the lease was granted, client is supposed
- # to start REBIND procedure (emergency renewal that allows switching
- # to a different server).
- "preferred-lifetime": 3000,
- "valid-lifetime": 4000,
- "renew-timer": 1000,
- "rebind-timer": 2000,
- # Defining a subnet. There are 3 DHCP options returned to the
- # clients connected to this subnet. The first option is identified
- # by the name. The second option is identified by the code.
- # There are two address pools defined within this subnet. Pool
- # specific value for option 12 is defined for the pool:
- # 2001:db8:1::1 - 2001:db8:1::100. Clients obtaining an address
- # from this pool will be assigned option 12 with a value of
- # 3001:cafe::21. Clients belonging to this subnet but obtaining
- # addresses from the other pool, or the clients obtaining
- # stateless configuration will be assigned subnet specific value
- # of option 12, i.e. 2001:db8:1:0:ff00::1.
- # For DHCPv6 subnets can have prefix delegation pools too so
- # a pd-pools with an option-data is defined too.
- "subnet6": [
- {
- "option-data": [
- {
- "name": "dns-servers",
- "data": "2001:db8:2::45, 2001:db8:2::100"
- },
- {
- "code": 12,
- "data": "2001:db8:1:0:ff00::1"
- },
- {
- // String options that have a comma in their values need to have
- // it escaped (i.e. each comma is predeced by two backslashes).
- // That's because commas are reserved for separating fields in
- // compound options. At the same time, we need to be conformant
- // with JSON spec, that does not allow "\,". Therefore the
- // slightly uncommon double backslashes notation is needed.
- "name": "new-posix-timezone",
- "data": "EST5EDT4\\,M3.2.0/02:00\\,M11.1.0/02:00"
- // Legal JSON escapes are \ followed by "\/bfnrt character
- // or \u followed by 4 hexa-decimal numbers (currently Kea
- // supports only \u0000 to \u00ff code points).
- // CSV processing translates '\\' into '\' and '\,' into ','
- // only so for instance '\x' is translated into '\x'. But
- // as it works on a JSON string value each of these '\'
- // characters must be doubled on JSON input.
- },
- {
- // A few options are encoded in (length, string) tuples
- // which can be defined using only strings as the CSV
- // processing computes lengths.
- "name": "bootfile-param",
- "data": "root=/dev/sda2, quiet, splash"
- }
- ],
- "pools": [
- {
- "pool": "2001:db8:1::1 - 2001:db8:1::100",
- "option-data": [
- {
- "code": 12,
- "data": "3001:cafe::21"
- }
- ]
- },
- {
- "pool": "2001:db8:1::500 - 2001:db8:1::1000"
- }
- ],
- "pd-pools": [
- {
- "prefix": "2001:2b8:2::",
- "prefix-len": 56,
- "delegated-len": 64,
- "option-data": [
- {
- "code": 12,
- "data": "3001:cafe::12:"
- }
- ]
- }
- ],
- "subnet": "2001:db8:1::/64",
- "interface": "ethX"
- }
- ]
- },
- # The following configures logging. It assumes that messages with at least
- # informational level (info, warn, error and fatal) should be logged to stdout.
- "Logging": {
- "loggers": [
- {
- "name": "kea-dhcp6",
- "output_options": [
- {
- "output": "stdout"
- }
- ],
- "debuglevel": 0,
- "severity": "INFO"
- }
- ]
- }
- }
|