Hi,
I am new to ns-2 society. I have installed ns-2.28 with EURANE in cygwin
(Windows 2003) as well as in Linux (Gentoo). I have the same problem in both
environments. This is my script:

set ns [new Simulator]

set file [open wyn1.tr w+]
set xfile [open xgwyn1.tr w+]

$ns trace-all $file

#Finish procedure
proc finish {} {
        global ns
        global file
        global xfile
        $ns flush-trace
        close $file
        close $xfile

        puts "End of this simulations"
        exec xgraph xgwyn1.tr -geometry 800x600 &
        
        exit 0
}

proc record {} {
        global ns
        global xfile
        global sink
        
        set ns [Simulator instance]
        
        set time 1
        
        set bw [$sink set bytes_]
        
        set now [$ns now]
        
        puts $xfile "$now [expr $bw/$time*8]"
        
        $sink set bytes_ 0
        
        $ns at [expr $now+$time] "record"
}
        

#RNC node address=0
$ns node-config -UmtsNodeType rnc

set rnc [$ns create-Umtsnode]


#NODE-B node address=1
$ns node-config -UmtsNodeType bs \
                                -downlinkBW 32kbs \
                                -downlinkTTI 10ms \
                                -uplinkBW 32kbs \
                                -uplinkTTI 10ms 
                                
                                

set bs [$ns create-Umtsnode]

#Interface Iub
$ns setup-Iub $bs $rnc 622Mbit 622Mbit 15ms 15ms DummyDropTail 2000

#UE node address=2
#UE2 node address=3
$ns node-config -UmtsNodeType ue \
                                -baseStation $bs \
                                -radioNetworkController $rnc
                                
set ue [$ns create-Umtsnode]
set ue2 [$ns create-Umtsnode]

#SGSN node address=4
#GGSN node address=5

set sgsn [$ns node]
set ggsn [$ns node]

#NODE1 node address=6
#NODE2 node address=7
set node1 [$ns node]
set node2 [$ns node]


#Connections between wired network    
$ns duplex-link $rnc $sgsn 622Mbit 1ms DropTail 1000 $ns duplex-link $sgsn
$ggsn 622Mbit 10ms DropTail 1000 $ns duplex-link $ggsn $node1 10Mbit 15ms
DropTail 1000 $ns duplex-link $node1 $node2 10Mbit 35ms DropTail 1000 


#Routing
$rnc add-gateway $sgsn


#TCP agent (source)
set tcp [new Agent/TCP]
$tcp set fid_ 0
$tcp set prio_ 2

$ns attach-agent $node2 $tcp

#Set CBR over TCP
set cbr [new Application/Traffic/CBR]
$cbr attach-agent $tcp
$cbr set packet_size_ 210
$cbr set rate_ 128kb


#TCP agent
set sink [new Agent/TCPSink]
$sink set fid_ 0
$ns attach-agent $ue $sink 

$ns connect $tcp $sink

#DCH

$ns node-config -llType UMTS/RLC/AM \
                                -downlinkBW 2000kbs \
                                -uplinkBW 384kbs \
                                -downlinkTTI 10ms \
                                -uplinkTTI 10ms 
                                
                                
set dch0 [$ns create-dch $ue $sink]


#tracing for all DCH traffic in downtarget $rnc trace-inlink-tcp $file 0 $bs
trace-outlink $file 2

#UE tracing
$ue trace-inlink $file 2
$ue trace-inlink-tcp $file 2


$ns at 0.0 "record"
$ns at 1.0 "$cbr start"
$ns at 101.0 "$cbr stop"
$ns at 101.5 "finish"

puts "Simulation start"
$ns run
 

I am using CBR (bandwidth 128 kb/s) as a traffic source and attach it to
TCP. I am using DCH (downlink 2000kb/s, uplink 384kb/s,TTI 10ms) for
communication between Node-B and UE. When I check throughput on node1
(directly connected to the source node2), I receive 600 kb/s as a result!
The same result comes from UE. Is it possible that I send more kbps than the
source declared throughput? I have tested different bandwidths and kinds of
sources (Exponential, Parento) and it seems that TCP agent doesn't work in
the correct way. Have I done any mistake in tcl script, have I understood
something wrong in TCP?

Thank you for your help.

Reply via email to