// Enumeration specifying server's mode of operation when it
// fetches host reservations.
+ // "reservation-mode": "all",
// It is replaced by the "reservations-global",
// "reservations-in-subnet" and "reservations-out-of-pool"
// parameters.
- // "reservation-mode": "all",
// Specify if server should lookup global reservations.
"reservations-global": false,
// Enumeration specifying server's mode of operation when it
// fetches host reservations.
+ // "reservation-mode": "all",
// It is replaced by the "reservations-global",
// "reservations-in-subnet" and
// "reservations-out-of-pool" parameters.
- // "reservation-mode": "all",
// Specify if server should lookup global reservations.
"reservations-global": false,
},
// Fetches host reservations.
+ // "reservation-mode": "all",
// It is replaced by the "reservations-global",
// "reservations-in-subnet" and "reservations-out-of-pool" parameters.
- // "reservation-mode": "all",
// Specify if server should lookup global reservations.
"reservations-global": false,
// 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 should lookup global reservations.
+ "reservations-global": true,
+
+// Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": false,
+
+// Specify if server can assume that all reserved addresses
+// are out-of-pool.
+ "reservations-out-of-pool": false,
// Define several global host reservations.
"reservations": [
// the global scope: as it breaks the link between the reservation and
// the subnet it can lead to a client localized in another subnet than
// its address belongs to.
- {
- "hw-address": "1a:1b:1c:1d:1e:1f",
- "ip-address": "192.0.2.201"
- },
+ {
+ "hw-address": "1a:1b:1c:1d:1e:1f",
+ "ip-address": "192.0.2.201"
+ },
// This is a reservation for a specific client-id. It also shows
// the this client will get a reserved hostname. A hostname can be defined
],
// Define a subnet.
- "subnet4": [
- {
- "pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
- "subnet": "192.0.2.0/24",
- "interface": "eth0"
- }
- ],
+ "subnet4": [
+ {
+ "pools": [ { "pool": "192.0.2.1 - 192.0.2.200" } ],
+ "subnet": "192.0.2.0/24",
+ "interface": "eth0"
+ }
+ ],
// The following configures logging. It assumes that messages with at
// least informational level (info, warn, error and fatal) should be
// To avoid this check, one can change reservation-mode to out-of-pool, rather
// than 'all'. If a subnet does not have reservations at all, the reservation
// lookup can be skipped altogether (reservation-mode is set to 'disabled').
+// The reservation-mode has been replaced by reservations-global,
+// reservations-in-subnet and reservations-out-of-pool.
// Note that the second reservation is for an address which is within the
// range of the pool of the dynamically allocated address. The server will
// out of the dynamic pool and change reservation-mode to "out-of-pool".
// Kea will then be able to skip querying for host reservations when
// assigning leases from dynamic pool.
- "reservation-mode": "all",
+ // "reservation-mode": "all",
+ // It is replaced by the "reservations-global", "reservations-in-subnet"
+ // and "reservations-out-of-pool" parameters.
+ "reservations-in-subnet": true,
+
+ "reservations-out-of-pool": false,
+
"reservations": [
// This is a reservation for a specific hardware/MAC address. It's a very
// Timer values can be overridden here.
"renew-timer": 100,
- "reservation-mode": "all",
+
+ // "reservation-mode": "all",
+ // It is replaced by the "reservations-global",
+ // "reservations-in-subnet" and "reservations-out-of-pool"
+ // parameters.
+
+ // Specify if server should lookup global reservations.
+ "reservations-global": false,
+
+ // Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": true,
+
+ // Specify if server can assume that all reserved addresses
+ // are out-of-pool.
+ "reservations-out-of-pool": false,
// This starts a list of subnets allowed in this shared network.
// In our example, there are two subnets.
"ip-address": "0.0.0.0"
},
"renew-timer": 10,
- "reservation-mode": "all",
+ // "reservation-mode": "all",
+ // It is replaced by the "reservations-global",
+ // "reservations-in-subnet" and "reservations-out-of-pool"
+ // parameters.
+ // Specify if server should lookup global reservations.
+ "reservations-global": false,
+ // Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": true,
+ // Specify if server can assume that all reserved addresses
+ // are out-of-pool.
+ "reservations-out-of-pool": false,
"subnet": "10.0.0.0/8",
"valid-lifetime": 30
},
"pools": [ ],
"rebind-timer": 20,
"renew-timer": 10,
- "reservation-mode": "all",
+ // "reservation-mode": "all",
+ // It is replaced by the "reservations-global",
+ // "reservations-in-subnet" and "reservations-out-of-pool"
+ // parameters.
+ // Specify if server should lookup global reservations.
+ "reservations-global": false,
+ // Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": true,
+ // Specify if server can assume that all reserved addresses
+ // are out-of-pool.
+ "reservations-out-of-pool": false,
"subnet": "192.0.2.0/24",
"valid-lifetime": 30
}
// Enumeration specifying server's mode of operation when it
// fetches host reservations.
+ // "reservation-mode": "all",
// It is replaced by the "reservations-global",
// "reservations-in-subnet" and "reservations-out-of-pool"
// parameters.
- // "reservation-mode": "all",
// Specify if server should lookup global reservations.
"reservations-global": false,
// Enumeration specifying server's mode of operation when it
// fetches host reservations.
+ // "reservation-mode": "all",
// It is replaced by the "reservations-global",
// "reservations-in-subnet" and
// "reservations-out-of-pool" parameters.
- // "reservation-mode": "all",
// Specify if server should lookup global reservations.
"reservations-global": false,
},
// Fetches host reservations.
+ // "reservation-mode": "all",
// It is replaced by the "reservations-global",
// "reservations-in-subnet" and "reservations-out-of-pool" parameters.
- // "reservation-mode": "all",
// Specify if server should lookup global reservations.
"reservations-global": false,
// costly database lookup to do so. It is therefore useful from a performance
// perspective to use only the reservation types that are actually used in a
// given network.
- "host-reservation-identifiers": [ "duid", "hw-address", "flex-id" ],
+ "host-reservation-identifiers": [ "duid", "hw-address", "flex-id" ],
// 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 should lookup global reservations.
+ "reservations-global": true,
+
+// Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": false,
+
+// Specify if server can assume that all reserved addresses
+// are out-of-pool.
+ "reservations-out-of-pool": false,
// Define several global host reservations.
- "reservations": [
+ "reservations": [
// This is a simple host reservation. The host with DUID matching
// the specified value will get an address of 2001:db8:1::100.
// quotes.
// Note: flexible identifier requires flex_id hook library to be
// loaded to work.
- {
- "flex-id": "'somevalue'",
- "ip-addresses": [ "2001:db8:1:cafe::2" ]
- }
- ],
+ {
+ "flex-id": "'somevalue'",
+ "ip-addresses": [ "2001:db8:1:cafe::2" ]
+ }
+ ],
// The following list defines subnets. Subnet, pools and interface definitions
// are the same as in the regular scenario.
// out of the dynamic pool and change reservation-mode to "out-of-pool".
// Kea will then be able to skip querying for host reservations when
// assigning leases from dynamic pool.
- "reservation-mode": "all",
+ // "reservation-mode": "all",
+ // It is replaced by the "reservations-global", "reservations-in-subnet"
+ // and "reservations-out-of-pool" parameters.
+ "reservations-in-subnet": true,
+
+ "reservations-out-of-pool": false,
"pools": [ { "pool": "2001:db8:1::/120" } ],
"ip-address": "2001:db8::1"
},
"renew-timer": 100,
- "reservation-mode": "all",
+
+ // "reservation-mode": "all",
+ // It is replaced by the "reservations-global",
+ // "reservations-in-subnet" and "reservations-out-of-pool"
+ // parameters.
+
+ // Specify if server should lookup global reservations.
+ "reservations-global": false,
+
+ // Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": true,
+
+ // Specify if server can assume that all reserved addresses
+ // are out-of-pool.
+ "reservations-out-of-pool": false,
// List of subnets belonging to this particular shared-network
// start here.
"ip-address": "2001:db8:1::123"
},
"renew-timer": 10,
- "reservation-mode": "all",
+ // "reservation-mode": "all",
+ // It is replaced by the "reservations-global",
+ // "reservations-in-subnet" and "reservations-out-of-pool"
+ // parameters.
+ // Specify if server should lookup global reservations.
+ "reservations-global": false,
+ // Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": true,
+ // Specify if server can assume that all reserved addresses
+ // are out-of-pool.
+ "reservations-out-of-pool": false,
"subnet": "2001:db8:1::/64",
"pools": [ { "pool": "2001:db8:1:abcd::/64" } ],
"valid-lifetime": 40
"ip-address": "3000::1"
},
"renew-timer": 10,
- "reservation-mode": "all",
+ // "reservation-mode": "all",
+ // It is replaced by the "reservations-global",
+ // "reservations-in-subnet" and "reservations-out-of-pool"
+ // parameters.
+ // Specify if server should lookup global reservations.
+ "reservations-global": false,
+ // Specify if server should lookup in-subnet reservations.
+ "reservations-in-subnet": true,
+ // Specify if server can assume that all reserved addresses
+ // are out-of-pool.
+ "reservations-out-of-pool": false,
"subnet": "3000::/16",
"valid-lifetime": 40
}
::
-
O
|
v
}
-For this reason, the ``in-subnet`` can not be omitted when ``out-of-pool`` is set.
+For this reason, the ``in-subnet`` must not be disabled or it can be enabled
+explicitly when ``out-of-pool`` is enabled.
::
}
-For this reason, the ``in-subnet`` can not be omitted when ``out-of-pool`` is set.
+For this reason, the ``in-subnet`` must not be disabled or it can be enabled
+explicitly when ``out-of-pool`` is enabled.
::
"ip-address": "0.0.0.0"
},
"renew-timer": 60,
+ # "reservation-mode": "all",
# It is replaced by the "reservations-global"
# "reservations-in-subnet" and "reservations-out-of-pool" parameters.
- # "reservation-mode": "all",
# Specify if server should lookup global reservations.
"reservations-global": false,
# Specify if server should lookup in-subnet reservations.
}
// This test verifies that the allocation engine ignores reservations when
-// reservation-mode is set to "disabled".
+// reservations flags are set to "disabled".
TEST_F(DORATest, reservationModeDisabled) {
// Client has a reservation.
Dhcp4Client client(Dhcp4Client::SELECTING);