Lines Matching +full:route +full:- +full:up

1 #	$NetBSD: t_route.sh,v 1.10 2016/12/21 02:46:08 ozaki-r Exp $
49 DEBUG=${DEBUG:-false}
51 PING_OPTS="-n -c 1 -w $TIMEOUT"
69 atf_check -s exit:0 rump.ifconfig shmif0 192.168.0.1
70 atf_check -s exit:0 rump.ifconfig shmif0 up
73 atf_check -s exit:0 -o match:'add net 10.0.0.1: gateway shmif0' \
74 rump.route add -net 10.0.0.1/32 -link -cloning -iface shmif0
76 $DEBUG && rump.netstat -nr -f inet
80 atf_check -s exit:0 rump.ifconfig shmif0 10.0.0.1/32
81 atf_check -s exit:0 rump.ifconfig shmif0 up
82 atf_check -s exit:0 rump.ifconfig -w 10
84 $DEBUG && rump.netstat -nr -f inet
86 # Don't know a route to the gateway yet
87 atf_check -s not-exit:0 -o match:'100.0% packet loss' \
88 -e match:'No route to host' rump.ping $PING_OPTS 192.168.0.1
90 # Teach a route to the gateway
91 atf_check -s exit:0 -o match:'add net 192.168.0.1: gateway shmif0' \
92 rump.route add -net 192.168.0.1/32 -link -cloning -iface shmif0
93 atf_check -s exit:0 -o match:'add net default: gateway 192.168.0.1' \
94 rump.route add default -ifa 10.0.0.1 192.168.0.1
96 $DEBUG && rump.netstat -nr -f inet
99 atf_check -s exit:0 -o ignore rump.ping $PING_OPTS 192.168.0.1
116 atf_set "descr" "tests of route get command"
123 atf_set "descr" "tests of route get command (IPv6)"
138 atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${addr}
139 atf_check -s exit:0 -o ignore rump.route add -inet6 default ${gw}
141 atf_check -s exit:0 rump.ifconfig shmif0 inet ${addr} netmask 0xffffff00
142 atf_check -s exit:0 -o ignore rump.route add default ${gw}
144 atf_check -s exit:0 rump.ifconfig shmif0 up
145 atf_check -s exit:0 rump.ifconfig -w 10
149 rump.netstat -nr
162 atf_check -s exit:0 rump.ifconfig shmif0 inet6 ${IP6SRCGW}
163 atf_check -s exit:0 rump.ifconfig shmif1 inet6 ${IP6DSTGW}
165 atf_check -s exit:0 rump.ifconfig shmif0 inet ${IP4SRCGW} netmask 0xffffff00
166 atf_check -s exit:0 rump.ifconfig shmif1 inet ${IP4DSTGW} netmask 0xffffff00
169 atf_check -s exit:0 rump.ifconfig shmif0 up
170 atf_check -s exit:0 rump.ifconfig shmif1 up
171 atf_check -s exit:0 rump.ifconfig -w 10
174 rump.netstat -nr
186 atf_check -s exit:0 -o ignore rump.sysctl -w net.inet.ip.forwarding=1
192 atf_check -s exit:0 -o ignore rump.sysctl -w net.inet6.ip6.forwarding=1
223 $DEBUG && rump.netstat -nr -f inet
224 $DEBUG && rump.arp -n -a
227 rump.arp -d $IP4SRCGW
230 cat >./expect <<-EOF
231 route to: 10.0.1.2
235 flags: <UP,HOST,DONE,LLINFO,LOCAL>
238 rump.route -n get $IP4SRC > ./output
241 sed -i '$d' ./output
242 atf_check -s exit:0 diff ./expect ./output
245 cat >./expect <<-EOF
246 route to: 10.0.1.1
251 flags: <UP,DONE,CONNECTED>
254 rump.route -n get $IP4SRCGW > ./output
256 sed -i '$d' ./output
257 atf_check -s exit:0 diff ./expect ./output
260 cat >./expect <<-EOF
261 route to: 10.0.2.2
267 flags: <UP,GATEWAY,DONE,STATIC>
270 rump.route -n get $IP4DST > ./output
272 sed -i '$d' ./output
273 atf_check -s exit:0 diff ./expect ./output
276 atf_check -s exit:0 -o ignore rump.ping -q -n -w $TIMEOUT -c 1 $IP4SRCGW
279 cat >./expect <<-EOF
280 route to: 10.0.1.1
285 flags: <UP,DONE,CONNECTED>
288 rump.route -n get $IP4SRCGW > ./output
290 sed -i '$d' ./output
291 atf_check -s exit:0 diff ./expect ./output
298 $DEBUG && rump.netstat -nr -f inet
299 $DEBUG && rump.ndp -n -a
302 rump.ndp -d $IP6SRCGW
305 cat >./expect <<-EOF
306 route to: fc00:0:0:1::2
310 flags: <UP,HOST,DONE,LLINFO,LOCAL>
313 rump.route -n get -inet6 $IP6SRC > ./output
315 sed -i '$d' ./output
316 atf_check -s exit:0 diff ./expect ./output
319 cat >./expect <<-EOF
320 route to: fc00:0:0:1::1
325 flags: <UP,DONE,CONNECTED>
328 rump.route -n get -inet6 $IP6SRCGW > ./output
330 sed -i '$d' ./output
331 atf_check -s exit:0 diff ./expect ./output
334 cat >./expect <<-EOF
335 route to: fc00:0:0:2::2
341 flags: <UP,GATEWAY,DONE,STATIC>
344 rump.route -n get -inet6 $IP6DST > ./output
346 sed -i '$d' ./output
347 atf_check -s exit:0 diff ./expect ./output
350 atf_check -s exit:0 -o ignore rump.ping6 -n -c 1 -X $TIMEOUT $IP6SRCGW
353 cat >./expect <<-EOF
354 route to: fc00:0:0:1::1
359 flags: <UP,DONE,CONNECTED>
362 rump.route -n get -inet6 $IP6SRCGW > ./output
364 sed -i '$d' ./output
365 atf_check -s exit:0 diff ./expect ./output