<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
Hello,<br dir="auto">
<br dir="auto">
I would like to ask about a pure static KEA DHCP server setup, where:<br dir="auto">
<br dir="auto">
- only the well-known clients with static reservations for their MACs will get reserved IP addrs (leases)
<div dir="auto"><br dir="auto">
- unknown clients/devices won't get anything (ideally no reply from DHCP server, or some kind of NAK)<br dir="auto">
<br dir="auto">
If yes, may I ask for a working demo config file - I mean related declarations of pools and client reservations...<br dir="auto">
<br dir="auto">
For my purposes, I am running a quite old, but working KEA 1.4 instance and would like to upgrade. To filter unwanted clients with unknown MACs, I had to create my own hook (extension written in .c) to accept the requests from registered clients only. And I
 would like to eliminate this solution...</div>
<div dir="auto"><br>
</div>
<div dir="auto">Pieces of my hook code:<br dir="auto">
<br dir="auto">
// std::cout << "pkt4_receive MAC : " << hwaddr->toText() << std::endl;<br dir="auto">
<br dir="auto">
ConstHostPtr host;<br dir="auto">
ConstHostCollection reservations = HostMgr::instance().getAll(Host::IDENT_HWADDR, &hwaddr->hwaddr_[0], 6);<br dir="auto">
host = reservations.empty() ? 0 : <a href="http://reservations.at" dir="auto">reservations.at</a>(0);<br dir="auto">
<br dir="auto">
...<br dir="auto">
<br dir="auto">
if (!host) {<br dir="auto">
                LOG_INFO(user_chk_logger, USER_CHK_MAC_INVALID).arg(mac_info_str);<br dir="auto">
<br dir="auto">
                // std::cout << "Host not found, setting status to NEXT_STEP_DROP" << std::endl;<br dir="auto">
                handle.setStatus(CalloutHandle::NEXT_STEP_DROP);<br dir="auto">
        }<br dir="auto">
        else {<br dir="auto">
                LOG_INFO(user_chk_logger, USER_CHK_MAC_VALID).arg(mac_info_str);<br dir="auto">
<br dir="auto">
        // std::cout << "Host OK, accepting packtet" << std::endl;<br dir="auto">
        // std::cout << "Subnet ID is " << host->getIPv4SubnetID() << std::endl;           
<br dir="auto">
        }<br dir="auto">
<br dir="auto">
Thank you very much.<br dir="auto">
<br dir="auto">
Sincerely,<br dir="auto">
Jan Rovner</div>
</body>
</html>