Re: [ns] collisions in 802.11 or interference
Hello Imad The 802.11 Standard uses CSMA/CA ( Carrier Sense Multiple Access with Collision Avoidance ). It does not use collision detection. And 802.11.ccshould be coded according to the standard, so I guess you won't be able to capture the collided packets inside 802.11.cc. I think you can only capture the packets that did not pass the CRC check. Best regards, -- Waleed Tuffaha Date: Thu, 13 Nov 2008 10:23:05 -0500 From: Imad Abdeljaouad [EMAIL PROTECTED] Subject: Re: [ns] collisions in 802.11 or interference To: Basim Javed [EMAIL PROTECTED] Cc: ns-users@isi.edu ns-users@ISI.EDU Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Well, my idea was to simulate interference. You are right absolutely right, interference happens in the air so the receiver has no idea about it. But this is in real life. Since there are no signals in ns2, my idea was to calculate interference at the MAC layer which will know what are the packets (signals) that were sent at the same time on the air. So when the MAC receives more than one packet, I want to record these packets somewhere (and this will give me access to where they are coming from and going to, plus their powers), then I will apply a formula that will calculate interference between all these packets (in real life: signals). You are absolutely right, in case of one channel, this will be considered as collision IF the received packets are destined to the same receiver/. But there are two other cases, if the packet is not destined to that receiver, then I think this will be strong interference. Also, if the interfering packet belongs to a different channel (that I am willing to add after I figure out the interference) then this is will be interference depending on the correlation between the channels. Do you see my point? The first step I believe would be to capture all packets that come at the same time while I am receiving another packet. This way I can process them and decide if it is collision or strong or weak interference. I have the formula, all I need are the packets along with their powers and channels they belong to (don't care about the channels now, coz that's coming after). I am still wondering how and where in the 802.11.cc code I can capture all colliding/interfering packets and put them somewhere for processing. cheers, On Thu, Nov 13, 2008 at 5:00 AM, Basim Javed [EMAIL PROTECTED] wrote: hello Imad I can see ur point. Lets talk on the issues one by one: The interference of one packet to an already sent packet creates collision. right? so interference and collisions happen in the air. I dont see why it is important that the packets should be sent to one receiver and they if they interfere, then collision happens. I think even those nodes who are just listening to the channel, know that collision has happened in the air, even they were not recipients of the packet. Now, how does the node knows that a collision has happened.. through the received signal power, which is lower than a threshold level (i forgot the name). As far as I remember, the power level can be so low, that a node can not receive a packet, or it is bit high but still not good enough to decrypt the bits. What I am talking above is related to the situation of same channel (single hop). I think multiple channels are used in neighbouring BSSs. About ur formula: how a receiving node can know about the power of the signal when the packet was sent, in real situation? regards basim On Wed, Nov 12, 2008 at 4:16 PM, Imad Abdeljaouad [EMAIL PROTECTED] wrote: Thank you so much, I really need help! I would like to add interference support in 802.11. If my understanding is right, interference happens when signals send on the same channel (or adjacent channels, like 1 and 2 or 3 ... to 6) overlap in the medium (the air) and cause attenuations to each other. I think this will not be possible in ns2 since there are no real signals. So I was thinking that what I should do is collect the signals that arrive at the same time at the receiver MAC (and this is where I got collisions) and this means that these signals already overlapped in the air since they got to the receiver MAC at the same time. Do you see my point? Once I know which siganls overlapped, I can use a formula to calculate interference (the fornula uses Power of the signal sent + which channel does it belong to, to calculate the effect of one sigan on another ). So the point is, I need to capture the packet*s* that collide while I am receiving another packet and for how long they collided. I don't know if you get my point, but please do not hesitate to ask me more questions! thank you again !!! On Wed, Nov 12, 2008 at 4:36 AM, Basim Javed [EMAIL PROTECTED] wrote: hello Imad I want to help you, but I dont understand your definition of
[ns] switched Ethernet simulation in ns2
If i develop the switched ethernet simulation than in which tcl scenario file should i use to test whether my code is working or not. Haider s.korea
[ns] Watchdog Algorithm position in the dsragent
Dear, ns users is it right to put the code of the watchdog technique in the SendOutPacketWithRoute please help anas
[ns] Correct use of mac 802.11 in MANET network
Hello to everybody! I would know your opinion about my solution. I'm working in MANET routing context and I'm simulating a simple network made up by 4 fixed wireless nodes (A,B,C,D) with mac layer 802_11 (dataRate_ set to 11Mb) and a mobile node (E) with mac layer 802_11 but dataRate_ set to 1Mb that moves from the left side to the right side of the network as shown in the next picture: | A | | B || C | | D | -| E |- Now I want to check the data throughput for the communication among node A and node E and viceversa. The simulator seams to run correctly but I'm not sure that the current implementation of the mac layer mac-802_11.{h,cc} allows me to deal with this scenario, i.e. it allows me to use different channel capacities in the same wireless network. Any help can be very useful and so thank you in advance for your attention! Best regards, Massimo
[ns] Large network simulation problem
Hi all! I've got a problem simulating a network with 1000 nodes. I've a tcl script that simulate a network with many nodes moving all around. When I analyze the trace file with up to 100 nodes, the results look correct, but with 500 or 1000 nodes I can't get correct results. For example that's are the results for traffic between node 0 and node 1 with AODV protocol: 50 nodes (1500x300): send = 3772.00 MACpacketSend = 11645.00 recv = 3664.00 routingpkts = 8239.00 PacketDeliveryRatio = 97.14 NormalizedRoutingLoad = 2.25 RoutingOverheads = 2.18 AverageHopCounts = 3.09 100 nodes(2121x424): send = 3796.00 MACpacketSend = 13169.00 recv = 3672.00 routingpkts = 16640.00 PacketDeliveryRatio = 96.73 NormalizedRoutingLoad = 4.53 RoutingOverheads = 4.38 AverageHopCounts = 3.47 1000nodes(6704x1342): send = 716.00 MACpacketSend = 4759.00 recv = 610.00 routingpkts = 124574.00 PacketDeliveryRatio = 85.20 NormalizedRoutingLoad = 204.22 RoutingOverheads = 173.99 AverageHopCounts = 6.65 Obviously the last results are not correct cause node 0 can't send just 716 packets...or I'm wrong? I attach also the awk script I use to analize results. http://www.nabble.com/file/p20514322/parameters-aodv.awk parameters-aodv.awk Please help me retrieving correct results, thanks. Alessandro -- View this message in context: http://www.nabble.com/Large-network-simulation-problem-tp20514322p20514322.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Large network simulation problem
Can you post here your tcl script, that way you could analyse better the results! Luís Barreto On Sat, Nov 15, 2008 at 11:01 AM, coorasse [EMAIL PROTECTED] wrote: Hi all! I've got a problem simulating a network with 1000 nodes. I've a tcl script that simulate a network with many nodes moving all around. When I analyze the trace file with up to 100 nodes, the results look correct, but with 500 or 1000 nodes I can't get correct results. For example that's are the results for traffic between node 0 and node 1 with AODV protocol: 50 nodes (1500x300): send = 3772.00 MACpacketSend = 11645.00 recv = 3664.00 routingpkts = 8239.00 PacketDeliveryRatio = 97.14 NormalizedRoutingLoad = 2.25 RoutingOverheads = 2.18 AverageHopCounts = 3.09 100 nodes(2121x424): send = 3796.00 MACpacketSend = 13169.00 recv = 3672.00 routingpkts = 16640.00 PacketDeliveryRatio = 96.73 NormalizedRoutingLoad = 4.53 RoutingOverheads = 4.38 AverageHopCounts = 3.47 1000nodes(6704x1342): send = 716.00 MACpacketSend = 4759.00 recv = 610.00 routingpkts = 124574.00 PacketDeliveryRatio = 85.20 NormalizedRoutingLoad = 204.22 RoutingOverheads = 173.99 AverageHopCounts = 6.65 Obviously the last results are not correct cause node 0 can't send just 716 packets...or I'm wrong? I attach also the awk script I use to analize results. http://www.nabble.com/file/p20514322/parameters-aodv.awkparameters-aodv.awk Please help me retrieving correct results, thanks. Alessandro -- View this message in context: http://www.nabble.com/Large-network-simulation-problem-tp20514322p20514322.html Sent from the ns-users mailing list archive at Nabble.com.
Re: [ns] Large network simulation problem
That's my tcl simulation script. It's a base script without the mobility model that's it is put where you read #INITIALPOSITION. http://www.nabble.com/file/p20514864/prova1.tcl prova1.tcl I change the number of nodes and the topology dimensions from that script when I wanna do a different simulation. -- View this message in context: http://www.nabble.com/Large-network-simulation-problem-tp20514322p20514864.html Sent from the ns-users mailing list archive at Nabble.com.
[ns] Correct use of mac 802.11 in MANET network (script included)
Hello to everybody! I would know your opinion about my solution. I'm working in MANET routing context and I'm simulating a simple network made up by 4 fixed wireless nodes (A,B,C,D) with mac layer 802_11 (dataRate_ set to 11Mb) and a mobile node (E) with mac layer 802_11 but dataRate_ set to 1Mb that moves from the left side to the right side of the network as shown in the next picture: | A | | B || C | | D | -| E |- Now I want to check the data throughput for the communication among node A and node E and viceversa. The simulator seams to run correctly but I'm not sure that the current implementation of the mac layer mac-802_11.{h,cc} allows me to deal with this scenario, i.e. it allows me to use different channel capacities in the same wireless network. The used simulation script is the following one: # == # Define options # == # following options are to define a network feature: default values 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) 5 ;# number of mobilenodes set opt(rp) OLSR ;# routing protocol set opt(x) 500 ;# X-dimention for the topology set opt(y) 550 ;# Y-dimention for the topology set opt(packetSize) 400 ;# packet size for CBR traffic in Bytes set opt(rate) 80Kb ;# CBR traffic bit rate set opt(speed) 3.0 ;# mobile node linear speed in m/sec set opt(startCBR) 100 ;# CBR flow start time in seconds set opt(stopCBR) 600 ;# CBR flow end time in seconds set opt(stopSimulation) 650 ;# Simulation end time in seconds proc usage {} { puts {manet_net.tcl: Usage ns manet_net.tcl } puts {PARAMETERS NEED NOT BE SPECIFIED... DEFAULTS WILL BE USED} exit } if {[string compare $opt(rp) OLSR] == 0} { Agent/OLSR set use_mac_ true } puts This is a basic manet network # = # Main Program # == # Initialize a network simulator set ns_ [new Simulator] set tracefd [open manet_net.tr w] $ns_ trace-all $tracefd # Initialize nam trace for netwrok visualization set namtrace [open manet_net.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) # Create God set god_ [create-god $opt(nn)] set chan_1_ [new $opt(chan)] # Create the specified number of mobilenodes [$opt(nn)] and attach them # to the channel. # Configure the node features Mac/802_11 set dataRate_ 11Mb Mac/802_11 set PLCPdataRate_ 11Mb $ns_ node-config -adhocRouting $opt(rp) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -channel $chan_1_ \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \ -macTrace OFF \ -movementTrace ON #in order to compute this threshold run the program in indeep-utils/propagation/threshold #command ./threshold -m TwoRayGround 200 Phy/WirelessPhy set RXThresh_ 1.42681e-08 ;# 100 m set node_(0) [$ns_ node] $node_(0) random-motion 0 Phy/WirelessPhy set RXThresh_ 1.42681e-08 ;# 100 m set node_(1) [$ns_ node] $node_(1) random-motion 0 Phy/WirelessPhy set RXThresh_ 1.42681e-08 ;# 100 m set node_(2) [$ns_ node] $node_(2) random-motion 0 Phy/WirelessPhy set RXThresh_ 1.42681e-08 ;# 100 m set node_(3) [$ns_ node] $node_(3) random-motion 0 Phy/WirelessPhy set RXThresh_ 1.42681e-08 ;# 100 m Mac/802_11 set dataRate_ 1Mb Mac/802_11 set PLCPdataRate_ 1Mb $ns_ node-config -adhocRouting $opt(rp) \ -llType $opt(ll) \ -macType $opt(mac) \ -ifqType $opt(ifq) \ -ifqLen $opt(ifqlen) \ -antType $opt(ant) \ -propType $opt(prop) \ -phyType $opt(netif) \ -channel $chan_1_ \ -topoInstance $topo \ -agentTrace ON \ -routerTrace ON \
[ns] I think it is AODV bug for interface queue dismatch
Hi all Recently, I face segmentation fault with AODV. So I check all the AODV C/C++ object and tcl. I found that In AODV, there's ifq which is PriQueue. In that case, when writing a wirelss network TCL file, declare set opt(ifq) Queue/DRR or set opt(ifq) Queue/RED, there's a chance will cause segmentation fault. Because when link fail, AODV will call AODV::rt_ll_failed(Packet*). and AODV will drop all the packets that is stored for the broken link. But in the tcl file, we declare set opt(ifq) Queue/DRR, So I think this is the key to case the segmentation fault. The ifq in the network is not match with one in AODV. I dont know am I right? Maybe some one can give me some advice about it. Maybe a solution better. :P thanks for any reply. howard
[ns] Fwd: Problem with trace-all in NS2
hi I am not able to collect the traces using trace-all command in NS2 (on windows): Here is a snapshot of my file #Create a simulator object set ns [new Simulator] #Open the Trace file set tracefile1 [open out.tr w] $ns trace-all $tracefile1 #Open the nam trace file set nf [open out.nam w] $ns namtrace-all $nf proc finish {} { global ns nf $ns flush-trace #Close the trace file close $tracefile1 close $nf #Execute nam on the trace file exec nam out.nam exit 0 } rest of file But there is an error when I run this $ ns example4a.tcl ns: finish: can't read tracefile1: no such variable while executing close $tracefile1 (procedure finish line 5) invoked from within finish I would really appreciate if anyone could help me out with this error? I am able to open the nam file using the open command but I am not able to find out why tracefile1 is not getting created. Regards Kanu