test-suite-mpls.tcl
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:16k
源码类别:

通讯编程

开发平台:

Visual C++

  1. # -*- Mode:tcl; tcl-indent-level:8; tab-width:8; indent-tabs-mode:t -*-
  2. #
  3. # Time-stamp: <2000-09-11 15:22:45 haoboy>
  4. #
  5. # Copyright (c) 1995 The Regents of the University of California.
  6. # All rights reserved.
  7. #
  8. # Redistribution and use in source and binary forms, with or without
  9. # modification, are permitted provided that the following conditions
  10. # are met:
  11. # 1. Redistributions of source code must retain the above copyright
  12. #    notice, this list of conditions and the following disclaimer.
  13. # 2. Redistributions in binary form must reproduce the above copyright
  14. #    notice, this list of conditions and the following disclaimer in the
  15. #    documentation and/or other materials provided with the distribution.
  16. # 3. All advertising materials mentioning features or use of this software
  17. #    must display the following acknowledgement:
  18. # This product includes software developed by the Computer Systems
  19. # Engineering Group at Lawrence Berkeley Laboratory.
  20. # 4. Neither the name of the University nor of the Laboratory may be used
  21. #    to endorse or promote products derived from this software without
  22. #    specific prior written permission.
  23. #
  24. # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  25. # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  26. # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  27. # ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  28. # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  29. # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  30. # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  31. # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  32. # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  33. # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  34. # SUCH DAMAGE.
  35. #
  36. # $Header: /cvsroot/nsnam/ns-2/tcl/test/test-suite-mpls.tcl,v 1.6 2005/06/11 04:42:09 sfloyd Exp $
  37. remove-all-packet-headers       ; # removes all except common
  38. add-packet-header Flags IP RTP TCP MPLS LDP ; # hdrs reqd for validation test
  39.  
  40. # FOR UPDATING GLOBAL DEFAULTS:
  41. Class TestSuite
  42. TestSuite instproc init { name } {
  43. $self instvar ns_ totalpkt_ testname_
  44. set testname_ $name
  45. set ns_ [new Simulator]
  46. set totalpkt_ 0
  47. }
  48. TestSuite instproc finish args {
  49. $self instvar traceFile_ ns_
  50. $self recv-pkts
  51. global quiet
  52. if { $quiet != "true" } {
  53. $ns_ flush-trace
  54. close $traceFile_
  55. }
  56. exit 0
  57. }
  58. TestSuite instproc openTrace { stopTime } {
  59. $self instvar ns_ traceFile_ testname_
  60. global quiet
  61. if { $quiet != "true" } {
  62. set traceFile_ [open $testname_.nam w]
  63. $ns_ namtrace-all $traceFile_
  64. }
  65. $ns_ at $stopTime "$self finish"
  66. }
  67. TestSuite instproc attach-expoo-traffic { node sink size burst idle rate } {
  68. $self instvar ns_
  69. set udp [new Agent/UDP]
  70. $ns_ attach-agent $node $udp
  71. set traffic [new Application/Traffic/Exponential]
  72. $traffic set packetSize_ $size
  73. $traffic set burst_time_ $burst
  74. $traffic set idle_time_ $idle
  75. $traffic set rate_ $rate
  76. $traffic attach-agent $udp
  77. $ns_ connect $udp $sink
  78. return $traffic
  79. }
  80. TestSuite instproc record {} {
  81.         $self instvar sink0_ totalpkt_ ns_
  82. # Set the time after which the procedure should be called again
  83.         set time 0.005
  84. # How many bytes have been received by the traffic sink?
  85.         set bw0 [$sink0_ set bytes_]
  86. # Get the current time
  87.         set now [$ns_ now]
  88. # Calculate the bandwidth (in MBit/s) and write it to the file
  89. puts "$now [expr $bw0/$time*8/1000000]"
  90. # Reset the bytes_ values on the traffic sink
  91.         $sink0_ set bytes_ 0
  92. #Re-schedule the procedure
  93.         $ns_ at [expr $now+$time] "$self record"
  94.         set bw0 [expr $bw0 / 200]
  95.         set totalpkt_ [expr $totalpkt_ + $bw0]
  96. }
  97. TestSuite instproc recv-pkts {} {
  98. $self instvar totalpkt_
  99. flush stdout
  100. puts "The Number of Total received packet is $totalpkt_"
  101. }
  102. TestSuite instproc run {} {
  103. $self instvar ns_
  104. $ns_ run
  105. }
  106. proc usage {} {
  107. global argv0
  108. puts stderr "usage: ns $argv0 <tests> [<quiet>]"
  109. puts stderr "Valid tests are:t[get-subclasses TestSuite Test/]"
  110. exit 1
  111. }
  112. proc isProc? {cls prc} {
  113. if [catch "Object info subclass $cls/$prc" r] {
  114. global argv0
  115. puts stderr "$argv0: no such $cls: $prc"
  116. usage
  117. }
  118. }
  119. proc get-subclasses {cls pfx} {
  120. set ret ""
  121. set l [string length $pfx]
  122. set c $cls
  123. while {[llength $c] > 0} {
  124. set t [lindex $c 0]
  125. set c [lrange $c 1 end]
  126. if [string match ${pfx}* $t] {
  127. lappend ret [string range $t $l end]
  128. }
  129. eval lappend c [$t info subclass]
  130. }
  131. set ret
  132. }
  133. TestSuite proc runTest {} {
  134. global argc argv quiet
  135. set quiet false
  136. switch $argc {
  137. 1 {
  138. set test $argv
  139. isProc? Test $test
  140. set topo ""
  141. }
  142. 2 {
  143. set test [lindex $argv 0]
  144. isProc? Test $test
  145. set extra [lindex $argv 1]
  146. if {$extra == "QUIET"} {
  147. set quiet true
  148. }
  149. }
  150. default {
  151. usage
  152. }
  153. }
  154. set t [new Test/$test $test]
  155. $t run
  156. }
  157. Class Test/simple -superclass TestSuite
  158. Test/simple instproc recv-pkts {} {
  159. # Nothing, since we do not do record{}.
  160. }
  161. Test/simple instproc init args {
  162. eval $self next $args
  163. $self instvar ns_
  164. Classifier/Addr/MPLS set control_driven_ 1
  165. # Turn on all traces to stdout
  166. Agent/LDP set trace_ldp_ 1
  167. Classifier/Addr/MPLS set trace_mpls_ 1
  168. $self openTrace 5.0
  169. set Node0  [$ns_ node]
  170. set Node1  [$ns_ node]
  171. $ns_ node-config -MPLS ON
  172. set LSR2   [$ns_ node]
  173. set LSR3   [$ns_ node]
  174. set LSR4   [$ns_ node]
  175. set LSR5   [$ns_ node]
  176. set LSR6   [$ns_ node]
  177. set LSR7   [$ns_ node]
  178. set LSR8   [$ns_ node]
  179. $ns_ node-config -MPLS OFF
  180. set Node9  [$ns_ node]
  181. set Node10 [$ns_ node]
  182. $ns_ duplex-link $Node0 $LSR2  1Mb  10ms DropTail
  183. $ns_ duplex-link $Node1 $LSR2  1Mb  10ms DropTail
  184. $ns_ duplex-link $LSR2  $LSR3  1Mb  10ms DropTail
  185. $ns_ duplex-link $LSR3  $LSR4  1Mb  10ms DropTail
  186. $ns_ duplex-link $LSR4  $LSR8  1Mb  10ms DropTail
  187. $ns_ duplex-link $LSR2  $LSR5  1Mb  10ms DropTail
  188. $ns_ duplex-link $LSR5  $LSR6  1Mb  10ms DropTail
  189. $ns_ duplex-link $LSR5  $LSR4  1Mb  10ms DropTail
  190. $ns_ duplex-link $LSR6  $LSR7  1Mb  10ms DropTail
  191. $ns_ duplex-link $LSR6  $LSR8  1Mb  10ms DropTail
  192. $ns_ duplex-link $LSR7  $LSR8  1Mb  10ms DropTail
  193. $ns_ duplex-link $LSR7  $Node9  1Mb  10ms DropTail
  194. $ns_ duplex-link $LSR8  $Node10 1Mb  10ms DropTail
  195. #
  196. # configure ldp agents on all mpls nodes
  197. #
  198. for {set i 2} {$i < 9} {incr i} {
  199. for {set j [expr $i+1]} {$j < 9} {incr j} {
  200. set a LSR$i
  201. set b LSR$j
  202. eval $ns_ LDP-peer $$a $$b
  203. }
  204. }
  205. #
  206. # set ldp-message clolr
  207. #
  208. $ns_ ldp-request-color       blue
  209. $ns_ ldp-mapping-color       red
  210. $ns_ ldp-withdraw-color      magenta
  211. $ns_ ldp-release-color       orange
  212. $ns_ ldp-notification-color  yellow
  213. #
  214. # make agent to send packets
  215. #
  216. set Src0 [new Application/Traffic/CBR]
  217. set udp0 [new Agent/UDP]
  218. $Src0 attach-agent $udp0
  219. $ns_ attach-agent $Node0 $udp0
  220. $Src0 set packetSize_ 500
  221. $Src0 set interval_ 0.010
  222. set Src1 [new Application/Traffic/CBR]
  223. set udp1 [new Agent/UDP]
  224. $Src1 attach-agent $udp1
  225. $ns_ attach-agent $Node1 $udp1
  226. $Src1 set packetSize_ 500
  227. $Src1 set interval_ 0.010
  228. set Dst0 [new Agent/Null]
  229. $ns_ attach-agent $Node9 $Dst0
  230. set Dst1 [new Agent/Null]
  231. $ns_ attach-agent $Node10 $Dst1
  232. $ns_ connect $udp0 $Dst0
  233. $ns_ connect $udp1 $Dst1
  234. $ns_ at 0.1  "$Src0 start"
  235. $ns_ at 0.1  "$Src1 start"
  236. for {set i 2} {$i < 9} {incr i} {
  237. set a LSR$i
  238. set m [eval $$a get-module "MPLS"]
  239. eval set LSR$i $m
  240. }
  241. $ns_ at 0.2  "$LSR7 ldp-trigger-by-withdraw 9 -1"
  242. $ns_ at 0.2  "$LSR8 ldp-trigger-by-withdraw 10 -1"
  243. $ns_ at 0.3  "$LSR2 flow-aggregation 9 -1  6 -1"
  244. $ns_ at 0.3  "$LSR2 flow-aggregation 10 -1 6 -1"
  245. $ns_ at 0.5  "$LSR6 ldp-trigger-by-withdraw 6 -1"
  246. $ns_ at 0.7  "$Src1 stop"
  247. $ns_ at 0.7  "$LSR2 make-explicit-route  7  5_4_8_6_7  3000  -1"
  248. $ns_ at 0.9  "$LSR2 flow-erlsp-install   9 -1   3000"
  249. $ns_ at 1.1  "$LSR2 ldp-trigger-by-release  7 3000"
  250. $ns_ at 1.2  "$LSR4 make-explicit-route  8  4_5_6_8       3500  -1"
  251. $ns_ at 1.4  "$LSR2 make-explicit-route  7  2_3_4_3500_7  3600  -1"
  252. $ns_ at 1.6  "$LSR2 flow-erlsp-install   9 -1   3600"
  253. $ns_ at 2.0 "$Src0 stop"
  254. $ns_ at 2.1 "$LSR2 pft-dump"
  255. $ns_ at 2.1 "$LSR2 erb-dump"
  256. $ns_ at 2.1 "$LSR2 lib-dump"
  257. $ns_ at 2.1 "$LSR3 pft-dump"
  258. $ns_ at 2.1 "$LSR3 erb-dump"
  259. $ns_ at 2.1 "$LSR3 lib-dump"
  260. $ns_ at 2.1 "$LSR4 pft-dump"
  261. $ns_ at 2.1 "$LSR4 erb-dump"
  262. $ns_ at 2.1 "$LSR4 lib-dump"
  263. $ns_ at 2.1 "$LSR5 pft-dump"
  264. $ns_ at 2.1 "$LSR5 erb-dump"
  265. $ns_ at 2.1 "$LSR5 lib-dump"
  266. $ns_ at 2.1 "$LSR6 pft-dump"
  267. $ns_ at 2.1 "$LSR6 erb-dump"
  268. $ns_ at 2.1 "$LSR6 lib-dump"
  269. $ns_ at 2.1 "$LSR7 pft-dump"
  270. $ns_ at 2.1 "$LSR7 erb-dump"
  271. $ns_ at 2.1 "$LSR7 lib-dump"
  272. $ns_ at 2.1 "$LSR8 pft-dump"
  273. $ns_ at 2.1 "$LSR8 erb-dump"
  274. $ns_ at 2.1 "$LSR8 lib-dump"
  275. }
  276. Class Test/control-driven -superclass TestSuite
  277. Test/control-driven instproc init args {
  278. Classifier/Addr/MPLS set control_driven_ 1
  279. Agent/LDP set trace_ldp_ 1
  280. Classifier/Addr/MPLS set trace_mpls_ 1
  281. eval $self next $args
  282. $self instvar ns_
  283. $ns_ use-scheduler List
  284. $self openTrace 0.7
  285. $ns_ rtproto DV
  286. set node0  [$ns_ node]
  287. $ns_ node-config -MPLS ON
  288. set LSR1   [$ns_ node]
  289. set LSR2   [$ns_ node]
  290. set LSR3   [$ns_ node]
  291. set LSR4   [$ns_ node]
  292. set LSR5   [$ns_ node]
  293. set LSR6   [$ns_ node]
  294. set LSR7   [$ns_ node]
  295. $ns_ node-config -MPLS OFF
  296. set node8  [$ns_ node]
  297. $ns_ duplex-link $node0 $LSR1  1Mb  10ms DropTail
  298. $ns_ duplex-link $LSR1 $LSR2 1Mb 10ms DropTail
  299. $ns_ duplex-link $LSR1 $LSR3 1Mb 10ms DropTail
  300. $ns_ duplex-link $LSR2  $LSR4  1Mb  10ms DropTail
  301. $ns_ duplex-link $LSR4  $LSR6  1Mb  10ms DropTail
  302. $ns_ duplex-link $LSR6  $LSR7  1Mb  10ms DropTail
  303. $ns_ duplex-link $LSR3  $LSR5  1Mb  10ms DropTail
  304. $ns_ duplex-link $LSR3  $LSR4  1Mb  10ms DropTail
  305. $ns_ duplex-link $LSR5  $LSR7  1Mb  10ms DropTail
  306. $ns_ duplex-link $LSR5  $LSR6  1Mb  10ms DropTail
  307. $ns_ duplex-link $LSR7  $node8 1Mb  10ms DropTail
  308. $ns_ duplex-link-op $node0 $LSR1 orient right
  309. $ns_ duplex-link-op $LSR1 $LSR2 orient down
  310. $ns_ duplex-link-op $LSR1 $LSR3 orient right
  311. $ns_ duplex-link-op $LSR2  $LSR4 orient right
  312. $ns_ duplex-link-op $LSR4  $LSR6 orient right
  313. $ns_ duplex-link-op $LSR6  $LSR7  orient right-up
  314. $ns_ duplex-link-op $LSR3  $LSR5 orient right
  315. $ns_ duplex-link-op $LSR3  $LSR4 orient down
  316. $ns_ duplex-link-op $LSR5  $LSR7 orient right
  317. $ns_ duplex-link-op $LSR5  $LSR6 orient down
  318. $ns_ duplex-link-op $LSR7  $node8 orient right
  319. #
  320. # configure ldp agents on all mpls nodes
  321. #
  322. for {set i 1} {$i < 8} {incr i} {
  323. set a LSR$i
  324. for {set j [expr $i+1]} {$j < 8} {incr j} {
  325. set b LSR$j
  326. eval $ns_ LDP-peer $$a $$b
  327. }
  328. set m [eval $$a get-module "MPLS"]
  329. $m enable-reroute "drop"
  330. }
  331. #
  332. # set ldp-message clolr
  333. #
  334. $ns_ ldp-request-color       blue
  335. $ns_ ldp-mapping-color       red
  336. $ns_ ldp-withdraw-color      magenta
  337. $ns_ ldp-release-color       orange
  338. $ns_ ldp-notification-color  yellow
  339. #Create a traffic sink and attach it to the node node8
  340. $self instvar sink0_
  341. set sink0_ [new Agent/LossMonitor]
  342. $ns_ attach-agent $node8 $sink0_
  343. # Create a traffic source
  344. set src0 [$self attach-expoo-traffic $node0 $sink0_ 200 0 0 400k]
  345. $ns_ at 0.0 "$self record"
  346. $ns_ at 0.1 "$src0 start"
  347. $ns_ rtmodel-at 0.3 down $LSR3 $LSR5
  348. $ns_ rtmodel-at 0.5 up   $LSR3 $LSR5
  349. $ns_ at 0.6 "$src0 stop"
  350. }
  351. Class Test/data-driven -superclass TestSuite
  352. Test/data-driven instproc init args {
  353. eval $self next $args
  354. $self instvar ns_
  355. Agent/LDP set trace_ldp_ 1
  356. Classifier/Addr/MPLS set trace_mpls_ 1
  357. $ns_ use-scheduler List
  358. $self openTrace 0.7
  359. $ns_ rtproto DV
  360. set node0  [$ns_ node]
  361. $ns_ node-config -MPLS ON
  362. set LSR1   [$ns_ node]
  363. set LSR2   [$ns_ node]
  364. set LSR3   [$ns_ node]
  365. set LSR4   [$ns_ node]
  366. set LSR5   [$ns_ node]
  367. set LSR6   [$ns_ node]
  368. set LSR7   [$ns_ node]
  369. $ns_ node-config -MPLS OFF
  370. set node8  [$ns_ node]
  371. $ns_ duplex-link $node0 $LSR1  1Mb  10ms DropTail
  372. $ns_ duplex-link $LSR1  $LSR2  1Mb  10ms DropTail
  373. $ns_ duplex-link $LSR2  $LSR4  1Mb  10ms DropTail
  374. $ns_ duplex-link $LSR4  $LSR6  1Mb  10ms DropTail
  375. $ns_ duplex-link $LSR6  $LSR7  1Mb  10ms DropTail
  376. $ns_ duplex-link $LSR1  $LSR3  1Mb  10ms DropTail
  377. $ns_ duplex-link $LSR3  $LSR5  1Mb  10ms DropTail
  378. $ns_ duplex-link $LSR5  $LSR7  1Mb  10ms DropTail
  379. $ns_ duplex-link $LSR3  $LSR4  1Mb  10ms DropTail
  380. $ns_ duplex-link $LSR5  $LSR6  1Mb  10ms DropTail
  381. $ns_ duplex-link $LSR7  $node8 1Mb  10ms DropTail
  382. #
  383. # configure ldp agents on all mpls nodes
  384. #
  385. for {set i 1} {$i < 8} {incr i} {
  386. set a LSR$i
  387. for {set j [expr $i+1]} {$j < 8} {incr j} {
  388. set b LSR$j
  389. eval $ns_ LDP-peer $$a $$b
  390. }
  391. set m [eval $$a get-module "MPLS"]
  392. $m enable-reroute "new"
  393. }
  394. #
  395. # set ldp-message clolr
  396. #
  397. $ns_ ldp-request-color       blue
  398. $ns_ ldp-mapping-color       red
  399. $ns_ ldp-withdraw-color      magenta
  400. $ns_ ldp-release-color       orange
  401. $ns_ ldp-notification-color  yellow
  402. #
  403. # set ldp events
  404. #
  405. Classifier/Addr/MPLS enable-on-demand
  406. Classifier/Addr/MPLS enable-ordered-control
  407. [$LSR1 get-module "MPLS"] enable-data-driven
  408. [$LSR3 get-module "MPLS"] enable-data-driven
  409. # Create a traffic sink and attach it to the node node8
  410. $self instvar sink0_
  411. set sink0_ [new Agent/LossMonitor]
  412. $ns_ attach-agent $node8 $sink0_
  413. # Create a traffic source
  414. set src0 [$self attach-expoo-traffic $node0 $sink0_ 200 0 0 400k]
  415. $ns_ at 0.0 "$self record"
  416. $ns_ at 0.1 "$src0 start"
  417. $ns_ rtmodel-at 0.3 down $LSR3 $LSR5
  418. $ns_ rtmodel-at 0.5 up   $LSR3 $LSR5
  419. $ns_ at 0.6 "$src0 stop"
  420. }
  421. Class Test/reroute -superclass TestSuite
  422. Test/reroute instproc init args {
  423. eval $self next $args
  424. $self instvar ns_
  425. Agent/LDP set trace_ldp_ 1
  426. Classifier/Addr/MPLS set trace_mpls_ 1
  427. $ns_ use-scheduler List
  428. $self openTrace 0.7
  429. $ns_ rtproto DV
  430. set node0  [$ns_ node]
  431. $ns_ node-config -MPLS ON
  432. set LSR1   [$ns_ node]
  433. set LSR2   [$ns_ node]
  434. set LSR3   [$ns_ node]
  435. set LSR4   [$ns_ node]
  436. set LSR5   [$ns_ node]
  437. set LSR6   [$ns_ node]
  438. set LSR7   [$ns_ node]
  439. $ns_ node-config -MPLS OFF
  440. set node8  [$ns_ node]
  441. $ns_ duplex-link $node0 $LSR1  1Mb  10ms DropTail
  442. $ns_ duplex-link $LSR1  $LSR2  1Mb  10ms DropTail
  443. $ns_ duplex-link $LSR2  $LSR4  1Mb  10ms DropTail
  444. $ns_ duplex-link $LSR4  $LSR6  1Mb  10ms DropTail
  445. $ns_ duplex-link $LSR6  $LSR7  1Mb  10ms DropTail
  446. $ns_ duplex-link $LSR1  $LSR3  1Mb  10ms DropTail
  447. $ns_ duplex-link $LSR3  $LSR5  1Mb  10ms DropTail
  448. $ns_ duplex-link $LSR5  $LSR7  1Mb  10ms DropTail
  449. $ns_ duplex-link $LSR3  $LSR4  1Mb  10ms DropTail
  450. $ns_ duplex-link $LSR5  $LSR6  1Mb  10ms DropTail
  451. $ns_ duplex-link $LSR7  $node8 1Mb  10ms DropTail
  452. #
  453. # configure ldp agents on all mpls nodes
  454. #
  455. for {set i 1} {$i < 8} {incr i} {
  456. set a LSR$i
  457. for {set j [expr $i+1]} {$j < 8} {incr j} {
  458. set b LSR$j
  459. eval $ns_ LDP-peer $$a $$b
  460. }
  461. set m [eval $$a get-module "MPLS"]
  462. $m enable-reroute "new"
  463. }
  464. #
  465. # set ldp-message clolr
  466. #
  467. $ns_ ldp-request-color       blue
  468. $ns_ ldp-mapping-color       red
  469. $ns_ ldp-withdraw-color      magenta
  470. $ns_ ldp-release-color       orange
  471. $ns_ ldp-notification-color  yellow
  472. Classifier/Addr/MPLS enable-on-demand
  473. Classifier/Addr/MPLS enable-ordered-control
  474. [$LSR1 get-module "MPLS"] enable-data-driven
  475. [$LSR3 get-module "MPLS"] enable-data-driven
  476. # Create a traffic sink and attach it to the node node8
  477. $self instvar sink0_
  478. set sink0_ [new Agent/LossMonitor]
  479. $ns_ attach-agent $node8  $sink0_
  480. # Create a traffic source
  481. set src0 [$self attach-expoo-traffic $node0 $sink0_ 200 0 0 400k]
  482. $ns_ at 00 "$self record"
  483. $ns_ at 0.1  "$src0 start"
  484. $ns_ at 0.1  "[$LSR1 get-module MPLS] make-explicit-route 7 2_4_6_7 1000 -1"
  485. $ns_ at 0.2  "[$LSR7 get-module MPLS] make-explicit-route  7  5_3_1_1000  1005  -1"
  486. $ns_ at 0.3  "[$LSR1 get-module MPLS] reroute-binding      8 -1    1005"
  487. $ns_ at 0.3  "[$LSR3 get-module MPLS] reroute-binding      8 -1    1005"
  488. $ns_ at 0.3  "[$LSR5 get-module MPLS] reroute-binding      8 -1    1005"
  489. $ns_ rtmodel-at 0.3 down $LSR3 $LSR5
  490. $ns_ rtmodel-at 0.5 up   $LSR3 $LSR5
  491. $ns_ at 0.6 "$src0 stop"
  492. }
  493. TestSuite runTest
  494. ### Local Variables:
  495. ### mode: tcl
  496. ### tcl-indent-level: 8
  497. ### tcl-default-application: ns
  498. ### End: