Browse Source

[trac4101] Update per second set of review comments

Shawn Routhier 9 years ago
parent
commit
9395b48616
3 changed files with 55 additions and 51 deletions
  1. 23 20
      doc/guide/classify.xml
  2. 28 27
      doc/guide/dhcp4-srv.xml
  3. 4 4
      doc/guide/dhcp6-srv.xml

+ 23 - 20
doc/guide/classify.xml

@@ -58,8 +58,11 @@
       When determining which options to include in the response the server will examine
       the union of options from all of the assigned classes. In the case two or more
       classes include the same option, the value from the first class examined will
-      be used.  Similarly if two or more classes are  associated with subnets, the
-      first class examined will be used. In the future the processing order of the
+      be used.  When choosing a subnet the server will iterate over all of the
+      subnets that are feasible given the information found in the packet (client address,
+      relay address etc). It will use the first subnet it finds that either doesn't
+      have a class associated with it or that has a class which matches one of
+      the packet's classes. In the future the processing order of the
       various classes may be specified but for now it is being left unspecified and
       may change in future releases.
       </para>
@@ -200,31 +203,31 @@
           </tbody>
           </tgroup>
         </table>
+      </para>
 
-        <section>
-          <title>Substring</title>
-          The substring operator "substring(value, start, length)" accepts both positive and
-          negative values for the starting position and the length.  For "start", a value of
-          0 is the first byte in the string while -1 is the last byte.  If the starting
-          point is outside of the original string an empty string is returned.  "length"
-          is the number of bytes to extract.  A negative number means to count towards
-          the beginning of the string but doesn't include the byte pointed to by "start".
-          The special value "all" means to return all bytes from start to the end of the
-          string.  If length is longer than the remaining portion of the string then
-          the entire remaining portion is returned.  Some examples may be helpful:
-
-            <screen>
+      <section>
+        <title>Substring</title>
+        The substring operator "substring(value, start, length)" accepts both positive and
+        negative values for the starting position and the length.  For "start", a value of
+        0 is the first byte in the string while -1 is the last byte.  If the starting
+        point is outside of the original string an empty string is returned.  "length"
+        is the number of bytes to extract.  A negative number means to count towards
+        the beginning of the string but doesn't include the byte pointed to by "start".
+        The special value "all" means to return all bytes from start to the end of the
+        string.  If length is longer than the remaining portion of the string then
+        the entire remaining portion is returned.  Some examples may be helpful:
+
+          <screen>
         substring('foobar', 0, 6) == 'foobar'
         substring('foobar', 3, 3) == 'bar'
         substring('foobar', 3, all) == 'bar'
         substring('foobar', 1, 4) == 'ooba'
         substring('foobar', -5, 4) == 'ooba'
-        substring('foobar', -1, -4) == 'ooba'
-        substring('foobar', 5, -4) == 'ooba'
+        substring('foobar', -1, -3) == 'oba'
+        substring('foobar', 4, -2) == 'ob'
         substring('foobar', 10, 2) == ''
-            </screen>
-        </section>
-      </para>
+          </screen>
+      </section>
     </section>
 
   <note>

+ 28 - 27
doc/guide/dhcp4-srv.xml

@@ -1570,10 +1570,10 @@ It is merely echoed by the server
       clients and treat them accordingly. It is envisaged that client
       classification will be used for changing the behavior of almost any part of
       the DHCP message processing, including the assignment of leases from different
