[Kea-users] does kea-dhcpv6 server only opensocket for link address

Yu, Mingli mingli.yu at windriver.com
Thu Apr 26 02:53:12 UTC 2018


Hi All,

I set up a kea-dhcp6 server and while I start up the kea-dhcp6 server 
with below config, there comes a warning as below:

Apr 25 02:23:00 testserver kea-dhcp6[6532]: 2018-04-25 02:23:00.563 WARN 
  [kea-dhcp6.dhcpsrv/6532] DHCPSRV_NO_SOCKETS_OPEN no interface 
configured to listen to DHCP traffic


{ "Dhcp6":

{
   "interfaces-config": {
     "interfaces": [ "eth1" ]
   },

   "lease-database": {
       "type": "memfile",
       "persist": true
   },
   "subnet6": [
     {
       "pools": [ { "pool": "2001:db8:0:f101::010-2001:db8:0:f101::200" } ],
       "subnet": "2001:db8:0:f101::/64",
       "interface": "eth1"
     }
   ]
}
}


Then I changed the config as below, the warning as above 
DHCPSRV_NO_SOCKETS_OPEN message gone, and client can also get the ipv6 
address successfully from server.

{ "Dhcp6":

{
   "interfaces-config": {
     "interfaces": [ "eth1" ]
   },

   "lease-database": {
       "type": "memfile",
       "persist": true
   },
   "subnet6": [
     {
       "pools": [ { "pool":
"fe80::2a0:c9ff:fe00:10-fe80::2a0:c9ff:fe00:200" } ],
       "subnet": "fe80::2a0:c9ff:fe00:0/64",
       "interface": "eth1"
     }
   ]
}
}


And I also noticed there is some link-local address check as below, does 
it mean the the kea-dhcpv6 server can only listen on link-local address, 
but not global address?


bool
IfaceMgr::openSockets6(const uint16_t port,
                        IfaceMgrErrorMsgCallback error_handler) {

         ...

          BOOST_FOREACH(Iface::Address addr, iface->getAddresses()) {

             // Skip all but V6 addresses.
             if (!addr.get().isV6()) {
                 continue;
             }

             // Bind link-local addresses only. Otherwise we bind 
several sockets
             // on interfaces that have several global addresses. For 
examples
             // with interface with 2 global addresses, we would bind 3 
sockets
             // (one for link-local and two for global). That would 
result in
             // getting each message 3 times.
             if (!addr.get().isV6LinkLocal()){
                 continue;
             }

             // Run OS-specific function to open a socket capable of 
receiving
             // packets sent to All_DHCP_Relay_Agents_and_Servers multicast
             // address.
             if (openMulticastSocket(*iface, addr, port, error_handler)) {
                 ++count;
             }

         }
       ...
}

Thanks,




More information about the Kea-users mailing list