Lines Matching +full:2 +full:ns

15 	local expected=$2
36 local ns
41 ns="$1"
49 out=$(eval ip netns exec ${ns} ${cmd} 2>&1)
65 local ns=$1
66 local addr=$2
72 ip netns add ${ns}
74 ip netns exec ${ns} ip link set lo up
76 ip netns exec ${ns} ip addr add dev lo ${addr}
79 ip netns exec ${ns} ip -6 addr add dev lo ${addr6}
82 ip netns exec ${ns} ip ro add unreachable default metric 8192
83 ip netns exec ${ns} ip -6 ro add unreachable default metric 8192
85 ip netns exec ${ns} sysctl -qw net.ipv4.ip_forward=1
86 ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1
87 ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.forwarding=1
88 ip netns exec ${ns} sysctl -qw net.ipv6.conf.default.forwarding=1
89 ip netns exec ${ns} sysctl -qw net.ipv6.conf.default.accept_dad=0
96 local ns1_dev=$2
154 # R2's host part of address: 2
163 local ns
165 for ns in host-1 host-2 router-1 router-2
167 ip netns del ${ns} 2>/dev/null
180 create_ns host-2
182 create_ns router-2
185 connect_ns router-2 eth3 - 2000:103::2/64 host-2 eth3 - 2000:103::4/64
186 ip netns exec host-2 ip route add default via 2000:103::2
189 connect_ns router-1 eth2 - 2000:102::1/64 router-2 eth2 - 2000:102::2/64
190 ip netns exec router-1 ip route add default via 2000:102::2
192 # Setup N1. host-1 and router-2 connect to a bridge in router-1.
201 connect_ns router-2 eth1 - 2000:101::2/64 router-1 eth1 - -
205 ip netns exec host-1 ping6 -c5 2000:103::4 >/dev/null 2>&1
219 # traceroute6 host-2 from host-1 (expects 2000:102::2)
220 run_cmd host-1 "traceroute6 2000:103::4 | grep -q 2000:102::2"
243 local ns
245 for ns in host-1 host-2 router
247 ip netns del ${ns} 2>/dev/null
258 create_ns host-2
269 connect_ns host-2 eth0 1.0.2.4/24 - \
271 ip netns exec host-2 ip route add default via 1.0.2.1
274 ip netns exec host-1 ping -c5 1.0.2.4 >/dev/null 2>&1
288 # traceroute host-2 from host-1 (expects 1.0.1.1). Takes a while.