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

1 #	$NetBSD: t_change.sh,v 1.9 2016/11/07 05:25:37 ozaki-r Exp $
29 "rump_server -lrumpdev -lrumpnet -lrumpnet_net \
30 -lrumpnet_netinet -lrumpnet_shmif"
33 DEBUG=${DEBUG:-false}
39 atf_set "descr" "Change a reject route to blackhole"
46 atf_check -s exit:0 ${netserver} ${RUMP_SERVER}
48 atf_check -s exit:0 -o ignore \
49 rump.route add 207.46.197.32 127.0.0.1 -reject
50 atf_check -s exit:0 -o match:UGHR -x \
51 "rump.route -n show -inet | grep ^207.46"
52 atf_check -s exit:0 -o ignore \
53 rump.route change 207.46.197.32 127.0.0.1 -blackhole
54 atf_check -s exit:0 -o match:' UGHBS ' -e ignore -x \
55 "rump.netstat -rn -f inet | grep ^207.46"
68 atf_set "descr" "Change the gateway of a route"
75 atf_check -s exit:0 ${netserver} ${RUMP_SERVER}
77 atf_check -s exit:0 rump.ifconfig shmif0 create
78 atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus
79 atf_check -s exit:0 rump.ifconfig shmif0 10.0.0.10/24 up
81 atf_check -s exit:0 -o ignore \
82 rump.route add -net 192.168.0.0/24 10.0.0.1
83 atf_check -s exit:0 -o match:'10.0.0.1' -x \
84 "rump.route -n show -inet | grep ^192.168"
85 atf_check -s exit:0 -o ignore \
86 rump.route change -net 192.168.0.0/24 10.0.0.254
87 atf_check -s exit:0 -o match:'10.0.0.254' -x \
88 "rump.route -n show -inet | grep ^192.168"
101 atf_set "descr" "Change the ifa (local address) of a route"
108 atf_check -s exit:0 ${netserver} ${RUMP_SERVER}
110 atf_check -s exit:0 rump.ifconfig shmif0 create
111 atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus
112 atf_check -s exit:0 rump.ifconfig shmif0 10.0.0.10/24
113 atf_check -s exit:0 rump.ifconfig shmif0 alias 10.0.0.11/24
114 atf_check -s exit:0 rump.ifconfig shmif0 up
116 atf_check -s exit:0 -o ignore \
117 rump.route add -net 192.168.0.0/24 10.0.0.1
118 atf_check -s exit:0 -o match:'10.0.0.1' -x \
119 "rump.route -n show -inet | grep ^192.168"
120 $DEBUG && rump.route -n show -inet
121 cat >./expect <<-EOF
122 route to: 192.168.0.1
128 flags: <UP,GATEWAY,DONE,STATIC>
131 rump.route -n get 192.168.0.1 > ./output
133 sed -i '$d' ./output
134 atf_check -s exit:0 diff ./expect ./output
136 # Change the local address of the route
137 atf_check -s exit:0 -o ignore \
138 rump.route change -net 192.168.0.0/24 10.0.0.1 -ifa 10.0.0.11
139 $DEBUG && rump.route -n show -inet
140 cat >./expect <<-EOF
141 route to: 192.168.0.1
147 flags: <UP,GATEWAY,DONE,STATIC>
150 rump.route -n get 192.168.0.1 > ./output
152 sed -i '$d' ./output
153 atf_check -s exit:0 diff ./expect ./output
166 atf_set "descr" "Change a route based on an interface (ifp)"
173 atf_check -s exit:0 ${netserver} ${RUMP_SERVER}
175 atf_check -s exit:0 rump.ifconfig shmif0 create
176 atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus
177 atf_check -s exit:0 rump.ifconfig shmif0 10.0.0.10/24 up
179 atf_check -s exit:0 rump.ifconfig shmif1 create
180 atf_check -s exit:0 rump.ifconfig shmif1 linkstr bus
181 atf_check -s exit:0 rump.ifconfig shmif1 10.0.0.11/24 up
183 atf_check -s exit:0 -o ignore \
184 rump.route add -net 192.168.0.0/24 10.0.0.1
185 atf_check -s exit:0 -o match:'10.0.0.1' -x \
186 "rump.route -n show -inet | grep ^192.168"
187 $DEBUG && rump.route -n show -inet
188 cat >./expect <<-EOF
189 route to: 192.168.0.1
195 flags: <UP,GATEWAY,DONE,STATIC>
198 rump.route -n get 192.168.0.1 > ./output
200 sed -i '$d' ./output
201 atf_check -s exit:0 diff ./expect ./output
203 # Change a route based on an interface
204 atf_check -s exit:0 -o ignore \
205 rump.route change -net 192.168.0.0/24 10.0.0.1 -ifp shmif1
206 $DEBUG && rump.route -n show -inet
207 cat >./expect <<-EOF
208 route to: 192.168.0.1
214 flags: <UP,GATEWAY,DONE,STATIC>
217 rump.route -n get 192.168.0.1 > ./output
219 sed -i '$d' ./output
220 atf_check -s exit:0 diff ./expect ./output
233 atf_set "descr" "Change a route with -ifp and -ifa"
240 atf_check -s exit:0 ${netserver} ${RUMP_SERVER}
242 atf_check -s exit:0 rump.ifconfig shmif0 create
243 atf_check -s exit:0 rump.ifconfig shmif0 linkstr bus
244 atf_check -s exit:0 rump.ifconfig shmif0 10.0.0.10/24 up
246 atf_check -s exit:0 rump.ifconfig shmif1 create
247 atf_check -s exit:0 rump.ifconfig shmif1 linkstr bus
248 atf_check -s exit:0 rump.ifconfig shmif1 10.0.0.11/24 up
250 atf_check -s exit:0 -o ignore \
251 rump.route add -net 192.168.0.0/24 10.0.0.1
252 atf_check -s exit:0 -o match:'10.0.0.1' -x \
253 "rump.route -n show -inet | grep ^192.168"
254 $DEBUG && rump.route -n show -inet
255 cat >./expect <<-EOF
256 route to: 192.168.0.1
262 flags: <UP,GATEWAY,DONE,STATIC>
265 rump.route -n get 192.168.0.1 > ./output
267 sed -i '$d' ./output
268 atf_check -s exit:0 diff ./expect ./output
270 # Change a route with -ifa and -ifp
271 atf_check -s exit:0 -o ignore \
272 rump.route change -net 192.168.0.0/24 -ifa 10.0.0.1 -ifp shmif1
273 $DEBUG && rump.route -n show -inet
274 cat >./expect <<-EOF
275 route to: 192.168.0.1
281 flags: <UP,GATEWAY,DONE,STATIC>
284 rump.route -n get 192.168.0.1 > ./output
286 sed -i '$d' ./output
287 atf_check -s exit:0 diff ./expect ./output