[Ns-developers] Help needed for Hierarchical routing

joy smilelol joysmilelol at yahoo.com
Fri Jul 15 01:46:24 PDT 2005


Hi,
 
Need help for hierarchy routing.
 
I bit confuse about hierarchy setting. I'm confused about the cluster and $eilastlevel.  What did I make wrong.
 
I've wrote the following code but got an error. str2addr: Address 7239534 outside range of address field length 2048
 
Thanks in advance.
 
JOY
 
#
#  $n(5)(1.0.0)      
#      |   \         \
#      |   |         \
#      |$n(7)(1.2.0) $n(8)(1.3.0)
#      |  
#   $n(6)(1.1.0)
#      /   \     \
#     /     \      \
#  $n(9)   $n(10)   $n(11)
# (1.1.1)  (1.1.2)  (1.1.3)
#
global ns
set ns [new Simulator]
$ns rtproto Session
$ns set-address-format hierarchical  ; # 7.14.05 hierarchy for lan(1)
set outfile [open Expout.tr w]
$ns trace-all $outfile
set nf [open Expout.nam w]
$ns namtrace-all $nf


#--------------------------------------------------------------
# node at LAN 1
# 07.12.05 add 2 more node for multimedia traffic with UDP 
# n(1)0 to n(5) router, n(11) to n(6) router 
#--------------------------------------------------------------
AddrParams set domain_num_ 1   ; # 7.14.05 add hierarchy
lappend cluster_num 3
AddrParams set cluster_num_ $cluster_num
lappend eilastlevel 2 3 3
AddrParams set nodes_num_ $eilastlevel
 
$ns node-config -satNodeType terminal 
set n(5) [$ns node 0.0.0]
$n(5) color "yellow" 
$n(5) shape "box"
$n(5) set-position 0 10 ; # Gateway for LAn(1)
$n(5) add-gsl geo $opt(ll) $opt(ifq) $opt(qlim) $opt(mac) $opt(bw_up) \
  $opt(phy) [$n(0) set downlink_] [$n(0) set uplink_]
$ns unset satNodeType_
set naddr {1.1.0 1.2.0 1.3.0 1.1.1 1.1.2 1.1.3}

for {set i 1} {$i < 7} {incr i} {
 set n(5+$i) [$ns node [lindex $naddr $i]]
}
for {set i 6} {$i < 12} {incr i} {
 $n($i) color "red"
 $n($i) shape "circle"
}
#---------------------------------------------
# link between cache and LAN 1
#---------------------------------------------
$ns duplex-link $n(5) $n(6) 1.5Mb 50ms DropTail
$ns duplex-link $n(5) $n(7) 1.5Mb 50ms DropTail  ; # 07.12.05
$ns duplex-link $n(5) $n(8) 1.5Mb 50ms DropTail
$ns duplex-link $n(6) $n(9) 1.5Mb 50ms DropTail
$ns duplex-link $n(6) $n(10) 1.5Mb 50ms DropTail
$ns duplex-link $n(6) $n(11) 1.5Mb 50ms DropTail  ; # 07.12.05


costas samdanis <konstantinos.samdanis at kcl.ac.uk> wrote:
I don't understand what you mean! In what way nam doesn't work?

I haven't tried the hier 100 but i have tried the hier 10 and it does work.
So i guess the other one should work as well.

br

costas

----- Original Message ----- 
From: "joy smilelol" 
To: 
Sent: Wednesday, July 13, 2005 11:00 AM
Subject: [ns] Hierarchical routing


>
> Dear Sir,
>
> I have tried to turn hier-tg-100.tcl (source hts100-0.tcl) in ns 2.27.
> the usage for link in hts100-0.tcl need to be rectified. But nam doesn't
work
> Is there anybody has tried out that file? If so, please help.
>
> Thank you
> Rgds
>
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com


		
---------------------------------
 Start your day with Yahoo! - make it your home page 


More information about the Ns-developers mailing list