From 809110edc71a4edfec48814ac389fa1d5b453b30 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 19 Mar 2019 21:03:10 +0100 Subject: [PATCH] Debug print to controller by default, not dropping --- doc/plan.org | 40 +++++++++++++++++++++++++++++++++++++++- p4src/static-mapping.p4 | 3 ++- 2 files changed, 41 insertions(+), 2 deletions(-) diff --git a/doc/plan.org b/doc/plan.org index 99321f8..1074833 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -725,11 +725,49 @@ p4@ubuntu:~/master-thesis$ **** TODO Translate ipv6 --> ipv4 with a (freely programmable) prefix ***** DONE Insert prefix into switch: v6_networks ***** TODO Support multiple ipv6 source networks: need new table w/ 2 keys! -> later -***** TODO Write test.py to generate correct destination packets +***** DONE Write test.py to generate correct destination packets >>> a = ipaddress.ip_network("2001:db8::/32") >>> b = ipaddress.ip_address("10.0.0.1") >>> a[int(b)] IPv6Address('2001:db8::a00:1') +***** Using test.py, new NDP packets been seen, bur zero icmp on the outgoing side +p4@ubuntu:~/master-thesis/p4app$ python test.py --method v6_static_mapping --debug +INFO:main:Trying to reach 10.0.0.1 (64:ff9b::a00:1) from h1 +sudo: unable to resolve host ubuntu +PING 64:ff9b::a00:1(64:ff9b::a00:1) 56 data bytes + +--- 64:ff9b::a00:1 ping statistics --- +1 packets transmitted, 0 received, 100% packet loss, time 0ms + +p4@ubuntu:~/master-thesis/p4app$ +\x00\x00\x00 :\xff\xfe\x80\x00\x00\x00\x00\x00\x00\x02\x00\n\xff\xfe\x00\x00\x01 \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00B\x87\x00\x08+\x00\x00\x00\x00 \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00B\x01\x01\x00\x00\n\x00\x00\x01' |>> +DEBUG:main:cpu = > +DEBUG:main:reassambled=>>> +DEBUG:main:INCOMING: > +DEBUG:main:cpu = > +DEBUG:main:reassambled=>>> +DEBUG:main:INCOMING: > +DEBUG:main:cpu = > +DEBUG:main:reassambled=>>> + +***** TODO Debug why neighbor discover does not work anymore +p4@ubuntu:~$ mx h1 tcpdump -lni any +sudo: unable to resolve host ubuntu +tcpdump: verbose output suppressed, use -v or -vv for full protocol decode +listening on any, link-type LINUX_SLL (Linux cooked), capture size 262144 bytes + +19:57:53.258805 IP6 fe80::200:aff:fe00:1 > ff02::1:ff00:42: ICMP6, neighbor solicitation, who has 2001:db8::42, length 32 +19:57:54.256924 IP6 2001:db8::1 > 2001:db8::1: ICMP6, destination unreachable, unreachable address 64:ff9b::a00:1, length 112 + +EBUG:main:INCOMING: > +DEBUG:main:cpu = > +DEBUG:main:reassambled=>>> +INFO:main:Doing neighbor solicitation +DEBUG:main:OUTGOING: >>> +DEBUG:main:INCOMING: >>> +****** Do we have a routing for fe80::/10? Probably not. Shouldn't we see it in the controller then? +****** TODO Implement address learning? + ***** TODO Implement the calculation ***** TODO Sketch the flow for session handling for icmp6 w/o packet loss diff --git a/p4src/static-mapping.p4 b/p4src/static-mapping.p4 index 26eb6c9..d3556ef 100644 --- a/p4src/static-mapping.p4 +++ b/p4src/static-mapping.p4 @@ -249,7 +249,8 @@ control MyIngress(inout headers hdr, NoAction; } size = ROUTING_TABLE_SIZE; - default_action = NoAction; +// default_action = NoAction; + default_action = controller_debug; } table v4_networks {