diff --git a/doc/plan.org b/doc/plan.org index b7e1c8b..c2d0e05 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -168,6 +168,26 @@ rtt min/avg/max/mdev = 0.053/0.074/0.095/0.021 ms Different checksum in most packets. +root@ubuntu:~/master-thesis# ip -6 neigh show +root@ubuntu:~/master-thesis# ip -6 neigh add 2001:db8:61::42 dev h1-eth0 lladdr 00:00:0a:00:00:42 +root@ubuntu:~/master-thesis# ip -6 neigh show +2001:db8:61::42 dev h1-eth0 lladdr 00:00:0a:00:00:42 PERMANENT +root@ubuntu:~/master-thesis# + +root@ubuntu:~/master-thesis# tcpdump -ni h1-eth0 +tcpdump: verbose output suppressed, use -v or -vv for full protocol decode +listening on h1-eth0, link-type EN10MB (Ethernet), capture size 262144 bytes +^C20:22:43.944152 IP6 2001:db8:61::1 > 2001:db8:61::42: ICMP6, echo request, seq 1, length 64 +20:22:43.945992 IP6 2001:db8:61::1 > 2001:db8:61::42: ICMP6, echo request, seq 1, length 64 +20:22:44.952453 IP6 2001:db8:61::1 > 2001:db8:61::42: ICMP6, echo request, seq 2, length 64 +20:22:44.953995 IP6 2001:db8:61::1 > 2001:db8:61::42: ICMP6, echo request, seq 2, length 64 + +4 packets captured +4 packets received by filter +0 packets dropped by kernel +root@ubuntu:~/master-thesis# + + ***** Hosts ****** Left side: IPv6 ****** Right side: IPv4 diff --git a/p4app/controller.py b/p4app/controller.py index 3db1087..ceb2801 100644 --- a/p4app/controller.py +++ b/p4app/controller.py @@ -143,7 +143,7 @@ class L2Controller(object): def debug_print_pkg(self, pkg, msg="INCOMING"): - log.info("{}: {}".format(msg, self.debug_format_pkg(pkg))) + log.debug("{}: {}".format(msg, self.debug_format_pkg(pkg))) def debug_format_pkg(self, pkg): packet = Ether(str(pkg)) @@ -169,6 +169,8 @@ class L2Controller(object): def recv_msg_cpu(self, pkg): packet = Ether(str(pkg)) + debug_print_pkg(pkg) + if packet.type == 0x800: pass elif packet.type == 0x86dd: diff --git a/p4src/static-mapping.p4 b/p4src/static-mapping.p4 index 64d8e73..9add5e2 100644 --- a/p4src/static-mapping.p4 +++ b/p4src/static-mapping.p4 @@ -16,6 +16,12 @@ control MyIngress(inout headers hdr, inout metadata meta, inout standard_metadata_t standard_metadata) { + /* use for debugging and controlling flows */ + action send_to_controller() { + clone3(CloneType.I2E, 100, meta); + } + + /********************** ADDRESS TABLES ***********************************/ action icmp6_answer() { @@ -41,10 +47,11 @@ control MyIngress(inout headers hdr, } actions = { icmp6_answer; + send_to_controller; NoAction; } size = ADDRESS_TABLE_SIZE; - default_action = NoAction; + default_action = send_to_controller; }