Lines Matching refs:ip

25 ip netns exec "$nsbr" sysctl -q net.ipv4.conf.default.rp_filter=0
26 ip netns exec "$nsbr" sysctl -q net.ipv4.conf.all.rp_filter=0
27 if ! ip link add veth0 netns "$nsbr" type veth peer name eth0 netns "$ns1"; then
31 ip link add veth1 netns "$nsbr" type veth peer name eth0 netns "$ns2"
33 if ! ip -net "$nsbr" link add br0 type bridge; then
38 ip -net "$nsbr" link set veth0 up
39 ip -net "$nsbr" link set veth1 up
41 ip -net "$nsbr" link set veth0 master br0
42 ip -net "$nsbr" link set veth1 master br0
43 ip -net "$nsbr" link set br0 up
44 ip -net "$nsbr" addr add 10.0.0.1/24 dev br0
47 ip -net "$ns1" link set eth0 up
48 ip -net "$ns2" link set eth0 up
49 ip -net "$ns1" addr add 10.0.0.11/24 dev eth0
50 ip -net "$ns2" addr add 10.0.0.12/24 dev eth0
55 # ip stack won't process OTHERHOST (foreign unicast mac) packets.
56 if ! ip netns exec "$nsbr" ebtables -t broute -A BROUTING -p ipv4 --ip-protocol icmp -j redirect --redirect-target=DROP; then
61 ip netns exec "$nsbr" sysctl -q net.ipv4.conf.veth0.forwarding=0
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
70 # neither needs an ip address, but at least the bridge needs
71 # an ip address in same network segment as ${ns1} and ${ns2} (${nsbr}
73 ip netns exec "$nsbr" sysctl -q net.ipv4.conf.veth0.forwarding=1
74 ip netns exec "$nsbr" sysctl -q net.ipv4.conf.veth1.forwarding=1
76 if ! ip netns exec "$ns1" ping -q -c 1 10.0.0.12 > /dev/null; then
82 ip netns exec "$nsbr" ebtables -t broute -F
85 if ! ip netns exec "$ns1" ping -q -c 1 10.0.0.12 > /dev/null; then
90 ip netns exec "$nsbr" ebtables -t filter -A FORWARD -p ipv4 --ip-protocol icmp -j DROP
93 if ip netns exec "$ns1" ping -q -c 1 10.0.0.12 -W 0.5 > /dev/null 2>&1; then
99 ip netns exec "$nsbr" ebtables -t broute -A BROUTING -p ipv4 --ip-protocol icmp -j redirect --redirect-target=DROP
101 if ! ip netns exec "$ns2" ping -q -c 1 10.0.0.11 > /dev/null; then
111 if ! ip netns exec "$ns1" ping -c 1 -q 10.0.0.12 > /dev/null; then
116 if ! ip netns exec "$ns2" ping -c 1 -q 10.0.0.11 > /dev/null; then