You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9475 lines
485 KiB

* DONE Time table / log
CLOSED: [2019-08-12 Mon 17:01]
| When? | What? | Notes |
| 2019-02-21 | Kick-Off | x |
| | Finish all admin points | x |
| | Know when/how to coordinate | x |
3 years ago
| | | |
| 2019-02-21 | Clarifications Ueli Maurer (Mentor) | x |
| | Write mail / phone | x |
3 years ago
| | | |
| 2019-02-22 | Have all papers handed in | |
| | | |
| 2019-02-22 | Have rough definition of tasks | x |
| | | |
3 years ago
| 2019-02-23 | python2 / ipaddress is buggy / has unicode problems | x |
| | | |
| | p4utils is python2 only support | |
| | bmpy_utils is not installable with pip | |
| | python2 / latest ipaddress==1.0.22 still has the bug | |
| | ipaddress.ip_network("2001:db8:61::/64") | |
| | IPv6Network(u'3230:3031:3a64:6238:3a36:313a:3a2f:3634/128') | |
| | | |
| | egress routing | x |
| | | |
| 2019-02-24 | non reliable neighbor entries / flushing addresses puts into failed | |
| | | |
| | | |
3 years ago
| 2019-02-28 | Meeting Laurent | |
| | - Status | |
| | * Setup base code | |
| | * Parser for all protocols (udp,tcp,icmp,icmp6) | |
| | * Started with icmp translation | |
| | * Investigating into IPv6 based checksums | |
| | * Reading into various RFCs, NDP, MLD | |
| | * Reading about multicast / trying to figure out dynamic membership | |
| | | |
| | - Challenges | |
| | * Some issues with python2 (ipaddr) - slowing down | x |
| | https://github.com/phihag/ipaddress/issues/46 | |
| | * Forwarded and received icmp6 packets are not "accepted" | |
| | | |
| | - Questions | |
| | * Multicast: in controller | x |
| | * Re-using code (lee howard) -> ok & mention | x |
| | * A lot of redundant code / different tables / repeating: use if's | x |
| | * 65k parsing is insane | x |
| | | |
| | - Next steps: | |
| | * Supporting MLD | |
| | * Save stuff in the controller | |
| | * checkout ipaddr bug / status | |
| | * Variable length / icmp6 in the controller | |
| | * Go simple... | |
| | * Meeting Edgar & Alexander week after | |
| | * Summary on Slack | |
| | * 1130 meeting now | |
| | | |
| | | |
| 2019-03-01 | Feature list / priority list / roadmap clear | x |
| | Joining P4 Slack | |
| | | |
| 2019-03-03 | icmp6 revised: | |
| | - add address to table for forwarding to controller | x |
| | - select correct format for forwarding | |
| | - decode in controller | |
| | - send back to switch | |
| | - test with host | |
| | | |
| 2019-03-06 | Meet Laurent #3 | |
| | - Checksum's in scapy | x |
| | - Python2 ipaddress fix (import future) | x |
| | - Added custom package format / additional information in packet | x |
| | - (partial) NDP working in controller | x |
| | - P4 checksum_with_payload | x |
| | - Reading scapy / inet6 | x |
| | - Further checksum tests -> required everywhere in IPv6 | x |
| | - icmp6 echo request working in controller | x |
| | - Hosts can ping6 the switch | x |
| | - Ran into P4 casting bug: https://github.com/p4lang/p4c/issues/1765 | x |
| | -> seems to be more than just casting bug | x |
| | - Default route for ipv6 hosts | x |
| | | |
| | Next target: | |
| | - Focus on enabling the "Internet" with ICMP6 translation | x |
| | | |
| | Next steps: | |
| | - Investigate again into checksumming with payload in P4 | x |
| | - Answering icmp6 echo request *in* in the switch | x |
| | - Translate icmp6 to icmp | x |
| | - Translate icmp to icmp6 | |
| | - Multiple branches: | x |
| | * Work on checksumming / p4 | x |
| | * Work on metadata passing / p4 | x |
| | * Work on static mapping (w/ incorrect checksum) 1:1 | |
| | * v1model/ | |
| | | |
| | Notes: | |
| | * Edgar back on Friday // check tofino checksumming | |
| | * Bugs mentioning in thesis | |
| | * Maybe run static mapping on tofino / p4_14 | |
| | * Tofino p4_16: alpha compiler | |
| | * Send recap / mail next week | |
| | * week after 1130 Thursday | |
| | | |
| 2019-03-07 | ICMP6 checksumming works!!! | x |
| | -> more fields needed to be included! | |
| | | |
| 2019-03-13 | Tried/trying to get vagrant VM or P4* running on the notebook | |
| | | |
| 2019-03-14 | NAT64 static rewrite | x |
| | - table support | |
| | - checksum not yet ported for translations | |
| | - how to get mask from lpm table match? | |
| | - how to get network from lpm match? | |
| | - Create p4lang/p4-spec bug | |
| | https://github.com/p4lang/p4-spec/issues/745 | |
| | | |
| 2019-03-21 | Meet Laurent #4 - post poned - sick | x |
| | https://github.com/p4lang/p4-spec/issues/660 sizeof() missing | |
| | | |
| | - Need to introduce new headers | |
| | - Might need deeper parsing for icmp6_ns | |
| | - Need hwaddr in icmp6_na | |
| | - Need to find out how to handle imcp6 options after target address | |
| | | |
| 2019-03-23 | Parsing down to link layer option | x |
3 years ago
| | Parsing on wrong field detected by unset fields in wireshark | |
| | Correcting parser->leads to incorrect checksum | |
| | - NDP is answered to, but icmp6 echo request isn't -> extend table | |
| | | |
| | Problem with multiple LPM keys in table | |
| | - logical problem, overlapping length matches | |
| | - priority / ordering would be helpful | |
| | | |
| | | |
| 2019-03-25 | | x |
| | Writing down double LPM problem | |
| | Removing source network support, documenting limitation | |
| | Rewriting code to use multiple NAT64 destinations | |
| | New test.py v6_static_mapping tests | |
| | | |
| | Again checksum errors in NDP answer | |
3 years ago
| | Added debug code to send table ID towards controller | |
3 years ago
| | | |
| 2019-03-26 | | x |
| | Find out where packet is stuck | |
| | | |
| 2019-03-27 | | |
| | switch cannot be used in actions! | |
3 years ago
| | Refactor program to use multiple tables instead of switch | |
| | Ethernet frame check sequence error | |
| | | |
| 2019-03-28 | Meet Laurent #4 | |
| | - Router solicitation for finding router on startup | |
| | - test.py for TDD | |
| | - Parsing icmp6 is not enough - one layer deeper | |
| | - No LPM priorities | |
| | - if/switch action logic | |
| | - partial translation working to IPv4 | |
| | - Focus on checksumming work (again) | |
| | | |
| | | |
| | Notes: | |
| | - Later using ternary matching | |
| | - Document (nested) if's in action (in thesis) | |
| | - SW and HW Targets Tofino [Albert, Thomas] | |
| | - P414/P416 for Tofino? | |
| | - Barefoot support/question: Ticket/Support System | |
| | - Can try P416 compiler | |
| | - Next week Laurent not around: send email + Albert/Thomas/Edgar meeting | |
| | | |
3 years ago
| 2019-03-30 | | |
| | Refactoring code | |
| | Hitting expression bug | |
| | Translating TO icmp4 works! | |
3 years ago
| | | |
3 years ago
| 2019-04-02 | | |
| | ARP egress support | |
| | | |
| 2019-04-03 | | |
| | ARP corrections -- ARP working for the switch! | x |
| | ICMP w/ incorrect checksum | x |
| | ICMP w/ correct checksum - PING REPLIES!!! | x |
| | Next: check / verify / translate nat46 | |
| | | |
| | | |
| 2019-04-04 | | |
| | Report [no meeting w/ Laurent] | |
| | | |
| | Added arp handling | |
| | Added icmp handling | |
| | Need to setup hardware addresses -> in theor resolution -> hardcoded atm | |
| | | |
| | | |
| 2019-04-04 | NAT64 1:1 table ICMP, ICMPv6 working | x |
| | Will need some switch local ip addresses | x |
| | | |
| 2019-04-11 | PLAN: NAT64 1:1 table UDP working | |
| | checksums in both directions | |
3 years ago
| | | |
| 2019-04-11 | | |
| | Meeting Laurent | |
| | | |
| | Status: | |
| | - Minimal ARP working (for the switch address) | |
3 years ago
| | | |
| | - echo ping/request icmp<->icmp6 working | |
3 years ago
| | - udp_v6->udp_v4 working | |
| | - tcp_v6->tcp_v4 working | |
| | - udp_v4->udp_v6 working | |
| | - tcp_v4->udp_v6 working | |
| | | |
| | | |
| | Next steps: | |
3 years ago
| | - Hardware | |
| | - icmp++ | |
| | - pmtu | |
| | - sessions main step | |
| | | |
| | Notes: | |
| | - broadcast link only | |
| | - About 2w delivery time | |
| | - Get in touch with Tobias | |
| | - Scalability analysis -> how many connections/connections/s | |
| | - Forwarding information in tables | |
| | - Hendrik: semester thesis / NetPFGA | |
| | - Tobias: advising Hendrik / Netpfga | |
| | | |
| | | |
3 years ago
| 2019-04-18 | PLAN: NAT64 1:1 table TCP/UDP working | x |
| | | |
3 years ago
| 2019-04-23 | | |
| | Meet Laurent | |
3 years ago
| | | |
| | General | |
| | - Get a better understanding of what others did | |
| | | |
3 years ago
| | Review docs / specs | |
| | - Jool EAMT/SIIT fully | |
| | | |
3 years ago
| | - IPv4 embedding | |
| | * Motivation/objective: working with real world DNS64 | |
3 years ago
| | * RFC6052 suffix support | |
| | * RFC4291 IPv4-Compatible IPv6 Address (16 0s) | |
| | * RFC4291 IPv4-Mapped IPv6 Address (16 1s) | |
| | | |
| | - Session handling | |
| | * RFC6145: Translation ip/icmp, obsoleted by RFC 7915 | x |
| | * RFC6146: NAT64 definition, only TCP, UDP, and ICMP traffic | |
| | * RFC6052: embedding support | |
| | * Mode: IPv6 outgoing -> "masquarading" | |
| | * Mode: IPv4 | |
| | | |
| | - Translation details | |
| | * How to handle ICMP4->icmp6 correctly (RFC7915) | x |
| | | |
| | - Hardware | |
| | * NetFPGA | |
| | * Hardware machine for software comparison? | |
| | | |
| | | |
| | New todos: | |
| | | |
| | - Translate fragment header | |
| | - Support MTU / packet too big | |
| | - Support PMTU, tcp mss | |
| | | |
| | | |
| | Meeting notes | |
| | - difference based | x |
| | - first physical access | |
| | - tofino: if it compiles -> line rate | |
| | - chaining switches / OS -> single port rate | |
| | - netpfga | |
| | - reason about what in hardware and what in software -> reason tradeoff | !!! |
| | - table gets full | |
| | | |
| | | |
| | Follow up: | |
| | | |
| | - what's the MTU of an interface? have a table | |
| | - have port/mtu | |
| | - total packeth length -> from IP | |
| | - tables not in data plane | |
| | - Meeting Hendrik | |
| | - Meeting Kamila | |
| | | |
| | | |
| | - 768k | |
| | | |
3 years ago
| | | |
| | | |
| 2019-05-02 | Jool SIIT / range / offset support https://www.jool.mx/en/run-vanilla.html | x |
| | Jool EAMT support https://www.jool.mx/en/run-eam.html | |
| | Bidirectional support | |
| | Will need IPv6 embedding suport https://tools.ietf.org/html/rfc6052 | |
| | | |
| 2019-04-18 | NAT64 prefix based IPv6->IPv4 conversion [tayga] | x |
| | Use case: IPv6 hosts send to specific /96 | |
| | | |
| 2019-05-23 | NAT64 dynamic pool implementation: n:1 ipv6 to ipv4 mapping | x |
| | And n:1 stateful mappings https://www.jool.mx/en/run-nat64.html | x |
| | Needs active controller | x |
| | Needs timeout / leases | x |
| | Might work w/ registers | |
3 years ago
| | | |
3 years ago
| 2019-06-16 | | |
| | Laurent meeting | |
| | | |
| | - Vivado installation: silent errors, infinite loop, missing libncurses5 | x |
3 years ago
| | | |
| | - Compiling netfpga: 82k lines of code that are interdependent | x |
| | - Many non critical error messages on the way | |
| | - Zero exit fatal errors | |
3 years ago
| | | |
| | - Code is not persistent in flash -> not there after power down | |
| | | |
3 years ago
| | - Not Receiving | |
3 years ago
| | - tcpdump on local nfX doesn't work -> can only debug on other endpoint | |
| | | |
| | - Writing tables fails | |
| | | |
3 years ago
| | - Output all ports -> unclear how test data should look like | |
| | - Found out broad/multicasting in theory -> bitmask | |
3 years ago
| | | |
3 years ago
| | - HW test | |
| | * compiling for 3 days | |
| | * Execution fails due to missing djtgcfg | x |
3 years ago
| | | |
| | Payload to control plane | |
| | - digest not possible due to missing content | |
3 years ago
| | - might work with working | |
| | | |
| | Next steps: | |
| | - Debug ioctl errors when writing table entries | x |
3 years ago
| | | |
| | - Understand HDL or PX user engines for writing checksum part | x |
3 years ago
| | - Adjust controller to digest | |
| | | |
| | HDL notes | |
| | - cycle limitations | |
| | - variable length might be a problem | x |
3 years ago
| | | |
| | Next steps after discussion: | |
| | | |
| | - checkout ipv6 test on netpfga / modify v6 packet | |
| | - checkout whether diff is possible on checksum -> see ttl | x |
3 years ago
| | - checkout externs of Hendrik / report | |
| | - Asses checksum difficulty | x |
3 years ago
| | | |
| | Handing in thesis: | |
| | | |
| | - Email pdf | |
| | - code on github | |
| | - tar.gz of the code | |
| | | |
| | - Decleration of -> from tobias | |
| | - Week after: presentation | |
| | | |
| | | |
| | - 15m talk | |
| | - 15m q&a | |
| | | |
| | | |
| 2019-06-24 | | |
| | Laurent meeting | |
| | | |
| | Checksums | |
| | - 16 bit sum of fields, later one/two complement | |
| | - various implementations | |
| | - is a sum -> commutative law | |
| | - overflow (delta > payload) handling unclear | |
| | | |
| | Netpfga | |
| | - Old one had several failure messages (one in DDR area) | x |
| | - New one: tables can be written | x |
| | - Need 3 ports: v4, v6, management | x |
| | | |
| | Next steps: | |
| | - Test checksums delta on software switch | |
| | - Begin to port code to netpfga one-by-one | |
| | | |
| | Follow up notes: | |
| | - Checkout Hendrik thesis / right / left shift | |
| | - Fix computer in lab | |
| | | |
| | | |
| 2019-06-27 | | |
| | Target Hardware: code running | |
| | | |
| 2019-07-01 | | |
| | Meeting Laurent | |
| | | |
| | - Diff'ing in python: | x |
| | * offsetting works | |
| | * Need to adjust to actual translation code | |
| | | |
| | - Phasing in netpfga code / copy & compile & fix | |
| | * Code structure w/o apply logic | |
| | * DIFF: Output port selection | x |
| | * DIFF: Sending to CPU | |
| | | |
| | - Diff'ing in P4 | |
| | * IPv4 checksum is w/o payload | x |
| | | |
| | - Different generated output | |
| | | |
| | Next steps: | |
| | - Implement in BMV2 diff | |
| | - Checksum assignment / calc phase not clear | |
| | - Check if action has to be used | |
| | - Check if ifdef makes a difference | |
| | - Defense: list of dates | |
| | | |
| | - iperf (alternative: hping) -> test on production setup | |
| | | |
| | Late tests: | |
| | - Performance tests | |
| | - Extra things | |
| | - Maybe compile to openvswitch | |
| | | |
| 2019-07-06 | | |
| | Test case for delta in P4/BMV2: | x |
| | | |
| | | |
| | | |
| | | |
3 years ago
| 2019-07-11 | | |
| | Meeting Laurent | |
| | | |
| | - Delta diff in P4 from v4 -> v6: checksum working, off by one error | x |
| | -> assume overflow | |
| | -> very likely | |
| | | |
| | - Investigating why NDP doesn't work | |
| | | |
| | - compile to netpfga: silent errors | |
| | - netpfga: icmp6/ndp might not work => shifting back to controller | |
| | - network card | |
| | | |
3 years ago
| | Integrated org-documentation into latex / export working | |
| | https://bastibe.de/2014-09-23-org-cite.html | |
| | http://viveks.info/org-mode-academic-writing-bibliographies-org-ref/ | |
| | https://github.com/jkitchin/org-ref | |
| | | |
| | | |
| 2019-07-25 | Benmarking results between P4, Jool, Tayga | x |
| | Real hardware of advantage | |
| | | |
3 years ago
| | | |
| | | |
| 2019-08-01 | Latest start writing documentation | |
3 years ago
| | | |
| | | |
| 2019-08-21 | hand in thesis | |
3 years ago
| | | |
3 years ago
* DONE Thesis implementation
CLOSED: [2019-08-15 Thu 13:46]
3 years ago
** DONE Setup test VM for P4: 2a0a:e5c0:2:12:400:f0ff:fea9:c3e3
** DONE Get feature list of jool
** DONE Get feature list of tayga
** DONE Setup P4 base / structure
** DONE Create minimal controller for populating tables
** DONE Checkout / review egress settings
** DONE Create Basis to translate ipv6 --> ipv4 with a (freely programmable) prefix; test ping6_switch
*** DONE Insert prefix into switch: v6_networks
*** DONE Support multiple ipv6 source networks: need new table w/ 2 keys! -> not at the moment
*** 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')
3 years ago
*** DONE 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 = <CpuHeader task=ICMP6_GENERAL ingress_port=1 type=0x86dd |<Raw load='`\x00\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:reassambled=<Ether dst=00:00:0a: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=fe80::200:aff:fe00:1 dst=2001:db8::42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x82b res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:INCOMING: <Ether dst=00:00:0a:00:00:42 src=00:00:0a:00:00:01 type=0x4242 |<Raw load='\x00\x02\x00\x01\x86\xdd`\x00\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 = <CpuHeader task=ICMP6_GENERAL ingress_port=1 type=0x86dd |<Raw load='`\x00\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:reassambled=<Ether dst=00:00:0a: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=fe80::200:aff:fe00:1 dst=2001:db8::42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x82b res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:INCOMING: <Ether dst=00:00:0a:00:00:42 src=00:00:0a:00:00:01 type=0x4242 |<Raw load='\x00\x02\x00\x01\x86\xdd`\x00\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 = <CpuHeader task=ICMP6_GENERAL ingress_port=1 type=0x86dd |<Raw load='`\x00\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:reassambled=<Ether dst=00:00:0a: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=fe80::200:aff:fe00:1 dst=2001:db8::42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x82b res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
3 years ago
*** DONE Debug why neighbor discover does not work anymore
**** log
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: <Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x4242 |<Raw load='\x00\x01\x00\x01\x86\xdd`\x00\x00\x00\x00 :\xff\xfe\x80\x00\x00\x00\x00\x00\x00\x02\x00\n\xff\xfe\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x007\xdf\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 = <CpuHeader task=ICMP6_NS ingress_port=1 type=0x86dd |<Raw load='`\x00\x00\x00\x00 :\xff\xfe\x80\x00\x00\x00\x00\x00\x00\x02\x00\n\xff\xfe\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x007\xdf\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:reassambled=<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=fe80::200:aff:fe00:1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x37df res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
INFO:main:Doing neighbor solicitation
DEBUG:main:OUTGOING: <Ether dst=00:00:0a:00:00:01 src=00:00:0a:00:00:42 type=0x86dd |<IPv6 nh=ICMPv6 hlim=255 src=2001:db8::42 dst=fe80::200:aff:fe00:1 |<ICMPv6ND_NA cksum=None R=0 S=1 tgt=2001:db8::42 |<ICMPv6NDOptDstLLAddr lladdr=00:00:0a:00:00:42 |>>>>
DEBUG:main:INCOMING: <Ether dst=00:00:0a:00:00:01
src=00:00:0a:00:00:42 type=0x86dd |<IPv6 version=6 tc=0 fl=0 plen=32
nh=ICMPv6 hlim=255 src=2001:db8::42
dst=fe80::200:aff:fe00:1 |<ICMPv6ND_NA type=Neighbor Advertisement
code=0 cksum=0xa5e9 R=0 S=1 O=1 res=0x0
tgt=2001:db8::42 |<ICMPv6NDOptDstLLAddr type=2 len=1
lladdr=00:00:0a:00:00:42 |>>>>
After removing noise:
DEBUG:main:reassambled=<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=fe80::200:aff:fe00:1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x37df res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:reassambled=<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=fe80::200:aff:fe00:1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x37df res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:reassambled=<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::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x13a7 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:reassambled=<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::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x13a7 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:reassambled=<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::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x13a7 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
3 years ago
**** Do we have routing for fe80::/10? Probably not. Shouldn't we see it in the controller then?
**** NDP is controller only!
*** DONE Finish NDP in switch
**** DONE Need to set R/S/O bits
**** DONE Need to parse R/S/O bits
*** DONE Maybe merge v6_address and v6_networks - /128 is the same
*** DONE Implement address learning? -> not at the moment
*** DONE Not sure whether we should react on router solicitation -> not at the moment
- Using static routes -> should do the job
*** DONE Implement the calculation
Currently offset + ip address
3 years ago
*** DONE Sketch the flow for session handling for icmp6 w/o packet loss
- switch receives icmp6 packet for known prefix
- controller needs to create session entry (?)
Not sure what I meant to do here - closing.
3 years ago
*** DONE Create table entry for mapping v4->v6 [net]
*** DONE Create table entry for mapping v6->v4 [net]
** DONE Implement ICMP <-> ICMP6 translation
*** DONE 2019-02-28 / icmp testing / first NDP steps
**** DONE pinging in router mode: nothing shown in the controller, multicast forwarded -> "ok"
root@ubuntu:~/master-thesis/p4app# ping6 -c1 2001:db8:61::42
PING 2001:db8:61::42(2001:db8:61::42) 56 data bytes
From 2001:db8:61::1 icmp_seq=1 Destination unreachable: Address unreachable
--- 2001:db8:61::42 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
root@ubuntu:~/master-thesis/p4app#
sudo: unable to resolve host ubuntu
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on h1-eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
09:47:07.191569 IP6 2001:db8:61::1 > ff02::1:ff00:42: ICMP6, neighbor solicitation, who has 2001:db8:61::42, length 32
09:47:08.190331 IP6 2001:db8:61::1 > ff02::1:ff00:42: ICMP6, neighbor solicitation, who has 2001:db8:61::42, length 32
09:47:09.190279 IP6 2001:db8:61::1 > ff02::1:ff00:42: ICMP6, neighbor solicitation, who has 2001:db8:61::42, length 32
**** DONE special rule for ff02::1:ff00:42
Semi works, replies are there, but host still retries:
p4@ubuntu:~/master-thesis$ h=1; mx h$h tcpdump -lni h$h-eth0
sudo: unable to resolve host ubuntu
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on h1-eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
09:58:04.786979 IP6 2001:db8:61::1 > ff02::1:ff00:42: ICMP6, neighbor solicitation, who has 2001:db8:61::42, length 32
09:58:04.793560 IP6 2001:db8:61::42 > 2001:db8:61::1: ICMP6, neighbor advertisement, tgt is 2001:db8:61::42, length 32
09:58:05.786311 IP6 2001:db8:61::1 > ff02::1:ff00:42: ICMP6, neighbor solicitation, who has 2001:db8:61::42, length 32
09:58:05.790506 IP6 2001:db8:61::42 > 2001:db8:61::1: ICMP6, neighbor advertisement, tgt is 2001:db8:61::42, length 32
09:58:06.786254 IP6 2001:db8:61::1 > ff02::1:ff00:42: ICMP6, neighbor solicitation, who has 2001:db8:61::42, length 32
09:58:06.792325 IP6 2001:db8:61::42 > 2001:db8:61::1: ICMP6, neighbor advertisement, tgt is 2001:db8:61::42, length 32
Maybe checksums?
*** DONE Parse icmp
*** DONE Parse icmpv6
*** DONE Add (static) egress configuration
*** DONE Calculate ICMP6 checksums in controller
**** Need to include the payload!?!!
*** DONE Implement minimal neighbor discovery in controller
**** DONE For the switch
***** DONE Register IPv6 address in table
***** DONE Parse ICMPv6 up to neighbor solicitation -> no: checksum problem
***** DONE Use NDP (Neighbor Solicitation (NDP) , Neighbor Advertisement (NDP)) -> no: controller
***** Approach 2: use cpu header, forward information to controller
***** DONE Fix the ip address match/mapping: 42 -> 2a -> use hex originally
***** DONE Find out why wrong type is used -> overlapping with NDP
DEBUG:main:INCOMING: <Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x4242 |<Raw load='\x00\x03\x00\x01\x86\xdd`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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' |>>
p=<Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x4242 |<Raw load='\x00\x03\x00\x01\x86\xdd`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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 = <CpuHeader task=DEBUG ingress_port=1 type=0x86dd |<Raw load='`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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:o=<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::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0xd3a4 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:Debug purpose only
DEBUG:main:INCOMING: <Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x4242 |<Raw load='\x00\x03\x00\x01\x86\xdd`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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' |>>
p=<Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x4242 |<Raw load='\x00\x03\x00\x01\x86\xdd`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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 = <CpuHeader task=DEBUG ingress_port=1 type=0x86dd |<Raw load='`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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:o=<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::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0xd3a4 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:Debug purpose only
DEBUG:main:INCOMING: <Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x4242 |<Raw load='\x00\x03\x00\x01\x86\xdd`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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' |>>
p=<Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x4242 |<Raw load='\x00\x03\x00\x01\x86\xdd`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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 = <CpuHeader task=DEBUG ingress_port=1 type=0x86dd |<Raw load='`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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:o=<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::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0xd3a4 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:Debug purpose only
3 years ago
***** Disable debug by default -> gives correct packets
DEBUG:main:INCOMING: <Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x4242 |<Raw load='\x00\x01\x00\x01\x86\xdd`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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 = <CpuHeader task=ICMP6_NS ingress_port=1 type=0x86dd |<Raw load='`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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:o=<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::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0xd3a4 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:Doing neighbor solicitation
DEBUG:main:INCOMING: <Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x4242 |<Raw load='\x00\x01\x00\x01\x86\xdd`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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 = <CpuHeader task=ICMP6_NS ingress_port=1 type=0x86dd |<Raw load='`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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:o=<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::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0xd3a4 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:Doing neighbor solicitation
DEBUG:main:INCOMING: <Ether dst=33:33:ff:00:00:42 src=00:00:0a:00:00:01 type=0x4242 |<Raw load='\x00\x01\x00\x01\x86\xdd`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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 = <CpuHeader task=ICMP6_NS ingress_port=1 type=0x86dd |<Raw load='`\x00\x00\x00\x00 :\xff \x01\r\xb8\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\xff\x00\x00B\x87\x00\xd3\xa4\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:o=<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::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0xd3a4 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:Doing neighbor solicitation
3 years ago
**** DONE For other nodes -> multicast
3 years ago
**** DONE Maybe implement link local addresses (missing at the moment): no
CLOSED: [2019-08-07 Wed 13:59]
3 years ago
***** ff02::/??
***** rfc4861
"Neighbor Solicitation messages are multicast to the solicited-node
multicast address of the target address."
3 years ago
***** DONE multicasting / groups
****** create a group ("node") that contains "all other" ports
****** create a multicast group with an ID
****** associate the "node" with the multicast group ID
**** If destination is within ff02::1:ff00:0/104, multicast
*** DONE Make switch answer icmp6 echo request for
*** DONE Introduce mixed mode: switch: icmp6 echo reply, controller: NDP
**** DONE try 1: reply seen, but checksum is incorrect
**** DONE try 2: analysing tagya checksumming code
static uint16_t ip6_checksum(struct ip6 *ip6, uint32_t data_len, uint8_t proto)
{
uint32_t sum = 0;
uint16_t *p;
int i;
for (i = 0, p = ip6->src.s6_addr16; i < 16; ++i)
sum += *p++;
sum += htonl(data_len) >> 16;
sum += htonl(data_len) & 0xffff;
sum += htons(proto);
while (sum > 0xffff)
sum = (sum & 0xffff) + (sum >> 16);
return ~sum;
}
static uint16_t convert_cksum(struct ip6 *ip6, struct ip4 *ip4)
{
uint32_t sum = 0;
uint16_t *p;
int i;
sum += ~ip4->src.s_addr >> 16;
sum += ~ip4->src.s_addr & 0xffff;
sum += ~ip4->dest.s_addr >> 16;
sum += ~ip4->dest.s_addr & 0xffff;
for (i = 0, p = ip6->src.s6_addr16; i < 16; ++i)
sum += *p++;
while (sum > 0xffff)
sum = (sum & 0xffff) + (sum >> 16);
return sum;
}
...
static int xlate_payload_4to6(struct pkt *p, struct ip6 *ip6)
{
uint16_t *tck;
uint16_t cksum;
if (p->ip4->flags_offset & htons(IP4_F_MASK))
return 0;
switch (p->data_proto) {
case 1:
cksum = ip6_checksum(ip6, htons(p->ip4->length) -
p->header_len, 58);
cksum = ones_add(p->icmp->cksum, cksum);
if (p->icmp->type == 8) {
p->icmp->type = 128;
p->icmp->cksum = ones_add(cksum, ~(128 - 8));
} else {
p->icmp->type = 129;
p->icmp->cksum = ones_add(cksum, ~(129 - 0));
}
return 0;
3 years ago
*** DONE Add default route for v6 hosts
p4@ubuntu:~/master-thesis$ mx h1 ip -6 r
sudo: unable to resolve host ubuntu
2001:db8::/64 dev h1-eth0 proto kernel metric 256 pref medium
fe80::/64 dev h1-eth0 proto kernel metric 256 pref medium
default via 2001:db8::42 dev h1-eth0 metric 1024 pref medium
p4@ubuntu:~/master-thesis$
3 years ago
*** DONE TEST ping6ing an emulated ipv6 host / Translate icmp <-> icmp6: test v6_static_mapping
**** DONE try1: only packets on h1 + controller -> wrong checksum 2019-03-25
+ filename=static_nat64-2019-03-25-1121-h1.pcap
+ intf=h1-eth0
+ mx h1 tcpdump -ni h1-eth0 -w static_nat64-2019-03-25-1121-h1.pcap
tcpdump: listening on h1-eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C10 packets captured
10 packets received by filter
0 packets dropped by kernel
DEBUG:main:reassambled=<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=fe80::200:aff:fe00:1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x37df res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:reassambled=<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=fe80::200:aff:fe00:1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x37df res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:reassambled=<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::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x13a7 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:reassambled=<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::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x13a7 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:reassambled=<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::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x13a7 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
That looks like NDP is not working again. Why: checksum seems to be
incorrect according to wireshark. Why? Checksum is the SAME as in the
request -> probably not updated. After inserting marker: it's clear
that the checksum code DOES NOT work on the task field!
Problem: task field might be overriden for controller use in different
table -> need different task field!
3 years ago
**** DONE try2: checksum ok, but no packets on h3
***** DONE Setup a default rule for the IPv4 world to debug on controller
Still not seeing the converted packet, however seeing icmp6_ns packets
which should not be there:
table entry for ns:
ff:02:00:00:00:00:00:00:00:00:00:01:ff:00:00:42/128
debug packet seen in controller:
DEBUG:main:v6 reassambled=<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=fe80::200:aff:fe00:1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x37df res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:v6 reassambled=<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=fe80::200:aff:fe00:1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x37df res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:v6 reassambled=<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::1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x13a7 res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>>
DEBUG:main:v6 reassambled=<Ether dst=00:00:0a:00:00:42 src=00:00:0a:00:00:01 type=0x86dd |<IPv6 version=6 tc=0 fl=920946 plen=64 nh=ICMPv6 hlim=64 src=2001:db8::1 dst=2001:db8:1::a00:1 |<ICMPv6EchoRequest type=Echo Request code=0 cksum=0xf981 id=0x5f7c seq=0x1 data='N\xc6\x98\\\x00\x00\x00\x00\x12\x1b\t\x00\x00\x00\x00\x00\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !"#$%&\'()*+,-./01234567' |>>>
debugging MIGHT come from nat64 table!
3 years ago
**** DONE try3: re-rewrite: no packets on h3 again (2019-03-30)
p4@ubuntu:~$ ~/master-thesis/p4app/sniff-host.sh h1 static_nat64
+ cd /home/p4/master-thesis/pcap
+ host=h1
+ name=static_nat64
+ date +%F-%H%M
+ now=2019-03-30-1608
+ filename=static_nat64-2019-03-30-1608-h1.pcap
+ intf=h1-eth0
+ mx h1 tcpdump -ni h1-eth0 -w static_nat64-2019-03-30-1608-h1.pcap
tcpdump: listening on h1-eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C10 packets captured
10 packets received by filter
0 packets dropped by kernel
p4@ubuntu:~$
p4@ubuntu:~/master-thesis/pcap$ ../p4app/sniff-host.sh h3 static_nat64
+ cd /home/p4/master-thesis/pcap
+ host=h3
+ name=static_nat64
+ date +%F-%H%M
+ now=2019-03-30-1608
+ filename=static_nat64-2019-03-30-1608-h3.pcap
+ intf=h3-eth0
+ mx h3 tcpdump -ni h3-eth0 -w static_nat64-2019-03-30-1608-h3.pcap
tcpdump: listening on h3-eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
^C0 packets captured
0 packets received by filter
0 packets dropped by kernel
p4@ubuntu:~/master-thesis/pcap$
-> NDP is going to the controller instead of being handled by the switch
INFO:main:unhandled reassambled=<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=fe80::200:aff:fe00:1 dst=ff02::1:ff00:42 |<ICMPv6ND_NS type=Neighbor Solicitation code=0 cksum=0x37df res=0 tgt=2001:db8::42 |<ICMPv6NDOptSrcLLAddr type=1 len=1 lladdr=00:00:0a:00:00:01 |>>>> from table TABLE_V6_NETWORKS
-> checksums likely broken again due to checksum changes
-> solved, test case for verification is
#+BEGIN_SRC
p4@ubuntu:~$ python ~/master-thesis/p4app/test.py -m v6_static_mapping --debug
INFO:main:Trying to reach 10.0.0.1 (2001:db8:1::a00:1) from h1
PING 2001:db8:1::a00:1(2001:db8:1::a00:1) 56 data bytes