[Kea-users] Wrong IPv6 subnet selected with matching relay addr

Silvester van der Leer svdleer at gmail.com
Mon Jan 24 15:12:19 UTC 2022


Hi,

We have a strange issue using Kea-DHCP 1.8.2 where sometimes the wrong IPv6
subnet is sometimes selected, even when there is a matching relay address.

This usually happens when de device goes offline, and comes back, when we
restart the kea-dhcp6 server, the correct subnet is selected again and
device comes online.

Can somebody clarify /help with this rather strange behavior?

I've also opened an issue regarding this behavior.

Configuration:

{
  "Dhcp6": {
  "interfaces-config": {
    "interfaces": [ "eth1/xxx:xxx:2::18" ]
  },
    "calculate-tee-times": true,
    "control-socket": {
      "socket-name": "/tmp/kea6-ctrl-socket",
      "socket-type": "unix"
    },
    "host-reservation-identifiers": [ "hw-address", "duid" ],
    "hostname-char-replacement": "",
    "hostname-char-set": "[^A-Za-z0-9.-]",
    "lease-database": {

        "type": "memfile",
        "persist": true,
        "name": "/var/lib/kea/kea-leases6.csv",
        "lfc-interval": 3600
    },
    "loggers": [
      {
        "name": "kea-dhcp6",
        "output_options": [
          {
            "maxsize": 10485760,
            "maxver": 8,
            "output": "/usr/local/var/log/kea-dhcp6.log"
          }
        ],
      "severity": "DEBUG",
      "debuglevel": 99
      }
    ],
    "mac-sources": [ "any" ],
    "multi-threading": {
      "enable-multi-threading": false,
      "packet-queue-size": 64,
      "thread-pool-size": 0
    },
    "client-classes": [
        {
            "name": "RPD",
            "test": "substring(option[17].option[2].hex,0,3) == 'RPD'"
        }
     ],
    "option-data": [
      {
        "code": 34,
        "csv-format": true,
        "data": "xxx:9202:2::18",
        "space": "vendor-4491",
        "always-send" : true
      },
      {
        "code": 37,
        "csv-format": true,
        "data": "xxx:9202:2::18",
        "space": "vendor-4491",
        "always-send" : true
      },
      {
        "code": 38,
        "csv-format": true,
        "data": "3600",
        "space": "vendor-4491",
        "always-send" : true
      }
    ],
    "option-def": [
      {
        "array": true,
        "code": 34,
        "name": "syslog-servers",
        "space": "vendor-4491",
        "type": "ipv6-address"
      },
      {
        "array": true,
        "code": 61,
        "name": "ccap-core",
        "space": "vendor-4491",
        "type": "ipv6-address"
      },
      {
        "array": true,
        "code": 37,
        "name": "rfc868-servers",
        "space": "vendor-4491",
        "type": "ipv6-address"
      },
      {
        "array": false,
        "code": 38,
        "name": "time-offset",
        "space": "vendor-4491",
        "type": "int32"
      }
    ],
    "preferred-lifetime": 43200,
    "valid-lifetime": 86400,
    "relay-supplied-options": [ "65" ],
    "reservation-mode": "all",
    "sanity-checks": {
      "lease-checks": "warn"
    },
    "server-id": {
      "enterprise-id": 0,
      "htype": 0,
      "identifier": "",
      "persist": true,
      "time": 0,
      "type": "LLT"
    },
    "server-tag": "daa-dhcp6",
#    "shared-networks": [ ],
    "statistic-default-sample-age": 0,
    "statistic-default-sample-count": 20,
    "store-extended-info": false,

    "shared-networks": [
    {
    "name": "RPDS",
    "subnet6": [
      {
        "id": 1,
        "subnet": "xxx:8::/64",
        "client-class": "RPD",
        "reservations": [

                  {
                    "hw-address": "00:90:50:08:8b:d5",
                    "ip-addresses": [ "xxx:8::0090:5008:8bd5" ],
                    "option-data": [
                                      {
                                        "code" : 61,
                                        "space": "vendor-4491",
                                        "csv-format": true,
                                        "data": "xxx:4::2,xxx::2",
                                        "always-send" : true
                                      }

                                   ]
                  },
                  {
                    "hw-address": "00:90:50:08:86:1f",
                    "ip-addresses": [ "xxx:8::0090:5008:861f" ],
                    "option-data": [
                                      {
                                        "code" : 61,
                                        "space": "vendor-4491",
                                        "csv-format": true,
                                        "data": "xxx:4::2,xxx::2",
                                        "always-send" : true
                                      }

                                   ]
                  },
                  {
                    "hw-address": "00:90:50:08:8d:16",
                    "ip-addresses": [ "xxx:8::0090:5008:8d16" ],
                    "option-data": [
                                      {
                                        "code" : 61,
                                        "space": "vendor-4491",
                                        "csv-format": true,
                                        "data": "xxx:5::2,xxx:1::2",
                                        "always-send" : true
                                      }

                                   ]
                  },
                  {
                    "hw-address": "00:90:50:08:86:20",
                    "ip-addresses": [ "xxx:8::0090:5008:8620" ],
                    "option-data": [
                                      {
                                        "code" : 61,
                                        "space": "vendor-4491",
                                        "csv-format": true,
                                        "data": "xxx:5::2,xxx:1::2",
                                        "always-send" : true
                                      }

                                   ]
                  },
                  {
                    "hw-address": "00:90:50:08:8d:43",
                    "ip-addresses": [ "xxx:8::0090:5008:8d43" ],
                    "option-data": [
                                      {
                                        "code" : 61,
                                        "space": "vendor-4491",
                                        "csv-format": true,
                                        "data": "xxx:6::2,xxx:2::2",
                                        "always-send" : true
                                      }

                                   ]
                  },
                  {
                    "hw-address": "00:90:50:08:8b:d7",
                    "ip-addresses": [ "xxx:8::0090:5008:8bd7" ],
                    "option-data": [
                                      {
                                        "code" : 61,
                                        "space": "vendor-4491",
                                        "csv-format": true,
                                        "data": "xxx:6::2,xxx:2::2",
                                        "always-send" : true
                                      }

                                   ]
                  },
                  {
                    "hw-address": "00:90:50:08:8b:d8",
                    "ip-addresses": [ "xxx:8::0090:5008:8bd8" ],
                    "option-data": [
                                      {
                                        "code" : 61,
                                        "space": "vendor-4491",
                                        "csv-format": true,
                                        "data": "xxx:7::2,xxx:3::2",
                                        "always-send" : true
                                      }

                                   ]
                  },

                  {
                    "hw-address": "00:90:50:08:86:24",
                    "ip-addresses": [ "xxx:8::0090:5008:8624" ],
                    "option-data": [
                                      {
                                        "code" : 61,
                                        "space": "vendor-4491",
                                        "csv-format": true,
                                        "data": "xxx:7::2,xxx:3::2",
                                        "always-send" : true
                                      }

                                   ]
                  }

        ],

        "pools": [
                {
                        "pool": "xxx:8:666::2-xxx:8:666::fffe"
                }
        ]
      },
      {


        "id": 2,


        "subnet": "xxx:12::/64",

        "preferred-lifetime": 43200,


        "valid-lifetime": 86400,


        "client-class": "RPD",


        "option-data": [


                                      {


                                        "name": "ccap-core",


                                        "code" : 61,


                                        "space": "vendor-4491",


                                        "csv-format": true,


                                        "data": "xxx:2::5",


                                        "always-send" : true


                                      },


                                      {


                                        "name": "syslog-servers",


                                        "code": 34,


                                        "space": "vendor-4491",


                                        "csv-format": true,


                                        "data": "xxx:9202:2::18"

                                      },


                                     {


                                        "name": "time-servers",


                                        "code": 37,


                                        "space": "vendor-4491",


                                        "csv-format": true,


                                        "data": "xxx:9202:2::18"

                                      },


                                      {


                                        "name": "time-offset",


                                        "code": 38,


                                        "space": "vendor-4491",


                                        "data": "3600"


                                      }


        ],





        "pools": [


                {


                        "pool": "xxx:12:666::2-xxx:12:666::fffe"

                }


        ],
        "relay": { "ip-addresses": [ "xxx:12::1" ] }


      },
      {
        "id": 3,
        "subnet": "xxx:13::/64",
        "preferred-lifetime": 43200,
        "valid-lifetime": 86400,
        "client-class": "RPD",
        "option-data": [
                                      {
                                        "name": "ccap-core",
                                        "code" : 61,
                                        "space": "vendor-4491",
                                        "csv-format": true,
                                        "data": "xxx:2::5",
                                        "always-send" : true
                                      },
                                      {
                                        "name": "syslog-servers",
                                        "code": 34,
                                        "space": "vendor-4491",
                                        "csv-format": true,
                                        "data": "xxx:9202:2::18"
                                      },
                                     {
                                        "name": "time-servers",
                                        "code": 37,
                                        "space": "vendor-4491",
                                        "csv-format": true,
                                        "data": "xxx:9202:2::18"
                                      },
                                      {
                                        "name": "time-offset",
                                        "code": 38,
                                        "space": "vendor-4491",
                                        "data": "3600"
                                      }
        ],

        "pools": [
                {
                        "pool": "xxx:13:666::2-xxx:13:666::fffe"
                }


        ],
        "relay": { "ip-addresses": [ "xxx:13::1" ] }


      }

    ]
   }
  ],
    "t1-percent": 0.5,
    "t2-percent": 0.8
  }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20220124/66149c43/attachment-0001.htm>


More information about the Kea-users mailing list