</li>
</ul>
- <h3>Ingress Table 10: Destination Lookup</h3>
+ <h3>Ingress Table 10: DHCP option processing</h3>
+
+ <p>
+ This table adds the DHCPv4 options to a DHCPv4 packet from the
+ logical ports configured with IPv4 address(es) and DHCPv4 options.
+ </p>
+
+ <ul>
+ <li>
+ <p>
+ A priority-100 logical flow is added for these logical ports
+ which matches the IPv4 packet with <code>udp.src</code> = 68 and
+ <code>udp.dst</code> = 67 and applies the action
+ <code>put_dhcp_opts</code> and advances the packet to the next table.
+ </p>
+
+ <pre>
+reg0[3] = put_dhcp_opts(offer_ip = <var>O</var>, <i>options</i>...);
+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
+ 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>
+
+ <h3>Ingress Table 11: DHCP responses</h3>
+
+ <p>
+ This table implements DHCP responder for the DHCP replies generated by
+ the previous table.
+ </p>
+
+ <ul>
+ <li>
+ <p>
+ A priority 100 logical flow is added for the logical ports configured
+ with DHCPv4 options which matches IPv4 packets with <code>udp.src == 68
+ && udp.dst == 67 && 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_dhcp_opts</code> was successful.
+ </p>
+
+ <pre>
+eth.dst = eth.src;
+eth.src = <var>E</var>;
+ip4.dst = <var>O</var>;
+ip4.src = <var>S</var>;
+udp.src = 67;
+udp.dst = 68;
+outport = <var>P</var>;
+inport = ""; /* Allow sending out inport. */
+output;
+ </pre>
+
+ <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
+ the IPv4 address defined in the logical port's addresses column.
+ </p>
+
+ <p>
+ (This terminates ingress packet processing; the packet does not go
+ to the next ingress table.)
+ </p>
+ </li>
+
+ <li>
+ A priority-0 flow that matches all packets to advances to table 12.
+ </li>
+ </ul>
+
+ <h3>Ingress Table 12: Destination Lookup</h3>
<p>
This table implements switching behavior. It contains these logical
there are no rules added for load balancing new connections.
</p>
+ <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
+ <code>Ingress Table 11: DHCP responses</code>.
+ </p>
+
<h3>Egress Table 6: Egress Port Security - IP</h3>
<p>