diff --git a/doc/plan.org b/doc/plan.org index c7b7486..dc256c3 100644 --- a/doc/plan.org +++ b/doc/plan.org @@ -103,7 +103,7 @@ | | | | | 2019-03-13 | Tried/trying to get vagrant VM or P4* running on the notebook | | | | | | -| 2019-03-14 | NAT64 static rewrite | | +| 2019-03-14 | NAT64 static rewrite | x | | | - table support | | | | - checksum not yet ported for translations | | | | - how to get mask from lpm table match? | | @@ -111,7 +111,7 @@ | | - Create p4lang/p4-spec bug | | | | https://github.com/p4lang/p4-spec/issues/745 | | | | | | -| 2019-03-21 | Meet Laurent #4 - post poned - sick | | +| 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 | | @@ -119,7 +119,7 @@ | | - 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 | | +| 2019-03-23 | Parsing down to link layer option | x | | | 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 | | @@ -129,7 +129,7 @@ | | - priority / ordering would be helpful | | | | | | | | | | -| 2019-03-25 | | | +| 2019-03-25 | | x | | | Writing down double LPM problem | | | | Removing source network support, documenting limitation | | | | Rewriting code to use multiple NAT64 destinations | | @@ -138,7 +138,7 @@ | | Again checksum errors in NDP answer | | | | Added debug code to send table ID towards controller | | | | | | -| 2019-03-26 | | | +| 2019-03-26 | | x | | | Find out where packet is stuck | | | | | | | 2019-03-27 | | | @@ -188,11 +188,11 @@ | | Need to setup hardware addresses -> in theor resolution -> hardcoded atm | | | | | | | | | | -| 2019-04-04 | NAT64 1:1 table ICMP, ICMPv6 working | | -| | Will need some switch local ip addresses | | +| 2019-04-04 | PLAN: NAT64 1:1 table ICMP, ICMPv6 working | x | +| | Will need some switch local ip addresses | x | | | | | | | | | -| 2019-04-18 | NAT64 1:1 table TCP/UDP working | | +| 2019-04-18 | PLAN: NAT64 1:1 table TCP/UDP working | | | | | | | | | | | 2019-05-02 | Jool SIIT / range / offset support https://www.jool.mx/en/run-vanilla.html | | @@ -203,10 +203,11 @@ | 2019-04-18 | NAT64 prefix based IPv6->IPv4 conversion [tayga] | | | | Use case: IPv6 hosts send to specific /96 | | | | | | -| 2019-05-23 | NAT64 dynamic pool implementation: n:m ipv6 to ipv4 mapping | | +| 2019-05-23 | NAT64 dynamic pool implementation: n:1 ipv6 to ipv4 mapping | | | | And n:1 stateful mappings https://www.jool.mx/en/run-nat64.html | | | | Needs active controller | | | | Needs timeout / leases | | +| | Might work w/ registers | | | | | | | 2018-06-27 | | | | | Target Hardware: code running | | diff --git a/p4app/test.py b/p4app/test.py index 355d64b..5ff1c3c 100755 --- a/p4app/test.py +++ b/p4app/test.py @@ -38,7 +38,7 @@ class TestStuff(object): host = "h1" nat64_prefix = ipaddress.ip_network("2001:db8:1::/96") dst_ipv4 = ipaddress.ip_address("10.0.0.1") - translated_ipv4 = nat64_prefix[int(dst_ipv4)] + translated_ipv4 = nat64_prefix[int(dst_ipv4)] # '2001:db8:1::a00:1' log.info("Trying to reach {} ({}) from {}".format(dst_ipv4, translated_ipv4, host)) cmd = "mx {} ping6 -c1 {}".format(host, translated_ipv4).split(" ") @@ -54,6 +54,30 @@ class TestStuff(object): return cmd + def test_v6_udp_to_v4(self): + """ unfinished """ + + """ + + """ + host = "h1" + dst_ipv6 = ipaddress.ip_address("2001:db8::42") + + log.info("Trying to reach {} from {}".format(dst_ipv6, host)) + cmd = "mx {} ping6 -c1 {}".format(host, dst_ipv6).split(" ") + + return cmd + + host = "h1" + nat64_prefix = ipaddress.ip_network("2001:db8:1::/96") + dst_ipv4 = ipaddress.ip_address("10.0.0.1") + translated_ipv4 = nat64_prefix[int(dst_ipv4)] + + log.info("Trying to reach {} ({}) from {}".format(dst_ipv4, translated_ipv4, host)) + cmd = "mx {} ping6 -c1 {}".format(host, translated_ipv4).split(" ") + + return cmd + def commandline(self): parser = argparse.ArgumentParser(description='controller++') diff --git a/p4src/static-mapping.p4 b/p4src/static-mapping.p4 index 7a4a0dd..4116dfc 100644 --- a/p4src/static-mapping.p4 +++ b/p4src/static-mapping.p4 @@ -214,7 +214,8 @@ Echo or Echo Reply Message NoAction; } size = NAT64_TABLE_SIZE; - default_action = controller_debug_table_id(TABLE_NAT64); +// default_action = controller_debug_table_id(TABLE_NAT64); + default_action = NoAction; } table nat46 {