]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1405] addressed comments
authorRazvan Becheriu <razvan@isc.org>
Wed, 18 Nov 2020 09:32:37 +0000 (11:32 +0200)
committerRazvan Becheriu <razvan@isc.org>
Wed, 18 Nov 2020 13:55:24 +0000 (15:55 +0200)
12 files changed:
doc/examples/kea4/all-keys.json
doc/examples/kea4/global-reservations.json
doc/examples/kea4/reservations.json
doc/examples/kea4/shared-network.json
doc/examples/kea6/all-keys.json
doc/examples/kea6/global-reservations.json
doc/examples/kea6/reservations.json
doc/examples/kea6/shared-network.json
doc/sphinx/arm/dhcp4-srv.rst
doc/sphinx/arm/dhcp6-srv.rst
doc/sphinx/arm/hooks.rst
src/bin/dhcp4/tests/dora_unittest.cc

index 19d0b1ac7db2affba5c7a8aebabb271e39fcd4c1..2182a61a8bdf14360d54c460dc513607311b1a2e 100644 (file)
 
                 // 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,
index 155b56aeeaefc05e1862d3cef7b77c50e9a8cdaf..fa3180207b6bc341ec37a495768dadb5821f0e4b 100644 (file)
 
 // 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
index 61b18bd8b45c586561bcbb99570437087debba95..71d346505a754fb61f1771be07941ab0188656ae 100644 (file)
@@ -51,6 +51,8 @@
 // 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
index 397869fd6ea77b63325671c36ddc94dfa418839c..4fc95cee5368a8b69bb396b433692e4c56bcc445 100644 (file)
 
             // 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
                 }
index da089119284c4997c2ed3163d4f41c24b8444c49..b7b9cc5624ff43c6cfba5fce3f2da5223ee555a3 100644 (file)
 
                 // 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,
index b5674178c16125b60dc89bc486f919aa588a0b48..519c7ca7d91f4def7e331db5276cb1ca79b45659 100644 (file)
 // 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.
index dad59d4f1e4e2d1057510ab8a3735cb11415767f..27d1bf6cabcde4c28a0c16a269285035fed270f2 100644 (file)
       // 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" } ],
 
index a8a537e36f2e634f5ac1fa9017697e7ba9762498..992a0d0350a0bc81c6ba4af593aa674acddc3b61 100644 (file)
                 "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
                 }
index 889907c655ac3b6c9bbe3e905077d49b845f7ea4..ccfa6d48b850bab45f6dfc903eae47878c293989 100644 (file)
@@ -4538,7 +4538,6 @@ following decision diagram:
 
 ::
 
-
                                   O
                                   |
                                   v
@@ -4740,7 +4739,8 @@ configuration, as ``out-of-pool`` are also ``in-subnet``.
    }
 
 
-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.
 
 ::
 
index 30492c2dd4dd07479930bb1316ed57a1a618ebff..a95b72a40d9c3197075a8ab8b4004a35323d0727 100644 (file)
@@ -4185,7 +4185,8 @@ configuration, as ``out-of-pool`` are also ``in-subnet``.
    }
 
 
-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.
 
 ::
 
index 358d6c5683dbb3277d86d44b244b0d3d99b61849..36f65e9097f253bd948753e7630d8f3e89a483b9 100644 (file)
@@ -2655,9 +2655,9 @@ An example response could look as follows:
                    "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.
index 3ea2529a98449e5a09a5cc66b2d56095338cc80c..ce2405a19ff4db13952f9064959e12b1d1f6f386 100644 (file)
@@ -1801,7 +1801,7 @@ TEST_F(DORATest, reservationsWithConflicts) {
 }
 
 // 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);