[ns] wired cum wireless [segmenation error]
hello I m trying to run a simple wired cum wireless problem. but its giving segmenation error can anyone suggest how can i get rid of that error ? I m sending my code. set ns [new Simulator] set num_wired_nodes 2 set num_mobile_nodes 1 set num_bs_nodes 1 ;# number of base stations set num_nodes [expr $num_wired_nodes + $num_mobile_nodes + $num_bs_nodes] set bs_id $num_wired_nodes # Parameter for wireless nodes set opt(chan) Channel/WirelessChannel;# channel type set opt(prop) Propagation/TwoRayGround ;# radio-propagation model set opt(netif) Phy/WirelessPhy;# network interface type set opt(mac)Mac/802_11 ;# MAC type set opt(ifq)Queue/DropTail/PriQueue set opt(ifqlen) 50 set opt(ll) LL ;# link layer type set opt(ant)Antenna/OmniAntenna;# antenna model set opt(adhocRouting) DSDV ;# routing protocol set opt(x) 500 ;# X dimension of the topography set opt(y) 500 ;# Y dimension of the topography Mac/802_11 set SlotTime_ 0.20;# 20us Mac/802_11 set SIFS_ 0.10;# 10us Mac/802_11 set PreambleLength_144 ;# 144 bit Mac/802_11 set PLCPHeaderLength_ 48 ;# 48 bits Mac/802_11 set PLCPDataRate_ 1.0e6 ;# 1Mbps Mac/802_11 set dataRate_ 11.0e6 ;# 11Mbps Mac/802_11 set basicRate_ 1.0e6 ;# 1Mbps Mac/802_11 set RTSThreshold_ 3000 Mac/802_11 set ShortRetryLimit_ 7 ;# retransmittions Mac/802_11 set LongRetryLimit_4 ;# retransmissions #set up for hierarchical routing #(needed for routing over a basestation) $ns node-config -addressType hierarchical AddrParams set domain_num_ 2 ;# domain number lappend cluster_num 1 1 ;# cluster number for each domain AddrParams set cluster_num_ $cluster_num lappend eilastlevel $num_wired_nodes [expr $num_mobile_nodes + $num_bs_nodes] ;# number of nodes for each cluster AddrParams set nodes_num_ $eilastlevel set ntr [open out.tr w] $ns trace-all $ntr set chan[new $opt(chan)] set topo[new Topography] $topo load_flatgrid $opt(x) $opt(y) # Create God create-god [expr $num_mobile_nodes + $num_bs_nodes] # create wired nodes set temp {0.0.0 0.1.0} ;# hierarchical addresses to be used for {set i 0} {$i < $num_wired_nodes} {incr i} { set W($i) [$ns node [lindex $temp $i]] } # creating base station $ns node-config -adhocRouting $opt(adhocRouting) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop)\ -phyType $opt(netif) \ -channel $chan \ -topoInstance $topo \ -wiredRouting ON \ -agentTrace OFF \ -routerTrace OFF \ -macTrace OFF\ -movementTrace OFF set BS(0) [$ns node 1.0.0] $BS(0) random-motion 0 puts "Base-Station node $bs_id created" #provide some co-ord (fixed) to base station node $BS(0) set X_ 250.0 $BS(0) set Y_ 250.0 $BS(0) set Z_ 0.0 set rng [new RNG] $rng seed 1 set rand1 [new RandomVariable/Uniform] $rand1 use-rng $rng $rand1 set min_ -50.0 $rand1 set max_ 50.0 # creating mobile nodes $ns node-config -wiredRouting ON for {set i 0} {$i < $num_mobile_nodes} {incr i} { set wl_node_($i) [$ns node 1.0.[expr $i + 1]] $wl_node_($i) random-motion 0 ;# disable random motion puts "wireless node $i created ..." $wl_node_($i) base-station [AddrParams addr2id [$BS(0) node-addr]] set x [expr 250+[$rand1 value]] set y [expr 250+[$rand1 value]] $wl_node_($i) set X_ $x $wl_node_($i) set Y_ $y $wl_node_($i) set Z_ 0.0 puts "X_:$x Y_:$y" } # linking of wired node to base-station node $ns duplex-link $W(0) $W(1) 100Mb 10ms DropTail $ns duplex-link $W(1) $BS(0) 100Mb 20ms DropTail #$ns duplex-link-op $W(0) $W(1) orient down #$ns duplex-link-op $W(1) $BS(0) orient left-down $ns duplex-link $W(1) $BS(0) 100Mb 1ms DropTail #set tcp1 [new Agent/TCP/Reno] #$ns attach-agent $W(1) $tcp1 #set tcpsink1 [new Agent/TCPSink/] #$tcpsink1 set_filename tcp_sink #$ns attach-agent $wl_node_(0) $tcpsink1 #$ns connect $tcp1 $tcpsink1 #set ftp1 [$tcp1 attach-source FTP] # Set a TCP connection between node_(0) and node_(1) set tcp [new Agent/TCP/Newreno] $tcp set class_ 2 set sink [new Agent/TCPSink] $ns attach-agent $W(1) $tcp $ns attach-agent $wl_node_(0) $sink $ns connect $tcp $sink set ftp1 [new Applicati
[ns] know link and bandwith of the link
Hi! I have create a function namely "calculate_metric" that calculate the metric for every outgoing link in every Agent. I would know if is possible know delay and bandwidth of the outgoing link in C++ because i use that information for the calculation of metric. I have find the function: LinkDelay* del = (LinkDelay*)TclObject::lookup(); that return a pointer of a link, but i don't know what I must put in place of the points. Sincerely, Marco
[ns] function for physical delay
Hi, I must implement the protocol aloha as agent on ns2. with which function I can make a physical delay for packages that I must send? Thanks, Bruno Bracalante
[ns] tcl scripts network wireless
Hi, someone has tcl scripts in order to simulate one network wireless? with and without random motions.. Thanks, Bruno Bracalante -- Leggi GRATIS le tue mail con il telefonino i-mode di Wind http://i-mode.wind.it/
[ns] network wireless
Hi, someone has tcl scripts in order to simulate one network wireless? with and without random motions.. Thanks, Bruno Bracalante -- Leggi GRATIS le tue mail con il telefonino i-mode di Wind http://i-mode.wind.it/
[ns] slotted aloha ns2
Dear All Could anybody please tell me how to implement the slotted ALOHA protocol in ns2? Is there any sample code? Thanks a lot! Bruno Bracalante -- Leggi GRATIS le tue mail con il telefonino i-mode di Wind http://i-mode.wind.it/
[ns] platform RFID on NS-2
Dear all, I must estimate the performances of systems RFID on NS-2. where I can find information on like realizing one platform RFID on NS-2? you have a script tlc already implemented in order to simulate systems RFID? thanks!! Bruno Bracalante -- Leggi GRATIS le tue mail con il telefonino i-mode di Wind http://i-mode.wind.it/
[ns] aloha, slotted aloha and binary tree
Hi all, I would want to know if someone has implemented the protocols aloha, slotted aloha and binary tree in NS2 and where I find them. I must simulate a system RFID. thanks Bruno Bracalante -- Leggi GRATIS le tue mail con il telefonino i-mode di Wind http://i-mode.wind.it/
[ns] at all
Hi all, I must estimate the performances of systems RFID with NS2 and would want to know like making. I do not find the protocols aloha, slotted aloha and binary tree. there are? where? thanks Bruno Bracalante -- Leggi GRATIS le tue mail con il telefonino i-mode di Wind http://i-mode.wind.it/
[ns] localization using ns-2
Hello! Does anybody have a tcl script that implements a localization algorithm for mobile or static sensor networks and could provide it? Thanks in advance Leonardo
[ns] help Timer...
Hi, I'm using a timer from TimerHandler class, but I can't understand the difference between sched(double) and resched(double) functions. Please someone of you can answer to my question? Thanks in advance, -- Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://click.libero.it/infostrada
[ns] problem with promiscuous mode
Hi All I have taken a look to the link: http://www.cse.msu.edu/~wangbo1/ns2/nshowto1.html where is explained how to use Promiscuous mode in AODV, but I can't understand what I must put in the section: void AODV::tap(const Packet *p) { // put your code here } I must monitoring RREP forwarding. Can someone of you help me please? Best regards, -- Leggi GRATIS le tue mail con il telefonino i-mode di Wind http://i-mode.wind.it/
[ns] Hello messages
Hi, Sombody can tell me if hello messages mechanism is active in default AODV(I'm using ns-2.29) and how can I monitor it in trace files? Thanks in advance, -- Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://click.libero.it/infostrada
[ns] We can make a difference
I'm extending a personal invitation to my friends and family to make a difference without spending a penny. To see your invitation, click the link below, or copy and paste it into your browser's address field: http://friends.unicefusa.org/r/acd8deb42475102a85e1 If you would prefer not to receive invitations from Friends.UNICEFUSA.org please click here http://friends.unicefusa.org/?PC=UNSUB&rh=0ffba52aed8d8647b0eb9a0d05bac755&[EMAIL PROTECTED]&tc=11 -- UNICEF USA PMB# 210 2440 16th Street San Francisco, CA 94103-4211
[ns] mobilenode's radio range
Hi, I want to decrease the radio range of mobilenodes to increase hop by hop comunications in the network, please, someone of you can tell me how I can do it? Best regards, -- Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://infostrada.it
[ns] segmentation fault
Hi, during a wireless simulation (after some code moifications, correctly compiled!) I received the message : "segmentation fault" What's the meaning of this message? why the simulation does not finish correctly? Please help me! Best regards, -- Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://click.libero.it/infostrada
Re: [ns] Help error: code omitted...
Hi I have found the problem: there was evidently a "}" outside place in a tcl file in ns-2.29/tcl/lib that I had modified. After correcting the error I have recompiled ns ("make clean, make depend, make") By -- Mutui da 200.000 euro? Tassi ridotti da 4.25% solo per richieste online. Mutuionline.it http://click.libero.it/mutuionline5mar07
[ns] Help error: code omitted...
Hi all, Please, someone of you can tell me something about this error: ns: [code omitted because of length] : invalid command name "}" while executing "}" it's generated during whichever tcl execution! Best regards! -- Mutui da 200.000 euro? Tassi ridotti da 4.25% solo per richieste online. Mutuionline.it http://click.libero.it/mutuionline5mar07
[ns] how to use perl/awk
Hi all I am beginner to NS2, I have found some perl and awk scripts to extract data from trace file but I don't know how use it, ( must include the code into tcl script, must run it separately ?) please help me Thanks and best regards -- Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://click.libero.it/infostrada28eb07
[ns] What kind of error is this?
Hi, while I debug my code for DSR-multipath I find this message: "0x402c98db in strlen() from /lib/tls/libc.so.6" What kind of error is this? What can I do? thank you -- Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://click.libero.it/infostrada22feb07
[ns] which aodv version?
Hi all I'm trying to extend aodv protocol with security feautures including cryptographic primitives. Can someone of you tell me which version it's more convenient to modify between aodv-uu and aodv available in ns? Best regards -- Un Tv Color LCD compreso nel prezzo con Giordano Vini! http://click.libero.it/webnation20feb07
[ns] Wireless Scenario
How can i put my base station in the centre of scenario and the other stations around the base in order to obtain a ring scenario? Thanks Naviga e telefona senza limiti con Tiscali Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom http://abbonati.tiscali.it/adsl/
[ns] 802.11 mac 54mb parameters
Hello ns-users. Where can I find parameters for 802.11 and 802.11e mac at 54mb? Thanks Naviga e telefona senza limiti con Tiscali Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom http://abbonati.tiscali.it/adsl/
[ns] Deadline for packets HOW TO
HELLO. How can I set deadlines for packets in a wireless scenario? Please answer me thank you. Naviga e telefona senza limiti con Tiscali Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom http://abbonati.tiscali.it/adsl/
[ns] AWK scripts
Hello. Where can I find awk scripts to evaluate performance for 802.11e?? Please help me. Naviga e telefona senza limiti con Tiscali Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom http://abbonati.tiscali.it/adsl/
Re: [ns] problems to install ns
what version of gcc you use (gcc -v)? is it 4.1 ? i had the same problem, it just needs a patch to work... mail me to send you the patch George [EMAIL PROTECTED] wrote: > Hi I tryed to install the same version > > checking if 64bit Sparc VIS support is requested... no > checking system version (for dynamic loading)... ./configure: line 5718: > syntax > error near unexpected token `)' > /configure: line 5718: ` OSF*)' > tcl8.3.2 configuration failed! Exiting ... > Tcl is not part of the ns project. Please see www.Scriptics.com > to see if they have a fix for your platform. > > > but in the proccess obtain this error. > > is when the aplication Build tcl8.3.2 may be you know what is the problem. > > thanks regards. > > > >> why don't you try the allinone version? >> >> George >> >> [EMAIL PROTECTED] wrote: >> >>> Hi >>> >>> I need to work with NS , but I heve problems to install it, first I install >>> Tcl/Tk , otcl tclcl, without problems but when I try to install Ns I heve >>> problems like this >>> >>> config.status: creating indep-utils/webtrace-conv/dec/Makefile >>> config.status: creating indep-utils/webtrace-conv/nlanr/Makefile >>> config.status: creating indep-utils/webtrace-conv/epa/Makefile >>> config.status: creating indep-utils/cmu-scen-gen/setdest/Makefile >>> config.status: creating autoconf.h >>> config.status: autoconf.h is unchanged >>> >>> >>> may be someone can tell me whats happening and the solution. >>> >>> thanks. >>> regards. >>> >>> ----- >>> Sent from web mail gateway in DIT - ETSIT - UPM. >>> Please, send hints or comments to [EMAIL PROTECTED] >>> >>> >>> >>> >>> >>> > > > - > Sent from web mail gateway in DIT - ETSIT - UPM. > Please, send hints or comments to [EMAIL PROTECTED] > > > > >
Re: [ns] problems to install ns
why don't you try the allinone version? George [EMAIL PROTECTED] wrote: > Hi > > I need to work with NS , but I heve problems to install it, first I install > Tcl/Tk , otcl tclcl, without problems but when I try to install Ns I heve > problems like this > > config.status: creating indep-utils/webtrace-conv/dec/Makefile > config.status: creating indep-utils/webtrace-conv/nlanr/Makefile > config.status: creating indep-utils/webtrace-conv/epa/Makefile > config.status: creating indep-utils/cmu-scen-gen/setdest/Makefile > config.status: creating autoconf.h > config.status: autoconf.h is unchanged > > > may be someone can tell me whats happening and the solution. > > thanks. > regards. > > - > Sent from web mail gateway in DIT - ETSIT - UPM. > Please, send hints or comments to [EMAIL PROTECTED] > > > > >
[ns] How "really" change transmission range
Hi all, I have a problem in a wired-cum-wireless scenario: in my scene, there are 4 Base Station that make a square. The distance betwen 2 BS is 1000 m. I want the transmission range of every BS to be 750m, so that a mobile node doesn' t lose packets when passes from a BS to another. I tried to modify the RXthresh_ parameter in the Phy/WirelessPhy field, according to the program threshold.cc, but in the simulations nothing changes: The mobile node begins to lose packets 200 m past the BS and resumes the connection 200 m before the next BS. In some cases, it resumes the connection 10 m before the BS. So the mobile node moves for 600 to 800 m without a connection and all the packets drop. Then i tried to modify the Pt_ variable. I put it to 1.0, 2.0 and also 20.0. It doesn' t change anything. Then I tried to modify txPower and rxPower of the BSs, I put them to 1000. But nothing changed. So I surrender to the idea that in ns2 the transmission range cannot change. If someone would show me that I am wrong, I would be much obliged. Thanks in advance! Salvatore -- Scopri se hai Vinto un Tv Color LCD! Clicca qui http://click.libero.it/webnation1febb07
[ns] Deadline Miss
Hello ns-users I need a script or an algorithm to calculate the number of deadline miss form the trace file in a 802.11e EDCA network using the new wireless format, and then make graphs to evaluate differences between 802.11 and 802.11e. Can somebody help me??? best regards Naviga e telefona senza limiti con Tiscali Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom http://abbonati.tiscali.it/adsl/
[ns] Deadline Miss
Hello ns-users I need a script or an algorithm to calculate the number of deadline miss form the trace file in a 802.11e EDCA network using the new wireless format, and then make graphs to evaluate differences between 802.11 and 802.11e. Can somebody help me??? best regards Naviga e telefona senza limiti con Tiscali Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom http://abbonati.tiscali.it/adsl/
[ns] Deadline Miss
Hello ns-users I need a script or an algorithm to calculate the number of deadline miss form the trace file in a 802.11e EDCA network using the new wireless format, and then make graphs to evaluate differences between 802.11 and 802.11e. Can somebody help me??? best regards Naviga e telefona senza limiti con Tiscali Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom http://abbonati.tiscali.it/adsl/
[ns] Deadline Miss
Hello ns-users I need a script or an algorithm to calculate the number of deadline miss form the trace file in a 802.11e EDCA network using the new wireless format, and then make graphs to evaluate differences between 802.11 and 802.11e. Can somebody help me??? best regards Naviga e telefona senza limiti con Tiscali Scopri le promozioni Tiscali adsl: navighi e telefoni senza canone Telecom http://abbonati.tiscali.it/adsl/
[ns] Calculate goodput
Can you help me to calculate goodput of tcp, fairness and friendliness? -- Passa a Infostrada. ADSL e Telefono senza limiti e senza canone Telecom http://click.libero.it/infostrada11gen07
Re: [ns] looking for FHMIP extension
hi, i had also asked for the extension few weeks ago, but no answer from the list... Although thanks to izzeldin shibeika who kindly sent it to me, there it is... http://rapidshare.com/files/9124547/fhmip-ext.zip.html FHMIPv6 extension by R.Hseih George 郑大伟(Dawei Zheng) wrote: > > > Hi all, > > I am looking for FHMIP extension. > > FHMIP extension site “http://mobqos.ee.unsw.edu.au/~robert/nsinstall.php” > is empty. > > Anyone have it??? Or anyone know another site to download it??? > > > > If you have FHMIP extension, please send me.. > > > > > > > > Best regards > > Dawei Zheng > > 2006-12-27 > >
[ns] dynamic link with manual routing
Hi, is possible to delete/create links dinamically in ns-2 with manual routing? The new routing is kept up-to-date? I have just read many_tcp.tcl but is very difficult for me to understand the code... Can you give me some command to do this? Thank you very much for any suggestion... Regards Luca
[ns] send off packet on different link
Hi, if I have a node from that issue themselves different link, is possible to send off the packet on different link in base to the flowid Thanks Regards Luca -- Francesco ha perso ben 45 Kg! Scopri come! Clicca qui http://click.libero.it/webnation05dic06
[ns] HMIPv6 extentions
Hi, i am a university student and i'm working on MIPv6, HMIPv6 and fast handovers. I've heard about R. Hsieh's impementation of HMIPv6, i've found a couple of links but there are all down. Is there anyone who already has this extention, or something similar (FHMIPv6)? thanks
[ns] recall a procedure every time that a packet arrives
Hi, is it possible to recall a procedure every time that a packet arrives in a tail? Or better,I would want to do a special control on every packet that arrives in a tail,in particular which flow belongs the packet. Thank you very much Regards, Luca -- Scopri subito RAS FullCasa: vinci 500 di buoni Mediaworld a settimana ed un viaggio Expedia! http://click.libero.it/ras29nov06 -- Scopri subito RAS FullCasa: vinci 500 di buoni Mediaworld a settimana ed un viaggio Expedia! http://click.libero.it/ras29nov06 -- Scopri subito RAS FullCasa: vinci 500 di buoni Mediaworld a settimana ed un viaggio Expedia! http://click.libero.it/ras29nov06
[ns] Broadcast packets and LL
Hi all! I would like to use Broadcast packets in a wired scenario. Is it possible? If I use IP_BRODCAST it seems not working (no target for slot -1). Is it working only for wireless networks? Why? Does the LL work with wired network? Because it seems that even when I build a "newLan" object (for example in lantest.tcl) it doesn't work. Please, help me, because it's really important for my thesis degree! Have a nice day, Paolo
[ns] Broadcast problem - HELP
Hi list! I got a problem handling broadcast packets. Here it is the code: set ns [new Simulator] $ns use-scheduler RealTime set f [open out.tr w] $ns trace-all $f set nf [open out.nam w] $ns namtrace-all $nf proc finish {} { global ns f nf $ns flush-trace close $f close $nf exit 0 } set node1 [$ns node] set node2 [$ns node] set node3 [$ns node] set node4 [$ns node] set node5 [$ns node] set node6 [$ns node] #Network objects to access the TAP devices at the link layer set raw1 [new Network/Raw] set raw2 [new Network/Raw] set raw3 [new Network/Raw] set raw4 [new Network/Raw] $raw1 open tap0 readwrite $raw2 open tap1 readwrite $raw3 open tap2 readwrite $raw4 open tap3 readwrite #Tap Agent for each node Agent/Tap set maxpkt_ 3100 set a1 [new Agent/Tap/Raw "FE:FD:0A:00:00:02"] set a2 [new Agent/Tap/Raw "FE:FD:0A:00:00:03"] set a3 [new Agent/Tap/Raw "FE:FD:0A:00:00:04"] set a4 [new Agent/Tap/Raw "FE:FD:0A:00:00:05"] puts "install nets into taps..." #Assign network objects to TAP agents $a1 network $raw1 $a2 network $raw2 $a3 network $raw3 $a4 network $raw4 #Assign TAP agents to ns-2 nodes $ns attach-agent $node1 $a1 $ns attach-agent $node2 $a2 $ns attach-agent $node3 $a3 $ns attach-agent $node4 $a4 # Setup connections between the nodes $ns duplex-link $node1 $node5 2Mb 2ms DropTail $ns duplex-link $node2 $node5 2Mb 2ms DropTail $ns duplex-link $node5 $node6 2Mb 15ms DropTail $ns duplex-link $node6 $node3 2Mb 2ms DropTail $ns duplex-link $node6 $node4 2Mb 2ms DropTail $ns at 20.0 "finish" $ns run I'm using a nse extension to have some real (UML) machines talking each other via ns-2. If I use this code I get the error: [EMAIL PROTECTED] ns2emulation]# ../nse mah.tcl Using gettimeofday() insdead of the CPU cycle counter to guarantee portability install nets into taps... TapAgent: changing the src and dst address to 0:0 ---> -1:0 0.478134: Tap(_o33): recvpkt, writing to target: _o13 --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o13: no target for slot -1 _o13 type: Classifier/Hash/Dest content dump: classifier _o13 0 offset 0 shift 2147483647 mask 1 slots slot 0: _o37 (Classifier/Port) -1 default -- Finished standard no-slot{} default handler -- Usually I get this error when something is not correctly linked. If on the UML machines I set the ARP statically, it's work (I get the error on the arp-request Who has 10.0.0.2...that is broadcast) The code than handle this is: void RawTapAgent::processpkt (Packet* p, const NodeInfo& srcinfo) { hdr_cmn* ch = HDR_CMN(p); hdr_ip* ip = HDR_IP(p); NodeInfo dstinfo = ((uint8_t*)p->accessdata ()); if (dstinfo.mac () == NodeInfo::broadcast_addr) { //A broadcast packet ip->daddr () = IP_BROADCAST; ip->dport () = 0; TDEBUG5 ("TapAgent: changing the src and dst address to %d:%d ---> %d:%d\n", srcinfo.get_node_addr (), 0, -1, 0); } else { nit = lower_bound (nodes.begin (), nodes.end (), dstinfo); if (nit == nodes.end () || (dstinfo < *nit)) { //Destination address not found in the map table Packet::free (p); TDEBUG ("Dropped packet: invalid destination\n"); return; } ip->daddr () = (*nit).get_node_addr (); ip->dport () = 0; TDEBUG5 ("TapAgent: changing the src and dst address to %d:%d ---> %d:%d\n", srcinfo.get_node_addr (), 0, (*nit).get_node_addr (), 0); } ip->saddr () = srcinfo.get_node_addr (); ip->sport () = 0; TDEBUG4("%f: Tap(%s): recvpkt, writing to target: %s\n", now(), name(), target_->name()); Scheduler::instance().sync (); ch->timestamp() = now(); target_->recv(p); return; } How can I solve this? Please, I really need a soluzione for this! If I use the wireless scenario they provided me, all works fine. Regards, Paolo Carpo
[ns] IP Broadcast in wired network
Hi list! I got a problem handling broadcast packets. Here it is the code: set ns [new Simulator] $ns use-scheduler RealTime set f [open out.tr w] $ns trace-all $f set nf [open out.nam w] $ns namtrace-all $nf proc finish {} { global ns f nf $ns flush-trace close $f close $nf exit 0 } set node1 [$ns node] set node2 [$ns node] set node3 [$ns node] set node4 [$ns node] set node5 [$ns node] set node6 [$ns node] #Network objects to access the TAP devices at the link layer set raw1 [new Network/Raw] set raw2 [new Network/Raw] set raw3 [new Network/Raw] set raw4 [new Network/Raw] $raw1 open tap0 readwrite $raw2 open tap1 readwrite $raw3 open tap2 readwrite $raw4 open tap3 readwrite #Tap Agent for each node Agent/Tap set maxpkt_ 3100 set a1 [new Agent/Tap/Raw "FE:FD:0A:00:00:02"] set a2 [new Agent/Tap/Raw "FE:FD:0A:00:00:03"] set a3 [new Agent/Tap/Raw "FE:FD:0A:00:00:04"] set a4 [new Agent/Tap/Raw "FE:FD:0A:00:00:05"] puts "install nets into taps..." #Assign network objects to TAP agents $a1 network $raw1 $a2 network $raw2 $a3 network $raw3 $a4 network $raw4 #Assign TAP agents to ns-2 nodes $ns attach-agent $node1 $a1 $ns attach-agent $node2 $a2 $ns attach-agent $node3 $a3 $ns attach-agent $node4 $a4 # Setup connections between the nodes $ns duplex-link $node1 $node5 2Mb 2ms DropTail $ns duplex-link $node2 $node5 2Mb 2ms DropTail $ns duplex-link $node5 $node6 2Mb 15ms DropTail $ns duplex-link $node6 $node3 2Mb 2ms DropTail $ns duplex-link $node6 $node4 2Mb 2ms DropTail $ns at 20.0 "finish" $ns run I'm using a nse extension to have some real (UML) machines talking each other via ns-2. If I use this code I get the error: [EMAIL PROTECTED] ns2emulation]# ../nse mah.tcl Using gettimeofday() insdead of the CPU cycle counter to guarantee portability install nets into taps... TapAgent: changing the src and dst address to 0:0 ---> -1:0 0.478134: Tap(_o33): recvpkt, writing to target: _o13 --- Classfier::no-slot{} default handler (tcl/lib/ns-lib.tcl) --- _o13: no target for slot -1 _o13 type: Classifier/Hash/Dest content dump: classifier _o13 0 offset 0 shift 2147483647 mask 1 slots slot 0: _o37 (Classifier/Port) -1 default -- Finished standard no-slot{} default handler -- Usually I get this error when something is not correctly linked. If on the UML machines I set the ARP statically, it's work (I get the error on the arp-request Who has 10.0.0.2...that is broadcast) The code than handle this is: void RawTapAgent::processpkt (Packet* p, const NodeInfo& srcinfo) { hdr_cmn* ch = HDR_CMN(p); hdr_ip* ip = HDR_IP(p); NodeInfo dstinfo = ((uint8_t*)p->accessdata ()); if (dstinfo.mac () == NodeInfo::broadcast_addr) { //A broadcast packet ip->daddr () = IP_BROADCAST; ip->dport () = 0; TDEBUG5 ("TapAgent: changing the src and dst address to %d:%d ---> %d:%d\n", srcinfo.get_node_addr (), 0, -1, 0); } else { nit = lower_bound (nodes.begin (), nodes.end (), dstinfo); if (nit == nodes.end () || (dstinfo < *nit)) { //Destination address not found in the map table Packet::free (p); TDEBUG ("Dropped packet: invalid destination\n"); return; } ip->daddr () = (*nit).get_node_addr (); ip->dport () = 0; TDEBUG5 ("TapAgent: changing the src and dst address to %d:%d ---> %d:%d\n", srcinfo.get_node_addr (), 0, (*nit).get_node_addr (), 0); } ip->saddr () = srcinfo.get_node_addr (); ip->sport () = 0; TDEBUG4("%f: Tap(%s): recvpkt, writing to target: %s\n", now(), name(), target_->name()); Scheduler::instance().sync (); ch->timestamp() = now(); target_->recv(p); return; } How can I solve this? Please, I really need a soluzione for this! If I use the wireless scenario they provided me, all works fine. Regards, Paolo Carpo
[ns] Integrate NS-2 with real network
Hi! I need help about integrate NS-2 into a real network. I would like that a real client communicates with a node within the simulator or with another node external to the simular (eg. a server). I saw the emulator extension, and now I can use ns-2 as a gateway, but I don't know how make real-simulator network communication (can I assign a real IP address to a simulated node? I read that I can't...). I would appreciate any suggestion/link/idea/code!! Thanks, Paolo Carpo
[ns] error while adding new protocol from "NS by example"
Hi all! I'va a problem when I try to add the Multimedia agent and protocol from "NS by example (nile.wpi.edu/NS/index.html)". I followed all the steps, but when I try to run the script I get: invalid command name "Agent/UDP/UDPmm" while executing "Agent/UDP/UDPmm create _o132 " invoked from within "catch "$className create $o $args" msg" invoked from within "if [catch "$className create $o $args" msg] { if [string match "__FAILED_SHADOW_OBJECT_" $msg] { delete $o return "" } global errorInfo error "class $..." (procedure "new" line 3) invoked from within "new Agent/UDP/UDPmm" invoked from within "set udp_s [new Agent/UDP/UDPmm]" (file "ex-mm-app.tcl" line 69) Do you have any solution/idea? Thank you very much! Regards, Paolo Carpo
[ns] R: Problem with emulation
Dear Svilen, You are totally right! Using just one interface, without filtering mac addresses, the simulator enters in a loop. Now it goes well! Thx a lot for the link, my next step will be integrate some UML with ns-2! Have a nice day, Paolo Carpo
[ns] Problem with emulation
Hi list! I'm having some problems using the emulation examples. I try to use ns-2 as a forwarder: real host A send a ping to real host B, passing through the simulator, C. After adding the correct route to A and B to use C as a gateway, I use this script (because the one with ns-2 doesn't work at all) # Inside the simulator # # node(5) # / \ # / \ # node(2) node(1) set ns [new Simulator] $ns use-scheduler RealTime set f [open out.tr w] $ns trace-all $f set nf [open out.nam w] $ns namtrace-all $nf # Create the nodes set n1 [$ns node]; #reading from real network set n2 [$ns node]; #writing to the real network set n5 [$ns node]; #nothing important # Configure the entry node set bpf1 [new Network/Pcap/Live]; # Create the bpf set dev1 [$bpf1 open readonly eth0]; # Open the device $bpf1 filter "icmp and host 192.168.0.3";# put the filter set tap1 [new Agent/Tap]; # Create the Tap Agent $tap1 network $bpf1; # Connect bpf to Tap Agent $ns attach-agent $n1 $tap1; # Attach Tap Agent to the node(1) # Configure the exit node set ipnet [new Network/IP]; # Create a Network agent $ipnet open writeonly set tap2 [new Agent/Tap]; # Create a Tap Agent $tap2 network $ipnet; # Connect network agent to tap agent $ns attach-agent $n2 $tap2; # Attach agent to the node. # Connect the agents. $ns simplex-connect $tap1 $tap2 #Just for debug puts "tap1: $tap1" puts "tap2: $tap2" puts "Node1: $n1" puts "Node2: $n2" puts "Node5: $n5" puts "bpf1: $bpf1" puts "ipnet: $ipnet" # Setup connections between the nodes $ns simplex-link $n1 $n2 10Mb 5ms DropTail $ns simplex-link $n5 $n2 10Mb 5ms DropTail $ns at 10 "finish" proc finish {} { global ns f nf $ns flush-trace close $f close $nf exit 0 } $ns run If I run this script, the packets are forwarded, but the simulator begins to create a very big traffic of dup packet: ... TapAgent(_o24): sent packet (sz: 60) TapAgent(_o24): sent packet (sz: 60) TapAgent(_o24): sent packet (sz: 60) TapAgent(_o24): sent packet (sz: 60) TapAgent(_o24): sent packet (sz: 60) TapAgent(_o24): sent packet (sz: 60) TapAgent(_o24): sent packet (sz: 60) TapAgent(_o24): sent packet (sz: 60) 4.835407: Tap(_o21): recvpkt, cc:60 4.835407: Tap(_o21): recvpkt, writing to target: _o13 4.835578: Tap(_o21): recvpkt, cc:60 4.835578: Tap(_o21): recvpkt, writing to target: _o13 4.835698: Tap(_o21): recvpkt, cc:60 4.835698: Tap(_o21): recvpkt, writing to target: _o13 4.835807: Tap(_o21): recvpkt, cc:60 4.835807: Tap(_o21): recvpkt, writing to target: _o13 4.835976: Tap(_o21): recvpkt, cc:60 4.835976: Tap(_o21): recvpkt, writing to target: _o13 4.836086: Tap(_o21): recvpkt, cc:60 ... I really don't understand why. And if I use IPTap for the 2 tap I get: IPTapAgent(_o21): sendpkt called while in read-only mode! 0.770541: IPTapAgent(_o21): recvpkt, cc:1 Thank you very much for any idea/suggestion/tip. Paolo Carpo P.S. Sorry for the poor english
[ns] : Found Error in cmu-scen-gen / cbrgen.tcl
Hi, I found an error in the cmu's script to generate traffic pattern. The file is /indep-utils/cmu-scen-gen/cbrgen.tcl My ns version is ns-2.29 Error is in lines 166 and 183: you must change [expr $opt(nn) + 1] with [expr $opt(nn)]. I think that this correction follows directly from basic modular math. In fact without this correction node index, for a set of nn node, has a range from 0 to nn, instead that from 0 to nn-1. Am I right? Aledep Milioni di oggetti, impossibile non trovare quello che cerchi. Dallo spillo all'elefante, non ti stupire. Sei su eBay! http://adfarm.mediaplex.com/ad/ck/724-7199-4110-179?id=2
[ns] Re: Doubt about visualization of wireless traffic
Hi sanjay, use $ns namtrace-all-wireless $fd $x $y instead of $ns namtrace-all $fd where "x" and "y" are respectivley x and y size of topology grid In the "finish" procedure, when you close all files, add the command: $ns nam-end-wireless [$ns now] keep up your work! Ale Original Message: >Message: 8 >Date: Sun, 2 Apr 2006 10:36:13 +0530 >From: "Sanjay Raghani" <[EMAIL PROTECTED]> >Subject: [ns] Doubt about visualization of wireless traffic >To: ns-users@ISI.EDU >Message-ID: ><[EMAIL PROTECTED]> >Content-Type: text/plain; charset=ISO-8859-1 > >Hi, >While executing the wireless examples given along with Marc Greis >tutorial in ns-2.29, i found that the unicast traffic was visible in >NAM while executing the nam trace file generated by script >simple-wireless.tcl but its not visible with the nam trace file >generated by wireless1.tcl... can anyone give some idea why it is >so.thanks in advance > >regards >sanjay raghani Solo per te TISCALI ADSL con 2 mesi GRATIS + 30 euro di sconto! Dalla 4 MEGA alla 24 MEGA, scopri l'Adsl Tiscali adatta a te. Con Tiscali Adsl senza limiti hai GRATIS 2 mesi di canone. E oggi in più, solo per pochi giorni, 30 euro di sconto. Non perdere questa straordinaria occasione. L'offerta è valida solo da questa mail. Scopri ora! http://promozioni.tiscali.it/webmail0406/ Solo per te TISCALI ADSL con 2 mesi GRATIS + 30 euro di sconto! Dalla 4 MEGA alla 24 MEGA, scopri l'Adsl Tiscali adatta a te. Con Tiscali Adsl senza limiti hai GRATIS 2 mesi di canone. E oggi in più, solo per pochi giorni, 30 euro di sconto. Non perdere questa straordinaria occasione. L'offerta è valida solo da questa mail. Scopri ora! http://promozioni.tiscali.it/webmail0406/
[ns] How can I make a simulation delay in ns2?
- Original Message - From: Yangmx To: ns-users@isi.edu Sent: Tuesday, January 24, 2006 11:41 AM Subject: How can I make a simulation delay in ns2? Hi,every body, I want to delay the simulation time for several seconds in ns2 before sending or receiving a aodv packet. How can I do for that? In the linux C program we can do it by call "sleep(seconds)" easily. Have any things similar to sleep() in ns2? Thanks in advance. michelle