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

Re: Link Cost



On Mon, 8 Mar 1999, Shuqian Yan wrote:

> Date: Mon, 8 Mar 1999 13:50:32 -0500 (EST)
> From: Shuqian Yan <[email protected]>
> To: Lloyd Wood <[email protected]>
> 
> Hello,
> To you question on " I haven't been able to change this successfully
> dynamically. Anyone?"

Huang confirmed he'd encountered the same thing.

> it seems I can dynamically change the
> default link cost (which is default to 1 hop for all directed edges) to
> whatever value I like.

changing the default overall cost isn't enough. you need to change the
cost of a single link with the effect of changing that cost appearing
in your simulations for this to be of any use.


> I made the change in the ~ns/tcl/mcast/BST.tcl,
> under its recv-graft procedure{}, I have enclose the modified file, and
> you can try to run it with example script under
> tcl/ex/newmcast/mcast5.tcl, see if it works for you too.

[cc'd to the list for an expert opinion.]

Well, looking at your modification:

diff ns/ns/tcl/mcast/BST.tcl BST-4.tcl
223a224,228
>       if { $node_ != $RP_($group) } {
>               set linkcost [[$ns_ link $node_ $RP_($group)] cost 3]
>               $self dbg "[[$ns_ link $node_ $RP_($group)] cost?]"
>               $self dbg "linkcost: $linkcost"
>       }

       $self dbg "oiflist: $oiflist_($group)"
     } 
etc.

There's more to it than just being able to set the link cost to an
arbitrary value, I think (since that doesn't affect the simulation
results of mcast5.tcl at all, and you haven't told the nodes the
link costs have changed, right?).

That's not really where you would want to change the link cost; you'd
want to change it in your simulation script between two nodes, and see
the results of that change reflected accurately in the traffic (or
multicast trees) running across those nodes at the time as the routing
protocols (which we're also having trouble with, but that's another
story, but intf-changed to update the nodes requires detailed dynamic
routing...) propagate the information throughout the network. 

The cost's associated with the simplex link, not with the traffic
running across said link, so setting such changes per-protocol is the
wrong answer, I think, and doesn't prove anything. (Someone correct 
me if I'm wrong here.)

And whether changing cost doesn't invalidate the simulation (if it
actually does anything at all) is a question I'm not qualified to
answer; I'm still at the 'changing cost doesn't do anything' stage.

Cheers,

L.

who thinks it would be nice if nam showed link cost both ways on link
popups too; that's the sort of thing he can cope with.



> shuqian
> 
> On Wed, 24 Feb 1999, Lloyd Wood wrote:
> 
> > On Sat, 20 Feb 1999, Wee Ching Wi wrote:
> >
> > > Does anyone know how to change the link cost for any pair of nodes. I
> know
> > > there is an instproc cost{ } but  not too sure how to use it.
> >
> >  [$ns link $n($node2) $n($node1)] cost $thislinkcost
> >
> > AFAIK it only works at startup; I haven't been able to change this
> > successfully dynamically. Anyone?
> >
> > In November 1998 Kannan wrote:
> > | You can try invoking "$n0 intf-changed; $n3 intf-changed" after
> > | changing the link cost.  However, since I don't recall ever
> > | explicitly taking link cost changes into account, it may or may not
> > | work.
> > [..]
> > | Again, setting costs as a function of the link delay definitely
> > | works (barring unforeseen bugs) when the costs are configured   
> > | at startup; whether it works when the costs are changed during
> > | simulation execution is a question.
> > 
> > L.

<[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>