Create multicast groups for NDP support

This commit is contained in:
Nico Schottelius 2019-02-26 15:08:53 +01:00
parent 8ca0c7fdf4
commit 6895a6ab34
2 changed files with 27 additions and 0 deletions

View file

@ -74,6 +74,14 @@
***** TODO For other nodes -> multicast
***** TODO Maybe implement link local addresses (missing at the moment)
****** ff02::/??
****** rfc4861
"Neighbor Solicitation messages are multicast to the solicited-node
multicast address of the target address."
****** multicasting / groups
******* create a group ("node") that contains "all other" ports
******* create a multicast group with an ID
******* associate the "node" with the multicast group ID
**** TODO Make switch answer icmp6 echo request for
**** TODO Make switch answer icmp echo request for
**** TODO Add default route for v6 and v4 hosts
@ -213,8 +221,10 @@ DEBUG:main:INCOMING: <Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x
**** RFC 6586 for deployment experiences using Stateful NAT64.
**** RFC 7757 Explicit Address Mappings for Stateless IP/ICMP Translation
**** RFC 4443 ICMPv6 https://tools.ietf.org/html/rfc4443
**** RFC 4861: https://tools.ietf.org/html/rfc4861 Neighbor discovery
**** RFC 2460 IPv6 (Checksum https://tools.ietf.org/html/rfc2460#section-8.1)
**** EAMT/Jool: https://www.jool.mx/en/eamt.html
**** Solicited node multicast address https://en.wikipedia.org/wiki/Solicited-node_multicast_address
* Proposal / task description
** Task description for mystudies
*** High speed NAT64 with P4

View file

@ -86,6 +86,21 @@ class L2Controller(object):
# Now add global address
subprocess.call(["mx", host, "ip", "addr", "add", ipaddr, "dev", dev])
def init_ndp(self):
""" initialise neighbor discovery protocol"""
all_ports = range(1,5)
# create multicast nodes
for rid in range(1,5):
ports = [ x for x in all_ports if not x == rid ]
n_handle = self.controller.mc_node_create(rid, ports)
log.debug("Creating MC node rid={} ports={} handle={}".format(rid, ports, n_handle))
g_handle = self.controller.mc_mgrp_create(rid)
log.debug("Creating MC group mgrp={} handle={} && associating afterwards".format(rid, g_handle))
self.controller.mc_node_associate(g_handle, n_handle)
def init_boilerplate(self, sw_name):
self.topo = Topology(db="topology.db")
self.sw_name = sw_name
@ -98,6 +113,8 @@ class L2Controller(object):
if self.cpu_port:
self.controller.mirroring_add(100, self.cpu_port)
self.init_ndp()
def config(self):
self.fill_tables()
self.config_hosts()