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

Re:Re: Variable BW link?




Kannan Varadhan has cautioned that you need to be careful about
changing (decreasing) link bandwidth or delay when there are packets in
flight or in the queue-- causality, or even the semantics of the link
(e.g., partially overlapping packets), could be violated.


>> I'm trying a variable bandwidth link.
>> But, it seems that there is just fixed bandwidth link in ns.
>> Do you know about a variable bandwidth link module?
>
>
>Both delay_ and bandwidth_ are bound variables-- so you should be able
>to change them dynamically.  You first need to obtain a handle to your
>Link object (through the link_ associative array), then access
>the "link_" instvar, which corresponds to a "DelayLink" object in C++.
>
>Say you want to change the bandwidth and delay of a simplex link between
>nodes n1 and n2.  You could do the following:
>
>        set i1 [$n1 id]
>        set i2 [$n2 id]
>        [[$ns set link_($i1:$i2)] set link_] set bandwidth_ $new_bw
>        [[$ns set link_($i1:$i2)] set link_] set delay_ $new_delay