[ovs-dev] [PATCH v4 0/4] Support native dhcp in ovn controller

Russell Bryant russell at ovn.org
Wed Mar 16 17:14:35 UTC 2016


On Wed, Mar 16, 2016 at 12:11 AM, Numan Siddique <nusiddiq at redhat.com>
wrote:

> On 03/16/2016 11:55 AM, Russell Bryant wrote:
>
> This is a fairly minor thing, but I'm wondering if the syntax of dhcp_offer
> { ... }; should be dhcp_offer(...); instead.
>
> Logical flows currently support:
>
>     next(<table>);
>     arp { action; ... };
>     icmp4 { action; ... };
>
> In the arp and icmp4 cases, we're executing a set of logical flow actions
> on a temporary replacement packet.  For "next", it's a parameter to "next",
> not something that could also be executed outside of the context of "next".
>
> Setting the offerip, router, and netmask seem more like parameters to a
> dhcp_offer action since they aren't actions that also make sense outside of
> "dhcp_offer".
>
> Thoughts?
>
>
> I thought about what you mentioned. Since there are many dhcp options and
> if we want to
> support extra dhcp options, We couldn't find a better way.
>
> With this approach, if CMS has set the below dhcp options in the
> Logical_Port.options
>   - "dhcp-opt-router=10.0.0.1", dhcp-opt-netmask=255.255.255.0",
> "dhcp-opt-mtu=1300", "dhcp-opt-dns=8.8.8.8,7.7.7.7",
>
> We could express this as "dhcp_offer{ offer_ip = 10.0.0.3; router =
> 10.0.0.1; netmask = 255.255.255.0; mtu = 1300; dns = 8.8.8.8, 7.7.7.7 ; }
> And the userdata would be stored as "
> 00.00.00.02.00.00.00.00.0a.00.00.03.03.04.0a.00.00.01.01.04.ff.ff.fe.00.1A.02.05.14.06.08.08.08.08.08.07.07.07.07".
>
> Please let us know if there is any better way to define this.
>

It could also be this:

dhcp_offer(offer_ip=10.0.0.3, netmask=255.255.255.0, mtu=1300,
dns={8.8.8.8, 7.7.7.7});

This is probably the least important detail, though.  We can always revisit
syntax later.  Sorry for the distraction.  :-)

-- 
Russell Bryant



More information about the dev mailing list