// Specify if server can assume that all reserved addresses
// are out-of-pool.
// Ignored when reservations-in-subnet is false.
+ // If it is specified, it is inherited to "subnet4" levels.
"reservations-out-of-pool": false,
// List of client classes which must be evaluated when this shared
// Specify if server can assume that all reserved addresses
// are out-of-pool.
// Ignored when reservations-in-subnet is false.
+ // If it is specified, it is inherited to "shared-networks" and
+ // "subnet4" levels.
"reservations-out-of-pool": false,
// Global compute T1 and T2 timers.
// This directive tells Kea that reservations are global. Note that this
// can also be specified at shared network and/or subnet level.
-// "reservation-mode": "global",
+// "reservation-mode": "global",
// It is replaced by the "reservations-global", "reservations-in-subnet" and
// "reservations-out-of-pool" parameters.
// Specify if server can assume that all reserved addresses
// are out-of-pool.
// Ignored when reservations-in-subnet is false.
+// If it is specified, it is inherited to "shared-networks" and "subnet4" levels.
"reservations-out-of-pool": false,
// Define several global host reservations.
// Specify if server can assume that all reserved addresses
// are out-of-pool.
// Ignored when reservations-in-subnet is false.
+ // If it is specified, it is inherited to "shared-networks" and
+ // "subnet4" levels.
"reservations-out-of-pool": false,
"reservations": [
// Specify if server can assume that all reserved addresses
// are out-of-pool.
// Ignored when reservations-in-subnet is false.
+ // If it is specified, it is inherited to "subnet4" levels.
"reservations-out-of-pool": false,
// This starts a list of subnets allowed in this shared network.
// Specify if server can assume that all reserved addresses
// are out-of-pool.
// Ignored when reservations-in-subnet is false.
+ // If it is specified, it is inherited to "subnet6" levels.
"reservations-out-of-pool": false,
// List of client classes which must be evaluated when this shared
// Specify if server can assume that all reserved addresses
// are out-of-pool.
// Ignored when reservations-in-subnet is false.
+ // If it is specified, it is inherited to "shared-networks" and
+ // "subnet6" levels.
"reservations-out-of-pool": false,
// Data directory.
// This directive tells Kea that reservations are global. Note that this
// can also be specified at shared network and/or subnet level.
-// "reservation-mode": "global",
+// "reservation-mode": "global",
// It is replaced by the "reservations-global", "reservations-in-subnet" and
// "reservations-out-of-pool" parameters.
// Specify if server can assume that all reserved addresses
// are out-of-pool.
// Ignored when reservations-in-subnet is false.
+// If it is specified, it is inherited to "shared-networks" and "subnet6" levels.
"reservations-out-of-pool": false,
// Define several global host reservations.
// Specify if server can assume that all reserved addresses
// are out-of-pool.
// Ignored when reservations-in-subnet is false.
+ // If it is specified, it is inherited to "shared-networks" and
+ // "subnet6" levels.
"reservations-out-of-pool": false,
"pools": [ { "pool": "2001:db8:1::/120" } ],
// Specify if server can assume that all reserved addresses
// are out-of-pool.
// Ignored when reservations-in-subnet is false.
+ // If it is specified, it is inherited to "subnet6" levels.
"reservations-out-of-pool": false,
// List of subnets belonging to this particular shared-network
An example configuration that disables reservations looks as follows:
-::
+.. code-block:: json
- "Dhcp4": {
- "subnet4": [
- {
- "subnet": "192.0.2.0/24",
- "reservation-mode": "disabled",
- ...
+ {
+ "Dhcp4": {
+ "subnet4": [
+ {
+ "subnet": "192.0.2.0/24",
+ "reservation-mode": "disabled",
+ "pools": [ { "pool": "192.0.2.10-192.0.2.100" } ]
+ }
+ ]
}
- ]
}
-
An example configuration using global reservations is shown below:
-::
-
- "Dhcp4": {
+.. code-block:: json
+ {
+ "Dhcp4": {
- "reservation-mode": "global",
- "reservations": [
- {
- "hw-address": "01:bb:cc:dd:ee:ff",
- "hostname": "host-one"
- },
- {
- "hw-address": "02:bb:cc:dd:ee:ff",
- "hostname": "host-two"
- }
- ],
+ "reservation-mode": "global",
+ "reservations": [
+ {
+ "hw-address": "01:bb:cc:dd:ee:ff",
+ "hostname": "host-one"
+ },
+ {
+ "hw-address": "02:bb:cc:dd:ee:ff",
+ "hostname": "host-two"
+ }
+ ],
- "subnet4": [
- {
- "subnet": "192.0.2.0/24",
- ...
+ "subnet4": [
+ {
+ "subnet": "192.0.2.0/24",
+ "pools": [ { "pool": "192.0.2.10-192.0.2.100" } ]
+ }
+ ]
}
- ]
}
The meaning of the reservation flags are:
``disabled``:
-::
+.. code-block:: json
- "Dhcp4": {
+ {
+ "Dhcp4": {
- "reservations-global": false,
- "reservations-in-subnet": false,
- ...
+ "reservations-global": false,
+ "reservations-in-subnet": false
+ }
}
``global``:
-::
+.. code-block:: json
- "Dhcp4": {
+ {
+ "Dhcp4": {
- "reservations-global": true,
- "reservations-in-subnet": false,
- "reservations-out-of-pool": false,
- ...
+ "reservations-global": true,
+ "reservations-in-subnet": false
+ }
}
``out-of-pool``:
-::
+.. code-block:: json
- "Dhcp4": {
+ {
+ "Dhcp4": {
- "reservations-global": false,
- "reservations-in-subnet": true,
- "reservations-out-of-pool": true,
- ...
+ "reservations-global": false,
+ "reservations-in-subnet": true,
+ "reservations-out-of-pool": true
+ }
}
``all``:
-::
+.. code-block:: json
- "Dhcp4": {
+ {
+ "Dhcp4": {
- "reservations-global": false,
- "reservations-in-subnet": true,
- "reservations-out-of-pool": false,
- ...
+ "reservations-global": false,
+ "reservations-in-subnet": true,
+ "reservations-out-of-pool": false
+ }
}
To activate both ``global`` and ``all``, the following combination can be used:
-::
+.. code-block:: json
- "Dhcp4": {
+ {
+ "Dhcp4": {
- "reservations-global": true,
- "reservations-in-subnet": true,
- "reservations-out-of-pool": false,
- ...
+ "reservations-global": true,
+ "reservations-in-subnet": true,
+ "reservations-out-of-pool": false
+ }
}
To activate both ``global`` and ``out-of-pool``, the following combination can
be used:
-::
+.. code-block:: json
- "Dhcp4": {
+ {
+ "Dhcp4": {
- "reservations-global": true,
- "reservations-in-subnet": true,
- "reservations-out-of-pool": true,
- ...
+ "reservations-global": true,
+ "reservations-in-subnet": true,
+ "reservations-out-of-pool": true
+ }
}
Note that enabling ``out-of-pool`` and disabling ``in-subnet`` at the same time
An example configuration that disables reservations looks as follows:
-::
+.. code-block:: json
- "Dhcp4": {
- "subnet4": [
- {
- "subnet": "192.0.2.0/24",
- "reservations-global": false,
- "reservations-in-subnet": false,
- ...
+ {
+ "Dhcp4": {
+ "subnet4": [
+ {
+ "subnet": "192.0.2.0/24",
+ "reservations-global": false,
+ "reservations-in-subnet": false
+ }
+ ]
}
- ]
}
-
An example configuration using global reservations is shown below:
-::
+.. code-block:: json
- "Dhcp4": {
+ {
+ "Dhcp4": {
- "reservations-global": true,
- "reservations-in-subnet": false,
- "reservations": [
- {
- "hw-address": "01:bb:cc:dd:ee:ff",
- "hostname": "host-one"
- },
- {
- "hw-address": "02:bb:cc:dd:ee:ff",
- "hostname": "host-two"
- }
- ],
+ "reservations-global": true,
+ "reservations-in-subnet": false,
+ "reservations": [
+ {
+ "hw-address": "01:bb:cc:dd:ee:ff",
+ "hostname": "host-one"
+ },
+ {
+ "hw-address": "02:bb:cc:dd:ee:ff",
+ "hostname": "host-two"
+ }
+ ],
- "subnet4": [
- {
- "subnet": "192.0.2.0/24",
- ...
+ "subnet4": [
+ {
+ "subnet": "192.0.2.0/24",
+ "pools": [ { "pool": "192.0.2.10-192.0.2.100" } ]
+ }
+ ]
}
- ]
}
For more details regarding global reservations, see :ref:`global-reservations4`.
# Specify if the server should lookup in-subnet reservations.
"reservations-in-subnet": false,
# Specify if the server can assume that all reserved addresses
- # are out-of-pool.
- "reservations-out-of-pool": false,
+ # are out-of-pool. It can be ignored because "reservations-in-subnet"
+ # is false.
+ # "reservations-out-of-pool": false,
"pools": [ { "pool": "10.0.0.10-10.0.0.100" } ]
} ]
}
# Specify if the server should lookup in-subnet reservations.
"reservations-in-subnet": false,
# Specify if the server can assume that all reserved addresses
- # are out-of-pool.
- "reservations-out-of-pool": false,
+ # are out-of-pool. It can be ignored because "reservations-in-subnet"
+ # is false, but if it is specified, it is inherited to "shared-networks"
+ # and "subnet4" levels.
+ # "reservations-out-of-pool": false,
"shared-networks": [{
"subnet4": [
{
An example configuration that disables reservations looks as follows:
-::
+.. code-block:: json
- "Dhcp6": {
- "subnet6": [
- {
- "subnet": "2001:db8:1::/64",
- "reservation-mode": "disabled",
- ...
+ {
+ "Dhcp6": {
+ "subnet6": [
+ {
+ "subnet": "2001:db8:1::/64",
+ "reservation-mode": "disabled",
+ "pools": [ { "pool": "2001:db8:1::-2001:db8:1::100" } ]
+ }
+ ]
}
- ]
}
-
An example configuration using global reservations is shown below:
-::
-
- "Dhcp6": {
+.. code-block:: json
+ {
+ "Dhcp6": {
- "reservation-mode": "global",
- "reservations": [
- {
- "duid": "00:03:00:01:11:22:33:44:55:66",
- "hostname": "host-one"
- },
- {
- "duid": "00:03:00:01:99:88:77:66:55:44",
- "hostname": "host-two"
- }
- ],
+ "reservation-mode": "global",
+ "reservations": [
+ {
+ "duid": "00:03:00:01:11:22:33:44:55:66",
+ "hostname": "host-one"
+ },
+ {
+ "duid": "00:03:00:01:99:88:77:66:55:44",
+ "hostname": "host-two"
+ }
+ ],
- "subnet6": [
- {
- "subnet": "2001:db8:1::/64",
- ...
+ "subnet6": [
+ {
+ "subnet": "2001:db8:1::/64",
+ "pools": [ { "pool": "2001:db8:1::-2001:db8:1::100" } ]
+ }
+ ]
}
- ]
}
The meaning of the reservation flags are:
``disabled``:
-::
+.. code-block:: json
- "Dhcp6": {
+ {
+ "Dhcp6": {
- "reservations-global": false,
- "reservations-in-subnet": false,
- ...
+ "reservations-global": false,
+ "reservations-in-subnet": false
+ }
}
``global``:
-::
+.. code-block:: json
- "Dhcp6": {
+ {
+ "Dhcp6": {
- "reservations-global": true,
- "reservations-in-subnet": false,
- "reservations-out-of-pool": false,
- ...
+ "reservations-global": true,
+ "reservations-in-subnet": false
+ }
}
``out-of-pool``:
-::
+.. code-block:: json
- "Dhcp6": {
+ {
+ "Dhcp6": {
- "reservations-global": false,
- "reservations-in-subnet": true,
- "reservations-out-of-pool": true,
- ...
+ "reservations-global": false,
+ "reservations-in-subnet": true,
+ "reservations-out-of-pool": true
+ }
}
``all``:
-::
+.. code-block:: json
- "Dhcp6": {
+ {
+ "Dhcp6": {
- "reservations-global": false,
- "reservations-in-subnet": true,
- "reservations-out-of-pool": false,
- ...
+ "reservations-global": false,
+ "reservations-in-subnet": true,
+ "reservations-out-of-pool": false
+ }
}
To activate both ``global`` and ``all``, the following combination can be used:
-::
+.. code-block:: json
- "Dhcp6": {
+ {
+ "Dhcp6": {
- "reservations-global": true,
- "reservations-in-subnet": true,
- "reservations-out-of-pool": false,
- ...
+ "reservations-global": true,
+ "reservations-in-subnet": true,
+ "reservations-out-of-pool": false
+ }
}
To activate both ``global`` and ``out-of-pool``, the following combination can
be used:
-::
+.. code-block:: json
- "Dhcp6": {
+ {
+ "Dhcp6": {
- "reservations-global": true,
- "reservations-in-subnet": true,
- "reservations-out-of-pool": true,
- ...
+ "reservations-global": true,
+ "reservations-in-subnet": true,
+ "reservations-out-of-pool": true
+ }
}
Note that enabling ``out-of-pool`` and disabling ``in-subnet`` at the same time
An example configuration that disables reservations looks as follows:
-::
+.. code-block:: json
- "Dhcp6": {
- "subnet6": [
- {
- "subnet": "2001:db8:1::/64",
- "reservations-global": false,
- "reservations-in-subnet": false,
- ...
+ {
+ "Dhcp6": {
+ "subnet6": [
+ {
+ "subnet": "2001:db8:1::/64",
+ "reservations-global": false,
+ "reservations-in-subnet": false
+ }
+ ]
}
- ]
}
-
An example configuration using global reservations is shown below:
-::
+.. code-block:: json
- "Dhcp6": {
+ {
+ "Dhcp6": {
- "reservations-global": true,
- "reservations-in-subnet": false,
- "reservations": [
- {
- "duid": "00:03:00:01:11:22:33:44:55:66",
- "hostname": "host-one"
- },
- {
- "duid": "00:03:00:01:99:88:77:66:55:44",
- "hostname": "host-two"
- }
- ],
+ "reservations-global": true,
+ "reservations-in-subnet": false,
+ "reservations": [
+ {
+ "duid": "00:03:00:01:11:22:33:44:55:66",
+ "hostname": "host-one"
+ },
+ {
+ "duid": "00:03:00:01:99:88:77:66:55:44",
+ "hostname": "host-two"
+ }
+ ],
- "subnet6": [
- {
- "subnet": "2001:db8:1::/64",
- ...
+ "subnet6": [
+ {
+ "subnet": "2001:db8:1::/64",
+ "pools": [ { "pool": "2001:db8:1::-2001:db8:1::100" } ]
+ }
+ ]
}
- ]
}
For more details regarding global reservations, see :ref:`global-reservations6`.
# Specify if the server should lookup in-subnet reservations.
"reservations-in-subnet": false,
# Specify if the server can assume that all reserved addresses
- # are out-of-pool.
- "reservations-out-of-pool": false,
+ # are out-of-pool. It can be ignored because "reservations-in-subnet"
+ # is false.
+ # "reservations-out-of-pool": false,
"pools": [ { "pool": "2001:db8:1::-2001:db8:1::100" } ]
} ]
}
# Specify if the server should lookup in-subnet reservations.
"reservations-in-subnet": false,
# Specify if the server can assume that all reserved addresses
- # are out-of-pool.
- "reservations-out-of-pool": false,
+ # are out-of-pool. It can be ignored because "reservations-in-subnet"
+ # is false, but if it is specified, it is inherited to "shared-networks"
+ # and "subnet6" levels.
+ # "reservations-out-of-pool": false,
"shared-networks": [{
"subnet6": [
{
" \"ip-address\": \"5.6.7.8\"\n"
" },\n"
" \"reservations-global\": false,\n"
- " \"reservations-in-subnet\": true,\n"
- " \"reservations-out-of-pool\": true,\n"
+ " \"reservations-in-subnet\": false,\n"
" \"renew-timer\": 10,\n"
" \"rebind-timer\": 20,\n"
" \"valid-lifetime\": 40,\n"
" \"ip-address\": \"55.66.77.88\"\n"
" },\n"
" \"reservations-global\": false,\n"
- " \"reservations-in-subnet\": false,\n"
- " \"reservations-out-of-pool\": false\n"
+ " \"reservations-in-subnet\": true,\n"
+ " \"reservations-out-of-pool\": true\n"
" }\n"
" ]\n"
" },\n"
EXPECT_EQ("bar", s->getFilename().get());
EXPECT_TRUE(s->hasRelayAddress(IOAddress("5.6.7.8")));
EXPECT_FALSE(s->getReservationsGlobal());
- EXPECT_TRUE(s->getReservationsInSubnet());
- EXPECT_TRUE(s->getReservationsOutOfPool());
+ EXPECT_FALSE(s->getReservationsInSubnet());
+ EXPECT_FALSE(s->getReservationsOutOfPool());
// For the second subnet, the renew-timer should be 100, because it
// was specified explicitly. Other parameters a derived
EXPECT_EQ("bootfile.efi", s->getFilename().get());
EXPECT_TRUE(s->hasRelayAddress(IOAddress("55.66.77.88")));
EXPECT_FALSE(s->getReservationsGlobal());
- EXPECT_FALSE(s->getReservationsInSubnet());
- EXPECT_FALSE(s->getReservationsOutOfPool());
+ EXPECT_TRUE(s->getReservationsInSubnet());
+ EXPECT_TRUE(s->getReservationsOutOfPool());
// Ok, now check the second shared subnet.
net = nets->at(1);