From: Zongkai LI <zealo...@gmail.com> This serial patches try to support Stateless Address Autoconfiguration(SLAAC) for IPv6, via Router Solicitation (RS) message responder, which will reply Router Advertisement (RA) message.
User case: After this serial patches, a user can follow the following steps to let all VMs/VIFs on a logical switch has IPv6 prefix/CIDR, configure their IPv6 addresses automatically: - add MTU "mtu=VAL" into Logical_Switch.other_config column, - add lsp and lrp for Logical_Switch to make it attached onto a router, the lsp and lrp should have IPv6 prefix/CIDR in their addresses and networks columns, Then, next time VM/VIF sends Router Solicitation (RS) message, a RA packet will be replied by ovn-controller. When VM/VIF receives that RA packet, it can configure its IPv6 address(es) and route(s) via that RA packet. There will be logical flows in table ls_in_ra_rsp(28) to work as RA responder, with: - match: ip6.dst == ff02::2 && nd_rs (nd_rs: icmp6.type == 133 && icmp6.code == 0 && ttl == 255) - action: nd_ra{put_nd_ra(64,0,10800,0,0); put_nd_ra_opt_sll(12:34:56:78:9a:bc); put_nd_ra_opt_mtu(1450); put_nd_ra_opt_prefix(64,192,10800,10800,fdad:a0f9:a012::); eth.src = 12:34:56:78:9a:bc; ip6.src = fe80::f334:56ff:fe78:9abc; outport = inport; flags.loopback = 1; output;}; (nd_ra is a new action which stands for RS responder; put_nd_ra is a new specific inner action for nd_ra to set cur_hop_limit, "Managed address configuration" and "Other configuration" flags, router lifetime, reachable time and retrans timer in RA packet; put_nd_ra_opt_sll is a new specific inner action for nd_ra to append Source Link-layer Address Option for RA message with given ethernet address, such as 12:34:56:78:9a:bc; put_nd_ra_opt_mtu is a new specific inner action for nd_ra to append MTU Option for RA message with given integer value, such as 1450; put_nd_ra_opt_prefix is a new specific inner action for nd_ra to append Prefix Information Option for RA message with inner parameters. The inner parameters will set prefix length, on-link flag and autonomous address-configuration flag, valid lifetime, preferred lifetime, prefix in Prefix Information Option. After a RA packet is composed, the left nested actions will make RA packet transmitted back to the inport, where Router Solicitation (RS) packet comes. Zongkai LI(6): ovs.packets: add compose_nd_ra and packet_put_ra_*_opt support ovn.lib: update logical-fields for ND ovs.lib.flow: extend is_nd for all ND messages types ovn-controller: add 'nd_ra' action against 'nd_na' action ovn-controller: add 'put_nd_ra' and 'put_nd_opt_*' actions support ovn-northd: add flow support for SLAAC include/ovn/actions.h | 86 ++++++++++++++- lib/flow.c | 26 ++--- lib/flow.h | 5 +- lib/nx-match.c | 4 +- lib/odp-execute.c | 20 ++-- lib/odp-util.c | 6 +- lib/packets.c | 168 ++++++++++++++++++++++++----- lib/packets.h | 80 +++++++++++--- ovn/controller/pinctrl.c | 217 +++++++++++++++++++++++++++++++++---- ovn/lib/actions.c | 269 +++++++++++++++++++++++++++++++++++++++++++++- ovn/lib/logical-fields.c | 21 +++- ovn/northd/ovn-northd.c | 97 +++++++++++++++-- ovn/ovn-nb.ovsschema | 5 +- ovn/ovn-nb.xml | 11 ++ ovn/ovn-sb.xml | 85 ++++++++++++++- ovn/utilities/ovn-trace.c | 23 ++-- tests/ovn.at | 134 ++++++++++++++++++++++- 17 files changed, 1149 insertions(+), 108 deletions(-) -- 1.9.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev