Lines Matching refs:ns2

31 setup_ns ns1 ns2 nsr1 nsr2
35 ip netns pids "$ns2" | xargs kill 2>/dev/null
51 ip link add veth1 netns "$nsr2" type veth peer name eth0 netns "$ns2"
65 # to ns2 (smaller MTU) to stack either to perform fragmentation (ip_no_pmtu_disc=1),
67 # ns2 is going via nsr2 with a smaller mtu, so that TCPMSS announced by both peers
112 ip -net "$ns2" link set eth0 mtu "$rmtu"
127 for ns in "$ns1" "$ns2";do
139 ip -net "$ns2" addr add 10.0.2.99/24 dev eth0
141 ip -net "$ns2" route add default via 10.0.2.1
143 ip -net "$ns2" addr add dead:2::99/64 dev eth0 nodad
145 ip -net "$ns2" route add default via dead:2::1
182 ip netns exec "$ns2" nft -f - <<EOF
205 echo "ERROR: $ns1 cannot reach ns2" 1>&2
209 if ! ip netns exec "$ns2" ping -c 1 -q 10.0.1.99 > /dev/null; then
210 echo "ERROR: $ns2 cannot reach $ns1" 1>&2
276 counter=$(ip netns exec "$ns2" nft reset counter inet filter ip4dscp3 | grep packets)
281 counter=$(ip netns exec "$ns2" nft reset counter inet filter ip4dscp0 | grep packets)
363 if ! check_transfer "$nsin" "$ns2out" "ns1 -> ns2"; then
368 if ! check_transfer "$nsin" "$ns1out" "ns1 <- ns2"; then
441 check_counters "flow offload for ns1/ns2 with masquerade and pmtu discovery $what"
443 echo "PASS: flow offload for ns1/ns2 with masquerade $what"
449 check_counters "flow offload for ns1/ns2 with dnat and pmtu discovery $what"
451 echo "PASS: flow offload for ns1/ns2 with dnat $what"
461 # No PMTU discovery, nsr1 is expected to fragment packets from ns1 to ns2 as needed.
465 if test_tcp_forwarding "$ns1" "$ns2"; then
466 echo "PASS: flow offloaded for ns1/ns2"
468 echo "FAIL: flow offload for ns1/ns2:" 1>&2
473 # delete default route, i.e. ns2 won't be able to reach ns1 and
476 ip -net "$ns2" route del default via 10.0.2.1
477 ip -net "$ns2" route del default via dead:2::1
478 ip -net "$ns2" route add 192.168.10.1 via 10.0.2.1
497 if ! test_tcp_forwarding_set_dscp "$ns1" "$ns2" 0 ""; then
498 echo "FAIL: flow offload for ns1/ns2 with dscp update" 1>&2
502 if ! test_tcp_forwarding_nat "$ns1" "$ns2" 0 ""; then
503 echo "FAIL: flow offload for ns1/ns2 with NAT" 1>&2
513 ip netns exec "$ns2" sysctl net.ipv4.ip_no_pmtu_disc=0 > /dev/null
522 if ! test_tcp_forwarding_nat "$ns1" "$ns2" 1 ""; then
523 echo "FAIL: flow offload for ns1/ns2 with NAT and pmtu discovery" 1>&2
560 if ! test_tcp_forwarding_nat "$ns1" "$ns2" 1 "on bridge"; then
561 echo "FAIL: flow offload for ns1/ns2 with bridge NAT" 1>&2
584 if ! test_tcp_forwarding_nat "$ns1" "$ns2" 1 "bridge and VLAN"; then
585 echo "FAIL: flow offload for ns1/ns2 with bridge NAT and VLAN" 1>&2
648 ip -net "$ns2" route del 192.168.10.1 via 10.0.2.1
649 ip -net "$ns2" route add default via 10.0.2.1
650 ip -net "$ns2" route add default via dead:2::1
652 if test_tcp_forwarding "$ns1" "$ns2"; then
653 check_counters "ipsec tunnel mode for ns1/ns2"
655 echo "FAIL: ipsec tunnel mode for ns1/ns2"