This serial patches try to support Stateless Address Autoconfiguration (SLAAC)
for IPv6, via Router Solicitation (RS) responder, who will reply Router
Advertisement (RA) message for received RS 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 Logical_Switch.other_config new key-pair 'mtu=N', while N should be a
valid MTU for IPv6(per RFC2460, consider 1280 as minimum MTU.)
- 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,
- set Logical_Router_Port.slaac column to true.
Then, next time VM/VIF sends RS packet, RA packets 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 lr_in_rs_rsp(20) to work as RS
responder, with:
- match: inport == "a-lrp-port-name" && ip6.dst == ff02::2 && nd_rs
(nd_rs: icmp6.type == 133 && icmp6.code == 0 && ttl == 255)
- action: nd_ra{slaac(fa:16:3e:32:3c:e0,1450,fdad:a0f9:a012::/64,...);
outport = inport; flags.loopback = 1; output;};
(nd_ra is a new action which will compose a RA packet to respond a RS
packet.
slaac is a new action which has the following parameters to tell
ovn-controller to compose RA packet with SLAAC flags, with these
parameters:
- LLA: router port link-layer address, such as fa:16:3e:32:3c:e0.
- MTU: logical switch MTU, such as 1450.
- IPv6 prefix(es): such as fdad:a0f9:a012::/64.
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.
LI Zong Kai (3):
ovs packet: add compose RA packet support
ovn-controller: add RS responder for SLAAC
ovn-northd: add RS responder for SLAAC
include/ovn/actions.h | 15 +++++
include/ovn/expr.h | 4 ++
lib/flow.c | 26 ++++----
lib/odp-execute.c | 20 +++---
lib/packets.c | 168 ++++++++++++++++++++++++++++++++++++++--------
lib/packets.h | 86 ++++++++++++++++++++----
ovn/controller/pinctrl.c | 169 +++++++++++++++++++++++++++++++++++++++++++++++
ovn/lib/actions.c | 73 ++++++++++++++++++++
ovn/lib/expr.c | 27 ++++++++
ovn/lib/logical-fields.c | 11 ++-
ovn/northd/ovn-northd.c | 93 ++++++++++++++++++++++++--
ovn/ovn-nb.ovsschema | 5 +-
ovn/ovn-nb.xml | 11 +++
ovn/ovn-sb.xml | 30 ++++++++-
tests/ovn.at | 116 +++++++++++++++++++++++++++++++-
15 files changed, 781 insertions(+), 73 deletions(-)
--
1.9.1
_______________________________________________
dev mailing list
[email protected]
http://openvswitch.org/mailman/listinfo/dev