Lines Matching refs:ns
88 local ns=$1
92 if [ -n "${ns}" ]; then
93 ns="-netns ${ns}"
96 ip ${ns} link add ${vrf} type vrf table ${table}
97 ip ${ns} link set ${vrf} up
98 ip ${ns} route add vrf ${vrf} unreachable default metric 8192
99 ip ${ns} -6 route add vrf ${vrf} unreachable default metric 8192
101 ip ${ns} addr add 127.0.0.1/8 dev ${vrf}
102 ip ${ns} -6 addr add ::1 dev ${vrf} nodad
104 ip ${ns} ru del pref 0
105 ip ${ns} ru add pref 32765 from all lookup local
106 ip ${ns} -6 ru del pref 0
107 ip ${ns} -6 ru add pref 32765 from all lookup local
112 local ns=$1
119 ip netns add ${ns}
121 ip -netns ${ns} link set lo up
123 ip -netns ${ns} addr add dev lo ${addr}
126 ip -netns ${ns} -6 addr add dev lo ${addr6}
129 ip -netns ${ns} ro add unreachable default metric 8192
130 ip -netns ${ns} -6 ro add unreachable default metric 8192
132 ip netns exec ${ns} sysctl -qw net.ipv4.ip_forward=1
133 ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1
134 ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.forwarding=1
135 ip netns exec ${ns} sysctl -qw net.ipv6.conf.default.forwarding=1
136 ip netns exec ${ns} sysctl -qw net.ipv6.conf.default.accept_dad=0
198 for ns in host1 host2
202 ip -netns ${ns} xfrm ${x} flush
203 ip -6 -netns ${ns} xfrm ${x} flush