[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting link up & down in your agent code



hi kannan,

thanks for the quick answer. If that's case, does it mean that i have to call my agent in the test script as follows :

$myagent BringDown"
$ns at 0.8 "$myagent BringUp"


At 10:09 AM 6/10/98 PDT, Kannan Varadhan wrote:
>> From: ChengLin TAN <[email protected]>
>> Date: Wed, 10 Jun 1998 18:56:16 +0200
>
>ChengLin,
>
>In connection with bringing a link down, you also have to
>
> a) update unicast routing at the incident nodes
> b) update multicast routing at the incident nodes
> c) drop all packets queued for transmission on that
> link
> d) drop all packets in transit
>
>Conversely, when bringing a link up, you have to do steps (a) and (b)
>above only.
>
>The rtmodel APIs do all of that automatically. If you choose to
>control the links directly through your agent, then you'd likely
>want to do the work of the rtmodel code yourself.
>
>All of this is in the documentation
>(http://www-mash.cs.berkeley.edu/ns/nsDoc.ps.gz),
>and, of course, the source code.
>
>
>Kannan
>
>
>
>> hi,
>>
>> To set link up & down, i know i can use
>> $ns rtmodel-at 0.2 down $n0 $n1
>> $ns rtmodel-at 0.8 up $n0 $n1
>>
>> However, if i want to use the following in my agent code procedures
>> (called BringUp and BringDown) instead :
>>
>> [$ns link $n0 $n1] down ---> in BringDown
>> [$ns link $n0 $n1] up -----> in BringUp
>>
>> I have declared both links to be dynamic using
>> [$ns link $n0 $n1] dynamic
>> [$ns link $n0 $n1] dynamic
>>
>> in my test script, i called the procedures as follows:
>>
>> $ns at 0.2 "$myagent BringDown"
>> $ns at 0.8 "$myagent BringUp"
>>
>> After i bring up the link, the link does not seems to be working
>> (although NAM shows the link turns fr red to black). Is it that the
>> routes are not updated yet? How do i solve this problem?
>>
>> Thanks in advance for any clue.
>> regards,
>> chenglin
>>
>
>--
>[email protected]
>http://www.isi.edu/~kannan
>
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Cheng Lin TAN


Centre for Wireless Communications Ph: +65 8729 030
20 Science Park Road DID: +65 8709 112
#02-34/37, Teletech Park Fax: +65 7795 441
Singapore Science Park II email: [email protected]
Singapore 117674 http://www.cwc.nus.edu.sg

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=