summaryrefslogtreecommitdiff
path: root/ovn/northd/ovn-northd.8.xml
diff options
context:
space:
mode:
authorNuman Siddique <nusiddiq@redhat.com>2016-08-05 09:36:39 +0530
committerBen Pfaff <blp@ovn.org>2016-08-14 13:47:12 -0700
commit33ac3c83416334e8759ff21170e42aa9700be8e4 (patch)
tree165d36be177b4dd465019700a18cd311922ce23b /ovn/northd/ovn-northd.8.xml
parent01cfdb2f7088e415eb5345b1d62cd44df492b36c (diff)
downloadopenvswitch-33ac3c83416334e8759ff21170e42aa9700be8e4.tar.gz
ovn-northd: Add logical flows to support DHCPv6
OVN implements native DHCPv6. DHCPv6 options are stored in the 'DHCP_Options' NB table and logical ports refer to this table to configure the DHCPv6 options. For each logical port configured with DHCPv6 Options following flows are added - A logical flow which copies the DHCPv6 options to the DHCPv6 request packets using the 'put_dhcpv6_opts' action and advances the packet to the next stage. - A logical flow which implements the DHCPv6 reponder by sending the DHCPv6 reply back to the inport once the 'put_dhcpv6_opts' action is applied. Signed-off-by: Numan Siddique <nusiddiq@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ovn/northd/ovn-northd.8.xml')
-rw-r--r--ovn/northd/ovn-northd.8.xml72
1 files changed, 66 insertions, 6 deletions
diff --git a/ovn/northd/ovn-northd.8.xml b/ovn/northd/ovn-northd.8.xml
index 77974172f..1cf6b6e41 100644
--- a/ovn/northd/ovn-northd.8.xml
+++ b/ovn/northd/ovn-northd.8.xml
@@ -488,7 +488,8 @@ nd_na {
<p>
This table adds the DHCPv4 options to a DHCPv4 packet from the
- logical ports configured with IPv4 address(es) and DHCPv4 options.
+ logical ports configured with IPv4 address(es) and DHCPv4 options,
+ and similarly for DHCPv6 options.
</p>
<ul>
@@ -501,13 +502,13 @@ nd_na {
</p>
<pre>
-reg0[3] = put_dhcp_opts(offer_ip = <var>O</var>, <i>options</i>...);
+reg0[3] = put_dhcp_opts(offer_ip = <var>ip</var>, <var>options</var>...);
next;
</pre>
<p>
For DHCPDISCOVER and DHCPREQUEST, this transforms the packet into a
- DHCP reply, adds the DHCP offer IP <var>O</var> and options to the
+ DHCP reply, adds the DHCP offer IP <var>ip</var> and options to the
packet, and stores 1 into reg0[3]. For other kinds of packets, it
just stores 0 into reg0[3]. Either way, it continues to the next
table.
@@ -516,6 +517,29 @@ next;
</li>
<li>
+ <p>
+ A priority-100 logical flow is added for these logical ports
+ which matches the IPv6 packet with <code>udp.src</code> = 546 and
+ <code>udp.dst</code> = 547 and applies the action
+ <code>put_dhcpv6_opts</code> and advances the packet to the next
+ table.
+ </p>
+
+ <pre>
+reg0[3] = put_dhcpv6_opts(ia_addr = <var>ip</var>, <var>options</var>...);
+next;
+ </pre>
+
+ <p>
+ For DHCPv6 Solicit/Request/Confirm packets, this transforms the
+ packet into a DHCPv6 Advertise/Reply, adds the DHCPv6 offer IP
+ <var>ip</var> and options to the packet, and stores 1 into reg0[3].
+ For other kinds of packets, it just stores 0 into reg0[3]. Either
+ way, it continues to the next table.
+ </p>
+ </li>
+
+ <li>
A priority-0 flow that matches all packets to advances to table 11.
</li>
</ul>
@@ -541,7 +565,7 @@ next;
<pre>
eth.dst = eth.src;
eth.src = <var>E</var>;
-ip4.dst = <var>O</var>;
+ip4.dst = <var>A</var>;
ip4.src = <var>S</var>;
udp.src = 67;
udp.dst = 68;
@@ -552,7 +576,7 @@ output;
<p>
where <var>E</var> is the server MAC address and <var>S</var> is the
- server IPv4 address defined in the DHCPv4 options and <var>O</var> is
+ server IPv4 address defined in the DHCPv4 options and <var>A</var> is
the IPv4 address defined in the logical port's addresses column.
</p>
@@ -563,6 +587,41 @@ output;
</li>
<li>
+ <p>
+ A priority 100 logical flow is added for the logical ports configured
+ with DHCPv6 options which matches IPv6 packets with <code>udp.src == 546
+ &amp;&amp; udp.dst == 547 &amp;&amp; reg0[3] == 1</code> and
+ responds back to the <code>inport</code> after applying these
+ actions. If <code>reg0[3]</code> is set to 1, it means that the
+ action <code>put_dhcpv6_opts</code> was successful.
+ </p>
+
+ <pre>
+eth.dst = eth.src;
+eth.src = <var>E</var>;
+ip6.dst = <var>A</var>;
+ip6.src = <var>S</var>;
+udp.src = 547;
+udp.dst = 546;
+outport = <var>P</var>;
+flags.loopback = 1;
+output;
+ </pre>
+
+ <p>
+ where <var>E</var> is the server MAC address and <var>S</var> is the
+ server IPv6 LLA address generated from the <code>server_id</code>
+ defined in the DHCPv6 options and <var>A</var> is
+ the IPv6 address defined in the logical port's addresses column.
+ </p>
+
+ <p>
+ (This terminates packet processing; the packet does not go on the
+ next ingress table.)
+ </p>
+ </li>
+
+ <li>
A priority-0 flow that matches all packets to advances to table 12.
</li>
</ul>
@@ -643,7 +702,8 @@ output;
<p>
Also a priority 34000 logical flow is added for each logical port which
- has DHCPv4 options defined to allow the DHCPv4 reply packet from the
+ has DHCPv4 options defined to allow the DHCPv4 reply packet and which has
+ DHCPv6 options defined to allow the DHCPv6 reply packet from the
<code>Ingress Table 11: DHCP responses</code>.
</p>