[NDP] Begin to add multicast / NDP support

This commit is contained in:
Nico Schottelius 2019-02-26 15:30:47 +01:00
commit 72c600d8da
5 changed files with 35 additions and 2 deletions

View file

@ -89,6 +89,9 @@ class L2Controller(object):
def init_ndp(self):
""" initialise neighbor discovery protocol"""
# https://en.wikipedia.org/wiki/Solicited-node_multicast_address
ndp_prefix = "ff02::1:ff00:0/104"
all_ports = range(1,5)
# create multicast nodes
for rid in range(1,5):
@ -101,6 +104,12 @@ class L2Controller(object):
self.controller.mc_node_associate(g_handle, n_handle)
self.controller.table_clear("ndp")
for port in all_ports:
self.controller.table_add("ndp", "multicast_pkg", [ndp_prefix, port], [str(port)])
def init_boilerplate(self, sw_name):
self.topo = Topology(db="topology.db")
self.sw_name = sw_name