Lines Matching +full:asym +full:- +full:pause

2 # SPDX-License-Identifier: GPL-2.0
13 # +----+ .253 +----+ .253 +----+
14 # | h1 |-------------------| r1 |-------------------| h2 |
15 # +----+ .1 +----+ .2 +----+
42 # .253 +----+ .253
43 # +----| r1 |----+
44 # | +----+ |
45 # +----+ | | +----+
46 # | h1 |--------------+ +--------------| h2 |
47 # +----+ .1 | | .2 +----+
48 # 172.16.1/24 | +----+ | 172.16.2/24
49 # 2001:db8:16:1/64 +----| r2 |----+ 2001:db8:16:2/64
50 # .254 +----+ .254
105 if [ "${rc}" -eq "${expected}" ]; then
106 printf "TEST: %-60s [ OK ]\n" "${msg}"
111 printf "TEST: %-60s [FAIL]\n" "${msg}"
115 read -r a
134 if [ "$VERBOSE" = "1" ] && [ -n "$out" ]; then
157 if [ "$VERBOSE" = "1" ] && [ -n "$out" ]; then
161 echo "$out" | grep -q "$grep_pattern"
185 ip -netns "${ns}" rule del pref 0
186 ip -netns "${ns}" rule add pref 32765 from all lookup local
187 ip -netns "${ns}" -6 rule del pref 0
188 ip -netns "${ns}" -6 rule add pref 32765 from all lookup local
197 ip -netns "${ns}" link add "${vrf}" type vrf table "${table}"
198 ip -netns "${ns}" link set "${vrf}" up
199 ip -netns "${ns}" route add vrf "${vrf}" unreachable default metric 8192
200 ip -netns "${ns}" -6 route add vrf "${vrf}" unreachable default metric 8192
202 ip -netns "${ns}" addr add 127.0.0.1/8 dev "${vrf}"
203 ip -netns "${ns}" -6 addr add ::1 dev "${vrf}" nodad
218 ip -netns $ns link set lo up
221 h[12]) ip netns exec $ns sysctl -q -w net.ipv6.conf.all.forwarding=0
222 ip netns exec $ns sysctl -q -w net.ipv6.conf.all.keep_addr_on_down=1
224 r1) ip netns exec $ns sysctl -q -w net.ipv4.ip_forward=1
225 ip netns exec $ns sysctl -q -w net.ipv6.conf.all.forwarding=1
232 ip -netns h1 link add eth0 type veth peer name r1h1
233 ip -netns h1 link set r1h1 netns r1 name eth0 up
235 ip -netns h2 link add eth0 type veth peer name r1h2
236 ip -netns h2 link set r1h2 netns r1 name eth1 up
241 ip -netns h1 addr add dev eth0 ${H1_N1_IP}/24
242 ip -netns h1 -6 addr add dev eth0 ${H1_N1_IP6}/64 nodad
243 ip -netns h1 link set eth0 up
246 ip -netns h1 route add ${H2_N2} via ${R1_N1_IP} dev eth0
247 ip -netns h1 -6 route add ${H2_N2_6} via "${R1_N1_IP6}" dev eth0
252 ip -netns h2 addr add dev eth0 ${H2_N2_IP}/24
253 ip -netns h2 -6 addr add dev eth0 ${H2_N2_IP6}/64 nodad
254 ip -netns h2 link set eth0 up
257 ip -netns h2 route add default via ${R1_N2_IP} dev eth0
258 ip -netns h2 -6 route add default via ${R1_N2_IP6} dev eth0
266 ip -netns r1 link set mtu 1400 dev eth1
267 ip -netns r1 link set eth0 vrf blue up
268 ip -netns r1 link set eth1 vrf red up
269 ip -netns r1 addr add dev eth0 ${R1_N1_IP}/24
270 ip -netns r1 -6 addr add dev eth0 ${R1_N1_IP6}/64 nodad
271 ip -netns r1 addr add dev eth1 ${R1_N2_IP}/24
272 ip -netns r1 -6 addr add dev eth1 ${R1_N2_IP6}/64 nodad
275 ip -netns r1 route add vrf blue ${H2_N2} dev red
276 ip -netns r1 -6 route add vrf blue ${H2_N2_6} dev red
279 ip -netns r1 route add vrf red ${H1_N1} dev blue
280 ip -netns r1 -6 route add vrf red ${H1_N1_6} dev blue
299 ip -netns $ns link set lo up
302 h[12]) ip netns exec $ns sysctl -q -w net.ipv6.conf.all.forwarding=0
303 ip netns exec $ns sysctl -q -w net.ipv6.conf.all.keep_addr_on_down=1
305 r[12]) ip netns exec $ns sysctl -q -w net.ipv4.ip_forward=1
306 ip netns exec $ns sysctl -q -w net.ipv6.conf.all.forwarding=1
313 ip -netns h1 link add eth0 type veth peer name r1h1
314 ip -netns h1 link set r1h1 netns r1 name eth0 up
316 ip -netns h1 link add eth1 type veth peer name r2h1
317 ip -netns h1 link set r2h1 netns r2 name eth0 up
319 ip -netns h2 link add eth0 type veth peer name r1h2
320 ip -netns h2 link set r1h2 netns r1 name eth1 up
322 ip -netns h2 link add eth1 type veth peer name r2h2
323 ip -netns h2 link set r2h2 netns r2 name eth1 up
328 ip -netns h1 link add br0 type bridge
329 ip -netns h1 link set br0 up
330 ip -netns h1 addr add dev br0 ${H1_N1_IP}/24
331 ip -netns h1 -6 addr add dev br0 ${H1_N1_IP6}/64 nodad
332 ip -netns h1 link set eth0 master br0 up
333 ip -netns h1 link set eth1 master br0 up
336 ip -netns h1 route add ${H2_N2} via ${R1_N1_IP} dev br0
337 ip -netns h1 -6 route add ${H2_N2_6} via "${R1_N1_IP6}" dev br0
342 ip -netns h2 link add br0 type bridge
343 ip -netns h2 link set br0 up
344 ip -netns h2 addr add dev br0 ${H2_N2_IP}/24
345 ip -netns h2 -6 addr add dev br0 ${H2_N2_IP6}/64 nodad
346 ip -netns h2 link set eth0 master br0 up
347 ip -netns h2 link set eth1 master br0 up
350 ip -netns h2 route add default via ${R2_N2_IP} dev br0
351 ip -netns h2 -6 route add default via ${R2_N2_IP6} dev br0
359 ip -netns r1 link set mtu 1400 dev eth1
360 ip -netns r1 link set eth0 vrf blue up
361 ip -netns r1 link set eth1 vrf red up
362 ip -netns r1 addr add dev eth0 ${R1_N1_IP}/24
363 ip -netns r1 -6 addr add dev eth0 ${R1_N1_IP6}/64 nodad
364 ip -netns r1 addr add dev eth1 ${R1_N2_IP}/24
365 ip -netns r1 -6 addr add dev eth1 ${R1_N2_IP6}/64 nodad
368 ip -netns r1 route add vrf blue ${H2_N2} dev red
369 ip -netns r1 -6 route add vrf blue ${H2_N2_6} dev red
376 ip -netns r2 addr add dev eth0 ${R2_N1_IP}/24
377 ip -netns r2 -6 addr add dev eth0 ${R2_N1_IP6}/64 nodad
378 ip -netns r2 addr add dev eth1 ${R2_N2_IP}/24
379 ip -netns r2 -6 addr add dev eth1 ${R2_N2_IP6}/64 nodad
387 ip netns exec h1 ping -c1 -w1 ${H2_N2_IP} >/dev/null 2>&1
394 ip netns exec h1 "${ping6}" -c1 -w1 ${H2_N2_IP6} >/dev/null 2>&1
401 if [ ! -x "$(command -v traceroute)" ]; then
409 if [ ! -x "$(command -v traceroute6)" ]; then
435 ipv4_traceroute asym
458 ipv6_traceroute asym
473 run_cmd_grep "Time to live exceeded" ip netns exec h1 ping -t1 -c1 -W2 ${H2_N2_IP}
479 ipv4_ping_ttl asym
494 run_cmd_grep "Frag needed" ip netns exec h1 ping -s 1450 -Mdo -c1 -W2 ${H2_N2_IP}
500 ipv4_ping_frag asym
515 run_cmd_grep "Time exceeded: Hop limit" ip netns exec h1 "${ping6}" -t1 -c1 -W2 ${H2_N2_IP6}
521 ipv6_ping_ttl asym
536 run_cmd_grep "Packet too big" ip netns exec h1 "${ping6}" -s 1450 -Mdo -c1 -W2 ${H2_N2_IP6}
542 ipv6_ping_frag asym
553 -4 Run IPv4 tests only
554 -6 Run IPv6 tests only
555 -t TEST Run only TEST
556 -p Pause on fail
557 -v verbose mode (show commands and output)
565 command -v ping6 > /dev/null 2>&1 && ping6=$(command -v ping6) || ping6=$(command -v ping)
590 if [ -z "$TESTS" ]; then