[controller] Add support in hosts for link local

This commit is contained in:
Nico Schottelius 2019-02-24 20:13:42 +01:00
parent a420c7e6d8
commit 8ca0c7fdf4
2 changed files with 18 additions and 1 deletions

View file

@ -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: <Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x86dd |<IPv6 version=6 tc=0 fl=0 plen=32 nh=ICMPv6 hlim=255 src=2001:db8:61::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0xd343 res=0 tgt=2001:db8:61::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:INCOMING: <Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x86dd |<IPv6 version=6 tc=0 fl=0 plen=32 nh=ICMPv6 hlim=255 src=2001:db8:61::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0xd343 res=0 tgt=2001:db8:61::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:INCOMING: <Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x86dd |<IPv6 version=6 tc=0 fl=0 plen=32 nh=ICMPv6 hlim=255 src=2001:db8:61::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0xd343 res=0 tgt=2001:db8:61::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
***** Hosts

View file

@ -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):