Commit 2e590351 authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰 Committed by Francis Dupont
Browse files

[#898] Added DHCP class and config example

parent 28cef4d4
......@@ -34,7 +34,38 @@ It takes no parameter.
This library is only meant to be loaded by the ``kea-dhcp4`` process
as there is no BOOTP protocol for IPv6.
.. _books-bootp-limitations:
.. _hooks-bootp-config:
Incoming BOOTP packets are added to the BOOTP class. Incoming packets that
are DHCP packets are added to the DHCP class. This can be used to segregate
BOOTP clients to separate pool. For example you can do the following:
::
"Dhcp4": {
"subnet4": [
{
"subnet": "192.0.2.0/24",
"pools": [
{
// BOOTP clients will be handled here
"pool": "192.0.2.200 - 192.0.2.254",
"class": "BOOTP"
},
{
// Regular DHCP clients will be handled here
"pool": "192.0.2.1 - 192.0.2.199"
}],
...
},
...
],
...
}
.. _hooks-bootp-limitations:
BOOTP Hooks Limitations
~~~~~~~~~~~~~~~~~~~~~~~
......
......@@ -37,6 +37,7 @@ int pkt4_receive(CalloutHandle& handle) {
try {
if (query->getType() != DHCP_NOTYPE) {
// DHCP query.
query->addClass("DHCP");
return (0);
}
if (query->getOp() == BOOTREPLY) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment