|
1 # |
|
2 # Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of "Eclipse Public License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: |
|
15 # USE-CASE-21: Foreign Agent Handover |
|
16 # |
|
17 |
|
18 ####################################################################################### |
|
19 # |
|
20 # Do some initialisations |
|
21 # |
|
22 ####################################################################################### |
|
23 runcmd svcid=6 svchost="penuu" methodid=2 SRC="192.168.14.10:5000.udp" DST="192.169.10.11:5000.udp" DROPI=0 |
|
24 runcmd svcid=8 svchost="penmn" methodid=1 CMD="cp --reply=yes /etc/ppp/BACKUP-ip-up.local /etc/ppp/ip-up.local" |
|
25 runcmd svcid=2 svchost="penha" methodid=13 TIMEOUT=10 |
|
26 runcmd svcid=3 svchost="penpdsn" methodid=13 TIMEOUT=10 |
|
27 |
|
28 |
|
29 ####################################################################################### |
|
30 # |
|
31 # Startup the Mobster service on the MN and the PDSN |
|
32 # |
|
33 ####################################################################################### |
|
34 runcmd svcid=5 svchost="penmn" methodid=1 PORT=7000 |
|
35 check RESULT=0 |
|
36 runcmd svcid=5 svchost="penpdsn" methodid=1 PORT=7000 |
|
37 check RESULT=0 |
|
38 |
|
39 |
|
40 ####################################################################################### |
|
41 # |
|
42 # Create a device on each machine and set them as peers |
|
43 # |
|
44 ####################################################################################### |
|
45 runcmd svcid=5 svchost="penmn" methodid=3 DATALINKCONFIG=2 FILTERCONFIG=0 |
|
46 assign mt0=RESULT |
|
47 runcmd svcid=5 svchost="penpdsn" methodid=3 DATALINKCONFIG=2 FILTERCONFIG=0 |
|
48 assign mt1=RESULT |
|
49 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 |
|
50 runcmd svcid=5 svchost="penmn" methodid=4 DEVICEID=mt0 |
|
51 assign local_uu_port0=AIR_INPORT |
|
52 runcmd svcid=5 svchost="penpdsn" methodid=4 DEVICEID=mt1 |
|
53 assign local_uu_port1=AIR_INPORT |
|
54 runcmd svcid=5 svchost="penmn" methodid=10 DEVICEID=mt0 REMOTE_ADDRESS="192.169.10.11" REMOTE_PORT=local_uu_port1 |
|
55 runcmd svcid=5 svchost="penpdsn" methodid=10 DEVICEID=mt1 REMOTE_ADDRESS="10.22.1.6" REMOTE_PORT=local_uu_port0 |
|
56 |
|
57 |
|
58 ####################################################################################### |
|
59 # |
|
60 # Create a PPP session on the MN and PDSN |
|
61 # |
|
62 ####################################################################################### |
|
63 runcmd svcid=7 svchost="penmn" methodid=3 MADDR="localhost" MPORT=7000 CONFIG="defaultroute noauth 0.0.0.1:192.168.200.20 debug nodetach" |
|
64 runcmd svcid=7 svchost="penpdsn" methodid=3 MADDR="localhost" MPORT=7000 CONFIG="noauth 192.168.200.20:0.0.0.1 debug nodetach" |
|
65 |
|
66 |
|
67 ####################################################################################### |
|
68 # |
|
69 # The PPP session should now be setup. |
|
70 # |
|
71 ####################################################################################### |
|
72 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 |
|
73 |
|
74 |
|
75 ####################################################################################### |
|
76 # |
|
77 # Start the home agent and the foreign agent running. |
|
78 # |
|
79 ####################################################################################### |
|
80 runcmd svcid=2 svchost="penha" methodid=6 TOKEN="MaxBindings" VALUE=0 |
|
81 runcmd svcid=2 svchost="penha" methodid=3 |
|
82 runcmd svcid=3 svchost="penpdsn" methodid=3 |
|
83 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=3000 |
|
84 |
|
85 |
|
86 ####################################################################################### |
|
87 # |
|
88 # Start the mobile node service, create ann object, and start the agent |
|
89 # |
|
90 ####################################################################################### |
|
91 runcmd svcid=4 svchost="penmn" methodid=1 |
|
92 check RESULT=0 |
|
93 runcmd svcid=4 svchost="penmn" methodid=31 |
|
94 assign mn0=RESULT |
|
95 runcmd svcid=4 svchost="penmn" methodid=3 AGENTID=mn0 |
|
96 check RESULT=0 |
|
97 |
|
98 |
|
99 ####################################################################################### |
|
100 # |
|
101 # Signal that we have completed the setup. |
|
102 # |
|
103 ####################################################################################### |
|
104 signal |
|
105 |
|
106 |
|
107 ####################################################################################### |
|
108 # |
|
109 # Wait for signal to say disconnect |
|
110 # |
|
111 ####################################################################################### |
|
112 waitforsignal |
|
113 |
|
114 |
|
115 ####################################################################################### |
|
116 # |
|
117 # Stop the MN (deregister MIP) |
|
118 # |
|
119 ####################################################################################### |
|
120 runcmd svcid=4 svchost="penmn" methodid=4 AGENTID=mn0 |
|
121 check RESULT=0 |
|
122 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 |
|
123 runcmd svcid=3 svchost="penpdsn" methodid=4 |
|
124 runcmd svcid=2 svchost="penha" methodid=4 |
|
125 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=1000 |
|
126 |
|
127 |
|
128 ####################################################################################### |
|
129 # |
|
130 # Now stop the PPP connection between the MN and the PDSN |
|
131 # |
|
132 ####################################################################################### |
|
133 runcmd svcid=7 svchost="penpdsn" methodid=4 SID=0 |
|
134 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=1000 |
|
135 runcmd svcid=7 svchost="penpdsn" methodid=6 SID=0 |
|
136 runcmd svcid=7 svchost="penmn" methodid=4 SID=0 |
|
137 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=1000 |
|
138 runcmd svcid=7 svchost="penmn" methodid=6 SID=0 |
|
139 |
|
140 |
|
141 ####################################################################################### |
|
142 # |
|
143 # Remove the mobster devices |
|
144 # |
|
145 ####################################################################################### |
|
146 runcmd svcid=5 svchost="penpdsn" methodid=6 DEVICEID=mt1 |
|
147 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=1000 |
|
148 runcmd svcid=5 svchost="penpdsn" methodid=7 DEVICEID=mt1 |
|
149 runcmd svcid=5 svchost="penmn" methodid=6 DEVICEID=mt0 |
|
150 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=1000 |
|
151 runcmd svcid=5 svchost="penmn" methodid=7 DEVICEID=mt0 |
|
152 |
|
153 |
|
154 ####################################################################################### |
|
155 # |
|
156 # Signal that the connection has been brought down |
|
157 # |
|
158 ####################################################################################### |
|
159 signal |
|
160 |
|
161 |
|
162 ####################################################################################### |
|
163 # |
|
164 # Wait for a signal to bring the connection back up |
|
165 # |
|
166 ####################################################################################### |
|
167 waitforsignal |
|
168 |
|
169 |
|
170 ####################################################################################### |
|
171 # |
|
172 # Create a device on each machine and set them as peers |
|
173 # |
|
174 ####################################################################################### |
|
175 runcmd svcid=5 svchost="penmn" methodid=3 DATALINKCONFIG=2 FILTERCONFIG=0 |
|
176 assign mt0=RESULT |
|
177 runcmd svcid=5 svchost="penpdsn" methodid=3 DATALINKCONFIG=2 FILTERCONFIG=0 |
|
178 assign mt1=RESULT |
|
179 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 |
|
180 runcmd svcid=5 svchost="penmn" methodid=4 DEVICEID=mt0 |
|
181 assign local_uu_port0=AIR_INPORT |
|
182 runcmd svcid=5 svchost="penpdsn" methodid=4 DEVICEID=mt1 |
|
183 assign local_uu_port1=AIR_INPORT |
|
184 runcmd svcid=5 svchost="penmn" methodid=10 DEVICEID=mt0 REMOTE_ADDRESS="192.169.10.11" REMOTE_PORT=local_uu_port1 |
|
185 runcmd svcid=5 svchost="penpdsn" methodid=10 DEVICEID=mt1 REMOTE_ADDRESS="10.22.1.6" REMOTE_PORT=local_uu_port0 |
|
186 |
|
187 |
|
188 ####################################################################################### |
|
189 # |
|
190 # Restart the PPP connection |
|
191 # |
|
192 ####################################################################################### |
|
193 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=1000 |
|
194 runcmd svcid=7 svchost="penmn" methodid=3 MADDR="localhost" MPORT=4000 CONFIG="defaultroute noauth 0.0.0.2:192.168.220.20 debug nodetach" |
|
195 runcmd svcid=7 svchost="penpdsn" methodid=3 MADDR="localhost" MPORT=4000 CONFIG="noauth 192.168.220.20:0.0.0.2 debug nodetach" |
|
196 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=6000 |
|
197 |
|
198 |
|
199 ####################################################################################### |
|
200 # |
|
201 # Restart the mobile agent (and the FA) |
|
202 # |
|
203 ####################################################################################### |
|
204 runcmd svcid=2 svchost="penha" methodid=3 |
|
205 runcmd svcid=3 svchost="penpdsn" methodid=3 |
|
206 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=3000 |
|
207 runcmd svcid=4 svchost="penmn" methodid=3 AGENTID=mn0 |
|
208 check RESULT=0 |
|
209 signal |
|
210 |
|
211 |
|
212 ####################################################################################### |
|
213 # |
|
214 # Stop the MA, FA, HA |
|
215 # |
|
216 ####################################################################################### |
|
217 waitforsignal |
|
218 runcmd svcid=4 svchost="penmn" methodid=4 AGENTID=mn0 |
|
219 check RESULT=0 |
|
220 runcmd svcid=4 svchost="penmn" methodid=32 AGENTID=mn0 |
|
221 check RESULT=0 |
|
222 runcmd svcid=4 svchost="penmn" methodid=2 |
|
223 check RESULT=0 |
|
224 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 |
|
225 runcmd svcid=3 svchost="penpdsn" methodid=4 |
|
226 runcmd svcid=2 svchost="penha" methodid=4 |
|
227 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=1000 |
|
228 |
|
229 |
|
230 ####################################################################################### |
|
231 # |
|
232 # Cleanup the PPP session (MN and PDSN) (hardcode session ID as zero) retrieving all the logs |
|
233 # |
|
234 ####################################################################################### |
|
235 runcmd svcid=7 svchost="penpdsn" methodid=4 SID=0 |
|
236 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=1000 |
|
237 runcmd svcid=7 svchost="penpdsn" methodid=6 SID=0 |
|
238 runcmd svcid=7 svchost="penmn" methodid=4 SID=0 |
|
239 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=1000 |
|
240 runcmd svcid=7 svchost="penmn" methodid=6 SID=0 |
|
241 |
|
242 runcmd svcid=5 svchost="penpdsn" methodid=6 DEVICEID=mt1 |
|
243 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=1000 |
|
244 runcmd svcid=5 svchost="penpdsn" methodid=7 DEVICEID=mt1 |
|
245 runcmd svcid=5 svchost="penmn" methodid=6 DEVICEID=mt0 |
|
246 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=1000 |
|
247 runcmd svcid=5 svchost="penmn" methodid=7 DEVICEID=mt0 |
|
248 |
|
249 |
|
250 ####################################################################################### |
|
251 # |
|
252 # We should be back to our original state now -- quit |
|
253 # |
|
254 ####################################################################################### |
|
255 runcmd svcid=8 svchost="penmn" methodid=1 CMD="rm -f /etc/ppp/ip-up.local" |
|
256 rendezvous |
|
257 |
|
258 |
|
259 |
|
260 |
|
261 |