Lines Matching refs:ip
56 ip -Version > /dev/null 2>&1
69 ip netns add ns0
70 ip netns add ns1
71 ip netns add ns2
73 ip link add veth01 netns ns0 type veth peer name veth10 netns ns1
74 ip link add veth02 netns ns0 type veth peer name veth20 netns ns2
75 ip link add veth12 netns ns1 type veth peer name veth21 netns ns2
77 ip netns exec ns0 ip link set veth01 up
78 ip netns exec ns0 ip link set veth02 up
79 ip netns exec ns0 ip link add br0 type bridge
80 ip netns exec ns0 ip link set veth01 master br0
81 ip netns exec ns0 ip link set veth02 master br0
82 ip netns exec ns0 ip link set br0 up
83 ip netns exec ns0 ip addr add ${cip_v4}/24 dev br0
85 ip netns exec ns1 ip link set lo up
86 ip netns exec ns1 ip link set veth10 up
87 ip netns exec ns1 ip addr add ${gip_v4}/24 dev veth10
88 ip netns exec ns1 ip link set veth12 up
89 ip netns exec ns1 ip addr add ${dip_v4}/24 dev veth12
91 ip netns exec ns2 ip link set lo up
92 ip netns exec ns2 ip link set veth21 up
93 ip netns exec ns2 ip addr add ${rip_v4}/24 dev veth21
94 ip netns exec ns2 ip link set veth20 up
95 ip netns exec ns2 ip addr add ${sip_v4}/24 dev veth20
105 ip netns del ns$i > /dev/null 2>&1
117 ip netns exec ns2 nc -l -p 8080 > "${outfile}" &
123 ip netns exec ns0 timeout 2 nc -w 1 ${vip_v4} ${port} < "${infile}"
139 ip netns exec ns0 ip route add ${vip_v4} via ${gip_v4} dev br0
141 ip netns exec ns1 sysctl -qw net.ipv4.ip_forward=1
142 ip netns exec ns1 ipvsadm -A -t ${vip_v4}:${port} -s rr
143 ip netns exec ns1 ipvsadm -a -t ${vip_v4}:${port} -r ${rip_v4}:${port}
144 ip netns exec ns1 ip addr add ${vip_v4}/32 dev lo:1
147 ip netns exec ns2 sysctl -qw net.ipv4.conf.all.arp_ignore=1
148 ip netns exec ns2 sysctl -qw net.ipv4.conf.all.arp_announce=2
150 ip netns exec ns2 sysctl -qw net.ipv4.conf.all.rp_filter=0
151 ip netns exec ns2 sysctl -qw net.ipv4.conf.veth21.rp_filter=0
152 ip netns exec ns2 ip addr add ${vip_v4}/32 dev lo:1
158 ip netns exec ns0 ip route add ${vip_v4} via ${gip_v4} dev br0
160 ip netns exec ns1 sysctl -qw net.ipv4.ip_forward=1
161 ip netns exec ns1 ipvsadm -A -t ${vip_v4}:${port} -s rr
162 ip netns exec ns1 ipvsadm -a -m -t ${vip_v4}:${port} -r ${rip_v4}:${port}
163 ip netns exec ns1 ip addr add ${vip_v4}/32 dev lo:1
165 ip netns exec ns2 ip link del veth20
166 ip netns exec ns2 ip route add default via ${dip_v4} dev veth21
172 ip netns exec ns0 ip route add ${vip_v4} via ${gip_v4} dev br0
174 ip netns exec ns1 modprobe ipip
175 ip netns exec ns1 ip link set tunl0 up
176 ip netns exec ns1 sysctl -qw net.ipv4.ip_forward=0
177 ip netns exec ns1 sysctl -qw net.ipv4.conf.all.send_redirects=0
178 ip netns exec ns1 sysctl -qw net.ipv4.conf.default.send_redirects=0
179 ip netns exec ns1 ipvsadm -A -t ${vip_v4}:${port} -s rr
180 ip netns exec ns1 ipvsadm -a -i -t ${vip_v4}:${port} -r ${rip_v4}:${port}
181 ip netns exec ns1 ip addr add ${vip_v4}/32 dev lo:1
183 ip netns exec ns2 modprobe ipip
184 ip netns exec ns2 ip link set tunl0 up
185 ip netns exec ns2 sysctl -qw net.ipv4.conf.all.arp_ignore=1
186 ip netns exec ns2 sysctl -qw net.ipv4.conf.all.arp_announce=2
187 ip netns exec ns2 sysctl -qw net.ipv4.conf.all.rp_filter=0
188 ip netns exec ns2 sysctl -qw net.ipv4.conf.tunl0.rp_filter=0
189 ip netns exec ns2 sysctl -qw net.ipv4.conf.veth21.rp_filter=0
190 ip netns exec ns2 ip addr add ${vip_v4}/32 dev lo:1