All,

I am setting up a new KEA DHCP solution for an ISP. When clients are doing a 
DISCOVER they source from the CMTS which acts as a relay. They then get the 
correct IP address. But when the client comes back half time with a unicast, 
the DHCP server does not know in which subnet the client belongs and does a 
NAK, meaning the client looses the IP until the client does a new DISCOVER:

tid=0x322cdf6c: failed to select a subnet for incoming packet, src 
100.71.0.208, type DHCPREQUEST

Shouldn’t the DHCP server be able to match the clients IP with a subnet, 
ignoring the client class?



Config:

{
"Dhcp4": {
    "control-socket": {
        "socket-type": "unix",
        "socket-name": "/tmp/kea4-ctrl-socket"
    },
    "hooks-libraries": [
        {
            "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_flex_id.so",
            "parameters": {
                "identifier-expression": "option[82].option[2].hex",
                "replace-client-id": true
            }
        },
        {
            "library": 
"/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_lease_cmds.so",
       "parameters": {
                "store-extended-info": true
            }
        },
        {
            "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_cb_cmds.so"
        },
 {
     "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_host_cmds.so"
 },
 {
     "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_host_cache.so"
 },
 {
     "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_pgsql_cb.so"
 },
 {
     "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_subnet_cmds.so"
 },
 {
     "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_class_cmds.so"
 },
 {
            "library": 
"/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_stat_cmds.so"
        },

 {
     "library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_legal_log.so",
     "parameters": {
                    "path": "/var/log/kea",
                    "base-name": "kea-forensic4",
      "time-unit": "second",
      "count": 3600
            }
 }
    ],
    "lease-database": {
        "type": "postgresql",
        "port": 5432,
        "max-reconnect-tries": 3,
        "reconnect-wait-time": 50
    },

    "hosts-database": {
        "type": "postgresql",
        "port": 5432,
        "max-reconnect-tries": 3,
        "reconnect-wait-time": 50
     },

     "config-control": {
        "config-databases": [
        {
            "type": "postgresql",
         
            "port": 5432
        }
        ],
        "config-fetch-wait-time": 20
    },
    "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
    },

    "interfaces-config": {
        "interfaces": ["ens35"],
        "dhcp-socket-type": "udp"
    },

    //"host-reservation-identifiers": ["client-id", "hw-address", "circuit-id", 
"flex-id", "duid"],
    "host-reservation-identifiers": ["flex-id"],
    "match-client-id": true,

    "renew-timer": 900,
    "rebind-timer": 1800,
    "valid-lifetime": 3600,


// Logging configuration starts here. Kea uses different loggers to log various
// activities. For details (e.g. names of loggers), see Chapter 18.
        "loggers": [
            {
                "name": "kea-dhcp4",
                "output_options": [
                    {
                        "output": "/var/log/kea/kea-dhcp4.log"
                    }
                ],
                "severity": "INFO",
                "debuglevel": 99
            },
            {
                "name": "kea-dhcp4.leases",
                "output_options": [
                    {
                        "output": "/var/log/kea/kea-dhcp4-leases.log"
                    }
                ],
                "severity": "INFO",
                "debuglevel": 0
            },
            {
                "name": "kea-dhcp4.alloc-engine",
                "output_options": [
                    {
                        "output": "/var/log/kea/kea-dhcp4-alloc-engine.log"
                    }
                ],
                "severity": "INFO",
                "debuglevel": 99
            },
            {
                "name": "kea-dhcp4.ddns",
                "output_options": [
                    {
                        "output": "/var/log/kea/kea-dhcp4-ddns.log"
                    }
                ],
                "severity": "INFO",
                "debuglevel": 0
            }
        ]
    }

}




