Lines Matching +full:2 +full:ns

45 hide_output(){ exec 3>&1 4>&2 >/dev/null 2>/dev/null; }
46 show_output(){ exec >&3 2>&4; }
50 printf "TEST: %-60s [ OK ]\n" "${2}"
52 printf "TEST: %-60s [FAIL]\n" "${2}"
64 # Caller must set up foo-ns and bar-ns namespaces
68 ip -n foo-ns address add $1/$3 dev foo || return 1
69 ip -n foo-ns link set foo up || return 1
70 ip -n bar-ns address add $2/$3 dev bar || return 1
71 ip -n bar-ns link set bar up || return 1
73 ip netns exec foo-ns timeout 2 ping -c 1 $2 || return 1
74 ip netns exec bar-ns timeout 2 ping -c 1 $1 || return 1
76 nettest -B -N bar-ns -O foo-ns -r $1 || return 1
77 nettest -B -N foo-ns -O bar-ns -r $2 || return 1
91 # Caller must set up foo-ns, bar-ns, and router-ns
93 # (foo in foo-ns, foo1 and bar1 in router-ns, and
94 # bar in bar-ns).
96 ip -n foo-ns address add $1/$5 dev foo || return 1
97 ip -n foo-ns link set foo up || return 1
98 ip -n foo-ns route add default via $2 || return 1
99 ip -n bar-ns address add $4/$5 dev bar || return 1
100 ip -n bar-ns link set bar up || return 1
101 ip -n bar-ns route add default via $3 || return 1
102 ip -n router-ns address add $2/$5 dev foo1 || return 1
103 ip -n router-ns link set foo1 up || return 1
104 ip -n router-ns address add $3/$5 dev bar1 || return 1
105 ip -n router-ns link set bar1 up || return 1
107 echo 1 | ip netns exec router-ns tee /proc/sys/net/ipv4/ip_forward
109 ip netns exec foo-ns timeout 2 ping -c 1 $2 || return 1
110 ip netns exec foo-ns timeout 2 ping -c 1 $4 || return 1
111 ip netns exec bar-ns timeout 2 ping -c 1 $3 || return 1
112 ip netns exec bar-ns timeout 2 ping -c 1 $1 || return 1
114 nettest -B -N bar-ns -O foo-ns -r $1 || return 1
115 nettest -B -N foo-ns -O bar-ns -r $4 || return 1
124 ip netns add foo-ns
125 ip netns add bar-ns
126 ip link add foo netns foo-ns type veth peer name bar netns bar-ns
131 ip netns pids foo-ns | xargs -r kill -9
132 ip netns pids bar-ns | xargs -r kill -9
133 ip netns del foo-ns
134 ip netns del bar-ns
150 ip netns add foo-ns
151 ip netns add bar-ns
152 ip netns add router-ns
153 ip link add foo netns foo-ns type veth peer name foo1 netns router-ns
154 ip link add bar netns bar-ns type veth peer name bar1 netns router-ns
159 ip netns pids foo-ns | xargs -r kill -9
160 ip netns pids bar-ns | xargs -r kill -9
161 ip netns pids router-ns | xargs -r kill -9
162 ip netns del foo-ns
163 ip netns del bar-ns
164 ip netns del router-ns
178 segmenttest 240.1.2.1 240.1.2.4 24 "assign and ping within 240/4 (1 of 2) (is allowed)"
179 segmenttest 250.100.2.1 250.100.30.4 16 "assign and ping within 240/4 (2 of 2) (is allowed)"
182 segmenttest 0.1.2.17 0.1.2.23 24 "assign and ping within 0/8 (1 of 2) (is allowed)"
183 segmenttest 0.77.240.17 0.77.2.23 16 "assign and ping within 0/8 (2 of 2) (is allowed)"
192 ….7 240.5.6.1 255.1.2.1 255.1.2.3 24 "route between 240.5.6/24 and 255.1.2/24 (is allowed)"