11
|
1 |
diff -r a1527ef7aacd .hgignore
|
|
2 |
--- a/.hgignore Thu Mar 29 13:55:03 2012 +0900
|
|
3 |
+++ b/.hgignore Thu Mar 29 13:55:22 2012 +0900
|
|
4 |
@@ -8,3 +8,4 @@
|
1
|
5 |
^files-
|
|
6 |
^.waf-
|
|
7 |
^.lock-
|
|
8 |
+pcap
|
11
|
9 |
diff -r a1527ef7aacd 3967.weights.intra
|
1
|
10 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
11
|
11 |
+++ b/3967.weights.intra Thu Mar 29 13:55:22 2012 +0900
|
1
|
12 |
@@ -0,0 +1,294 @@
|
|
13 |
+San+Jose,+CA471 Santa+Clara,+CA444 4.5
|
|
14 |
+San+Jose,+CA471 Santa+Clara,+CA389 4
|
|
15 |
+San+Jose,+CA471 San+Jose,+CA472 3.5
|
|
16 |
+San+Jose,+CA471 Oak+Brook,+IL301 14.5
|
|
17 |
+San+Jose,+CA472 San+Jose,+CA471 3.5
|
|
18 |
+San+Jose,+CA472 Santa+Clara,+CA430 2
|
|
19 |
+San+Jose,+CA472 Santa+Clara,+CA389 3.5
|
|
20 |
+San+Jose,+CA472 Santa+Clara,+CA431 2.5
|
|
21 |
+Weehawken,+NJ543 New+York,+NY293 8
|
|
22 |
+Weehawken,+NJ543 Atlanta,+GA127 18.5
|
|
23 |
+Weehawken,+NJ543 New+York,+NY294 2.5
|
|
24 |
+Weehawken,+NJ543 Weehawken,+NJ544 2
|
|
25 |
+Weehawken,+NJ543 Weehawken,+NJ552 2
|
|
26 |
+Weehawken,+NJ543 Oak+Brook,+IL300 12
|
|
27 |
+Weehawken,+NJ543 Jersey+City,+NJ244 2
|
|
28 |
+Oak+Brook,+IL307 Oak+Brook,+IL315 2
|
|
29 |
+Oak+Brook,+IL307 Oak+Brook,+IL300 2
|
|
30 |
+Oak+Brook,+IL307 Oak+Brook,+IL301 2
|
|
31 |
+Herndon,+VA193 Herndon,+VA496 3
|
|
32 |
+Herndon,+VA193 Atlanta,+GA126 4.5
|
|
33 |
+Herndon,+VA193 Atlanta,+GA127 7.5
|
|
34 |
+Weehawken,+NJ544 Jersey+City,+NJ245 2
|
|
35 |
+Weehawken,+NJ544 London274 4
|
|
36 |
+Weehawken,+NJ544 London275 4.5
|
|
37 |
+Weehawken,+NJ544 London276 4
|
|
38 |
+Weehawken,+NJ544 Weehawken,+NJ543 2
|
|
39 |
+Weehawken,+NJ544 Weehawken,+NJ552 2
|
|
40 |
+Weehawken,+NJ544 New+York,+NY293 5
|
|
41 |
+Weehawken,+NJ544 Herndon,+VA495 4
|
|
42 |
+Oak+Brook,+IL308 Oak+Brook,+IL315 2
|
|
43 |
+Oak+Brook,+IL308 Oak+Brook,+IL300 2
|
|
44 |
+Oak+Brook,+IL308 Oak+Brook,+IL301 2
|
|
45 |
+Toronto,+Canada537 Waltham,+MA555 1
|
|
46 |
+Oak+Brook,+IL309 Oak+Brook,+IL300 2
|
|
47 |
+Oak+Brook,+IL309 Oak+Brook,+IL301 2.5
|
|
48 |
+Toronto,+Canada538 Oak+Brook,+IL300 1
|
|
49 |
+Palo+Alto,+CA317 Santa+Clara,+CA388 3
|
|
50 |
+Palo+Alto,+CA317 Palo+Alto,+CA104 2.5
|
|
51 |
+Palo+Alto,+CA317 Santa+Clara,+CA336 2.5
|
|
52 |
+Palo+Alto,+CA317 Palo+Alto,+CA318 2
|
|
53 |
+Palo+Alto,+CA318 Santa+Clara,+CA363 2
|
|
54 |
+Palo+Alto,+CA318 Santa+Clara,+CA364 2
|
|
55 |
+Palo+Alto,+CA318 Palo+Alto,+CA317 2
|
|
56 |
+Amsterdam119 London274 2
|
|
57 |
+Amsterdam119 London275 5.5
|
|
58 |
+Amsterdam119 Frankfurt185 1
|
|
59 |
+Tukwila,+WA508 Tukwila,+WA509 2
|
|
60 |
+Tukwila,+WA508 Santa+Clara,+CA429 7
|
|
61 |
+Tukwila,+WA508 Chicago,+IL155 9
|
|
62 |
+Oak+Brook,+IL310 Oak+Brook,+IL300 2
|
|
63 |
+Oak+Brook,+IL310 Oak+Brook,+IL301 3.5
|
|
64 |
+Tukwila,+WA509 Chicago,+IL155 6
|
|
65 |
+Tukwila,+WA509 Tukwila,+WA508 2
|
|
66 |
+Santa+Clara,+CA388 Santa+Clara,+CA430 2
|
|
67 |
+Santa+Clara,+CA388 Santa+Clara,+CA389 2.5
|
|
68 |
+Santa+Clara,+CA388 Palo+Alto,+CA317 3
|
|
69 |
+Santa+Clara,+CA388 San+Jose,+CA460 3
|
|
70 |
+Palo+Alto,+CA104 Santa+Clara,+CA444 2.5
|
|
71 |
+Palo+Alto,+CA104 Santa+Clara,+CA365 2
|
|
72 |
+Palo+Alto,+CA104 Palo+Alto,+CA317 2.5
|
|
73 |
+Palo+Alto,+CA104 Santa+Clara,+CA403 2
|
|
74 |
+Santa+Clara,+CA389 San+Jose,+CA471 4
|
|
75 |
+Santa+Clara,+CA389 Santa+Clara,+CA388 2.5
|
|
76 |
+Santa+Clara,+CA389 San+Jose,+CA472 3.5
|
|
77 |
+Santa+Clara,+CA389 Santa+Clara,+CA443 4
|
|
78 |
+Santa+Clara,+CA389 Santa+Clara,+CA403 3
|
|
79 |
+Oak+Brook,+IL315 Oak+Brook,+IL307 2
|
|
80 |
+Oak+Brook,+IL315 Oak+Brook,+IL300 2
|
|
81 |
+Oak+Brook,+IL315 Oak+Brook,+IL308 2
|
|
82 |
+Oak+Brook,+IL315 Oak+Brook,+IL301 2.5
|
|
83 |
+Weehawken,+NJ552 Weehawken,+NJ543 2
|
|
84 |
+Weehawken,+NJ552 Weehawken,+NJ544 2
|
|
85 |
+Weehawken,+NJ552 Oak+Brook,+IL300 13
|
|
86 |
+Chicago,+IL155 Tukwila,+WA509 6
|
|
87 |
+Chicago,+IL155 Oak+Brook,+IL301 2
|
|
88 |
+Chicago,+IL155 Chicago,+IL156 2.5
|
|
89 |
+Chicago,+IL155 Tukwila,+WA508 9
|
|
90 |
+Chicago,+IL156 Oak+Brook,+IL300 2
|
|
91 |
+Chicago,+IL156 Fort+Worth,+TX189 7
|
|
92 |
+Chicago,+IL156 Chicago,+IL155 2.5
|
|
93 |
+Fort+Worth,+TX189 Irvine,+CA228 17
|
|
94 |
+Fort+Worth,+TX189 Austin,+TX137 4
|
|
95 |
+Fort+Worth,+TX189 Fort+Worth,+TX190 2
|
|
96 |
+Fort+Worth,+TX189 Chicago,+IL156 7
|
|
97 |
+Fort+Worth,+TX189 Santa+Clara,+CA403 16
|
|
98 |
+Fort+Worth,+TX189 Fort+Worth,+TX191 3.5
|
|
99 |
+Herndon,+VA495 Herndon,+VA496 2
|
|
100 |
+Herndon,+VA495 Herndon,+VA208 5
|
|
101 |
+Herndon,+VA495 Weehawken,+NJ544 4
|
|
102 |
+Jersey+City,+NJ244 Jersey+City,+NJ261 4
|
|
103 |
+Jersey+City,+NJ244 Frankfurt184 1
|
|
104 |
+Jersey+City,+NJ244 Jersey+City,+NJ245 2
|
|
105 |
+Jersey+City,+NJ244 Weehawken,+NJ543 2
|
|
106 |
+Jersey+City,+NJ244 Waltham,+MA568 5
|
|
107 |
+Jersey+City,+NJ244 London277 1
|
|
108 |
+Jersey+City,+NJ244 Waltham,+MA569 2
|
|
109 |
+Herndon,+VA496 Santa+Clara,+CA429 22.5
|
|
110 |
+Herndon,+VA496 Herndon,+VA193 3
|
|
111 |
+Herndon,+VA496 Herndon,+VA495 2
|
|
112 |
+Irvine,+CA212 El+Segundo,+CA163 1
|
|
113 |
+Tokyo525 Santa+Clara,+CA404 2.5
|
|
114 |
+Tokyo525 Tokyo526 2
|
|
115 |
+Irvine,+CA213 Santa+Clara,+CA404 10
|
|
116 |
+Irvine,+CA213 Irvine,+CA228 4
|
|
117 |
+Irvine,+CA213 El+Segundo,+CA164 2
|
|
118 |
+Jersey+City,+NJ245 Jersey+City,+NJ261 3
|
|
119 |
+Jersey+City,+NJ245 London274 2
|
|
120 |
+Jersey+City,+NJ245 New+York,+NY294 2.5
|
|
121 |
+Jersey+City,+NJ245 London275 2.5
|
|
122 |
+Jersey+City,+NJ245 London276 2
|
|
123 |
+Jersey+City,+NJ245 Weehawken,+NJ544 2
|
|
124 |
+Jersey+City,+NJ245 Jersey+City,+NJ244 2
|
|
125 |
+Tokyo526 Tokyo525 2
|
|
126 |
+Tokyo526 Santa+Clara,+CA336 2.5
|
|
127 |
+Tokyo526 San+Jose,+CA460 2
|
|
128 |
+Waltham,+MA555 Waltham,+MA556 2
|
|
129 |
+Waltham,+MA555 Waltham,+MA568 2
|
|
130 |
+Waltham,+MA555 Oak+Brook,+IL300 13
|
|
131 |
+Waltham,+MA555 Toronto,+Canada537 1
|
|
132 |
+Waltham,+MA556 Oak+Brook,+IL300 10
|
|
133 |
+Waltham,+MA556 Waltham,+MA569 7
|
|
134 |
+Waltham,+MA556 Waltham,+MA555 2
|
|
135 |
+Herndon,+VA206 New+York,+NY293 2
|
|
136 |
+Herndon,+VA206 Herndon,+VA208 2
|
|
137 |
+Santa+Clara,+CA429 Herndon,+VA496 22.5
|
|
138 |
+Santa+Clara,+CA429 Santa+Clara,+CA430 2
|
|
139 |
+Santa+Clara,+CA429 Santa+Clara,+CA431 5.5
|
|
140 |
+Santa+Clara,+CA429 San+Jose,+CA459 2
|
|
141 |
+Santa+Clara,+CA429 Tukwila,+WA508 7
|
|
142 |
+Santa+Clara,+CA429 Santa+Clara,+CA403 4.5
|
|
143 |
+Herndon,+VA208 Herndon,+VA206 2
|
|
144 |
+Herndon,+VA208 New+York,+NY293 4
|
|
145 |
+Herndon,+VA208 Herndon,+VA495 5
|
|
146 |
+Atlanta,+GA126 Atlanta,+GA127 3
|
|
147 |
+Atlanta,+GA126 Herndon,+VA193 4.5
|
|
148 |
+Atlanta,+GA126 Atlanta,+GA133 4
|
|
149 |
+Miami,+FL285 New+York,+NY293 5
|
|
150 |
+Miami,+FL285 Miami,+FL286 8
|
|
151 |
+Atlanta,+GA127 Atlanta,+GA126 3
|
|
152 |
+Atlanta,+GA127 Miami,+FL286 2.5
|
|
153 |
+Atlanta,+GA127 Weehawken,+NJ543 18.5
|
|
154 |
+Atlanta,+GA127 Herndon,+VA193 7.5
|
|
155 |
+Atlanta,+GA127 Fort+Worth,+TX190 3.5
|
|
156 |
+Atlanta,+GA127 Atlanta,+GA133 2
|
|
157 |
+Miami,+FL286 Miami,+FL285 8
|
|
158 |
+Miami,+FL286 Atlanta,+GA127 2.5
|
|
159 |
+Fort+Worth,+TX190 Irvine,+CA228 14
|
|
160 |
+Fort+Worth,+TX190 Atlanta,+GA127 3.5
|
|
161 |
+Fort+Worth,+TX190 Irvine,+CA229 16
|
|
162 |
+Fort+Worth,+TX190 Austin,+TX136 1
|
|
163 |
+Fort+Worth,+TX190 Fort+Worth,+TX189 2
|
|
164 |
+Fort+Worth,+TX190 Fort+Worth,+TX191 2.5
|
|
165 |
+San+Jose,+CA459 Santa+Clara,+CA429 2
|
|
166 |
+San+Jose,+CA459 San+Jose,+CA460 6
|
|
167 |
+Fort+Worth,+TX191 Fort+Worth,+TX189 3.5
|
|
168 |
+Fort+Worth,+TX191 Fort+Worth,+TX190 2.5
|
|
169 |
+New+York,+NY293 Miami,+FL285 5
|
|
170 |
+New+York,+NY293 Herndon,+VA206 2
|
|
171 |
+New+York,+NY293 Herndon,+VA208 4
|
|
172 |
+New+York,+NY293 New+York,+NY294 5.5
|
|
173 |
+New+York,+NY293 Weehawken,+NJ543 8
|
|
174 |
+New+York,+NY293 Weehawken,+NJ544 5
|
|
175 |
+New+York,+NY294 Jersey+City,+NJ245 2.5
|
|
176 |
+New+York,+NY294 New+York,+NY293 5.5
|
|
177 |
+New+York,+NY294 Weehawken,+NJ543 2.5
|
|
178 |
+London274 Jersey+City,+NJ245 2
|
|
179 |
+London274 Amsterdam119 2
|
|
180 |
+London274 Weehawken,+NJ544 4
|
|
181 |
+London275 Jersey+City,+NJ245 2.5
|
|
182 |
+London275 Amsterdam119 5.5
|
|
183 |
+London275 Weehawken,+NJ544 4.5
|
|
184 |
+Santa+Clara,+CA430 Santa+Clara,+CA404 4.5
|
|
185 |
+Santa+Clara,+CA430 Santa+Clara,+CA364 5.5
|
|
186 |
+Santa+Clara,+CA430 Santa+Clara,+CA429 2
|
|
187 |
+Santa+Clara,+CA430 Santa+Clara,+CA388 2
|
|
188 |
+Santa+Clara,+CA430 San+Jose,+CA472 2
|
|
189 |
+Santa+Clara,+CA430 Santa+Clara,+CA336 2.5
|
|
190 |
+Santa+Clara,+CA430 Santa+Clara,+CA443 3.5
|
|
191 |
+London276 Jersey+City,+NJ245 2
|
|
192 |
+London276 Weehawken,+NJ544 4
|
|
193 |
+Santa+Clara,+CA431 Santa+Clara,+CA363 2
|
|
194 |
+Santa+Clara,+CA431 Santa+Clara,+CA429 5.5
|
|
195 |
+Santa+Clara,+CA431 Santa+Clara,+CA364 2
|
|
196 |
+Santa+Clara,+CA431 Santa+Clara,+CA365 4
|
|
197 |
+Santa+Clara,+CA431 San+Jose,+CA472 2.5
|
|
198 |
+Santa+Clara,+CA431 Santa+Clara,+CA443 4
|
|
199 |
+London277 Jersey+City,+NJ244 1
|
|
200 |
+Santa+Clara,+CA363 Santa+Clara,+CA431 2
|
|
201 |
+Santa+Clara,+CA363 Palo+Alto,+CA318 2
|
|
202 |
+Irvine,+CA228 Irvine,+CA213 4
|
|
203 |
+Irvine,+CA228 Irvine,+CA229 2
|
|
204 |
+Irvine,+CA228 Irvine,+CA237 2
|
|
205 |
+Irvine,+CA228 Irvine,+CA230 3
|
|
206 |
+Irvine,+CA228 Irvine,+CA231 2
|
|
207 |
+Irvine,+CA228 Fort+Worth,+TX189 17
|
|
208 |
+Irvine,+CA228 Fort+Worth,+TX190 14
|
|
209 |
+Santa+Clara,+CA364 Santa+Clara,+CA430 5.5
|
|
210 |
+Santa+Clara,+CA364 Santa+Clara,+CA431 2
|
|
211 |
+Santa+Clara,+CA364 Palo+Alto,+CA318 2
|
|
212 |
+Irvine,+CA229 Irvine,+CA228 2
|
|
213 |
+Irvine,+CA229 El+Segundo,+CA164 3
|
|
214 |
+Irvine,+CA229 Fort+Worth,+TX190 16
|
|
215 |
+Santa+Clara,+CA365 Palo+Alto,+CA104 2
|
|
216 |
+Santa+Clara,+CA365 Santa+Clara,+CA431 4
|
|
217 |
+Waltham,+MA568 Waltham,+MA569 2
|
|
218 |
+Waltham,+MA568 Jersey+City,+NJ244 5
|
|
219 |
+Waltham,+MA568 Waltham,+MA555 2
|
|
220 |
+Waltham,+MA569 Waltham,+MA556 7
|
|
221 |
+Waltham,+MA569 Waltham,+MA568 2
|
|
222 |
+Waltham,+MA569 Jersey+City,+NJ244 2
|
|
223 |
+Atlanta,+GA133 Atlanta,+GA126 4
|
|
224 |
+Atlanta,+GA133 Atlanta,+GA127 2
|
|
225 |
+San+Jose,+CA460 Tokyo526 2
|
|
226 |
+San+Jose,+CA460 Santa+Clara,+CA388 3
|
|
227 |
+San+Jose,+CA460 San+Jose,+CA459 6
|
|
228 |
+San+Jose,+CA460 Santa+Clara,+CA443 2.5
|
|
229 |
+El+Segundo,+CA163 Irvine,+CA212 1
|
|
230 |
+El+Segundo,+CA163 Santa+Clara,+CA404 5
|
|
231 |
+El+Segundo,+CA163 Santa+Clara,+CA405 3
|
|
232 |
+El+Segundo,+CA163 El+Segundo,+CA164 2
|
|
233 |
+El+Segundo,+CA163 Austin,+TX137 16
|
|
234 |
+Austin,+TX136 Fort+Worth,+TX190 1
|
|
235 |
+El+Segundo,+CA164 Irvine,+CA213 2
|
|
236 |
+El+Segundo,+CA164 Irvine,+CA229 3
|
|
237 |
+El+Segundo,+CA164 Irvine,+CA230 2
|
|
238 |
+El+Segundo,+CA164 Irvine,+CA231 3
|
|
239 |
+El+Segundo,+CA164 El+Segundo,+CA163 2
|
|
240 |
+El+Segundo,+CA164 Santa+Clara,+CA403 9
|
|
241 |
+El+Segundo,+CA164 Santa+Clara,+CA443 6
|
|
242 |
+Austin,+TX137 El+Segundo,+CA163 16
|
|
243 |
+Austin,+TX137 Fort+Worth,+TX189 4
|
|
244 |
+Santa+Clara,+CA403 Santa+Clara,+CA444 2.5
|
|
245 |
+Santa+Clara,+CA403 Santa+Clara,+CA404 2
|
|
246 |
+Santa+Clara,+CA403 Santa+Clara,+CA429 4.5
|
|
247 |
+Santa+Clara,+CA403 Santa+Clara,+CA405 5
|
|
248 |
+Santa+Clara,+CA403 Palo+Alto,+CA104 2
|
|
249 |
+Santa+Clara,+CA403 Santa+Clara,+CA389 3
|
|
250 |
+Santa+Clara,+CA403 Fort+Worth,+TX189 16
|
|
251 |
+Santa+Clara,+CA403 El+Segundo,+CA164 9
|
|
252 |
+Jersey+City,+NJ261 Jersey+City,+NJ245 3
|
|
253 |
+Jersey+City,+NJ261 Jersey+City,+NJ244 4
|
|
254 |
+Santa+Clara,+CA404 Santa+Clara,+CA444 4.5
|
|
255 |
+Santa+Clara,+CA404 Irvine,+CA213 10
|
|
256 |
+Santa+Clara,+CA404 Tokyo525 2.5
|
|
257 |
+Santa+Clara,+CA404 Santa+Clara,+CA430 4.5
|
|
258 |
+Santa+Clara,+CA404 El+Segundo,+CA163 5
|
|
259 |
+Santa+Clara,+CA404 Santa+Clara,+CA443 3
|
|
260 |
+Santa+Clara,+CA404 Santa+Clara,+CA403 2
|
|
261 |
+Santa+Clara,+CA405 El+Segundo,+CA163 3
|
|
262 |
+Santa+Clara,+CA405 Santa+Clara,+CA403 5
|
|
263 |
+Irvine,+CA230 Irvine,+CA228 3
|
|
264 |
+Irvine,+CA230 El+Segundo,+CA164 2
|
|
265 |
+Irvine,+CA231 Irvine,+CA228 2
|
|
266 |
+Irvine,+CA231 Irvine,+CA237 3
|
|
267 |
+Irvine,+CA231 El+Segundo,+CA164 3
|
|
268 |
+Santa+Clara,+CA336 Tokyo526 2.5
|
|
269 |
+Santa+Clara,+CA336 Santa+Clara,+CA430 2.5
|
|
270 |
+Santa+Clara,+CA336 Palo+Alto,+CA317 2.5
|
|
271 |
+Santa+Clara,+CA443 Santa+Clara,+CA444 2.5
|
|
272 |
+Santa+Clara,+CA443 Santa+Clara,+CA404 3
|
|
273 |
+Santa+Clara,+CA443 Santa+Clara,+CA430 3.5
|
|
274 |
+Santa+Clara,+CA443 Santa+Clara,+CA431 4
|
|
275 |
+Santa+Clara,+CA443 Santa+Clara,+CA389 4
|
|
276 |
+Santa+Clara,+CA443 El+Segundo,+CA164 6
|
|
277 |
+Santa+Clara,+CA443 San+Jose,+CA460 2.5
|
|
278 |
+Santa+Clara,+CA444 Santa+Clara,+CA404 4.5
|
|
279 |
+Santa+Clara,+CA444 San+Jose,+CA471 4.5
|
|
280 |
+Santa+Clara,+CA444 Palo+Alto,+CA104 2.5
|
|
281 |
+Santa+Clara,+CA444 Santa+Clara,+CA443 2.5
|
|
282 |
+Santa+Clara,+CA444 Santa+Clara,+CA403 2.5
|
|
283 |
+Frankfurt184 Jersey+City,+NJ244 1
|
|
284 |
+Irvine,+CA237 Irvine,+CA228 2
|
|
285 |
+Irvine,+CA237 Irvine,+CA231 3
|
|
286 |
+Frankfurt185 Amsterdam119 1
|
|
287 |
+Oak+Brook,+IL300 Weehawken,+NJ543 12
|
|
288 |
+Oak+Brook,+IL300 Oak+Brook,+IL307 2
|
|
289 |
+Oak+Brook,+IL300 Oak+Brook,+IL315 2
|
|
290 |
+Oak+Brook,+IL300 Weehawken,+NJ552 13
|
|
291 |
+Oak+Brook,+IL300 Oak+Brook,+IL308 2
|
|
292 |
+Oak+Brook,+IL300 Oak+Brook,+IL309 2
|
|
293 |
+Oak+Brook,+IL300 Chicago,+IL156 2
|
|
294 |
+Oak+Brook,+IL300 Toronto,+Canada538 1
|
|
295 |
+Oak+Brook,+IL300 Waltham,+MA555 13
|
|
296 |
+Oak+Brook,+IL300 Waltham,+MA556 10
|
|
297 |
+Oak+Brook,+IL300 Oak+Brook,+IL301 2.5
|
|
298 |
+Oak+Brook,+IL300 Oak+Brook,+IL310 2
|
|
299 |
+Oak+Brook,+IL301 San+Jose,+CA471 14.5
|
|
300 |
+Oak+Brook,+IL301 Oak+Brook,+IL307 2
|
|
301 |
+Oak+Brook,+IL301 Oak+Brook,+IL315 2.5
|
|
302 |
+Oak+Brook,+IL301 Oak+Brook,+IL308 2
|
|
303 |
+Oak+Brook,+IL301 Chicago,+IL155 2
|
|
304 |
+Oak+Brook,+IL301 Oak+Brook,+IL309 2.5
|
|
305 |
+Oak+Brook,+IL301 Oak+Brook,+IL300 2.5
|
|
306 |
+Oak+Brook,+IL301 Oak+Brook,+IL310 3.5
|
11
|
307 |
diff -r a1527ef7aacd example/dce-fga-crawdad.cc
|
1
|
308 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
11
|
309 |
+++ b/example/dce-fga-crawdad.cc Thu Mar 29 13:55:22 2012 +0900
|
2
|
310 |
@@ -0,0 +1,233 @@
|
1
|
311 |
+/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */
|
|
312 |
+#include "ns3/core-module.h"
|
|
313 |
+#include "ns3/mobility-module.h"
|
|
314 |
+#include "ns3/crawdad-mobility-helper.h"
|
|
315 |
+#include "ns3/dce-module.h"
|
|
316 |
+#include "ns3/mip6d-helper.h"
|
|
317 |
+#include "ns3/csma-helper.h"
|
|
318 |
+#include "ns3/wifi-helper.h"
|
|
319 |
+#include "ns3/yans-wifi-helper.h"
|
|
320 |
+#include "ns3/mgt-headers.h"
|
|
321 |
+#include "ns3/nqos-wifi-mac-helper.h"
|
|
322 |
+
|
|
323 |
+#include <sys/resource.h>
|
|
324 |
+
|
|
325 |
+using namespace ns3;
|
|
326 |
+NS_LOG_COMPONENT_DEFINE ("DceFgaCrawdad");
|
|
327 |
+
|
|
328 |
+#include <iomanip>
|
|
329 |
+void Progress ()
|
|
330 |
+{
|
|
331 |
+ Time now = Simulator::Now ();
|
2
|
332 |
+ Simulator::Schedule (Seconds (1), MakeEvent (&Progress));
|
1
|
333 |
+ fprintf (stderr, "Elapsed: %.3f sec\r", now.GetSeconds ());
|
|
334 |
+}
|
|
335 |
+static void
|
|
336 |
+SetRlimit ()
|
|
337 |
+{
|
|
338 |
+ int ret;
|
|
339 |
+ struct rlimit limit;
|
|
340 |
+ limit.rlim_cur = 1000000;
|
|
341 |
+ limit.rlim_max = 1000000;
|
|
342 |
+
|
|
343 |
+ ret = setrlimit(RLIMIT_NOFILE, &limit);
|
|
344 |
+ if (ret == -1)
|
|
345 |
+ {
|
|
346 |
+ perror ("setrlimit");
|
|
347 |
+ }
|
|
348 |
+ return;
|
|
349 |
+}
|
|
350 |
+
|
|
351 |
+
|
|
352 |
+
|
|
353 |
+static void RunIp (Ptr<Node> node, Time at, std::string str)
|
|
354 |
+{
|
|
355 |
+ DceApplicationHelper process;
|
|
356 |
+ ApplicationContainer apps;
|
|
357 |
+ process.SetBinary ("ip");
|
|
358 |
+ process.SetStackSize (1<<16);
|
|
359 |
+ process.ResetArguments();
|
|
360 |
+ process.ParseArguments(str.c_str ());
|
|
361 |
+ apps = process.Install (node);
|
|
362 |
+ apps.Start (at);
|
|
363 |
+}
|
|
364 |
+
|
|
365 |
+static void AddAddress (Ptr<Node> node, Time at, uint32_t sim_suffix, const char *address)
|
|
366 |
+{
|
|
367 |
+ std::ostringstream oss;
|
|
368 |
+ oss << "-f inet6 addr add " << address << " dev sim" << sim_suffix;
|
|
369 |
+ RunIp (node, at, oss.str ());
|
|
370 |
+ oss.str("");
|
|
371 |
+ oss << "link set sim" << sim_suffix << " up";
|
|
372 |
+ RunIp (node, Seconds (at.GetSeconds () + 0.1), oss.str ());
|
|
373 |
+}
|
|
374 |
+
|
|
375 |
+static void AddRoute (Ptr<Node> node, Time at, const char *dest, const char *gw, uint32_t sim_suffix)
|
|
376 |
+{
|
|
377 |
+ std::ostringstream oss;
|
|
378 |
+ oss << "-6 route add " << dest << " via " << gw << " dev sim" << sim_suffix;
|
|
379 |
+ RunIp (node, at, oss.str ());
|
|
380 |
+}
|
|
381 |
+
|
|
382 |
+static void RunIp6Tables (Ptr<Node> node, Time at, std::string str)
|
|
383 |
+{
|
|
384 |
+ // return;
|
|
385 |
+ DceApplicationHelper process;
|
|
386 |
+ ApplicationContainer apps;
|
|
387 |
+ process.SetBinary ("ip6tables");
|
|
388 |
+ process.SetStackSize (1<<16);
|
|
389 |
+ process.ResetArguments();
|
|
390 |
+ process.ParseArguments(str.c_str ());
|
|
391 |
+ apps = process.Install (node);
|
|
392 |
+ apps.Start (at);
|
|
393 |
+}
|
|
394 |
+
|
|
395 |
+std::string mnp_base = "2001:200:0:";
|
|
396 |
+std::string hoa_base = "2001:500:0:";
|
|
397 |
+bool isDebug = false;
|
2
|
398 |
+int numRFR = 1;
|
1
|
399 |
+
|
|
400 |
+void
|
|
401 |
+ConfigureMRs (NodeContainer mr)
|
|
402 |
+{
|
|
403 |
+ //
|
|
404 |
+ // NetDevice Conf
|
|
405 |
+ //
|
|
406 |
+ WifiHelper wifi = WifiHelper::Default ();
|
|
407 |
+ wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
|
|
408 |
+ wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
|
|
409 |
+ "DataMode",StringValue("DsssRate1Mbps"),
|
|
410 |
+ "ControlMode",StringValue("DsssRate1Mbps"));
|
|
411 |
+ YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
|
|
412 |
+ YansWifiChannelHelper phyChannel = YansWifiChannelHelper::Default ();
|
|
413 |
+ NqosWifiMacHelper mac;
|
|
414 |
+ // For Egress interface (adhoc)
|
|
415 |
+ mac.SetType ("ns3::AdhocWifiMac", "Ssid", SsidValue (Ssid ("manemo-eiei")));
|
|
416 |
+ phy.SetChannel (phyChannel.Create ());
|
|
417 |
+ wifi.Install (phy, mac, mr);
|
|
418 |
+
|
|
419 |
+ // For Ingress (AP)
|
|
420 |
+ // mac.SetType ("ns3::ApWifiMac", "Ssid", SsidValue (Ssid ("manemo-ingress")));
|
|
421 |
+ // phy.SetChannel (phyChannel.Create ());
|
|
422 |
+ // wifi.Install (phy, mac, mr);
|
|
423 |
+
|
|
424 |
+ //
|
|
425 |
+ // Upper Layers
|
|
426 |
+ //
|
|
427 |
+ Mip6dHelper mip6d;
|
|
428 |
+ for (uint32_t i = 0; i< mr.GetN (); i++)
|
|
429 |
+ {
|
|
430 |
+ //
|
|
431 |
+ // IP address configuration
|
|
432 |
+ //
|
|
433 |
+ std::ostringstream mnp;
|
|
434 |
+
|
|
435 |
+ // Ingress Interface (FIXME)
|
|
436 |
+ CsmaHelper csma;
|
|
437 |
+ csma.Install (mr.Get (i));
|
|
438 |
+
|
|
439 |
+ // others
|
|
440 |
+ RunIp (mr.Get (i), Seconds (0.15), "link set lo up");
|
|
441 |
+ RunIp (mr.Get (i), Seconds (0.2), "link set ip6tnl0 up");
|
|
442 |
+ RunIp (mr.Get (i), Seconds (0.25), "addr");
|
|
443 |
+
|
|
444 |
+ // EI interface
|
|
445 |
+ mnp.str ("");
|
|
446 |
+ mnp << mnp_base << std::hex << i;
|
|
447 |
+ AddAddress (mr.Get (i), Seconds (0.6), 0, (mnp.str () + "::1/128").c_str ());
|
|
448 |
+
|
|
449 |
+ // Ingress
|
|
450 |
+ AddAddress (mr.Get (i), Seconds (0.8), 1, (mnp.str () + "::1/64").c_str ());
|
|
451 |
+
|
|
452 |
+
|
|
453 |
+ // zebra
|
|
454 |
+ QuaggaHelper quagga;
|
|
455 |
+ quagga.EnableRadvd (mr.Get (i), "sim0", "");
|
|
456 |
+ // quagga.EnableRadvd (mr.Get (i), "sim1", (mnp.str () + "::/64").c_str ());
|
|
457 |
+ quagga.EnableTdpNina (mr.Get (i));
|
|
458 |
+ quagga.EnableEgressIF (mr.Get (i), "sim0");
|
|
459 |
+// quagga.EnableNat (mr.Get (i));
|
|
460 |
+ if (isDebug||1)
|
|
461 |
+ {
|
|
462 |
+ quagga.EnableZebraDebug (mr.Get (i));
|
|
463 |
+ }
|
2
|
464 |
+ if (i < numRFR)
|
|
465 |
+ {
|
|
466 |
+ quagga.EnableTdpFixedRouter (mr.Get (i));
|
|
467 |
+ }
|
1
|
468 |
+ quagga.Install (mr.Get (i));
|
|
469 |
+
|
|
470 |
+ // mip6d
|
|
471 |
+#if 0
|
|
472 |
+ std::ostringstream hoa;
|
|
473 |
+ hoa << hoa_base << std::hex << i;
|
|
474 |
+ mip6d.AddMobileNetworkPrefix (mr.Get (i), Ipv6Address ((mnp.str () + "::/64").c_str()), Ipv6Prefix (64));
|
|
475 |
+ mip6d.AddHomeAgentAddress (mr.Get (i), Ipv6Address ((hoa.str () + "::1/64").c_str ()));
|
|
476 |
+
|
|
477 |
+ mip6d.AddHomeAddress (mr.Get (i), Ipv6Address ((hoa.str () + "::2/64").c_str ()), Ipv6Prefix (64));
|
|
478 |
+ mip6d.AddEgressInterface (mr.Get (i), "sim0");
|
|
479 |
+
|
|
480 |
+ mip6d.EnableMR (mr.Get (i));
|
|
481 |
+ mip6d.Install (mr.Get (i));
|
|
482 |
+#endif
|
|
483 |
+ }
|
|
484 |
+
|
|
485 |
+ if (isDebug)
|
|
486 |
+ phy.EnablePcapAll ("pcap/dce-fga-crawdad");
|
|
487 |
+
|
|
488 |
+ return;
|
|
489 |
+}
|
|
490 |
+
|
|
491 |
+// Example to use ns2 traces file in ns3
|
|
492 |
+int main (int argc, char *argv[])
|
|
493 |
+{
|
|
494 |
+ std::string traceDir = "/home/tazaki/Downloads/crawdad/cabspottingdata/";
|
|
495 |
+ // int nodeNum=20;
|
|
496 |
+ int nodeNum=536;
|
|
497 |
+ int trial = 1;
|
|
498 |
+ int duration = 1213089934 - 1211018404;
|
|
499 |
+
|
|
500 |
+ // Parse command line attribute
|
|
501 |
+ CommandLine cmd;
|
|
502 |
+ cmd.AddValue ("traceDir", "Crawdad movement trace directory", traceDir);
|
|
503 |
+ cmd.AddValue ("trial", "Set num of trial", trial);
|
|
504 |
+ cmd.AddValue ("isDebug", "Debug mode", isDebug);
|
2
|
505 |
+ cmd.AddValue ("numRFR", "The number of Root FR", numRFR);
|
|
506 |
+ cmd.AddValue ("nodeNum", "The number of node", nodeNum);
|
1
|
507 |
+ cmd.Parse (argc,argv);
|
|
508 |
+
|
|
509 |
+ // Enable logging from the crawdad helper
|
|
510 |
+ LogComponentEnable ("CrawdadMobilityHelper",LOG_LEVEL_WARN);
|
|
511 |
+
|
|
512 |
+ SetRlimit ();
|
|
513 |
+ std::cout << "Random seed will " << trial << std::endl;
|
|
514 |
+ SeedManager::SetSeed (trial);
|
|
515 |
+ SeedManager::SetRun (trial + 2);
|
|
516 |
+
|
|
517 |
+
|
|
518 |
+ // Create mobile routers.
|
|
519 |
+ NodeContainer mr;
|
|
520 |
+ mr.Create (nodeNum);
|
|
521 |
+ CrawdadMobilityHelper crawdad = CrawdadMobilityHelper (traceDir);
|
|
522 |
+ crawdad.Install (); // MR with Crawdad Trace
|
|
523 |
+ ConfigureMRs (mr);
|
|
524 |
+
|
|
525 |
+
|
|
526 |
+ DceManagerHelper dceMng;
|
|
527 |
+ dceMng.SetTaskManagerAttribute ("FiberManagerType",
|
|
528 |
+ EnumValue (0));
|
|
529 |
+ dceMng.SetAttribute ("MinimizeOpenFiles", BooleanValue (true));
|
|
530 |
+ dceMng.SetLoader ("ns3::DlmLoaderFactory");
|
|
531 |
+ dceMng.SetNetworkStack("ns3::LinuxSocketFdFactory",
|
|
532 |
+ "Library", StringValue ("libnet-next-2.6.so"));
|
|
533 |
+ dceMng.Install (mr);
|
|
534 |
+
|
|
535 |
+
|
2
|
536 |
+ if (isDebug || 1)
|
1
|
537 |
+ Simulator::ScheduleNow (Progress);
|
|
538 |
+ Simulator::Stop (Seconds (duration));
|
|
539 |
+ Simulator::Run ();
|
|
540 |
+ Simulator::Destroy ();
|
|
541 |
+
|
|
542 |
+ return 0;
|
|
543 |
+}
|
11
|
544 |
diff -r a1527ef7aacd example/dce-fga.cc
|
1
|
545 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
11
|
546 |
+++ b/example/dce-fga.cc Thu Mar 29 13:55:22 2012 +0900
|
1
|
547 |
@@ -0,0 +1,829 @@
|
|
548 |
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
|
|
549 |
+#include "ns3/network-module.h"
|
|
550 |
+#include "ns3/core-module.h"
|
|
551 |
+#include "ns3/internet-module.h"
|
|
552 |
+#include "ns3/dce-module.h"
|
|
553 |
+#include "ns3/mip6d-helper.h"
|
|
554 |
+#include "ns3/csma-helper.h"
|
|
555 |
+#include "ns3/wifi-helper.h"
|
|
556 |
+#include "ns3/yans-wifi-helper.h"
|
|
557 |
+#include "ns3/nqos-wifi-mac-helper.h"
|
|
558 |
+#include "ns3/mobility-module.h"
|
|
559 |
+#include "ns3/ping6-helper.h"
|
|
560 |
+#include "ns3/topology-read-module.h"
|
|
561 |
+#include "ns3/mgt-headers.h" // from wifi module
|
|
562 |
+
|
|
563 |
+#include <iomanip>
|
|
564 |
+#include <sys/resource.h>
|
|
565 |
+
|
|
566 |
+using namespace ns3;
|
|
567 |
+NS_LOG_COMPONENT_DEFINE ("mip6d-rf");
|
|
568 |
+
|
|
569 |
+static void RunIp (Ptr<Node> node, Time at, std::string str)
|
|
570 |
+{
|
|
571 |
+ DceApplicationHelper process;
|
|
572 |
+ ApplicationContainer apps;
|
|
573 |
+ process.SetBinary ("ip");
|
|
574 |
+ process.SetStackSize (1<<16);
|
|
575 |
+ process.ResetArguments();
|
|
576 |
+ process.ParseArguments(str.c_str ());
|
|
577 |
+ apps = process.Install (node);
|
|
578 |
+ apps.Start (at);
|
|
579 |
+}
|
|
580 |
+
|
|
581 |
+static void AddAddress (Ptr<Node> node, Time at, uint32_t sim_suffix, const char *address)
|
|
582 |
+{
|
|
583 |
+ std::ostringstream oss;
|
|
584 |
+ oss << "-f inet6 addr add " << address << " dev sim" << sim_suffix;
|
|
585 |
+ RunIp (node, at, oss.str ());
|
|
586 |
+ oss.str("");
|
|
587 |
+ oss << "link set sim" << sim_suffix << " up";
|
|
588 |
+ RunIp (node, Seconds (at.GetSeconds () + 0.1), oss.str ());
|
|
589 |
+}
|
|
590 |
+
|
|
591 |
+static void AddRoute (Ptr<Node> node, Time at, const char *dest, const char *gw, uint32_t sim_suffix)
|
|
592 |
+{
|
|
593 |
+ std::ostringstream oss;
|
|
594 |
+ oss << "-6 route add " << dest << " via " << gw << " dev sim" << sim_suffix;
|
|
595 |
+ RunIp (node, at, oss.str ());
|
|
596 |
+}
|
|
597 |
+
|
|
598 |
+static void RunIp6Tables (Ptr<Node> node, Time at, std::string str)
|
|
599 |
+{
|
|
600 |
+ // return;
|
|
601 |
+ DceApplicationHelper process;
|
|
602 |
+ ApplicationContainer apps;
|
|
603 |
+ process.SetBinary ("ip6tables");
|
|
604 |
+ process.SetStackSize (1<<16);
|
|
605 |
+ process.ResetArguments();
|
|
606 |
+ process.ParseArguments(str.c_str ());
|
|
607 |
+ apps = process.Install (node);
|
|
608 |
+ apps.Start (at);
|
|
609 |
+}
|
|
610 |
+
|
|
611 |
+static void
|
|
612 |
+SetRlimit ()
|
|
613 |
+{
|
|
614 |
+ int ret;
|
|
615 |
+ struct rlimit limit;
|
|
616 |
+ limit.rlim_cur = 1000000;
|
|
617 |
+ limit.rlim_max = 1000000;
|
|
618 |
+
|
|
619 |
+ ret = setrlimit(RLIMIT_NOFILE, &limit);
|
|
620 |
+ if (ret == -1)
|
|
621 |
+ {
|
|
622 |
+ perror ("setrlimit");
|
|
623 |
+ }
|
|
624 |
+ return;
|
|
625 |
+}
|
|
626 |
+
|
|
627 |
+static void
|
|
628 |
+SetVelocity (Ptr<Node> node, Vector vel)
|
|
629 |
+{
|
|
630 |
+ Ptr<ConstantVelocityMobilityModel> mobility =
|
|
631 |
+ node->GetObject<ConstantVelocityMobilityModel> ();
|
|
632 |
+ mobility->SetVelocity (vel);
|
|
633 |
+}
|
|
634 |
+
|
|
635 |
+
|
|
636 |
+
|
|
637 |
+uint32_t useAdhoc = 0; // 0: E-I (nemobs), 1: EI-EI (nat-manemo), 2: E-I (nat-manemo)
|
|
638 |
+uint32_t useMobility = 0;
|
|
639 |
+int stopTime = 800;
|
|
640 |
+double ping6_interval = 1.0;
|
|
641 |
+bool doPing = true;
|
|
642 |
+bool doPerf = false;
|
|
643 |
+double startTime = 50.0;
|
|
644 |
+int trial = 1;
|
|
645 |
+uint32_t mrNodes = 7;
|
|
646 |
+bool mobilityDebug = false;
|
|
647 |
+
|
|
648 |
+std::string bgp_sim0_base ("2001:300:0:");
|
|
649 |
+std::string ha_sim0_base ("2001:200:0:8a");
|
|
650 |
+std::string mnp_base ("2001:200:0:88");
|
|
651 |
+std::string ar_arcore = "3000:1000:500:100::1/64";
|
|
652 |
+std::string ar_arcore2 = "3000:1000:500:100::2/64";
|
|
653 |
+std::string ar0_mnet = "4000:1000:500:100::1/64";
|
|
654 |
+std::string cn_network = "5000:100:0:1000::1/64";
|
|
655 |
+std::string ar1_wifi_net = "4000:2000:500:100::/64";
|
|
656 |
+std::string ar1_wifi_link = "4000:2000:500:100::3/64";
|
|
657 |
+std::string ar0_ar1_link = "6000:500:200:0::";
|
|
658 |
+uint32_t ar0_attatch_rtr = 60;
|
|
659 |
+uint32_t cn_attatch_rtr = 61;
|
|
660 |
+uint32_t diff_x = 100;
|
|
661 |
+uint32_t diff_y = 100;
|
|
662 |
+double move_start = 550.0;
|
|
663 |
+double move_end = 600.0;
|
|
664 |
+
|
|
665 |
+NodeContainer
|
|
666 |
+CreateAccessNetwork ()
|
|
667 |
+{
|
|
668 |
+ Ptr<TopologyReader> inFile = 0;
|
|
669 |
+ TopologyReaderHelper topoHelp;
|
|
670 |
+
|
|
671 |
+ NodeContainer nodes;
|
|
672 |
+
|
|
673 |
+ std::string format ("Rocketfuel");
|
|
674 |
+ std::string input ("examples/topology-read/RocketFuel_toposample_1239_weights.txt");
|
|
675 |
+
|
|
676 |
+ input = "3967.weights.intra";
|
|
677 |
+
|
|
678 |
+ topoHelp.SetFileName(input);
|
|
679 |
+ topoHelp.SetFileType(format);
|
|
680 |
+ inFile = topoHelp.GetTopologyReader();
|
|
681 |
+
|
|
682 |
+ if (inFile != 0)
|
|
683 |
+ {
|
|
684 |
+ nodes = inFile->Read ();
|
|
685 |
+ }
|
|
686 |
+
|
|
687 |
+ if (nodes.GetN () == 0)
|
|
688 |
+ {
|
|
689 |
+ NS_LOG_ERROR ("Problems reading node information the topology file. Failing.");
|
|
690 |
+ return nodes;
|
|
691 |
+ }
|
|
692 |
+ if (inFile->LinksSize () == 0)
|
|
693 |
+ {
|
|
694 |
+ NS_LOG_ERROR ("Problems reading the topology file. Failing.");
|
|
695 |
+ return nodes;
|
|
696 |
+ }
|
|
697 |
+ NS_LOG_INFO ("Rocketfuel topology created with " << nodes.GetN () << " nodes and " <<
|
|
698 |
+ inFile->LinksSize () << " links (from " << input << ")");
|
|
699 |
+
|
|
700 |
+ //
|
|
701 |
+ // Step 1
|
|
702 |
+ // Node Basic Configuration
|
|
703 |
+ //
|
|
704 |
+
|
|
705 |
+ DceManagerHelper processManager;
|
|
706 |
+ processManager.SetTaskManagerAttribute ("FiberManagerType",
|
|
707 |
+ EnumValue (0));
|
|
708 |
+ processManager.SetAttribute ("MinimizeOpenFiles", BooleanValue (true));
|
|
709 |
+ // processManager.SetLoader ("ns3::DlmLoaderFactory");
|
|
710 |
+ processManager.SetNetworkStack("ns3::LinuxSocketFdFactory",
|
|
711 |
+ "Library", StringValue ("libnet-next-2.6.so"));
|
|
712 |
+ processManager.Install (nodes);
|
|
713 |
+
|
|
714 |
+ //
|
|
715 |
+ // Step 2
|
|
716 |
+ // Address Configuration
|
|
717 |
+ //
|
|
718 |
+ //
|
|
719 |
+
|
|
720 |
+ int totlinks = inFile->LinksSize ();
|
|
721 |
+ NS_LOG_INFO ("creating node containers");
|
|
722 |
+ NodeContainer nc[totlinks];
|
|
723 |
+ TopologyReader::ConstLinksIterator iter;
|
|
724 |
+ int i = 0;
|
|
725 |
+ for (iter = inFile->LinksBegin (); iter != inFile->LinksEnd (); iter++, i++ )
|
|
726 |
+ {
|
|
727 |
+ nc[i] = NodeContainer (iter->GetFromNode (), iter->GetToNode ());
|
|
728 |
+ // NS_LOG_INFO ("Node " << iter->GetFromNode ()->GetId () << " and Node "<< iter->GetToNode ()->GetId () << " is paired");
|
|
729 |
+ }
|
|
730 |
+
|
|
731 |
+ NS_LOG_INFO ("creating net device containers");
|
|
732 |
+ NetDeviceContainer ndc[totlinks];
|
|
733 |
+ NodeContainer gnodes = NodeContainer::GetGlobal ();
|
|
734 |
+ CsmaHelper csma;
|
|
735 |
+ MobilityHelper mobility;
|
|
736 |
+ // mobility.Install (nodes);
|
|
737 |
+ // Configure process
|
|
738 |
+ QuaggaHelper quagga;
|
|
739 |
+ quagga.EnableBgp (nodes);
|
|
740 |
+
|
|
741 |
+ for (int i = 0; i < totlinks; i++)
|
|
742 |
+ {
|
|
743 |
+ csma.SetChannelAttribute ("DataRate", DataRateValue (5000000));
|
|
744 |
+ csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (0.20)));
|
|
745 |
+ ndc[i] = csma.Install (nc[i]);
|
|
746 |
+
|
|
747 |
+ uint32_t n1 = nc[i].Get (0)->GetId ();
|
|
748 |
+ uint32_t n2 = nc[i].Get (1)->GetId ();
|
|
749 |
+
|
|
750 |
+ // IP address
|
|
751 |
+ std::stringstream cmdstr;
|
|
752 |
+ std::stringstream n1_v6, n2_v6;
|
|
753 |
+
|
|
754 |
+ n1_v6 << bgp_sim0_base << std::setw(4) << std::setfill('0') << std::hex << i << "::1/64";
|
|
755 |
+ AddAddress (gnodes.Get (n1), Seconds (0.1), ndc[i].Get (0)->GetIfIndex (), n1_v6.str ().c_str ());
|
|
756 |
+ RunIp (gnodes.Get (n1), Seconds (0.11), "link set lo up");
|
|
757 |
+ cmdstr << "link set sim" << ndc[i].Get (0)->GetIfIndex () << " up";
|
|
758 |
+ RunIp (gnodes.Get (n1), Seconds (0.11), cmdstr.str());
|
|
759 |
+
|
|
760 |
+
|
|
761 |
+ n2_v6 << bgp_sim0_base << std::setw(4) << std::setfill('0') << std::hex << i << "::2/64";
|
|
762 |
+ AddAddress (gnodes.Get (n2), Seconds (0.1), ndc[i].Get (1)->GetIfIndex (), n2_v6.str ().c_str ());
|
|
763 |
+ RunIp (gnodes.Get (n2), Seconds (0.11), "link set lo up");
|
|
764 |
+ cmdstr.str ("");
|
|
765 |
+ cmdstr << "link set sim" << ndc[i].Get (1)->GetIfIndex () << " up";
|
|
766 |
+ RunIp (gnodes.Get (n2), Seconds (0.11), cmdstr.str());
|
|
767 |
+
|
|
768 |
+ // bgp peer
|
|
769 |
+ std::string n1_nbr = n1_v6.str ().replace (n1_v6.str ().find ("/"), 3, " ");
|
|
770 |
+ std::string n2_nbr = n2_v6.str ().replace (n2_v6.str ().find ("/"), 3, " ");
|
|
771 |
+ quagga.BgpAddNeighbor(gnodes.Get (n1), n2_nbr, quagga.GetAsn(gnodes.Get (n2)));
|
|
772 |
+ quagga.BgpAddNeighbor(gnodes.Get (n2), n1_nbr, quagga.GetAsn(gnodes.Get (n1)));
|
|
773 |
+ }
|
|
774 |
+
|
|
775 |
+ quagga.EnableZebraDebug (nodes);
|
|
776 |
+ // Config IF later
|
|
777 |
+ // MR
|
|
778 |
+ std::stringstream oss;
|
|
779 |
+ oss.str ("");
|
|
780 |
+ oss << "sim" << std::dec << nodes.Get (ar0_attatch_rtr)->GetNDevices ();
|
|
781 |
+ quagga.EnableRadvd (nodes.Get (ar0_attatch_rtr), oss.str ().c_str (),
|
|
782 |
+ "4000:1000:500:100::/64");
|
|
783 |
+
|
|
784 |
+ // CN
|
|
785 |
+ oss.str ("");
|
|
786 |
+ oss << "sim" << std::dec << nodes.Get (nodes.GetN ()-1)->GetNDevices ();
|
|
787 |
+ quagga.EnableRadvd (nodes.Get (nodes.GetN () - 1), oss.str ().c_str (),
|
|
788 |
+ "5000:100:0:1000::/64");
|
|
789 |
+
|
|
790 |
+ // HAs
|
|
791 |
+ for (uint32_t i = 0; i< mrNodes; i++)
|
|
792 |
+ {
|
|
793 |
+ oss.str ("");
|
|
794 |
+ oss << "sim" << std::dec << nodes.Get (i)->GetNDevices ();
|
|
795 |
+#ifdef FIXME
|
|
796 |
+ quagga.EnableRadvd (nodes.Get (i), oss.str ().c_str(),
|
|
797 |
+ "/64");
|
|
798 |
+#endif
|
|
799 |
+ quagga.EnableHomeAgentFlag (nodes.Get (i), oss.str ().c_str());
|
|
800 |
+ }
|
|
801 |
+
|
|
802 |
+ oss.str ("");
|
|
803 |
+ oss << "sim" << std::dec << nodes.Get (cn_attatch_rtr)->GetNDevices ();
|
|
804 |
+#ifdef FIXME
|
|
805 |
+ quagga.EnableRadvd (nodes.Get (cn_attatch_rtr), oss.str ().c_str ());
|
|
806 |
+#endif
|
|
807 |
+ if (!mobilityDebug)
|
|
808 |
+ {
|
|
809 |
+ quagga.Install (nodes);
|
|
810 |
+ }
|
|
811 |
+
|
|
812 |
+ return nodes;
|
|
813 |
+}
|
|
814 |
+
|
|
815 |
+int main (int argc, char *argv[])
|
|
816 |
+{
|
|
817 |
+ ApplicationContainer sinkApp;
|
|
818 |
+ CommandLine cmd;
|
|
819 |
+ cmd.AddValue ("useAdhoc", "use EIEI or not", useAdhoc);
|
|
820 |
+ cmd.AddValue ("useMobility", "use movement", useMobility);
|
|
821 |
+ cmd.AddValue ("stopTime", "Duration of simulation", stopTime);
|
|
822 |
+ cmd.AddValue ("startTime", "Start time of the perf transmission", startTime);
|
|
823 |
+ cmd.AddValue ("trial", "Set num of trial", trial);
|
|
824 |
+ cmd.AddValue ("mrNodes", "num of node", mrNodes);
|
|
825 |
+ cmd.AddValue ("mobilityDebug", "stop BGP session", mobilityDebug);
|
|
826 |
+ cmd.Parse (argc, argv);
|
|
827 |
+ LogComponentEnable ("mip6d-rf", LOG_LEVEL_INFO);
|
|
828 |
+
|
|
829 |
+ if (mrNodes < 6)
|
|
830 |
+ {
|
|
831 |
+ NS_LOG_WARN ("mrNodes must be >= 6");
|
|
832 |
+ return 0;
|
|
833 |
+ }
|
|
834 |
+
|
|
835 |
+ SetRlimit ();
|
|
836 |
+
|
|
837 |
+ std::cout << "Random seed will " << trial << std::endl;
|
|
838 |
+ SeedManager::SetSeed (trial);
|
|
839 |
+ SeedManager::SetRun (trial + 2);
|
|
840 |
+
|
|
841 |
+ if (useMobility)
|
|
842 |
+ {
|
|
843 |
+ ping6_interval = 1.0;
|
|
844 |
+ }
|
|
845 |
+ else
|
|
846 |
+ {
|
|
847 |
+ ping6_interval = 1.0;
|
|
848 |
+ }
|
|
849 |
+
|
|
850 |
+ NodeContainer arCore = CreateAccessNetwork ();
|
|
851 |
+
|
|
852 |
+ std::ostringstream oss;
|
|
853 |
+ NodeContainer mr, ha, ar;
|
|
854 |
+ ha.Create (mrNodes);
|
|
855 |
+ ar.Create (2);
|
|
856 |
+ mr.Create (mrNodes);
|
|
857 |
+ NodeContainer mnn, cn;
|
|
858 |
+ cn.Create (1);
|
|
859 |
+ mnn.Create (1);
|
|
860 |
+
|
|
861 |
+ MobilityHelper mobility;
|
|
862 |
+ Ptr<ListPositionAllocator> positionAlloc = CreateObject<ListPositionAllocator> ();
|
|
863 |
+ for (uint32_t i = 0; i < ha.GetN (); i++)
|
|
864 |
+ {
|
|
865 |
+ positionAlloc->Add (Vector (50.0 * i, 0.0, 0.0)); // HA0
|
|
866 |
+ }
|
|
867 |
+ positionAlloc->Add (Vector (75.0, 300.0, 0.0)); // AR0
|
|
868 |
+ positionAlloc->Add (Vector (275.0, 300.0, 0.0)); // AR1
|
|
869 |
+ positionAlloc->Add (Vector (-50.0, 300.0, 0.0)); // CN
|
|
870 |
+ mobility.SetPositionAllocator (positionAlloc);
|
|
871 |
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
|
|
872 |
+ mobility.Install (ha);
|
|
873 |
+ mobility.Install (ar);
|
|
874 |
+ mobility.Install (cn);
|
|
875 |
+
|
|
876 |
+
|
|
877 |
+ Ptr<ListPositionAllocator> mr_position = CreateObject<ListPositionAllocator> ();
|
|
878 |
+ mr_position->Add (Vector (70.0, 350.0, 0.0)); // MR0
|
|
879 |
+ mr_position->Add (Vector (70.0 - 1 * diff_x, 350.0 + 1 * diff_y, 0.0)); // MR1, another branch
|
|
880 |
+ mr_position->Add (Vector (70.0 + 2.5 * diff_x + 50, 350.0 + 0.5 * diff_y, 0.0)); // MR2, another floating ground
|
|
881 |
+ mobility.SetPositionAllocator (mr_position);
|
|
882 |
+ if (useMobility == 0)
|
|
883 |
+ {
|
|
884 |
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
|
|
885 |
+ mobility.Install (mr.Get (0));
|
|
886 |
+ }
|
|
887 |
+ else if (useMobility == 1)
|
|
888 |
+ {
|
|
889 |
+ mobility.SetMobilityModel ("ns3::ConstantVelocityMobilityModel");
|
|
890 |
+ mobility.Install (mr.Get (0));
|
|
891 |
+ Simulator::Schedule (Seconds (move_start), &SetVelocity, mr.Get (0), Vector (6.0,0.0,0.0));
|
|
892 |
+ Simulator::Schedule (Seconds (move_end), &SetVelocity, mr.Get (0), Vector (0.0,0.0,0.0));
|
|
893 |
+ }
|
|
894 |
+ else if (useMobility == 2)
|
|
895 |
+ {
|
|
896 |
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
|
|
897 |
+ mobility.Install (mr.Get (0));
|
|
898 |
+ }
|
|
899 |
+ else if (useMobility == 3)
|
|
900 |
+ {
|
|
901 |
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
|
|
902 |
+ mobility.Install (mr.Get (0));
|
|
903 |
+ }
|
|
904 |
+ else if (useMobility == 4)
|
|
905 |
+ {
|
|
906 |
+ mobility.SetMobilityModel ("ns3::RandomWalk2dMobilityModel",
|
|
907 |
+ "Bounds", RectangleValue (Rectangle (0, 300, 300, 350)),
|
|
908 |
+ "Distance", DoubleValue (20.0),
|
|
909 |
+ "Speed", RandomVariableValue (ConstantVariable (5)));
|
|
910 |
+ mobility.Install (mr.Get (0));
|
|
911 |
+ }
|
|
912 |
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
|
|
913 |
+ mobility.Install (mr.Get (1));
|
|
914 |
+ mobility.Install (mr.Get (2));
|
|
915 |
+
|
|
916 |
+ mobility.PushReferenceMobilityModel (mr.Get (0));
|
|
917 |
+ // Lower MR
|
|
918 |
+ for (uint32_t i = 3; i< mr.GetN (); i++)
|
|
919 |
+ {
|
|
920 |
+ if (useMobility == 2)
|
|
921 |
+ {
|
|
922 |
+ if (i == 5)
|
|
923 |
+ {
|
|
924 |
+ mobility.PopReferenceMobilityModel ();
|
|
925 |
+ mr_position = CreateObject<ListPositionAllocator> ();
|
|
926 |
+ mr_position->Add (Vector (70.0 + 1 * diff_x, 350.0 + 3 * diff_y, 0.0)); // MR4
|
|
927 |
+ mobility.SetPositionAllocator (mr_position);
|
|
928 |
+ mobility.SetMobilityModel ("ns3::ConstantVelocityMobilityModel");
|
|
929 |
+ mobility.Install (mr.Get (i));
|
|
930 |
+ mobility.PushReferenceMobilityModel (mr.Get (i));
|
|
931 |
+
|
|
932 |
+ Simulator::Schedule (Seconds (move_start), &SetVelocity, mr.Get (i), Vector (5.0,-2.4,0.0));
|
|
933 |
+ Simulator::Schedule (Seconds (move_end), &SetVelocity, mr.Get (i), Vector (0.0,0.0,0.0));
|
|
934 |
+ continue;
|
|
935 |
+ }
|
|
936 |
+
|
|
937 |
+ }
|
|
938 |
+
|
|
939 |
+ if (useMobility == 3)
|
|
940 |
+ {
|
|
941 |
+ if (i == 5)
|
|
942 |
+ {
|
|
943 |
+ mobility.PopReferenceMobilityModel ();
|
|
944 |
+ mr_position = CreateObject<ListPositionAllocator> ();
|
|
945 |
+ mr_position->Add (Vector (70.0 + 1 * diff_x, 350.0 + 3 * diff_y, 0.0)); // MR4
|
|
946 |
+ mobility.SetPositionAllocator (mr_position);
|
|
947 |
+ mobility.SetMobilityModel ("ns3::ConstantVelocityMobilityModel");
|
|
948 |
+ mobility.Install (mr.Get (i));
|
|
949 |
+ mobility.PushReferenceMobilityModel (mr.Get (i));
|
|
950 |
+
|
|
951 |
+ Simulator::Schedule (Seconds (move_start), &SetVelocity, mr.Get (i), Vector (-5.0,-2.5,0.0));
|
|
952 |
+ Simulator::Schedule (Seconds (move_end), &SetVelocity, mr.Get (i), Vector (0.0,0.0,0.0));
|
|
953 |
+ continue;
|
|
954 |
+ }
|
|
955 |
+ }
|
|
956 |
+
|
|
957 |
+ Vector pos;
|
|
958 |
+ Ptr<ListPositionAllocator> positionAllocMr =
|
|
959 |
+ CreateObject<ListPositionAllocator> ();
|
|
960 |
+ if (i == 3)
|
|
961 |
+ pos.x = (1.0) * diff_x;
|
|
962 |
+ else
|
|
963 |
+ pos.x = 0;
|
|
964 |
+ pos.y = diff_y;
|
|
965 |
+ positionAllocMr->Add (pos);
|
|
966 |
+ mobility.SetPositionAllocator (positionAllocMr);
|
|
967 |
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
|
|
968 |
+
|
|
969 |
+ mobility.Install (mr.Get (i));
|
|
970 |
+ pos = mr.Get (i)->GetObject<MobilityModel> ()->GetPosition ();
|
|
971 |
+ std::cout << "pos of " << i-1 << " is " << pos.x << ":" << pos.y << std::endl;
|
|
972 |
+ mobility.PopReferenceMobilityModel ();
|
|
973 |
+ mobility.PushReferenceMobilityModel (mr.Get (i));
|
|
974 |
+ }
|
|
975 |
+
|
|
976 |
+ // MNN
|
|
977 |
+ mobility.PushReferenceMobilityModel (mr.Get (mr.GetN () -1));
|
|
978 |
+ Ptr<MobilityModel> parentMobility = mr.Get (mr.GetN () -1)->GetObject<MobilityModel> ();
|
|
979 |
+ Vector pos = parentMobility->GetPosition ();
|
|
980 |
+ Ptr<ListPositionAllocator> positionAllocMnn =
|
|
981 |
+ CreateObject<ListPositionAllocator> ();
|
|
982 |
+ pos.x = 5;
|
|
983 |
+ pos.y = 20;
|
|
984 |
+ positionAllocMnn->Add (pos);
|
|
985 |
+ mobility.SetPositionAllocator (positionAllocMnn);
|
|
986 |
+ mobility.SetMobilityModel ("ns3::ConstantPositionMobilityModel");
|
|
987 |
+ mobility.Install (mnn);
|
|
988 |
+
|
|
989 |
+
|
|
990 |
+ //
|
|
991 |
+ // NetDevice Conf
|
|
992 |
+ //
|
|
993 |
+ WifiHelper wifi = WifiHelper::Default ();
|
|
994 |
+ // wifi.EnableLogComponents ();
|
|
995 |
+ wifi.SetStandard (WIFI_PHY_STANDARD_80211b);
|
|
996 |
+ wifi.SetRemoteStationManager ("ns3::ConstantRateWifiManager",
|
|
997 |
+ "DataMode",StringValue("DsssRate1Mbps"),
|
|
998 |
+ "ControlMode",StringValue("DsssRate1Mbps"));
|
|
999 |
+ YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
|
|
1000 |
+
|
|
1001 |
+ YansWifiChannelHelper phyChannel = YansWifiChannelHelper::Default ();
|
|
1002 |
+ NqosWifiMacHelper mac;
|
|
1003 |
+ CsmaHelper csma;
|
|
1004 |
+ csma.SetChannelAttribute ("DataRate", DataRateValue (5000000));
|
|
1005 |
+ csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (0.20)));
|
|
1006 |
+
|
|
1007 |
+ NetDeviceContainer arcore_dev = csma.Install (NodeContainer (ar.Get (0), arCore.Get (ar0_attatch_rtr)));
|
|
1008 |
+
|
|
1009 |
+ for (uint32_t i = 0; i < ha.GetN (); i++)
|
|
1010 |
+ {
|
|
1011 |
+ if (i == cn_attatch_rtr || i == ar0_attatch_rtr)
|
|
1012 |
+ continue;
|
|
1013 |
+ csma.Install (NodeContainer (arCore.Get (i), ha.Get (i)));
|
|
1014 |
+ }
|
|
1015 |
+
|
|
1016 |
+ // For Egress interface (sta-wifi)
|
|
1017 |
+ Ptr<YansWifiChannel> mr0sta;
|
|
1018 |
+ Ssid ssid = Ssid ("manemo-ingress");
|
|
1019 |
+ // AP (ingress)
|
|
1020 |
+ mac.SetType ("ns3::ApWifiMac", "Ssid", SsidValue (ssid));
|
|
1021 |
+ phy.SetChannel (mr0sta = phyChannel.Create ());
|
|
1022 |
+ wifi.Install (phy, mac, ar.Get (0));
|
|
1023 |
+ // STA (egress)
|
|
1024 |
+ mac.SetType ("ns3::StaWifiMac",
|
|
1025 |
+ "Ssid", SsidValue (ssid),
|
|
1026 |
+ "MaxMissedBeacons", UintegerValue (5),
|
|
1027 |
+ "ActiveProbing", BooleanValue (false));
|
|
1028 |
+ phy.SetChannel (mr0sta);
|
|
1029 |
+ wifi.Install (phy, mac, mr.Get (0));
|
|
1030 |
+ wifi.Install (phy, mac, mr.Get (2));
|
|
1031 |
+
|
|
1032 |
+
|
|
1033 |
+ // For Ingress interface (wifi-ap) and AR
|
|
1034 |
+ Ptr<YansWifiChannel> nextap;
|
|
1035 |
+ Ptr<YansWifiChannel> mr0adhoc;
|
|
1036 |
+ Ptr<YansWifiChannel> mr0ap, mr1ap;
|
|
1037 |
+ for (uint32_t i = 0; i < mr.GetN (); i++)
|
|
1038 |
+ {
|
|
1039 |
+ // STA (egress), sim0
|
|
1040 |
+ mac.SetType ("ns3::StaWifiMac",
|
|
1041 |
+ "Ssid", SsidValue (ssid),
|
|
1042 |
+ "MaxMissedBeacons", UintegerValue (5),
|
|
1043 |
+ "ActiveProbing", BooleanValue (false));
|
|
1044 |
+ if (i != 0 && i != 2)
|
|
1045 |
+ {
|
|
1046 |
+ if (useAdhoc == 1)
|
|
1047 |
+ {
|
|
1048 |
+ phy.SetChannel (phyChannel.Create ());
|
|
1049 |
+ }
|
|
1050 |
+ else
|
|
1051 |
+ {
|
|
1052 |
+ phy.SetChannel (nextap);
|
|
1053 |
+ }
|
|
1054 |
+ wifi.Install (phy, mac, mr.Get(i));
|
|
1055 |
+ }
|
|
1056 |
+
|
|
1057 |
+ // Adhoc (EIEI), sim1
|
|
1058 |
+ mac.SetType ("ns3::AdhocWifiMac");
|
|
1059 |
+ if (useAdhoc == 1)
|
|
1060 |
+ {
|
|
1061 |
+ if (mr0adhoc == 0)
|
|
1062 |
+ {
|
|
1063 |
+ mr0adhoc = phyChannel.Create ();
|
|
1064 |
+ }
|
|
1065 |
+ phy.SetChannel (mr0adhoc);
|
|
1066 |
+ }
|
|
1067 |
+ else
|
|
1068 |
+ {
|
|
1069 |
+ phy.SetChannel (phyChannel.Create ());
|
|
1070 |
+ }
|
|
1071 |
+
|
|
1072 |
+ if (useMobility != 1 || i != 2)
|
|
1073 |
+ wifi.Install (phy, mac, mr.Get (i));
|
|
1074 |
+
|
|
1075 |
+ // AP (ingress), sim2
|
|
1076 |
+ mac.SetType ("ns3::ApWifiMac", "Ssid", SsidValue (ssid));
|
|
1077 |
+ if (i == 2 || i == 4)
|
|
1078 |
+ phy.SetChannel (mr1ap);
|
|
1079 |
+ else
|
|
1080 |
+ phy.SetChannel (nextap = phyChannel.Create ());
|
|
1081 |
+
|
|
1082 |
+ if (useMobility != 1 || i != 2)
|
|
1083 |
+ wifi.Install (phy, mac, mr.Get(i));
|
|
1084 |
+ if (i == 0)
|
|
1085 |
+ {
|
|
1086 |
+ mr0ap = nextap;
|
|
1087 |
+ }
|
|
1088 |
+ else if (i == 1)
|
|
1089 |
+ {
|
|
1090 |
+ mr1ap = nextap;
|
|
1091 |
+ }
|
|
1092 |
+ else if (i == 2)
|
|
1093 |
+ {
|
|
1094 |
+ nextap = mr0ap;
|
|
1095 |
+ }
|
|
1096 |
+ else if (i == 4)
|
|
1097 |
+ {
|
|
1098 |
+ nextap = mr1ap;
|
|
1099 |
+ }
|
|
1100 |
+ }
|
|
1101 |
+
|
|
1102 |
+ // AR0 Link for CN
|
|
1103 |
+ NetDeviceContainer cn_devices = csma.Install (NodeContainer (arCore.Get (cn_attatch_rtr), cn.Get (0)));
|
|
1104 |
+
|
|
1105 |
+ // For AR1
|
|
1106 |
+ // csma.SetChannelAttribute ("DataRate", DataRateValue (5000000));
|
|
1107 |
+ csma.SetChannelAttribute ("Delay", TimeValue (MilliSeconds (20)));
|
|
1108 |
+ csma.Install (NodeContainer (ar.Get (0), ar.Get (1)));
|
|
1109 |
+ // For MR0's Egress interface (wifi)
|
|
1110 |
+ phy.SetChannel (mr0sta);
|
|
1111 |
+ wifi.Install (phy, mac, ar.Get (1));
|
|
1112 |
+
|
|
1113 |
+ // setup MNN (sta)
|
|
1114 |
+ mac.SetType ("ns3::StaWifiMac",
|
|
1115 |
+ "Ssid", SsidValue (ssid),
|
|
1116 |
+ "ActiveProbing", BooleanValue (false));
|
|
1117 |
+ phy.SetChannel (nextap);
|
|
1118 |
+ NetDeviceContainer mnn_devices = wifi.Install (phy, mac, mnn.Get(0));
|
|
1119 |
+
|
|
1120 |
+
|
|
1121 |
+
|
|
1122 |
+ //
|
|
1123 |
+ // ProcessManager Configuration
|
|
1124 |
+ //
|
|
1125 |
+ DceManagerHelper processManager;
|
|
1126 |
+ processManager.SetTaskManagerAttribute ("FiberManagerType",
|
|
1127 |
+ EnumValue (0));
|
|
1128 |
+ processManager.SetAttribute ("MinimizeOpenFiles", BooleanValue (true));
|
|
1129 |
+ // processManager.SetLoader ("ns3::DlmLoaderFactory");
|
|
1130 |
+ processManager.SetNetworkStack("ns3::LinuxSocketFdFactory",
|
|
1131 |
+ "Library", StringValue ("libnet-next-2.6.so"));
|
|
1132 |
+ processManager.Install (mr);
|
|
1133 |
+ processManager.Install (ha);
|
|
1134 |
+ processManager.Install (ar);
|
|
1135 |
+
|
|
1136 |
+ // Prefix configuration
|
|
1137 |
+ std::vector <std::string> *ha_links = new std::vector <std::string>;
|
|
1138 |
+ std::vector <std::string> *ar_links = new std::vector <std::string>;
|
|
1139 |
+ std::vector <std::string> *mnps = new std::vector <std::string>;
|
|
1140 |
+
|
|
1141 |
+ uint32_t i = 0;
|
|
1142 |
+ for (i = 0; i < mr.GetN (); i++)
|
|
1143 |
+ {
|
|
1144 |
+ std::ostringstream oss;
|
|
1145 |
+ oss << ha_sim0_base << std::setw(2) << std::setfill('0') << std::hex << i << "::1/64";
|
|
1146 |
+ ha_links->push_back (oss.str ());
|
|
1147 |
+
|
|
1148 |
+ oss.str ("");
|
|
1149 |
+ oss << ha_sim0_base << std::setw(2) << std::setfill('0') << std::hex << i << "::2/64";
|
|
1150 |
+ ar_links->push_back (oss.str ());
|
|
1151 |
+
|
|
1152 |
+ oss.str ("");
|
|
1153 |
+ oss << mnp_base << std::setw(2) << std::setfill('0') << std::hex << i << "::" << (i+16);
|
|
1154 |
+ mnps->push_back (oss.str ());
|
|
1155 |
+ }
|
|
1156 |
+
|
|
1157 |
+ // For HA
|
|
1158 |
+ for (uint32_t i = 0; i< ha.GetN (); i++)
|
|
1159 |
+ {
|
|
1160 |
+ // ArCore
|
|
1161 |
+ AddAddress (arCore.Get (i), Seconds (0.5 * (i + 1)), arCore.Get (i)->GetNDevices () - 1, ar_links->at (i).c_str ());
|
|
1162 |
+ std::string gw = ha_links->at (i);
|
|
1163 |
+ gw.replace (gw.find ("/"), 3, " ");
|
|
1164 |
+ std::string dst = mnps->at (i);
|
|
1165 |
+ dst.append ("/64");
|
|
1166 |
+ AddRoute (arCore.Get (i), Seconds (0.5 * (i + 1)), dst.c_str (), gw.c_str (), arCore.Get (i)->GetNDevices () - 1);
|
|
1167 |
+
|
|
1168 |
+ if (i == cn_attatch_rtr || i == ar0_attatch_rtr)
|
|
1169 |
+ continue;
|
|
1170 |
+
|
|
1171 |
+ // HA
|
|
1172 |
+ AddAddress (ha.Get (i), Seconds (0.1), 0, ha_links->at (i).c_str ());
|
|
1173 |
+ gw = ar_links->at (i);
|
|
1174 |
+ gw.replace (gw.find ("/"), 3, " ");
|
|
1175 |
+ AddRoute (ha.Get (i), Seconds (0.3), "default", gw.c_str (), 0);
|
|
1176 |
+ }
|
|
1177 |
+
|
|
1178 |
+ // For AR0 (the intermediate node)
|
|
1179 |
+ AddAddress (ar.Get (0), Seconds (0.05), 1, ar0_mnet.c_str ());
|
|
1180 |
+ AddAddress (ar.Get (0), Seconds (0.15), 2, (ar0_ar1_link + "2/64").c_str ());
|
|
1181 |
+ AddRoute (ar.Get (0), Seconds (mrNodes*0.15+2), ar1_wifi_net.c_str (), (ar0_ar1_link+"3").c_str (), 2);
|
|
1182 |
+ RunIp (ar.Get (0), Seconds (10.15), "route show table all");
|
|
1183 |
+ RunIp (ar.Get (0), Seconds (10.15), "neig show all");
|
|
1184 |
+ RunIp (ar.Get (0), Seconds (10.15), "addr");
|
|
1185 |
+
|
|
1186 |
+ // For AR1
|
|
1187 |
+ AddAddress (ar.Get (1), Seconds (0.1), 0, (ar0_ar1_link + "3/64").c_str ());
|
|
1188 |
+ AddAddress (ar.Get (1), Seconds (0.1), 1, ar1_wifi_link.c_str ());
|
|
1189 |
+ AddRoute (ar.Get (1), Seconds (0.15), "default", (ar0_ar1_link + "2").c_str (), 0);
|
|
1190 |
+
|
|
1191 |
+ // For MR
|
|
1192 |
+ for (uint32_t i = 0; i< mr.GetN (); i++)
|
|
1193 |
+ {
|
|
1194 |
+ // EI interface
|
|
1195 |
+ // XXX: we need to add sim1 first since netlink notification won't come sometimes
|
|
1196 |
+ oss.str ("");
|
|
1197 |
+ oss << mnps->at (i) << "/128";
|
|
1198 |
+ AddAddress (mr.Get (i), Seconds (1.6), 1, oss.str ().c_str ());
|
|
1199 |
+
|
|
1200 |
+ // Egress
|
|
1201 |
+ RunIp (mr.Get (i), Seconds (0.15), "link set sim0 up");
|
|
1202 |
+ RunIp (mr.Get (i), Seconds (0.2), "link set ip6tnl0 up");
|
|
1203 |
+
|
|
1204 |
+ // Ingress
|
|
1205 |
+ std::string iif = mnps->at (i);
|
|
1206 |
+ oss.str ("");
|
|
1207 |
+ oss << iif << "/64";
|
|
1208 |
+ AddAddress (mr.Get (i), Seconds (0.4), 2, oss.str ().c_str ());
|
|
1209 |
+ }
|
|
1210 |
+
|
|
1211 |
+ // ARCore and AR0
|
|
1212 |
+ AddAddress (ar.Get (0), Seconds (0.3), arcore_dev.Get (0)->GetIfIndex (), ar_arcore.c_str ());
|
|
1213 |
+ std::string gw = ar_arcore2;
|
|
1214 |
+ gw.replace (gw.find ("/"), 3, " ");
|
|
1215 |
+ AddRoute (ar.Get (0), Seconds (0.3), "default", gw.c_str (), arcore_dev.Get (0)->GetIfIndex ());
|
|
1216 |
+
|
|
1217 |
+ AddAddress (arCore.Get (ar0_attatch_rtr), Seconds (0.3), arcore_dev.Get (1)->GetIfIndex (), ar_arcore2.c_str ());
|
|
1218 |
+ gw = ar_arcore;
|
|
1219 |
+ gw.replace (gw.find ("/"), 3, " ");
|
|
1220 |
+ AddRoute (arCore.Get (ar0_attatch_rtr), Seconds (0.3), ar0_mnet.c_str (), gw.c_str (), arcore_dev.Get (1)->GetIfIndex ());
|
|
1221 |
+ AddRoute (arCore.Get (ar0_attatch_rtr), Seconds (0.4), ar1_wifi_net.c_str (), gw.c_str (), arcore_dev.Get (1)->GetIfIndex ());
|
|
1222 |
+
|
|
1223 |
+ // Process Configuration
|
|
1224 |
+ DceApplicationHelper process;
|
|
1225 |
+ ApplicationContainer apps;
|
|
1226 |
+ QuaggaHelper quagga;
|
|
1227 |
+ Mip6dHelper mip6d;
|
|
1228 |
+ if (useAdhoc)
|
|
1229 |
+ {
|
|
1230 |
+ mip6d.SetBinary ("mip6d.natmanemo");
|
|
1231 |
+ }
|
|
1232 |
+
|
|
1233 |
+ // HA
|
|
1234 |
+ for (uint32_t i = 0; i< ha.GetN (); i++)
|
|
1235 |
+ {
|
|
1236 |
+ mip6d.AddHaServedPrefix (ha.Get (i), Ipv6Address (mnps->at (i).c_str ()), Ipv6Prefix (64));
|
|
1237 |
+ mip6d.EnableHA (ha.Get (i));
|
|
1238 |
+ mip6d.Install (ha.Get (i));
|
|
1239 |
+ }
|
|
1240 |
+
|
|
1241 |
+ // AR
|
|
1242 |
+ // for MR
|
|
1243 |
+#ifdef FIXME
|
|
1244 |
+ quagga.EnableRadvd (ar.Get (0), "sim1");
|
|
1245 |
+#endif
|
|
1246 |
+ // for CN
|
|
1247 |
+#ifdef FIXME
|
|
1248 |
+ quagga.EnableRadvd (ar.Get (1), "sim1");
|
|
1249 |
+#endif
|
|
1250 |
+ quagga.EnableZebraDebug (ar);
|
|
1251 |
+ quagga.Install (ar);
|
|
1252 |
+
|
|
1253 |
+ // MR
|
|
1254 |
+ for (uint32_t i = 0; i< mr.GetN (); i++)
|
|
1255 |
+ {
|
|
1256 |
+ mip6d.AddMobileNetworkPrefix (mr.Get (i), Ipv6Address (mnps->at (i).c_str()), Ipv6Prefix (64));
|
|
1257 |
+ std::ostringstream oss;
|
|
1258 |
+ oss << ha_sim0_base << std::setw(2) << std::setfill('0') << std::hex << i << "::1/64";
|
|
1259 |
+ std::string ha_addr = oss.str();
|
|
1260 |
+ ha_addr.replace (ha_addr.find ("/"), 3, "\0 ");
|
|
1261 |
+ mip6d.AddHomeAgentAddress (mr.Get (i), Ipv6Address (ha_addr.c_str ()));
|
|
1262 |
+
|
|
1263 |
+ oss.str ("");
|
|
1264 |
+ oss << ha_sim0_base << std::setw(2) << std::setfill('0') << std::hex << i << "::2/64";
|
|
1265 |
+ std::string hoa = oss.str();
|
|
1266 |
+ hoa.replace (hoa.find ("/"), 4, "000\0");
|
|
1267 |
+ mip6d.AddHomeAddress (mr.Get (i), Ipv6Address (hoa.c_str ()), Ipv6Prefix (64));
|
|
1268 |
+ mip6d.AddEgressInterface (mr.Get (i), "sim0");
|
|
1269 |
+ if (i != 0)
|
|
1270 |
+ mip6d.AddEgressInterface (mr.Get (i), "sim1");
|
|
1271 |
+ }
|
|
1272 |
+ mip6d.EnableMR (mr);
|
|
1273 |
+ mip6d.Install (mr);
|
|
1274 |
+
|
|
1275 |
+ if (useAdhoc)
|
|
1276 |
+ {
|
|
1277 |
+ quagga.EnableNat (mr.Get (0));
|
|
1278 |
+ quagga.EnableNat (mr.Get (2));
|
|
1279 |
+
|
|
1280 |
+ RunIp (ha.Get (1), Seconds (30.1), "route show table all");
|
|
1281 |
+
|
|
1282 |
+ for (uint32_t i = 0; i< mr.GetN (); i++)
|
|
1283 |
+ {
|
|
1284 |
+ std::string proxy_addr = ar0_mnet;
|
|
1285 |
+ proxy_addr.replace (proxy_addr.find ("/") - 1, 4, "\0\0\0\0");
|
|
1286 |
+ oss.str ("");
|
|
1287 |
+ oss << "-6 neighbor add proxy " << proxy_addr << std::hex << (i+16) << " dev sim0";
|
|
1288 |
+ RunIp (mr.Get (0), Seconds (20.1 + 0.01 * i), oss.str ().c_str ());
|
|
1289 |
+ RunIp (mr.Get (2), Seconds (20.1 + 0.01 * i), oss.str ().c_str ());
|
|
1290 |
+
|
|
1291 |
+ proxy_addr = ar1_wifi_link;
|
|
1292 |
+ proxy_addr.replace (proxy_addr.find ("/") - 1, 4, "\0\0\0\0");
|
|
1293 |
+ oss.str ("");
|
|
1294 |
+ oss << "-6 neighbor add proxy " << proxy_addr << std::hex << (i+16) << " dev sim0";
|
|
1295 |
+ RunIp (mr.Get (0), Seconds (20.1 + 0.01 * i), oss.str ().c_str ());
|
|
1296 |
+ RunIp (mr.Get (2), Seconds (20.1 + 0.01 * i), oss.str ().c_str ());
|
|
1297 |
+
|
|
1298 |
+ }
|
|
1299 |
+ RunIp (mr.Get (0), Seconds (100.1), "-6 neighbor");
|
|
1300 |
+ RunIp (mr.Get (2), Seconds (100.1), "-6 neighbor");
|
|
1301 |
+ }
|
|
1302 |
+ else
|
|
1303 |
+ {
|
|
1304 |
+ RunIp6Tables (mr.Get (0), Seconds (100.1), "-F -t nat");
|
|
1305 |
+ }
|
|
1306 |
+
|
|
1307 |
+ for (uint32_t i = 0; i< mr.GetN (); i++)
|
|
1308 |
+ {
|
|
1309 |
+ quagga.EnableEgressIF (mr.Get (i), "sim0");
|
|
1310 |
+#ifdef FIXME
|
|
1311 |
+ quagga.EnableRadvd (mr.Get (i), "sim1");
|
|
1312 |
+#endif
|
|
1313 |
+ quagga.EnableEgressIF (mr.Get (i), "sim1");
|
|
1314 |
+#ifdef FIXME
|
|
1315 |
+ quagga.EnableRadvd (mr.Get (i), "sim2");
|
|
1316 |
+#endif
|
|
1317 |
+ RunIp (mr.Get (i), Seconds (200), "route show table all");
|
|
1318 |
+ RunIp (mr.Get (i), Seconds (200), "addr list");
|
|
1319 |
+ }
|
|
1320 |
+ quagga.EnableZebraDebug (mr);
|
|
1321 |
+ quagga.EnableTdpNina (mr);
|
|
1322 |
+ if (!mobilityDebug)
|
|
1323 |
+ {
|
|
1324 |
+ quagga.Install (mr);
|
|
1325 |
+ }
|
|
1326 |
+
|
|
1327 |
+ // MNN and CN
|
|
1328 |
+ /* Install IPv4/IPv6 stack */
|
|
1329 |
+ InternetStackHelper internetv6;
|
|
1330 |
+ internetv6.SetIpv4StackInstall (false);
|
|
1331 |
+ internetv6.Install (mnn);
|
|
1332 |
+ internetv6.Install (cn);
|
|
1333 |
+
|
|
1334 |
+ // MNN
|
|
1335 |
+ Ipv6AddressHelper ipv6;
|
|
1336 |
+ Ipv6InterfaceContainer src = ipv6.AssignWithoutAddress (mnn_devices.Get (0));
|
|
1337 |
+
|
|
1338 |
+ // CN
|
|
1339 |
+ AddAddress (arCore.Get (cn_attatch_rtr), Seconds (0.3), cn_devices.Get (0)->GetIfIndex (), cn_network.c_str ());
|
|
1340 |
+ cn_network.replace (cn_network.find ("/") - 1, 4, "\0 ");
|
|
1341 |
+ ipv6.NewNetwork (Ipv6Address (cn_network.c_str ()), 64);
|
|
1342 |
+ Ipv6InterfaceContainer dst = ipv6.Assign (cn_devices.Get (1));
|
|
1343 |
+
|
|
1344 |
+ if (doPing)
|
|
1345 |
+ {
|
|
1346 |
+ LogComponentEnable ("Ping6Application", LOG_LEVEL_INFO);
|
|
1347 |
+ // Ping6
|
|
1348 |
+ uint32_t packetSize = 64;
|
|
1349 |
+ uint32_t maxPacketCount = 5000;
|
|
1350 |
+ Time interPacketInterval = Seconds (ping6_interval);
|
|
1351 |
+ Ping6Helper ping6;
|
|
1352 |
+
|
|
1353 |
+ ping6.SetLocal (Ipv6Address::GetAny ());
|
|
1354 |
+ ping6.SetRemote (dst.GetAddress (0, 1));
|
|
1355 |
+
|
|
1356 |
+ ping6.SetAttribute ("MaxPackets", UintegerValue (maxPacketCount));
|
|
1357 |
+ ping6.SetAttribute ("Interval", TimeValue (interPacketInterval));
|
|
1358 |
+ ping6.SetAttribute ("PacketSize", UintegerValue (packetSize));
|
|
1359 |
+ ApplicationContainer apps = ping6.Install (mnn.Get (0));
|
|
1360 |
+ apps.Start (Seconds (2.0));
|
|
1361 |
+ apps.Stop (Seconds (stopTime));
|
|
1362 |
+ }
|
|
1363 |
+
|
|
1364 |
+
|
|
1365 |
+
|
|
1366 |
+ // Pcap
|
|
1367 |
+ phy.EnablePcapAll ("pcap/mip6d-rf");
|
|
1368 |
+ csma.EnablePcapAll ("pcap/mip6d-rf");
|
|
1369 |
+
|
|
1370 |
+
|
|
1371 |
+ Simulator::Stop (Seconds (stopTime + 5.0));
|
|
1372 |
+ Simulator::Run ();
|
|
1373 |
+ Simulator::Destroy ();
|
|
1374 |
+
|
|
1375 |
+ return 0;
|
|
1376 |
+}
|
11
|
1377 |
diff -r a1527ef7aacd example/dce-mip6d.cc
|
|
1378 |
--- a/example/dce-mip6d.cc Thu Mar 29 13:55:03 2012 +0900
|
|
1379 |
+++ b/example/dce-mip6d.cc Thu Mar 29 13:55:22 2012 +0900
|
1
|
1380 |
@@ -139,7 +139,7 @@
|
|
1381 |
NetDeviceContainer cn_devices = csma.Install (NodeContainer (ar.Get (0), cn.Get (0)));
|
|
1382 |
|
|
1383 |
DceManagerHelper processManager;
|
|
1384 |
- // processManager.SetLoader ("ns3::DlmLoaderFactory");
|
|
1385 |
+ processManager.SetLoader ("ns3::DlmLoaderFactory");
|
|
1386 |
processManager.SetNetworkStack("ns3::LinuxSocketFdFactory",
|
|
1387 |
"Library", StringValue ("libnet-next-2.6.so"));
|
|
1388 |
processManager.Install (mr);
|
11
|
1389 |
diff -r a1527ef7aacd exec_sudo.sh
|
1
|
1390 |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
|
11
|
1391 |
+++ b/exec_sudo.sh Thu Mar 29 13:55:22 2012 +0900
|
1
|
1392 |
@@ -0,0 +1,5 @@
|
|
1393 |
+#!/bin/bash
|
|
1394 |
+
|
|
1395 |
+ulimit -c unlimited
|
|
1396 |
+. utils/setenv.sh
|
|
1397 |
+$1
|
11
|
1398 |
diff -r a1527ef7aacd helper/mip6d-helper.cc
|
|
1399 |
--- a/helper/mip6d-helper.cc Thu Mar 29 13:55:03 2012 +0900
|
|
1400 |
+++ b/helper/mip6d-helper.cc Thu Mar 29 13:55:22 2012 +0900
|
1
|
1401 |
@@ -92,6 +92,7 @@
|
|
1402 |
|
|
1403 |
|
|
1404 |
Mip6dHelper::Mip6dHelper ()
|
|
1405 |
+ : m_binary_file ("mip6d")
|
|
1406 |
{
|
|
1407 |
}
|
|
1408 |
|
|
1409 |
@@ -279,6 +280,13 @@
|
|
1410 |
}
|
|
1411 |
|
|
1412 |
void
|
|
1413 |
+Mip6dHelper::SetBinary (std::string binary_file)
|
|
1414 |
+{
|
|
1415 |
+ m_binary_file = binary_file;
|
|
1416 |
+ return;
|
|
1417 |
+}
|
|
1418 |
+
|
|
1419 |
+void
|
|
1420 |
Mip6dHelper::GenerateConfig (Ptr<Node> node)
|
|
1421 |
{
|
|
1422 |
Ptr<Mip6dConfig> mip6d_conf = node->GetObject<Mip6dConfig>();
|
|
1423 |
@@ -434,7 +442,7 @@
|
|
1424 |
GenerateConfig (node);
|
|
1425 |
|
|
1426 |
process.ResetArguments ();
|
|
1427 |
- process.SetBinary ("mip6d");
|
|
1428 |
+ process.SetBinary (m_binary_file);
|
|
1429 |
process.ParseArguments ("-c /etc/mip6d.conf -d 10");
|
|
1430 |
process.SetStackSize (1<<16);
|
|
1431 |
apps.Add (process.Install (node));
|
11
|
1432 |
diff -r a1527ef7aacd helper/mip6d-helper.h
|
|
1433 |
--- a/helper/mip6d-helper.h Thu Mar 29 13:55:03 2012 +0900
|
|
1434 |
+++ b/helper/mip6d-helper.h Thu Mar 29 13:55:22 2012 +0900
|
1
|
1435 |
@@ -98,8 +98,10 @@
|
|
1436 |
// Common
|
|
1437 |
void EnableDebug (NodeContainer nodes);
|
|
1438 |
void UseManualConfig (NodeContainer nodes);
|
|
1439 |
+ void SetBinary (std::string binary_file);
|
|
1440 |
|
|
1441 |
private:
|
|
1442 |
+ std::string m_binary_file;
|
|
1443 |
/**
|
|
1444 |
* \internal
|
|
1445 |
*/
|
11
|
1446 |
diff -r a1527ef7aacd helper/quagga-helper.cc
|
|
1447 |
--- a/helper/quagga-helper.cc Thu Mar 29 13:55:03 2012 +0900
|
|
1448 |
+++ b/helper/quagga-helper.cc Thu Mar 29 13:55:22 2012 +0900
|
2
|
1449 |
@@ -42,7 +42,9 @@
|
1
|
1450 |
QuaggaConfig ()
|
|
1451 |
: m_tdpenable (false),
|
|
1452 |
m_zebradebug (false),
|
|
1453 |
- m_usemanualconf (false)
|
|
1454 |
+ m_usemanualconf (false),
|
2
|
1455 |
+ m_natenable (false),
|
|
1456 |
+ m_tdfixed (false)
|
1
|
1457 |
{
|
|
1458 |
m_radvd_if = new std::map<std::string, std::string> ();
|
|
1459 |
m_egress_if = new std::vector<std::string> ();
|
2
|
1460 |
@@ -82,6 +84,8 @@
|
1
|
1461 |
bool m_tdpenable;
|
|
1462 |
bool m_zebradebug;
|
|
1463 |
bool m_usemanualconf;
|
|
1464 |
+ bool m_natenable;
|
2
|
1465 |
+ bool m_tdfixed;
|
1
|
1466 |
std::map<std::string, std::string> *m_radvd_if;
|
|
1467 |
std::vector<std::string> *m_egress_if;
|
|
1468 |
std::vector<std::string> *m_haflag_if;
|
2
|
1469 |
@@ -379,6 +383,22 @@
|
|
1470 |
}
|
|
1471 |
|
|
1472 |
void
|
|
1473 |
+QuaggaHelper::EnableTdpFixedRouter (NodeContainer nodes)
|
|
1474 |
+{
|
|
1475 |
+ for (uint32_t i = 0; i < nodes.GetN (); i ++)
|
|
1476 |
+ {
|
|
1477 |
+ Ptr<QuaggaConfig> zebra_conf = nodes.Get (i)->GetObject<QuaggaConfig>();
|
|
1478 |
+ if (!zebra_conf)
|
|
1479 |
+ {
|
|
1480 |
+ zebra_conf = new QuaggaConfig ();
|
|
1481 |
+ nodes.Get (i)->AggregateObject (zebra_conf);
|
|
1482 |
+ }
|
|
1483 |
+ zebra_conf->m_tdfixed = true;
|
|
1484 |
+ }
|
|
1485 |
+ return;
|
|
1486 |
+}
|
|
1487 |
+
|
|
1488 |
+void
|
|
1489 |
QuaggaHelper::EnableZebraDebug (NodeContainer nodes)
|
|
1490 |
{
|
|
1491 |
for (uint32_t i = 0; i < nodes.GetN (); i ++)
|
|
1492 |
@@ -456,6 +476,22 @@
|
1
|
1493 |
return;
|
|
1494 |
}
|
|
1495 |
|
|
1496 |
+void
|
|
1497 |
+QuaggaHelper::EnableNat (NodeContainer nodes)
|
|
1498 |
+{
|
|
1499 |
+ for (uint32_t i = 0; i < nodes.GetN (); i ++)
|
|
1500 |
+ {
|
|
1501 |
+ Ptr<QuaggaConfig> zebra_conf = nodes.Get (i)->GetObject<QuaggaConfig>();
|
|
1502 |
+ if (!zebra_conf)
|
|
1503 |
+ {
|
|
1504 |
+ zebra_conf = new QuaggaConfig ();
|
|
1505 |
+ nodes.Get (i)->AggregateObject (zebra_conf);
|
|
1506 |
+ }
|
|
1507 |
+ zebra_conf->m_natenable = true;
|
|
1508 |
+ }
|
|
1509 |
+ return;
|
|
1510 |
+}
|
|
1511 |
+
|
|
1512 |
// BGP
|
|
1513 |
void
|
|
1514 |
QuaggaHelper::EnableBgp (NodeContainer nodes)
|
2
|
1515 |
@@ -548,10 +584,11 @@
|
|
1516 |
conf << *zebra_conf;
|
|
1517 |
if (zebra_conf->m_zebradebug)
|
1
|
1518 |
{
|
2
|
1519 |
- conf << "debug zebra kernel" << std::endl;
|
|
1520 |
- conf << "debug zebra events" << std::endl;
|
1
|
1521 |
- // conf << "debug zebra route" << std::endl;
|
|
1522 |
- conf << "debug zebra packet" << std::endl;
|
2
|
1523 |
+ conf << "debug zebra tree" << std::endl;
|
|
1524 |
+// conf << "debug zebra kernel" << std::endl;
|
|
1525 |
+ // conf << "debug zebra events" << std::endl;
|
1
|
1526 |
+ // conf << "debug zebra route" << std::endl;
|
|
1527 |
+ // conf << "debug zebra packet" << std::endl;
|
|
1528 |
}
|
|
1529 |
|
|
1530 |
// radvd
|
2
|
1531 |
@@ -560,7 +597,10 @@
|
1
|
1532 |
{
|
|
1533 |
conf << "interface " << (*i).first << std::endl;
|
|
1534 |
conf << " ipv6 nd ra-interval 5" << std::endl;
|
|
1535 |
- conf << " ipv6 nd prefix " << (*i).second << " 30 15" <<std::endl;
|
|
1536 |
+ if ((*i).second.length () != 0)
|
|
1537 |
+ {
|
|
1538 |
+ conf << " ipv6 nd prefix-advertisement " << (*i).second << " 30 15" <<std::endl;
|
|
1539 |
+ }
|
|
1540 |
conf << " no ipv6 nd suppress-ra" << std::endl;
|
|
1541 |
conf << "!" << std::endl;
|
|
1542 |
}
|
2
|
1543 |
@@ -580,6 +620,7 @@
|
1
|
1544 |
{
|
|
1545 |
conf << "interface " << (*i) << std::endl;
|
|
1546 |
conf << " ipv6 nd td egress" << std::endl;
|
|
1547 |
+ conf << " ipv6 nd td ingress" << std::endl;
|
|
1548 |
conf << "!" << std::endl;
|
|
1549 |
}
|
|
1550 |
|
2
|
1551 |
@@ -590,6 +631,19 @@
|
1
|
1552 |
conf << "interface eth" << *i << std::endl;
|
|
1553 |
}
|
|
1554 |
|
|
1555 |
+ if (zebra_conf->m_tdpenable)
|
|
1556 |
+ {
|
|
1557 |
+ conf << "ipv6 nd nina enable" << std::endl;
|
2
|
1558 |
+ }
|
|
1559 |
+ if (zebra_conf->m_tdfixed)
|
|
1560 |
+ {
|
|
1561 |
+ conf << "ipv6 nd td fixed" << std::endl;
|
1
|
1562 |
+ }
|
|
1563 |
+ if (zebra_conf->m_natenable)
|
|
1564 |
+ {
|
|
1565 |
+ conf << "ipv6 nat enable" << std::endl;
|
|
1566 |
+ }
|
|
1567 |
+
|
|
1568 |
#if 0
|
|
1569 |
if (zebra_conf->m_tdpenable)
|
|
1570 |
{
|
2
|
1571 |
@@ -760,10 +814,10 @@
|
1
|
1572 |
GenerateConfigZebra (node);
|
|
1573 |
process.SetBinary ("zebra");
|
|
1574 |
process.AddArguments ("-f", zebra_conf->GetFilename ());
|
|
1575 |
- process.AddArguments ("-i", "/usr/local/etc/zebra.pid");
|
|
1576 |
+ // process.AddArguments ("-i", "/usr/local/etc/zebra.pid");
|
|
1577 |
process.SetStackSize (1<<16);
|
|
1578 |
apps.Add (process.Install (node));
|
|
1579 |
- apps.Get(0)->SetStartTime (Seconds (1.0 + 0.01 * node->GetId ()));
|
|
1580 |
+ apps.Get(0)->SetStartTime (Seconds (10.0 + 0.01 * node->GetId ()));
|
|
1581 |
node->AddApplication (apps.Get (0));
|
|
1582 |
|
|
1583 |
Ptr<OspfConfig> ospf_conf = node->GetObject<OspfConfig>();
|
11
|
1584 |
diff -r a1527ef7aacd helper/quagga-helper.h
|
|
1585 |
--- a/helper/quagga-helper.h Thu Mar 29 13:55:03 2012 +0900
|
|
1586 |
+++ b/helper/quagga-helper.h Thu Mar 29 13:55:22 2012 +0900
|
|
1587 |
@@ -82,11 +82,13 @@
|
2
|
1588 |
void EnableOspf (NodeContainer nodes);
|
|
1589 |
void EnableOspfDebug (NodeContainer nodes);
|
|
1590 |
void EnableTdpNina (NodeContainer nodes);
|
|
1591 |
+ void EnableTdpFixedRouter (NodeContainer nodes);
|
|
1592 |
void EnableZebraDebug (NodeContainer nodes);
|
|
1593 |
void EnableRadvd (Ptr<Node> node, const char *ifname, const char *prefix);
|
1
|
1594 |
void EnableEgressIF (Ptr<Node> node, const char *ifname);
|
|
1595 |
void EnableHomeAgentFlag (Ptr<Node> node, const char *ifname);
|
|
1596 |
void UseManualConfig (NodeContainer nodes);
|
|
1597 |
+ void EnableNat (NodeContainer nodes);
|
|
1598 |
void EnableBgp (NodeContainer nodes);
|
|
1599 |
uint32_t GetAsn (Ptr<Node> node);
|
|
1600 |
void BgpAddNeighbor (Ptr<Node> node, std::string n, uint32_t asn);
|
11
|
1601 |
diff -r a1527ef7aacd model/linux-socket-fd-factory.cc
|
|
1602 |
--- a/model/linux-socket-fd-factory.cc Thu Mar 29 13:55:03 2012 +0900
|
|
1603 |
+++ b/model/linux-socket-fd-factory.cc Thu Mar 29 13:55:22 2012 +0900
|
|
1604 |
@@ -524,7 +524,7 @@
|
1
|
1605 |
this));
|
|
1606 |
Set (".net.ipv4.conf.all.forwarding", "1");
|
|
1607 |
Set (".net.ipv4.conf.all.log_martians", "1");
|
|
1608 |
- Set (".net.ipv6.conf.all.forwarding", "1");
|
|
1609 |
+ // Set (".net.ipv6.conf.all.forwarding", "1");
|
|
1610 |
Set (".net.ipv6.conf.all.proxy_ndp", "1");
|
|
1611 |
|
|
1612 |
while (!m_earlySysfs.empty ())
|
11
|
1613 |
diff -r a1527ef7aacd test/test-pipe.cc
|
|
1614 |
--- a/test/test-pipe.cc Thu Mar 29 13:55:03 2012 +0900
|
|
1615 |
+++ b/test/test-pipe.cc Thu Mar 29 13:55:22 2012 +0900
|
2
|
1616 |
@@ -354,7 +354,7 @@
|
|
1617 |
|
|
1618 |
|
|
1619 |
int
|
|
1620 |
-main (int c, char *v)
|
|
1621 |
+main (int c, char **v)
|
|
1622 |
{
|
|
1623 |
test1 ();
|
|
1624 |
test2 ();
|
11
|
1625 |
diff -r a1527ef7aacd utils/setenv.zsh
|
|
1626 |
--- a/utils/setenv.zsh Thu Mar 29 13:55:03 2012 +0900
|
|
1627 |
+++ b/utils/setenv.zsh Thu Mar 29 13:55:22 2012 +0900
|
1
|
1628 |
@@ -5,7 +5,7 @@
|
|
1629 |
BASE=$PWD
|
|
1630 |
LD_LIBRARY_PATH="$BASE/ns-3-dce/build/lib:$BASE/build/lib:$BASE/build/bin:$BASE/ns-3-dce/build/bin:."
|
|
1631 |
PKG_CONFIG_PATH="$BASE/build/lib/pkgconfig"
|
|
1632 |
-PATH="$PATH:$BASE/build/bin:$BASE/build/sbin:/home/tazaki/hgworks/ns-3-dce-thehajime/build/bin:/home/tazaki/hgworks/ns-3-dce-thehajime/build/sbin"
|
|
1633 |
+PATH="$BASE/build/bin:$BASE/build/sbin:/home/tazaki/hgworks/ns-3-dce-thehajime/build/bin:/home/tazaki/hgworks/ns-3-dce-thehajime/build/sbin:$PATH"
|
|
1634 |
PYTHONPATH=$BASE/ns-3-dev/build/debug/bindings/python:$BASE/ns-3-dev/src/visualizer:$BASE/pybindgen-0.15.0.795:$BASE/build/lib/python2.6/site-packages/
|
|
1635 |
export LD_LIBRARY_PATH PKG_CONFIG_PATH PATH PYTHONPATH
|
|
1636 |
cd $BASE/ns-3-dce
|
11
|
1637 |
diff -r a1527ef7aacd wscript
|
|
1638 |
--- a/wscript Thu Mar 29 13:55:03 2012 +0900
|
|
1639 |
+++ b/wscript Thu Mar 29 13:55:22 2012 +0900
|
|
1640 |
@@ -277,6 +277,14 @@
|
1
|
1641 |
target='bin/dce-dsmip6d',
|
|
1642 |
source=['example/dce-dsmip6d.cc'])
|
|
1643 |
|
|
1644 |
+ module.add_example(needed = ['core', 'internet', 'dce', 'csma', 'mobility', 'wifi', 'visualizer', 'topology-read'],
|
|
1645 |
+ target='bin/dce-fga',
|
|
1646 |
+ source=['example/dce-fga.cc'])
|
|
1647 |
+
|
|
1648 |
+ module.add_example(needed = ['core', 'internet', 'dce', 'csma', 'mobility', 'wifi', 'visualizer', 'topology-read'],
|
|
1649 |
+ target='bin/dce-fga-crawdad',
|
|
1650 |
+ source=['example/dce-fga-crawdad.cc'])
|
|
1651 |
+
|
|
1652 |
def build(bld):
|
|
1653 |
build_netlink(bld)
|
|
1654 |
|