Cleanup nat64 references
This commit is contained in:
parent
7fedd83959
commit
09a15b6c25
2 changed files with 1 additions and 39 deletions
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
"program": "../p4src/static-mapping.p4",
|
"program": "../p4src/nat64.p4",
|
||||||
"switch": "simple_switch",
|
"switch": "simple_switch",
|
||||||
"compiler": "p4c",
|
"compiler": "p4c",
|
||||||
"options": "--target bmv2 --arch v1model --std p4-16",
|
"options": "--target bmv2 --arch v1model --std p4-16",
|
|
@ -1,38 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -x
|
|
||||||
|
|
||||||
# cleanup
|
|
||||||
for i in 1 2 3 4; do
|
|
||||||
mx h$i "ip addr flush dev $dev"
|
|
||||||
done
|
|
||||||
|
|
||||||
# host 1/2+42 need NDP for reaching themselves
|
|
||||||
for i in 1 2; do
|
|
||||||
dev="h$i-eth0"
|
|
||||||
# add and enable ipv6
|
|
||||||
mx h$i "sysctl net.ipv6.conf.{lo,h$i-eth0}.disable_ipv6=0"
|
|
||||||
mx h$i "ip addr add 2001:db8:6::$i/64 dev $dev"
|
|
||||||
mx h$i "ip -6 route add default via 2001:db8:6::42"
|
|
||||||
|
|
||||||
# add neighbors
|
|
||||||
for j in 1 2 42; do
|
|
||||||
mx h$i "ip -6 neigh add 2001:db8:61::${j} dev $dev lladdr 00:00:0a:00:00:0${j}"
|
|
||||||
mx h$i "ip -6 neigh add 2001:db8:62::${j} dev $dev lladdr 00:00:0a:00:00:0${j}"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
# host 3/4 need ARP, also need access to .42 (virtual IP)
|
|
||||||
for i in 3 4; do
|
|
||||||
dev="h$i-eth0"
|
|
||||||
mx h$i "ip addr add 10.0.0.$i/24 dev $dev"
|
|
||||||
|
|
||||||
# add arp
|
|
||||||
for j in 1 2 42; do
|
|
||||||
mx h$i "ip neigh add 10.0.0.${j} dev $dev lladdr 00:00:0a:00:00:${j}"
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
for i in 1 2 3 4; do
|
|
||||||
mx h$i "ip neigh show"
|
|
||||||
done
|
|
Loading…
Reference in a new issue