[ns] how can i change the pause time parameters?
Sidney Doria
ssdoria at gmail.com
Tue Jan 6 15:19:16 PST 2009
Ok, the answers are here, but I suggest you to google it a bit more! :)
http://web.syr.edu/~dchen02/FAQ.txt
------------------------------------------------------
Question 6:
How to set up the wireless bandwidth (such as 802.11 a,b,g) in NS2?
Answer:
In ns2.26 and ns2.27, you can change (basicRate_ and dataRate_ ):
Mac/802_11 set basicRate_ 1Mb
Mac/802_11 set dataRate_ 11Mb
in your tcl script.
FHSS (IEEE802.11)
Mac/802_11 set SlotTime_ 0.000050 ;# 50us
Mac/802_11 set SIFS_ 0.000028 ;# 28us
Mac/802_11 set PreambleLength_ 0 ;# no preamble
Mac/802_11 set PLCPHeaderLength_ 128 ;# 128 bits
Mac/802_11 set PLCPDataRate_ 1.0e6 ;# 1Mbps
Mac/802_11 set dataRate_ 1.0e6 ;# 11Mbps
Mac/802_11 set basicRate_ 1.0e6 ;# 1Mbps
DSSS (IEEE802.11b)
Mac/802_11 set SlotTime_ 0.000020 ;# 20us
Mac/802_11 set SIFS_ 0.000010 ;# 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
Note:
-if using the short preamble option: you can change the line as:
Mac/802_11 set PreambleLength_ 72
- # frequency is 2.4 GHz
Phy/WirelessPhy set freq_ 2.4e+9
# transmit power
Phy/WirelessPhy set Pt_ 3.3962527e-2
# Receive sensitivity.
Phy/WirelessPhy set RXThresh_ 6.309573e-12
Phy/WirelessPhy set CSThresh_ 6.309573e-12
( *** HEY SARYM ***, READ THIS)
Note that the radio range that results from this configuration may or may
not coincide with open field tests. If you want setup a specific range,
use the program ~/indep-utils/propagation/threshold.cc to obtain the
desired RXThresh_ (rx sensitivity) based on the above frequency, transmit
power and your desired range.
802.11g:
#define DSSS_CWMin 15
#define DSSS_CWMax 1023
#define DSSS_SlotTime 0.000009
#define DSSS_CCATime 0.000003
#define DSSS_RxTxTurnaroundTime 0.000002
#define DSSS_SIFSTime 0.000016
#define DSSS_PreambleLength 96
#define DSSS_PLCPHeaderLength 40
#define DSSS_PLCPDataRate 6.0e6 // 6Mbps
#define DSSS_MaxPropagationDelay 0.0000005 // 0.5us
Note: bandwidth is different with achievable throughput.
- In NS ACK are always sent at 1Mbps
- NS use always the long PLCP preamble format sent at 1Mbps
- by default NS uses RTS/CTS handshake
- Packet's size has also an impact in the % of overhead.
All this factor can bound the achievable throughput
---------------------------------------------------------------------------------------------------
Hope to be useful,
Sidney Doria
UFCG / BRAZIL
2009/1/6 sarym binome <binome_ini at hotmail.com>:
> hi sideny
> please show me exactly where can i do that (about radio range )
> set ns_ [new Simulator]
>
> set topo [new Topography]
>
> set val(chan) Channel/WirelessChannel
> set val(prop) Propagation/TwoRayGround
> set val(ant) Antenna/OmniAntenna
> set val(ll) LL
> set val(ifq) Queue/DropTail/PriQueue
> set val(x) 670 ;# X dimension of the topography
> set val(y) 670 ;# Y dimension of the topography
> set val(ifqlen) 50
> set val(seed) 0.0
> set val(netif) Phy/WirelessPhy
> set val(mac) Mac/802_11
> set val(rp) AODV
> set val(nn) 20
> set val(cp) "cbr-20-test.cbr"
> set val(sc) [lindex $argv 0]
> set val(stop) 200.0
>
>
> for {set i 0} {$i < $val(nn) } { incr i} {
> set node_($i) [$ns_ node]
> $node_($i) random-motion 0
> }
> thanks
>
>> Date: Tue, 6 Jan 2009 18:29:46 -0300
>> From: ssdoria at gmail.com
>> To: binome_ini at hotmail.com
>> Subject: Re: [ns] how can i change the pause time parameters?
>>
>> About the pause time I don't know, but about the radio range 250m is
>> the default. This value is initiated in the TCL file, in a loop to
>> create all nodes (with same parameters).
>>
>> Sidney Doria
>>
>> UFCG / BRAZIL
>>
>> 2009/1/6 sarym binome <binome_ini at hotmail.com>:
>> >
>> >
>> > hello
>> > how can i change the pause time parameters without creating a lot of
>> > scenario file and change the -p (when we use the setdest) ? is it possible
>> > (how can i do it ?)
>> > how can i set the radio range = 250m , where can i initiate this
>> > variable ?
>> > best regards
>> >
>> > _________________________________________________________________
>> > Glissez - déplacez : c'est si simple de partager vos photos sur Windows
>> > Live™ Photos !
>> > http://www.microsoft.com/windows/windowslive/photos.aspx
>> >
>>
>>
>>
>> --
>> Sidney Doria
>> Redes ad hoc móveis
>> Doutorado em Computação
>> UFCG
>> Brasil
>>
>> "Nessa jornada, o conhecimento será o seu escudo..."
>> (Mestre dos Magos no episódio do grimoire de ouro)
>
> ________________________________
> Tous vos amis discutent sur Messenger, et vous ? Téléchargez Messenger,
> c'est gratuit !
--
Sidney Doria
Redes ad hoc móveis
Doutorado em Computação
UFCG
Brasil
"Nessa jornada, o conhecimento será o seu escudo..."
(Mestre dos Magos no episódio do grimoire de ouro)
More information about the Ns-users
mailing list