[ns] Tracing Lan BW.
Mon, 15 Jan 2001 22:28:22 -0800 (PST)
To measure the bandwidth on a LAN you need to parse the trace file and
observe the number of packets successfully received between the start and
The start of the packet transmission of the LAN is indicated by a 'h' in
the trace file. The reception of the packet is indicated by a 'r'.
I suggest reducing the propogation delay to on the LAN to 950ns (this
is the value indicted in the IEEE 802.3 standards.) to get acceptable
You could also observe the mac level collisions on the LAN indicated by a
'c' in the trace file.
best of luck
On Mon, 15 Jan 2001, Adeel Baig wrote:
> Hi Ns-Users
> I simulated a lan.And started the FTP transfer from
> one node to another.i have seen the BW consumption in
> simulation by trace the link option.I wanted to see
> the graph using the xgraph.I tried the Marc's Tut for
> that.But it is not working.As it traces the bytes at
> each node.I want to have BW on a link i.e. LAN.
> Can any body guide me how to have the trace file for
> BW.And have the xgraph for it.
> I have attached my code below.
> Thanks in advance.
> Any help will be appreciated.
> set ns [new Simulator]
> set f [open outftp.nam w]
> $ns namtrace-all $f
> set n0 [$ns node]
> set n1 [$ns node]
> set n2 [$ns node]
> set n3 [$ns node]
> set n4 [$ns node]
> set n5 [$ns node]
> set nodelist_ "$n0 $n1 $n2 $n3"
> $ns duplex-link $n4 $n0 10Mb 20ms DropTail
> $ns duplex-link $n5 $n2 10Mb 20ms DropTail
> $ns duplex-link-op $n4 $n0 orient down
> $ns duplex-link-op $n5 $n2 orient down
> set lan_ [$ns make-lan $nodelist_ 10Mb 1ms LL
> Queue/DropTail Mac/802_3 Channel]
> $ns compute-routes
> set tcp0 [$ns create-connection TCP $n0 TCPSink $n3
> set tcp2 [$ns create-connection TCP $n2 TCPSink $n4
> set ftp0 [$tcp0 attach-app FTP]
> set ftp2 [$tcp2 attach-app FTP]
> $ftp0 set fid_ 2
> $ftp2 set fid_ 3
> $ns color 2 Tan
> $ns color 3 Red
> $ns at 1.0 "$ftp0 start"
> $ns at 2.0 "$ftp2 start"
> $ns at 3.0 "$ns halt"
> puts "running..."
> $ns run
> puts "finishing..."
> $ns flush-trace
> close $f
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.