[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
I can't get collisions -- Help Please!!!
Hi all,
I have set a simulation where one machine tries to do an ftp to a server
in a very heavily loaded LAN. On the server side, I have set an
application recording the bytes correctly arrived to the TCP Agent, as
described in:
http://www-mash.cs.berkeley.edu/dist/archive/ns-users/9904/0116.html
...and I can't notice the effect of increasing the load on the network!!!
Before posting this letter to the mailing list I have took a look to the
archives for people with the same problem, for example
http://www-mash.cs.berkeley.edu/dist/archive/ns-users/9810/0081.html
OK, so NAM is NOT going to show the collisions. No problem, I'm not
interested on that, but what about the rest?
and I have took a look to he source code of the sim (channel.h ...). I'm
not used to dig in the ns code, but there are quite a few lines commented
that are scaring me, for example
//double txstop_; // end of the last transmission
//double cwstop_; // end of the contention window
//int numtx_; // number of transmissions during contention
//Packet* pkt_; // packet current transmitted on the channel
Can anybody help me? (It's just a moment ... ;-) Thanks in advance!.
Here you have the interesting part of the script:
-------------------
set N_NODES 20
# Create a node list
set nodelist [ list ]
for {set i 0} {$i < $N_NODES} {incr i} {
set n($i) [$ns node]
lappend nodelist $n($i)
}
# Connect the nodes to a CSMA LAN
# newLan is used instead of make-lan for more fine-grained parameter
control
#
# NOTE I've used 5Mb/2ms instead of 10Mbps 64us !!!
set lan [$ns newLan $nodelist 5Mb 2ms]
$lan llType LL
$lan macType Mac/Csma/Cd
$lan chanType DuplexChannel
$lan phyType Phy/WiredPhy
# Main server
set server [new Agent/LossMonitor]
$ns attach-agent $n(0) $server
# The other server
set test_server [new Agent/TCPSink]
$ns attach-agent $n(1) $test_server
# The trace application
set traceapp [new TraceApp]
$traceapp attach-agent $test_server
# Test traffic
set test_tcp [new Agent/TCP]
$ns attach-agent $n(2) $test_tcp
$ns connect $test_tcp $test_server
set test_traffic [new Application/FTP]
$test_traffic attach-agent $test_tcp
# Background traffic: nodes n(3..) send UDP packets to the server
# in n(0) with the parameters indicated below
for {set i 3} {$i < $N_NODES} {incr i} {
set udp($i) [new Agent/UDP]
$ns attach-agent $n($i) $udp($i)
set traffic($i) [new Traffic/Expoo]
$traffic($i) attach-agent $udp($i)
$traffic($i) set packet-size 1500
$traffic($i) set burst-time 5s
$traffic($i) set idle-time 0.0001s
$traffic($i) set rate 10Mb
$traffic($i) set fid_ 2
$ns connect $udp($i) $server
}
$ns at 0.0 "record"
$ns at 0.2 "$traceapp start"
$ns at 1.0 "$test_traffic start"
$ns at 2.0 "$test_traffic stop"
for {set i 3} {$i < $N_NODES} {incr i} {
$ns at 3.0 "$traffic($i) start"
}
$ns at 4.0 "$test_traffic start"
$ns at 5.0 "$test_traffic stop"
$ns at 6.0 "finish"
----------------------------------------------------------------------
Fernando Cela
email: [email protected] phone: +46 31 772 1709