[ns] help!!! fail to create topology

=?GB2312?Q?=C9=F2=C0=F6=D6=D2?= lzhshen at sjtu.edu.cn
Sun May 30 01:43:05 PDT 2004


hi, all friends!!
When I run the application, it always fail to create the topology. 
The error information shows that "error when calling class $cls: $args" $...".
Could someone tell me what's wrong with the application??

###########################     Here is the detail information of error. ########################


    (_o1449 cmd line 1)
    invoked from within
"_o1449 cmd addMarkRule 10 -1 -1 ack any"
    invoked from within
"catch "$self cmd $args" ret"
    invoked from within
"if [catch "$self cmd $args" ret] {
set cls [$self info class]
global errorInfo
set savedInfo $errorInfo
error "error when calling class $cls: $args" $..."
    (procedure "_o1449" line 2)
    (SplitObject unknown line 2)
    invoked from within
"$qCE1 addMarkRule 10 -1 -1 ack any"
    (procedure "create_topology" line 35)
    invoked from within
"create_topology "
    (file "scenario3.tcl" line 59)



############################  Here is the place where error occurs   ###########################3

#
# Maintainer: Polly Huang <huang at isi.edu>
# Version Date: $Date: 1999/04/20 22:34:31 $
#
# @(#) $Header: /nfs/jade/vint/CVSROOT/ns-2/tcl/ex/varybell.tcl,v 1.1 1999/04/20 22:34:31 polly Exp $ (USC/ISI)
#
# Unbalanced dumbell topology
# Used by large-scale-web-traffic.tcl
#        clients      servers
#
#            7       2    3
#          \ |       | / 
#         -- 1 ----- 0 -- 4
#          / |        \
#           426         5   

#source sc3_utils.tcl
set packetSize 1000
set realaudionodes 301 ;# 300 senders, 1 receiver


proc create_topology {} {
   	global ns n verbose num_node cbsBE cirBE BEpacketSize packetSize alg algBW red r realaudionodes num_server num_client VoIPSink
	set num_server 40
	set num_client 420
	
	set num_node [expr 7 + [expr $num_client + $num_server]]  ;# 467
	set num_telnet 50
	set num_ftp    50	

	for {set i 0} {$i < $num_node} {incr i} {
		set n($i) [$ns node]
	}

	set n($num_node) 	  [$ns node]  ;#  for CBR traffic
	set n([expr $num_node+1]) [$ns node]  ;# 

	$ns duplex-link $n($num_node) $n(0)  10Mb 20ms DropTail
	$ns duplex-link $n(1) $n([expr $num_node+1])  10Mb 20ms DropTail

	$ns simplex-link $n(0) $n([expr $num_node - 1])  3.5Mb 40ms dsRED/edge  ;# DiffServ enabled interface
	$ns simplex-link $n([expr $num_node - 1])  $n(0) 3.5Mb 40ms dsRED/edge  ;# used only to count number of acks

	# node 1 connects to the client pool
	$ns duplex-link $n([expr $num_node - 1]) $n(1) 6Mb 20ms DropTail
	$ns duplex-link $n(0) $n(2) 2Mb 20ms DropTail
	$ns duplex-link $n(0) $n(3) 2Mb 30ms DropTail
	$ns duplex-link $n(0) $n(4) 2Mb 40ms DropTail
	$ns duplex-link $n(0) $n(5) 2Mb 60ms DropTail

	# configuring for ack counting
	set qCE1 [[$ns link $n([expr $num_node - 1]) $n(0)] queue]
	$qCE1 set numQueues_ 1
	$qCE1 setNumPrec 0 2; # queue 0, three levels of precedence

	$qCE1 addMarkRule 10 -1 -1 ack any     #########################  error here   ##########################
	$qCE1 addMarkRule  0 -1 -1 any any     #########################   error here    #############################
    ....

.....




More information about the Ns-users mailing list