From 8ca0c7fdf42ecc483af76eed3d2efb0567cf6090 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 24 Feb 2019 20:13:42 +0100 Subject: [PATCH] [controller] Add support in hosts for link local --- doc/plan.org | 13 ++++++++++++- p4app/controller.py | 6 ++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/plan.org b/doc/plan.org index c2d0e05..a266c93 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -16,6 +16,8 @@ | | | | | | egress routing | x | | | | | +| 2019-02-24 | non reliable neighbor entries / flushing addresses puts into failed | | +| | | | | | | | | 2019-02-28 | Meet Laurent #2 | | | | - Parser for all protocols (udp,tcp,icmp,icmp6) | | @@ -66,7 +68,12 @@ **** DONE Parse icmp **** DONE Parse icmpv6 **** DONE Add (static) egress configuration -**** TODO Calculate ICMP6 checksums +**** DONE Calculate ICMP6 checksums +**** TODO Implement minimal neighbor discovery +***** TODO For the switch +***** TODO For other nodes -> multicast +***** TODO Maybe implement link local addresses (missing at the moment) +****** ff02::/?? **** 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 @@ -186,6 +193,10 @@ listening on h1-eth0, link-type EN10MB (Ethernet), capture size 262144 bytes 4 packets received by filter 0 packets dropped by kernel root@ubuntu:~/master-thesis# +***** When pinging we see +DEBUG:main:INCOMING: >>> +DEBUG:main:INCOMING: >>> +DEBUG:main:INCOMING: >>> ***** Hosts diff --git a/p4app/controller.py b/p4app/controller.py index 3131d84..5a1d1a8 100644 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -78,6 +78,12 @@ class L2Controller(object): subprocess.call(["mx", host, "ip", "addr", "flush", "dev", dev]) subprocess.call(["mx", host, "sysctl", "net.ipv6.conf.lo.disable_ipv6=0"]) subprocess.call(["mx", host, "sysctl", "net.ipv6.conf.{}.disable_ipv6=0".format(dev)]) + + # Set down & up to regain link local address + subprocess.call(["mx", host, "ip", "link", "set", dev, "down"]) + subprocess.call(["mx", host, "ip", "link", "set", dev, "up"]) + + # Now add global address subprocess.call(["mx", host, "ip", "addr", "add", ipaddr, "dev", dev]) def init_boilerplate(self, sw_name):