Tested-by: Ramu Ramamurthy <ramu.ramamur...@us.ibm.com> Numan, I tested this patch to work on devstack+ovn without the openstack-plugin, with manual configuration.
Notes: 1) In ovn/utilities/ovn-nbctl.c, usage() Can you add a help string to ovn-nbctl for the new command lswitch-get-dhcp-options, and lswitch-set-dhcp-options 2) When server_mac was not defined, the lflow was created like this, maybe the error checks can be tighter in ovn-northd.c table=3( ls_in_dhcp), priority= 50, match=(inport == "7fe086b5-9ab0-4c14-bf62-0291a62a4b14" && eth.src == fa:16:3e:cf:3d:bc && ip4.src == 0.0.0.0 && ip4.dst == 255.255.255.255 && udp.src == 68 && udp.dst == 67), action=(dhcp_offer(offerip = 10.0.1.3, netmask = 255.255.255.0, router = 10.0.1.1, mtu = 1400, server_id = 10.0.1.2, dns_server = {8.8.8.8,7.7.7.7}, lease_time = 43200); eth.dst = eth.src; eth.src = (null); ip4.dst = 10.0.1.3; ip4.src = 10.0.1.2; udp.src = 67; udp.dst = 68; outport = inport; inport = ""; /* Allow sending out inport. */ output;) The ovn-controller failed to parse the above flow at eth.src 2016-04-20T23:19:49Z|00070|lflow|WARN|error parsing actions "dhcp_offer(offerip = 10.0.1.2, netmask = 255.255.255.0, router = 10.0.1.1, mtu = 1400, server_id = 10.0.1.2, dns_server = {8.8.8.8,7.7.7.7}, lease_time = 43200); eth.dst = eth.src; eth.src = (null); ip4.dst = 10.0.1.2; ip4.src = 10.0.1.2; udp.src = 67; udp.dst = 68; outport = inport; inport = ""; /* Allow sending out inport. */ output;": Syntax error at `(' expecting constant. On Mon, Apr 18, 2016 at 10:29 AM, Numan Siddique <nusid...@redhat.com> wrote: > To support native dhcp in ovn > - A new column 'dhcp-options' is added in 'Logical_Switch' north db. > - A logical flow is added for each logical port to handle dhcp packets > if the CMS has defined dhcp options in this column. > > Eg. > action=(dhcp_offer(offerip = 10.0.0.2, router = 10.0.0.1, > server_id = 10.0.0.2, mtu = 1300, lease_time = 3600, > netmask = 255.255.255.0); eth.dst = eth.src; eth.src = 00:00:00:00:00:03; > ip4.dst = 10.0.0.2; ip4.src = 10.0.0.2; udp.src = 67; udp.dst = 68; > outport = inport; inport = ""; /* Allow sending out inport. */ output;) > > - ovn-controller will convert this logical flow to a packet-in OF flow with > 'pause' flag set. The dhcp options defined in 'dhcp_offer' action > are stored in the 'userdata' > > - When the ovn-controller receives the packet-in, it would frame a new > dhcp packet with the dhcp options set in the 'userdata' and resume > the packet. > > TODO: Test cases and updating the necessary documentation. > > Signed-off-by: Numan Siddique <nusid...@redhat.com> _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev