Hi,

I am having the same error in ns2 version 2.35.

Have you succeeded in running this file without this error? 
If yes, then what should I do to make it work?

Thanks!!!



Vincent Ngo wrote:
> 
> Hi everyone,
> 
> I am a undergraduate research student at the University of Waterloo,
> Ontario 
> and am a complete beginner to NS2 (and even Linux).  I'm working for a 
> research group and my task is to demonstrate a very basic emulation
> example by 
> next week just to show that it is possible to use ns2 to emulate.  I've
> been 
> trying to get any simple emulation script to work for the past few weeks
> but 
> have failed.  I'm sure it would take an expert just a few minutes to 
> write a couple lines of code to do this.  Most explainations I have read
> to 
> similar problems are even too advanced for my understanding either in
> terms of 
> NS2 or Linux.  If someone could please help me on a student level that
> would be  
> greatly appreciated.   
> 
> I am using a Linux machine and so far I have downloaded and installed the 
> allinone ns-2.29.  I have also googled for some simple example emulation 
> scripts.    
> 
> For example, I found this one:
> 
> # Create simulator
> set ns [new Simulator]
> $ns use-scheduler RealTime 
> 
> # Emulator address
> set me [exec hostname]
> 
> # Packet input
> set bpf0 [new Network/Pcap/Live]
> $bpf0 set promisc_ true
> set nd0 [$bpf0 open readonly fxp0] 
> set filt "(not ip host $me)"
> $bpf0 filter $filt 
> 
> # Packet output
> set ipnet [new Network/IP]
> $ipnet open writeonly
> 
> # Input agent
> set pfa [new Agent/Tap]
> $pfa network $bpf0 
> 
> # Output agent
> set ipa [new Agent/Tap]
> $ipa network $ipnet 
> 
> # ICMP ECHO agent
> set echoagent [new Agent/PingResponder]
> 
> set n0 [$ns node]
> set n1 [$ns node]
> set n2 [$ns node]
> $ns simplex-link $n0 $n2 100Mb 1000ms DropTail
> $ns simplex-link $n2 $n1 100Mb 1000ms DropTail 
> $ns attach-agent $n0 $pfa
> $ns attach-agent $n1 $ipa
> $ns attach-agent $n2 $echoagent
> $ns simplex-connect $pfa $echoagent
> $ns simplex-connect $ipa $echoagent
> 
> # Wait for ping to come in...
> $ns run
> 
> 
> 
> When I try running this script I get a message that says:
> 
> invalid command name "Network/Pcap/Live"
>   while executing
> "Network/Pcap/Live create o_11 "
>   invoked from within 
> "catch "$className create $o $args" msg"
>   (procedure "new" line 3)
>   invoked within
> "new Network/Pcap/Live"
>   invoked from within 
> "set bpf0 [new Network/Pcap/Live]"
>   (file "./vince/emu1.tcl" line 12)
> 
> 
> Can anyone help me with this problem please?  Since I am not yet an ns2 
> expert, I don't know all too well how that code works.  I believe it is a
> ping 
> responder.  All I need is a very simple emulation example to show that it 
> works so any other suggestions or example scripts would be great!  
> 
> Thanks,
> 
> Vincent Ngo
> 

-- 
View this message in context: 
http://old.nabble.com/ns2-emulation---urgent-help-needed-tp5767814p34531630.html
Sent from the ns-users mailing list archive at Nabble.com.

Reply via email to