im confuse, if i want to create traffic in NS should i use 
Application/Traffic/Trace
or Network/Pcap/File??

if anyone can tell me how to make it work i will love him/her forever

------------------------------------------------------------------------------------------
set ns [new Simulator]
$ns use-scheduler Heap

#Open the NAM trace file
set nf [open pcap_ex.nam w]
$ns namtrace-all $nf

$ns color 400 Green
$ns color 500 Yellow
$ns color 900 Red

#Define a 'finish' procedure

proc finish {} {

       global ns nf
       $ns flush-trace
       #Close the NAM trace file
       close $nf
       exit 0
}


###### Setup the Network ############################
set r(0) [ $ns node ]
set r(1) [ $ns node ]

####### Create the network links between nodes ######
set BANDWIDTH 80Mb
set DELAY 10us
$ns simplex-link $r(0) $r(1) $BANDWIDTH $DELAY DropTail

$ns simplex-link-op $r(0) $r(1) orient right

######## Setup the traffic types ########
set pcap0 [new Network/Pcap/File ]
##### open the trace file
$pcap0 open readonly network.dump

set null [new Agent/Null]
set tap0 [new Agent/Tap]
$ns attach-agent $r(1) $null
$tap0 network $pcap0
$ns attach-agent $r(0) $tap0

####### Notify that we are starting the run...
puts "Starting run..."

####### Run the above configured simulation
$ns at 10 "finish"
$ns run
---------------------------------------------------------------

use nse to run it , anyone??
i get no error and no result

_________________________________________________________________
Picture this – share your photos and you could win big! http://www.GETREALPhotoContest.com?ocid=TXT_TAGHM&loc=us

Reply via email to