Lines Matching refs:ns1
8 # setup is: ns1 <-> nsbr <-> ns2
23 setup_ns nsbr ns1 ns2
27 if ! ip link add veth0 netns "$nsbr" type veth peer name eth0 netns "$ns1"; then
46 # place both in same subnet, ${ns1} and ${ns2} connected via ${nsbr}:br0
47 ip -net "$ns1" link set eth0 up
49 ip -net "$ns1" addr add 10.0.0.11/24 dev eth0
63 # ping net${ns1}, expected to not work (ip forwarding is off)
64 if ip netns exec "$ns1" ping -q -c 1 10.0.0.12 -W 0.5 > /dev/null 2>&1; then
71 # an ip address in same network segment as ${ns1} and ${ns2} (${nsbr}
76 if ! ip netns exec "$ns1" ping -q -c 1 10.0.0.12 > /dev/null; then
81 echo "PASS: ${ns1}/${ns2} connectivity with active broute rule"
84 # ping net${ns1}, expected to work (frames are bridged)
85 if ! ip netns exec "$ns1" ping -q -c 1 10.0.0.12 > /dev/null; then
92 # ping net${ns1}, expected to not work (DROP in bridge forward)
93 if ip netns exec "$ns1" ping -q -c 1 10.0.0.12 -W 0.5 > /dev/null 2>&1; then
106 echo "PASS: ${ns1}/${ns2} connectivity with active broute rule and bridge forward drop"
111 if ! ip netns exec "$ns1" ping -c 1 -q 10.0.0.12 > /dev/null; then
112 echo "ERROR: Could not reach ${ns2} from ${ns1}" 1>&2
117 echo "ERROR: Could not reach ${ns1} from ${ns2}" 1>&2