[ns] how to make complex topology in NS2 for wired network??
-- Forwarded message -- From: Raju Sarkar Date: Thu, Apr 2, 2009 at 10:58 PM Subject: Help!!! To: ns-users@isi.edu Hi!!! i am raju sarkar.i want to make some complex topology in NS2 in wired network..but as per as i know that in wired we can only give the relative positions of the node..plzzz say how can i draw a topology in NS2 for my choosen topology..i send u th picture of the topology.. Thanks & regards, Raju Sarkar
[ns] Why NAM does not work for wireless simulation!
Why NAM does not work for wireless simulations? Even if we make necessary changes in the example tcl files present in NS2 (2.33 version), still it gives errors for executing NAM Although i get trace files but no NAM display. Can anyone help me to solve this problem?
[ns] request for help about how to get MAC link in my Program
Hello All, Can anyone help me to find out why I cannot get any MAC connection between nodes when I execute this program? And I always find minus dropped packets. Thank you for your help. Sincerely, Feng An please place the three files in the same folder, and use: ns *.tcl -nn XX to execute that main file: source getopt.tclib global opt lappend optlist path base tr nam nn bw delay ll ifq mac chan verb stop #pkt_Size rate set x [getopt $argc $argv $optlist] # == # Define options # == 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;# interface queue type set opt(ll) LL ;# link layer type set opt(ant)Antenna/OmniAntenna;# antenna model set opt(ifqlen) 50 ;# max packet in ifq #set opt(nn) 4 ;# number of mobilenodes set opt(adhocRouting) DSDV ;# routing protocol set opt(x) 600;# x coordinate of topology set opt(y) 600;# y coordinate of topology set opt(seed) 0.0;# seed for random number gen. set opt(stop) 20;# time to stop simulation set num_bs_nodes 1 Mac/Simple set bandwidth_ 2Mb # == # Main Program # == # # Initialize Global Variables # set ns_ [new Simulator] $ns_ use-newtrace set tracefd [open simple3.tr w] $ns_ trace-all $tracefd set namtrace [open simple3.tr.nam w] $ns_ namtrace-all-wireless $namtrace $opt(x) $opt(y) # set up topography object set topo [new Topography] $topo load_flatgrid $opt(x) $opt(y) #set chan [new $opt(chan)] # # Create God # #create-god 3 set god_ [create-god [expr $opt(nn) + $num_bs_nodes]] # # Create the specified number of mobilenodes [$val(nn)] and "attach" them # to the channel. # Here two nodes are created : node(0) and node(1) # configure node $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) \ -channelType $opt(chan) \ -topoInstance $topo \ -agentTrace ON \ -wiredRouting OFF \ -routerTrace ON \ -macTrace ON \ -movementTrace OFF for {set i 0} {$i < $opt(nn) } {incr i} { set node_($i) [$ns_ node] $node_($i) set id_ $i $node_($i) random-motion 0 ;# disable random motion } # # Provide initial (X,Y, for now Z=0) co-ordinates for mobilenodes # #set random value set x [new RandomVariable/Uniform] $x set min_ 0 $x set max_ 600 set y [new RandomVariable/Uniform] $y set min_ 0 $y set max_ 600 for {set i 0} {$i < $opt(nn)} {incr i} { set x_rand [$x value] set y_rand [$y value] $node_($i) set X_ x_rand $node_($i) set Y_ y_rand $node_($i) set Z_ 0.0 } # configure for base-station node $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) \ -channelType $opt(chan) \ -topoInstance $topo \ -wiredRouting OFF \ -agentTrace ON \ -routerTrace ON \ -macTrace ON \ -movementTrace OFF #create base-station node set BS(0) [$ns_ node ] $BS(0) set id_ $opt(nn) $BS(0) random-motion 0 ;# disable random motion #provide some co-ord (fixed) to base station node $BS(0) set X_ 300.0 $BS(0) set Y_ 300.0 $BS(0) set Z_ 0.0 ###senser nodes to base station# for {set i 0} {$i < $opt(nn)} {incr i} { #Create a UDP agent and attach it to node n0 set udp($i) [new Agent/UDP] #$udp($i) set filename sd_udp#? #$udp($i) set fid_ 1 $ns_ attach-agent $node_($i) $udp($i) #Create a CBR traffic source and attach it to udp0 set cbr($i) [new Application/Traffic/CBR] $cbr($i) attach-agent $udp($i) $cbr($i) set type_ CBR $cbr($i) set packetSize_ 500 $cbr($i) set rate_ 1mb } set null0 [new Agent/Null] #$null0 set filename rd_udp#
[ns] How to Cross Layer AODV?
Dear all, am developing a project based on NS2 and Cross Layer Design. My questions are: 1) How to forward the Power received Pr and Pt values available in physical layer to the network layer? 2) What is the relationship between AODV class and MAC, LL, Propagation classes in NS2? Any suggestions/clarification in this regard is highly appreciated. Regards, Vijaykumar K
[ns] how to implement DCF using NS2
Hello All, I have some difficulty using NS2 to implement IEEE 802.11 DCF. Can anyone help me for a little bit? Thank you for your help. Sincerely, Feng An
[ns] Fw: unreasonable average end to end delay of TES video trafficmodel
-- From: "anas" Sent: Thursday, April 02, 2009 8:44 PM To: "ns" Subject: [ns] unreasonable average end to end delay of TES video trafficmodel > > Dear NS users, > > when I did a simulation for > video traffic of TES model > over DSR routing protocol > with 50 nodes and > simulation time of 200 s > and grid of 670x670 > speed 20 > pause 0 > > NS2.33 over red hat Linux platform > > the average end to end delay was 5 Sec which is unreasonable value > > thanks in advance > > Anas >
[ns] Problem with NIST package
hi, I have to install the nist mobility package to implement vertical handover between Wimax and Umts I have dowloaded nist package from http://w3.antd.nist.gov/cgi-bin/req_mobility.pl but when i excecute ./configure i obtain this message: Please correct the problem by telling configure where tclcl is using the argument --with-tclcl=/path/to/package, or the package is not required, disable it with --with-tclcl=no. how can i resolve this problem and where can i dowload tclcl package and install it. Thank you in advance for your help
[ns] how to implement a proxy mobile agent
Hi, Does anyone know how to implement a proxy mobile agent for mobile IP in ns-2? That is, an agent that will perform mobility related signaling (e.g. binding update) on behalf of the mobile node. Which files should be modified. Thank you in advance for your help Lynoh _ Show them the way! Add maps and directions to your party invites. http://www.microsoft.com/windows/windowslive/products/events.aspx
[ns] unreasonable average end to end delay of TES video traffic model
Dear NS users, when I did a simulation for video traffic of TES model over DSR routing protocol with 50 nodes and simulation time of 200 s and grid of 670x670 speed 20 pause 0 NS2.33 over red hat Linux platform the average end to end delay was 5 Sec which is unreasonable value thanks in advance Anas
[ns] Trace file explanation
Hello all, s 0.0 _0_ AGT --- 0 cbr 512 [0 0 0 0] --- [0:0 17:0 32 0] [0] 0 0 this is a line in trace file that have generated after the simulation in ns2 using DSDV routing protocol. Can u please help me citing the different attributes of this file and thier corresponding entity in above line Regards, Sorabh Hamirwasia NIT Durgapur Dept of Information Technology
[ns] Mobile ip handover problem
Hi all! I am trying to simulate a simple handover scenario, one with tcp, just like in wireless3.tcl, and one with sctp. However, it doesn't work properly and there are time periods where the mobile node doesn't send or receive any packets, while beng in the range of an access point. Handover latency times have many different values. For example, when the MN moves from HA to FA it takes 6 sec to start communicating with the new BS, but when it moves back the handover takes place in just 0.02 sec! As I have the MN moving back and forth, I measure more handover latency times that differ much from those mentioned above... Does anyone know why that happens?? Please help me if you know, I 've stuck here for over a week..:( I post my tcl code below. Thanks in advance, Spyros set ns_ [new Simulator] set opt(chan) Channel/WirelessChannel set opt(prop) Propagation/TwoRayGround set opt(netif) Phy/WirelessPhy set opt(mac) Mac/802_11 set opt(ifq) Queue/DropTail/PriQueue set opt(ll) LL set opt(ant) Antenna/OmniAntenna set opt(x) 1000 ;# X dimension of the topography set opt(y) 1000 ;# Y dimension of the topography set opt(ifqlen) 5 ;# max packet in ifq #set val(seed) 0.0 set opt(rp) DSDV ; # routing protocol set opt(nn) 1 ;# how many nodes are simulated set num_wired_nodes 2 set num_bs_nodes 2 set topo [new Topography] $ns_ node-config -addressType hierarchical AddrParams set domain_num_ 3 ;# number of domains lappend cluster_num 2 1 1 ;# number of clusters in each domain AddrParams set cluster_num_ $cluster_num lappend eilastlevel 1 1 2 1 ;# number of nodes in each cluster AddrParams set nodes_num_ $eilastlevel ;# of each domain # create trace object for ns and nam set tracefd [open tcp-mono.tr w] set namtrace [open tcp-mono.nam w] $ns_ trace-all $tracefd $ns_ namtrace-all-wireless $namtrace $opt(x) $opt(y) # define topology $topo load_flatgrid $opt(x) $opt(y) #create wired nodes set Server [$ns_ node 0.0.0] $Server set X_ 500.0 $Server set Y_ 850.0 $Server set Z_ 0.0 set W_node [$ns_ node 0.1.0] $W_node set X_ 500.0 $W_node set Y_ 710.0 $W_node set Z_ 0.0 set god_ [create-god $opt(nn)+2] set chan_1 [new $opt(chan)] ;#umts Mac/802_11 set dataRate_ 2.0Mb ;# UMTS data rate Phy/WirelessPhy set Pt_ 4.5099 ;# UMTS coverage: r=500m Phy/WirelessPhy set freq_ 2.175e9 ;# UMTS radio frequency $chan_1 set delay 10ms Phy/WirelessPhy set bandwidth_ 384k $ns_ node-config -mobileIP ON \ -adhocRouting $opt(rp) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -topoInstance $topo \ -agentTrace ON \ -routerTrace OFF \ -macTrace ON \ -wiredRouting ON \ -channel $chan_1 # Create BSs set BS_umts [$ns_ node 1.0.0] $BS_umts random-motion 0 $BS_umts radius 500 $BS_umts set X_ 150.0 $BS_umts set Y_ 610.0 $BS_umts set Z_ 0. $ns_ node-config -wiredRouting OFF #dimioyrgia toy purina toy kinitoy komboy set MN [$ns_ node 1.0.1] $MN random-motion 0 $MN set X_ 160.0 $MN set Y_ 530.0 $MN set Z_ 0.0 set HAaddress [AddrParams addr2id [$BS_umts node-addr]] [$MN set regagent_] set home_agent_ $HAaddress $ns_ node-config -wiredRouting ON set BS_umts2 [$ns_ node 2.0.0] $BS_umts2 random-motion 0 $BS_umts2 radius 500 $BS_umts2 set X_ 950.0 $BS_umts2 set Y_ 610.0 $BS_umts2 set Z_ 0. $ns_ at 1.0 "$MN setdest 950.0 530.0 15.0" # create links between wired and BaseStation nodes $ns_ duplex-link $Server $W_node 50Mb 0.2ms DropTail $ns_ duplex-link-op $Server $W_node orient down $ns_ duplex-link $W_node $BS_umts 50Mb 0.2ms DropTail $ns_ duplex-link-op $W_node $BS_umts orient down-left $ns_ duplex-link $W_node $BS_umts2 50Mb 0.2ms DropTail $ns_ duplex-link-op $W_node $BS_umts2 orient down-right set tcp1 [new Agent/TCP] $tcp1 set packetSize_ 64 #$tcp1 set window_ 1 $ns_ attach-agent $Server $tcp1 set sink1 [new Agent/TCPSink] $ns_ attach-agent $MN $sink1 $ns_ connect $tcp1 $sink1 set ftp0 [new Application/FTP] $ftp0 attach-agent $tcp1 #stelnei kathe 0.01 sec apo ena paketo data ftp #12000= 120/0.01 for {set i 1} {$i<12000} {incr i} { $ns_ at [expr ($i*0.01)] "$ftp0 send 64"; } $ns_ at 42.5 "$MN setdest 105.0 530.0 15.0" $ns_ at 81.0 "$MN setdest 950.0 530.0 15.0" $ns_ at 102.5 "$MN setdest 105.0 530.0 15.0" #$ns_ at 141.0 "$MN setdest 950.0 530.0 15.0" $ns_ at 120 "stop"; $ns_ at 120 "puts \"NS EXITING...\" ; $ns_ halt" proc stop {} { global ns_ tracefd $ns_ flush-trace close $t
Re: [ns] throughput calculation
Hello, there are several possibilities. First you can analyse the trace files by filtering the interesting event. An example for awk you can find in the attachment. Second you my use an statistic toolset like ns2measure. (see google) Best regards, Volker neha goel schrieb: Hi all, Can i please know how to find throughput if i am sending udp packets from one node to another. Thanks.. #!/usr/bin/awk -f BEGIN { start_time = 26 stop_time = 99 # Uplink src_ip_port_ul = "4194305.0" dest_ip_port_ul = "4194304.0" packettype_ul = "cbr" # Downlink src_ip_port_dl = "4194304.1" ;#"0.0.0.1" dest_ip_port_dl = "4194305.1" ;#"1.0.1.1" packettype_dl = "cbr" #init var # Uplink packetcounter_ul = 0 recv_bytes_ul = 0 # Downlink packetcounter_dl = 0 recv_bytes_dl = 0 } { # Uplink # r -t 25.017077960 -Hs 0 -Hd 4194304 -Ni 0 -Nx 500.00 -Ny 500.00 -Nz 0.00 -Ne -1.00 -Nl AGT -Nw --- -Ma 0 -Md 100 -Ms 8 -Mt 0 # -Is 4194305.0 -Id 4194304.0 - It cbr -Il 1520 -If 0 -Ii 7 -Iv 32 -Pn cbr -Pi 0 -Pf 0 -Po 0 # Take only packets into account within transmission period if (($3 <= stop_time) && ($3 >= start_time) ){ # Count packets and bytes for UPLINK if ( ($1 == "r") && ($19 == "AGT") && ($31 == src_ip_port_ul) && ($33 == dest_ip_port_ul) && ($35 == packettype_dl)){ # Packetcounter packetcounter_ul++ # Datacounter recv_bytes_ul=recv_bytes_ul + $37 -20 } } # Downlink # r -t 25.504000981 -Hs 1 -Hd 4194305 -Ni 1 -Nx 700.00 -Ny 500.00 -Nz 0.00 -Ne -1.00 -Nl AGT -Nw --- -Ma 0 -Md 0 -Ms 8 -Mt 0 # -Is 4194304.1 -Id 4194305.1 -It cbr -Il 1520 -If 0 -Ii 8 -Iv 32 -Pn cbr -Pi 0 -Pf 0 -Po 0 if (($3 <= stop_time) && ( $3 >= start_time) ){ # Count packets and bytes for DOWNLINK if ( ($1 == "r") && ($19 == "AGT") && ($31 == src_ip_port_dl) && ($33 == dest_ip_port_dl) && ($35 == packettype_dl) ){ # Packetcounter packetcounter_dl++ # Datacounter recv_bytes_dl=recv_bytes_dl + $37 -20 } } } END { # Calculation of throughput # Uplink if (recv_bytes_ul==0){ bandwidth_ul = 0 } else { bandwidth_ul = 10^-6*8*recv_bytes_ul/(stop_time-start_time) } # Downlink if (recv_bytes_dl==0){ bandwidth_dl = 0 } else { bandwidth_dl = 10^-6*8*recv_bytes_dl/(stop_time-start_time) } # Output of the results printf("Start: %20d\n",start_time) printf("Stop:%20d\n\n",stop_time) printf("Uplink \n\n") printf("Statistic for %s-flow from %s to %s:\n\n",packettype_ul,src_ip_port_ul,dest_ip_port_ul) printf("Received packets: %20d [%15d Bytes]\n",packetcounter_ul,recv_bytes_ul) printf("Bandwidth: %6.3f Mbit/s\n",bandwidth_ul) printf("\n\n") printf("Downlink \n\n") printf("Statistic for %s-flow from %s to %s:\n\n",packettype_dl,src_ip_port_dl,dest_ip_port_dl) printf("Received packets: %20d [%15d Bytes]\n",packetcounter_dl,recv_bytes_dl) printf("Bandwidth:%6.3f Mbit/s\n",bandwidth_dl) printf("\n\n") printf("Results %6.6f %6.6f \n", bandwidth_ul, bandwidth_dl); }
[ns] please is there an extra fields in the DSR header that can i use to classify the packets
Dear users, I need just one bit in the DSR header to use it for classifying the packets to two types is it found best regards, Anas
[ns] Video streaming simulation under NS-2
Hello I am trying to simulation MPEG-4 video transmission over 802.11 i want to use any streaming server which i can simulate under NS-2 for the features such as throughput, delay, PSNR. etc anyone, please help me Thanks in advance _ News, entertainment and everything you care about at Live.com. Get it now! http://www.live.com/getstarted.aspx
[ns] throughput calculation
Hi all, Can i please know how to find throughput if i am sending udp packets from one node to another. Thanks..
[ns] Who can send me an example of "MW node"?
Hi to all, If anyone has an example of "MW node" extension(tcl file or code), please send to me. Thanks.
[ns] scheduling services of wimax
if anybody has worked on scheduling services of wimax then please help me