ovn-nb: Add support for IP+MAC binding pairs in Port_Binding 'address'.
authorBen Pfaff <blp@nicira.com>
Fri, 16 Oct 2015 20:00:01 +0000 (13:00 -0700)
committerBen Pfaff <blp@nicira.com>
Sat, 17 Oct 2015 06:52:41 +0000 (23:52 -0700)
When a logical router can statically obtain the IP+MAC pairs for its
attached logical switches, it can avoid expensive ARP resolution.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Justin Pettit <jpettit@nicira.com>
ovn/TODO
ovn/ovn-nb.xml
ovn/utilities/ovn-nbctl.8.xml
ovn/utilities/ovn-nbctl.c

index ac1332f..9f1056a 100644 (file)
--- a/ovn/TODO
+++ b/ovn/TODO
@@ -186,15 +186,6 @@ Somehow it has to be possible for an L3 logical router to map from an
 IP address to an Ethernet address.  This can happen statically or
 dynamically.  Probably both cases need to be supported eventually.
 
-*** Static IP to MAC binding
-
-Commonly, for a VM, the binding of an IP address to a MAC is known
-statically.  The Logical_Port table in the OVN_Northbound schema can
-be revised to make these bindings known.  Then ovn-northd can
-integrate the bindings into the logical router flow table.
-(ovn-northd can also integrate them into the logical switch flow table
-to terminate ARP requests from VIFs.)
-
 *** Dynamic IP to MAC bindings
 
 Some bindings from IP address to MAC will undoubtedly need to be
index 34bbdc9..7f6f703 100644 (file)
     </column>
 
     <column name="addresses">
-      The logical port's own Ethernet address or addresses, each in the form
-      <var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>.
-      Like a physical Ethernet NIC, a logical port ordinarily has a single
-      fixed Ethernet address.  The string <code>unknown</code> is also allowed
-      to indicate that the logical port has an unknown set of (additional)
-      source addresses.
+      <p>
+        Addresses owned by the logical port.
+      </p>
+
+      <p>
+        Each element in the set must take one of the following forms:
+      </p>
+
+      <dl>
+        <dt><code><var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var></code></dt>
+        <dd>
+          <p>
+            An Ethernet address owned by the logical port.  Like a physical
+            Ethernet NIC, a logical port ordinarily has a single fixed Ethernet
+            address.
+          </p>
+
+          <p>
+            When a OVN logical switch processes a unicast Ethernet frame whose
+            destination MAC address is in a logical port's <ref
+            column="addresses"/> column, it delivers it only to that port, as
+            if a MAC learning process had learned that MAC address on the port.
+          </p>
+        </dd>
+
+        <dt><code><var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var>:<var>xx</var> <var>a</var>.<var>b</var>.<var>c</var>.<var>d</var></code></dt>
+        <dd>
+          <p>
+            This form has all the effects of the previous form.  It also
+            indicates that the logical port owns the given IPv4 address.
+          </p>
+
+          <p>
+            The OVN logical switch uses this information to synthesize
+            responses to ARP requests without traversing the physical network.
+            The OVN logical router connected to the logical switch, if any,
+            uses this information to avoid issuing ARP requests for logical
+            switch ports.
+          </p>
+        </dd>
+
+        <dt><code>unknown</code></dt>
+        <dd>
+          This indicates that the logical port has an unknown set of Ethernet
+          addresses.  When an OVN logical switch processes a unicast Ethernet
+          frame whose destination MAC address is not in any logical port's <ref
+          column="addresses"/> column, it delivers it to the port (or ports)
+          whose <ref column="addresses"/> columns include <code>unknown</code>.
+        </dd>
+      </dl>
     </column>
 
     <column name="port_security">
index 38d51c2..34bbba0 100644 (file)
       <dt><code>lport-set-addresses</code> <var>lport</var> [<var>address</var>]...</dt>
       <dd>
         Sets the addresses associated with <var>lport</var> to
-        <var>address</var>.  Multiple MACs may be sets by using multiple
-        <var>address</var> arguments.  If no <var>mac</var> argument is given,
-        <var>lport</var> will have no addresses associated with it.
+        <var>address</var>.  Each <var>address</var> should be either an
+        Ethernet address or an Ethernet address followed by an IP address
+        (separated by a space and quoted to form a single command-line
+        argument).  The special form <code>unknown</code> is also valid.
+        Multiple Ethernet addresses or Ethernet+IP pairs may be set. If no
+        <var>address</var> argument is given, <var>lport</var> will have no
+        addresses associated with it.
       </dd>
 
       <dt><code>lport-get-addresses</code> <var>lport</var></dt>
index 4c8f533..aac4c27 100644 (file)
@@ -312,7 +312,7 @@ Logical port commands:\n\
   lport-get-parent LPORT    get the parent of LPORT if set\n\
   lport-get-tag LPORT       get the LPORT's tag if set\n\
   lport-set-addresses LPORT [ADDRESS]...\n\
-                            set addresses for LPORT.\n\
+                            set MAC or MAC+IP addresses for LPORT.\n\
   lport-get-addresses LPORT      get a list of MAC addresses on LPORT\n\
   lport-set-port-security LPORT [ADDRS]...\n\
                             set port security addresses for LPORT.\n\