"shared-networks":[{
        "interface":"ens35",
        "name":"CMTS-A",
        "option-data":[],
        "relay":{"ip-addresses":["100.70.224.1","188.228.85.1"]},
        "subnet4":[{"4o6-interface":"",
                "4o6-interface-id":"",
                "4o6-subnet":"",
                "client-class":"Option82Subscribers",
                "id":1,
                "option-data":[{
                "always-send":false,
        "code":3,"csv-format":true,
"data":"100.70.224.1",
"name":"routers",
"never-send":false,
"space":"dhcp4"}],
                "pools":[{
                "option-data":[],
        "pool":"100.70.224.2-100.70.255.254"}],
                "relay":{"ip-addresses":[]},
        "reservations":[],
"subnet":"100.70.224.0/19"},
{"4o6-interface":"",
        "4o6-interface-id":"",
        "4o6-subnet":"",
        "client-class":"Option82Subscribers",
        "id":2,
        "option-data":[{
        "always-send":false,
"code":3,
"csv-format":true,
"data":"188.228.85.1",
"name":"routers",
"never-send":false,
"space":"dhcp4"}],
        "pools":[],
        "relay":{
        "ip-addresses":[]},
"reservations":[],
"subnet":"188.228.85.0/26"}]},
        {"interface":"ens35",
                "name":"CMTS-B",
                "option-data":[],
                "relay":{"ip-addresses":["100.71.0.1","188.228.85.65"]},
                "subnet4":[{
                        "4o6-interface":"",
                        "4o6-interface-id":"",
                        "4o6-subnet":"",
                        "client-class":"Option82Subscribers",
                        "id":3,
                        "option-data":[{
                        "always-send":false,
                "code":3,
        "csv-format":true,
"data":"100.71.0.1",
"name":"routers",
"never-send":false,
"space":"dhcp4"}],
                        "pools":[{
                        "option-data":[],
                "pool":"100.71.0.2-100.71.31.254"}],
                        "relay":{
                        "ip-addresses":[]},
                "reservations":[],
        "subnet":"100.71.0.0/19"},
        {"4o6-interface":"",
                "4o6-interface-id":"",
                "4o6-subnet":"",
                "client-class":"Option82Subscribers",
                "id":4,
                "option-data":[{
                "always-send":false,
        "code":3,
"csv-format":true,
"data":"188.228.85.65",
"name":"routers",
"never-send":false,
"space":"dhcp4"}],
                "pools":[],
                "relay":{"ip-addresses":[]},
        "reservations":[],
"subnet":"188.228.85.64/26"}]},
                {"interface":"ens35",
                        "name":"CMTS-C",
                        "option-data":[],
                        "relay":{
                        "ip-addresses":["100.71.32.1","188.228.85.129"]},
                        "subnet4":[{
                                "4o6-interface":"",
                                "4o6-interface-id":"",
                                "4o6-subnet":"",
                                "client-class":"Option82Subscribers",
                                "id":5,"option-data":[{
                                "always-send":false,
                        "code":3,
                "csv-format":true,
        "data":"100.71.32.1",
"name":"routers",
"never-send":false,
"space":"dhcp4"}],
        "pools":[{
        "option-data":[],
"pool":"100.71.32.2-100.71.63.254"}],
        "relay":{
        "ip-addresses":[]},
"reservations":[],
"subnet":"100.71.32.0/19"},
{"4o6-interface":"",
        "4o6-interface-id":"",
        "4o6-subnet":"",
        "client-class":"Option82Subscribers",
        "id":6,
        "option-data":[{
        "always-send":false,
"code":3,
"csv-format":true,
"data":"188.228.85.129",
"name":"routers",
"never-send":false,
"space":"dhcp4"}],
        "pools":[],
        "relay":{
        "ip-addresses":[]},
"reservations":[],
"subnet":"188.228.85.128/26"}]}],
"stash-agent-options":false,
"statistic-default-sample-age":0,
"statistic-default-sample-count":20,
"store-extended-info":false,
"subnet4":[],
"t1-percent":0.5,
"t2-percent":0.875,
"valid-lifetime":3600},

"daemonId":3,
"daemonName":"dhcp4",
"editable":true,
"options":{
        "options":[{"code":6,
                "fields":[{
                "fieldType":"ipv4-address",
        "values":["81.167.36.5"]},
        {"fieldType":"ipv4-address",
        "values":["81.167.36.12"]}],
        "options":null,
"universe":4},
{"code":15,
        "fields":[{
        "fieldType":"string",
"values":[""]}],
"options":null,
"universe":4}],


————————————————
Jesper Nørgaard


-- 
ISC funds the development of this software with paid support subscriptions. 
Contact us at https://www.isc.org/contact/ for more information.

To unsubscribe visit https://lists.isc.org/mailman/listinfo/kea-users.

Kea-users mailing list
Kea-users@lists.isc.org
https://lists.isc.org/mailman/listinfo/kea-users

Reply via email to