Browse Source

++update

Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
master
Nico Schottelius 3 years ago
parent
commit
079699c687
  1. 64
      doc/plan.org
  2. 30
      p4app/test.py

64
doc/plan.org

@ -194,6 +194,18 @@
| 2019-04-11 | PLAN: NAT64 1:1 table UDP working | |
| | checksums in both directions | |
| | | |
| 2019-04-11 | | |
| | Meeting Laurent | |
| | | |
| | Status: | |
| | - Minimal ARP working (for the switch address) | |
| | - echo ping/request icmp<->icmp6 working | |
| | - udp_v4<->udp_v6 working | |
| | | |
| | Next steps: | |
| | | |
| | | |
| | | |
| 2019-04-18 | PLAN: NAT64 1:1 table TCP/UDP working | |
| | | |
| | | |
@ -763,6 +775,58 @@ PING 10.1.1.1 (10.1.1.1) 56(84) bytes of data.
rtt min/avg/max/mdev = 12.593/12.593/12.593/0.000 ms
p4@ubuntu:~$
*** TODO Implement ipv6<->ipv4 udp translation
**** DONE udp: ipv6->ipv4
p4@ubuntu:~$ mx h3 "echo V4-OK | socat - UDP-LISTEN:2342"
/usr/bin/mx: line 25: [: too many arguments
V6-OK
p4@ubuntu:~$
p4@ubuntu:~$ mx h1 "echo V6-OK | socat - UDP6:[2001:db8:1::a00:1]:2342"
/usr/bin/mx: line 25: [: too many arguments
V4-OK
p4@ubuntu:~$
***** pcap/v6_udp-2019-04-11-0840-h1.pcap
***** pcap/v6_udp-2019-04-11-0840-h3.pcap
**** TODO udp: ipv4->ipv6
p4@ubuntu:~$ mx h3 "echo V4-OK | socat - UDP:10.1.1.1:2342"
/usr/bin/mx: line 25: [: too many arguments
V6-OK
p4@ubuntu:~$
p4@ubuntu:~$ mx h1 "echo V6-OK | socat - UDP6-LISTEN:2342"
/usr/bin/mx: line 25: [: too many arguments
V4-OK
***** proof
create mode 100644 pcap/v4_udp-2019-04-11-0855-h1.pcap
create mode 100644 pcap/v4_udp-2019-04-11-0855-h3.pcap
*** DONE Implement ipv6<->ipv4 tcp translation
**** DONE tcp: v6 -> v4
p4@ubuntu:~$ mx h1 "echo V6-OK | socat - TCP6:[2001:db8:1::a00:1]:2342"
/usr/bin/mx: line 25: [: too many arguments
V4-OK
p4@ubuntu:~$
p4@ubuntu:~$ mx h3 "echo V4-OK | socat - TCP-LISTEN:2342"
/usr/bin/mx: line 25: [: too many arguments
V6-OK
p4@ubuntu:~$
***** Proof
create mode 100644 pcap/v6_tcp-2019-04-11-0846-h1.pcap
create mode 100644 pcap/v6_tcp-2019-04-11-0846-h3.pcap
**** DONE tcp: v4 -> v6
p4@ubuntu:~$ mx h3 "echo V4-OK | socat - TCP:10.1.1.1:2342"
/usr/bin/mx: line 25: [: too many arguments
V6-OK
p4@ubuntu:~$
p4@ubuntu:~$ mx h1 "echo V6-OK | socat - TCP6-LISTEN:2342"
/usr/bin/mx: line 25: [: too many arguments
V4-OK
p4@ubuntu:~$
***** Proof
pcap/v4_tcp-2019-04-11-0853-h1.pcap | Bin 0 -> 1174 bytes
pcap/v4_tcp-2019-04-11-0853-h3.pcap | Bin 0 -> 1070 bytes
*** TODO Update p4c to avoid compiler bug
**** TODO Updating p4c
***** DONE Try1

30
p4app/test.py

@ -55,34 +55,28 @@ class TestStuff(object):
return cmd
def test_v6_udp_to_v4(self):
""" unfinished """
"""
"""
print('mx h3 "echo V4-OK | socat - UDP-LISTEN:2342"')
print('mx h1 "echo V6-OK | socat - UDP6:[2001:db8:1::a00:1]:2342"')
return
host = "h1"
dst_ipv6 = ipaddress.ip_address("2001:db8::42")
def test_v6_tcp_to_v4(self):
print('mx h3 "echo V4-OK | socat - TCP-LISTEN:2342"')
print('mx h1 "echo V6-OK | socat - TCP6:[2001:db8:1::a00:1]:2342"')
log.info("Trying to reach {} from {}".format(dst_ipv6, host))
cmd = "mx {} ping6 -c1 {}".format(host, dst_ipv6).split(" ")
return
return cmd
def test_v4_tcp_to_v6(self):
print('mx h3 "echo V4-OK | socat - TCP:10.1.1.1:2342"')
print('mx h1 "echo V6-OK | socat - TCP-LISTEN:2342"')
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)]
return
log.info("Trying to reach {} ({}) from {}".format(dst_ipv4, translated_ipv4, host))
cmd = "mx {} ping6 -c1 {}".format(host, translated_ipv4).split(" ")
def test_v4_udp_to_v6(self):
print('mx h3 "echo V4-OK | socat - UDP:10.1.1.1:2342"')
print('mx h1 "echo V6-OK | socat - UDP-LISTEN:2342"')
return cmd
return
def commandline(self):

Loading…
Cancel
Save