123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- # This is an example configuration file for the DHCPv4 server in Kea.
- # The purpose of this example is to showcase how clients can be classified.
- { "Dhcp6":
- {
- # Kea is told to listen on ethX interface only.
- "interfaces-config": {
- "interfaces": [ "ethX" ]
- },
- # Let's use the simplest backend: memfile and use some reasonable values
- # for timers. They are of no concern for the classification demonstration.
- "lease-database": { "type": "memfile" },
- "renew-timer": 1000,
- "rebind-timer": 2000,
- "preferred-lifetime": 3000,
- "valid-lifetime": 4000,
- # This list defines several classes that incoming packets can be assigned to.
- # One packet can belong to zero or more classes.
- "client-classes": [
- # The first class attempts to match all packets coming in on ethX interface.
- {
- "name": "lab",
- "test": "pkt.iface == 'ethX'",
- "option-data": [{
- "name": "dns-servers",
- "data": "2001:db8::1"
- }]
- },
- # Let's classify all incoming RENEW (message type 5) to a separate
- # class.
- {
- "name": "renews",
- "test": "pkt6.msgtype == 5"
- },
- # Let's pick cable modems. In this simple example we'll assume the device
- # is a cable modem if it sends a vendor option with enterprise-id equal
- # to 4491.
- {
- "name": "cable-modems",
- "test": "vendor.enterprise == 4491"
- },
- ],
-
- # The following list defines subnets. Each subnet consists of at
- # least subnet and pool entries.
- "subnet6": [
- {
- "pools": [ { "pool": "2001:db8:1::/80" } ],
- "subnet": "2001:db8:1::/64",
- "client-class": "cable-modems",
- "interface": "ethX"
- },
- {
- "pools": [ { "pool": "2001:db8:2::/80" } ],
- "subnet": "2001:db8:2::/64",
- "interface": "ethX"
- }
- ]
- },
- # The following configures logging. Kea will log all debug messages
- # to /var/log/kea-debug.log file.
- "Logging": {
- "loggers": [
- {
- "name": "kea-dhcp6",
- "output_options": [
- {
- "output": "/var/log/kea-debug.log"
- }
- ],
- "debuglevel": 99,
- "severity": "DEBUG"
- }
- ]
- }
- }
|