[Ns-developers] 802.11 wireless LAN on ns-2

Lavina Jain lavina.jain at gmail.com
Sat Apr 15 12:27:24 PDT 2006


Hello Sir,

I could understand the flow of code as implemented using mac-simple. Let me
explain the problem that I am targetting so that you can answer my questions
in that reference.
I want to implement burst transmission.
That is, a station get an opportunity to transmit, it sends more than one
data packets (say n) without waiting for ack, then it sends a request for
ack, reciever sends ack for all the recieved packet after it recieves this
request.

A typical sequence of actions is:
A station wins TXOP ---->  send n data frames separated by SIFS ---> send
request for ack ----> recieve ack.

1. Is there any implementation of pcf or contention free poll available?
Because burst transmission would be easier to implement on that.
Or, can you give me some other pointers to implement this.
I tried to implement this in dcf, but it was difficult to manage timers in
that.

2. sequence number and fragment number are not set in mac header because it
is assumed that at a time only one packet m_current would be in transmission
until it is acknowledged.

2. mac-simple does not take into account sifs and difs. This affects the
throughput calculations.
What other variants of mac are implemented?
What does mac-low implement? Can you provide me with a sample for that.

Regards,
Lavina

On 4/8/06, mathieu lacage <Mathieu.Lacage at sophia.inria.fr> wrote:
>
> hi lavina,
>
> On Sat, 2006-04-08 at 08:50 -0600, Lavina Jain wrote:
> > Can you please provide me with some documentation of the yans code,
> > specifically 802.11 functionality if you have. That would help in
>
> There is no documentation for now except for the sample code.
>
> >  understanding various modules and parameters.
> > I tried to go through the 80211 source code. I have some queries.
> > 1. How to simulate a particular data rate? That is, I dont want to use
> > arf and transmit data at a constant data rate, say 6Mbps or 12Mbps or
> > so on...
>
> Well, arf is useless if you use a single rate :) You should use the
> "cr" (where c stands for constant) rate control algorithm which uses a
> single rate. I have this in my main-80211-adhoc.cc file:
>        NetworkInterface80211Factory *wifi_factory;
>        wifi_factory = new NetworkInterface80211Factory ();
>        // force rts/cts on all the time.
>        wifi_factory->set_mac_rts_cts_threshold (2200);
>        wifi_factory->set_mac_fragmentation_threshold (2200);
>        //wifi_factory->set_cr (5, 5);
>        //wifi_factory->set_ideal (1e-5);
>        wifi_factory->set_aarf ();
>        //wifi_factory->set_arf ();
>
> All you have to do is disable the call to set_aarf and enable the one to
> set_cr. set_cr has two parameters: they are the data and the control
> transmission modes. Here, set_cr (5,5) will set the data and control
> modes to mode 5. the transmission mode is an index in the array of
> TransmissionMode objects contained in phy-80211.cc.
>
>
> > I see that possibly this can be done by using set_cr() instead of
> > set_aarf() in the main-80211-simple.cc
> > Possibly different modes of transmiision correspond to different data
> > rates and these are implemented as a link list. configure_80211a() in
> > phy_80211a.cc adds modes to this list. So, an integer value of mode
> > maps to a particular rate. Am I correct? If yes, I could not map, what
>
> yes, you are completely right :)
>
> >  value of mode corresponds to what data rate?
>
> in phy-80211.cc, I have this:
>        add_tx_rx_mode (new FecBpskMode (20e6, 6000000, 0.5,   10, 11));
>        add_tx_rx_mode (new FecBpskMode (20e6, 9000000, 0.75,  5, 8));
>        add_tx_rx_mode (new FecQamMode (20e6, 12000000, 0.5,   4, 10, 11,
> 0));
>        add_tx_rx_mode (new FecQamMode (20e6, 18000000, 0.75,  4, 5, 8,
> 31));
>        //add_tx_rx_mode (new FecQamMode (20e6, 24000000, 0.5,   16, 10,
> 11, 0));
>        add_tx_rx_mode (new FecQamMode (20e6, 36000000, 0.75,  16, 5, 8,
> 31));
>        //add_tx_rx_mode (new FecQamMode (20e6, 48000000, 0.666, 64, 6, 1,
> 16));        add_tx_rx_mode (new FecQamMode (20e6, 54000000, 0.75,  64, 5,
> 8, 31));
> the first mode inserted is BPSK 6Mbs. Thus, its index is 0. The second
> mode is BPSK 9Mbs. Thus, its index is 1. aso...
>
> This question comes back regularly so, I have filed the bug 15:
> http://yans.inria.fr/bts/yans/issue15
>
>
> > Also, set_cr() takes two parameters, data_mode and ctl_mode. Do they
> > correspond respectively to transmission rate of data frames and
> > control frames?
>
> yes.
>
> >
> > 2. How can I make changes to frame formats.
> > Is it that data frames as well as control frames(ack frames) use
> > ChunkMac80211Hdr, different frames being differentiated by type field.
> > Then if I want to add a field to ack frame and not to data frame, how
> > can I do that?
>
> You need to change the common structure. ChunkMac80211Hdr. It reflect
> the real 802.11 MAC header. So, if you want to change the underlying MAC
> header, you have to change this class.
>
> Thank you for your interest. Feel free to keep on sending questions.
> Mathieu
>
> PS: questions would be best sent to ns-developers at isi.edu to ensure that
> our email exchanges are archived.
>
>


--
"Unravelling life's mysteries and discovering life's secrets may take the
courage and determination found only in a self-motivated pursuit."
- Peter McWilliams


More information about the Ns-developers mailing list