-      pools, the assignmen of different options (or different values of the same
+      pools, the assignment of different options (or different values of the same
       options) etc. In the current release of the software however, there are
       only three mechanisms that take advantage of client classification:
-      subnet seletion, assignment of different options, and, for cable modems, there
+      subnet selection, assignment of different options, and, for cable modems, there
       are specific options for use with the TFTP server address and the boot file field.
       </para>
 
@@ -1629,10 +1629,31 @@ It is merely echoed by the server
         always set to 0.0.0.0. That capability is expected to be moved to
         an external hook library that will be dedicated to cable modems.
         </para>
+
+        <para>
+        This example shows a configuration using an automatcially generated
+        "VENDOR_CLASS_" class. The Administrator of the network has
+        decided that addresses from range 192.0.2.10 to 192.0.2.20 are
+        going to be managed by the Dhcp4 server and only clients belonging to the
+        docsis3.0 client class are allowed to use that pool.
+
+        <screen>
+"Dhcp4": {
+    "subnet4": [
+        {
+            "subnet": "192.0.2.0/24",
+            "pools": [ { "pool": "192.0.2.10 - 192.0.2.20" } ],
+            <userinput>"client-class": "VENDOR_CLASS_docsis3.0"</userinput>
+        }
+    ],
+    ...
+}</screen>
+        </para>
+
       </section>
 
       <section>
-        <title>Configuring Classes Example</title>
+        <title>Defining and Using Custom Classes</title>
         <para>
         The following example shows how to configure a class using an expression
         and a subnet making use of that class. This configuration defines the
@@ -1646,18 +1667,18 @@ It is merely echoed by the server
           <screen>
 "Dhcp4": {
     "client-classes": [
-        {
+        {<userinput>
             "name": "Client_foo",
             "test": "substring(option[61].text,0,3) == 'foo'",
             "option-data": [
                 {
-                    "name": "doamin-name-servers",
+                    "name": "domain-name-servers",
                     "code": 6,
                     "space": "dhcp4",
                     "csv-format": true,
                     "data": "192.0.2.1, 192.0.2.2"
                 }
-            ]
+            ]</userinput>
         },
         ...
     ],
@@ -1665,33 +1686,13 @@ It is merely echoed by the server
         {
             "subnet": "192.0.2.0/24",
             "pools": [ { "pool": "192.0.2.10 - 192.0.2.20" } ],
-            "client-class": "Client_foo"
+            <userinput>"client-class": "Client_foo"</userinput>
         },
         ...
     ],
     ...
 }</screen>
         </para>
-
-        <para>
-        This example shows a configuration using an automatcially generated
-        "VENDOR_CLASS_" class. The Administrator of the network has
-        decided that addresses from range 192.0.2.10 to 192.0.2.20 are
-        going to be managed by the Dhcp4 server and only clients belonging to the
-        docsis3.0 client class are allowed to use that pool.
-
-        <screen>
-"Dhcp4": {
-    "subnet4": [
-        {
-            "subnet": "192.0.2.0/24",
-            "pools": [ { "pool": "192.0.2.10 - 192.0.2.20" } ],
-            <userinput>"client-class": "VENDOR_CLASS_docsis3.0"</userinput>
-        }
-    ],
-    ...
-}</screen>
-        </para>
       </section>
     </section>
 

+ 4 - 4
doc/guide/dhcp6-srv.xml

@@ -1599,7 +1599,7 @@ should include options from the isc option space:
       </para></note>
 
       <section>
-        <title>Configuring Classes Example</title>
+        <title>Defining and Using Custom Classes</title>
         <para>
         The following example shows how to configure a class using an expression
         and a subnet making use of that class. This configuration defines the
@@ -1613,7 +1613,7 @@ should include options from the isc option space:
         <screen>
 "Dhcp6": {
     "client-classes": [
-        {
+        {<userinput>
             "name": "Client_enterprise",
             "test": "substring(option[2].hex,0,6) == 0x0002AABBCCDD'",
             "option-data": [
@@ -1624,7 +1624,7 @@ should include options from the isc option space:
                     "csv-format": true,
                     "data": "2001:db8:0::1, 2001:db8:2::1"
                 }
-            ]
+            ]</userinput>
         },
         ...
     ],
@@ -1632,7 +1632,7 @@ should include options from the isc option space:
         {
             "subnet": "2001:db8:1::/64",
             "pools": [ { "pool": "2001:db8:1::-2001:db8:1::ffff" } ],
-            "client-class": "Client_enterprise"
+            <userinput>"client-class": "Client_enterprise"</userinput>
         }
     ],
     ...