Hi, Maybe you can try this in tcl, set link [$ns link node1 node2] $link cost cost-val where cost-val is the cost of this $link. shuqian