Saturday 17 March 2012

What is Fragmentation threshold in Wireless (WLAN)/ How Fragmentation threshold is used in Wireless

What is Fragmentation threshold in Wireless (WLAN)/ How Fragmentation threshold is used in Wireless

Fragmentation Threshold is one  parameter which is given in all stations and Access points. Fine tuning Fragmentation Threshold parameter can result in good throughput but not using it properly can results in low throughput.

1 ) What is fragmentation threshold?

In simple words it does the same thing which MTU do in Ethernet. Both are different parameters but the work done is same , it fragments the data packets.

2) When fragmentation threshold will be used ?

Fragmentation threshold
will be used when we have more data packet size to be transmitted and we have less fragment threshold value. Lets say from Ethernet we have to send 1400 byte packet but the fragmentation threshold is set as 400. In this case when the packet is to be transmitted on air it will fragment the packet in to 4 small packet 400+400+400+200 and send on air.This includes MAC header+ frame body and CRC so 400 byte will be in total including headers.

The reason while sending in fragments increases throughput and affects throughput can be because in a wireless network where RTS/CTS are not used , a wireless workstation needs 34us to sense a channel, 16us RTS, data transmission of roughly 600us for full payload, 16us for ack, 34us for DIFS, and roughly another 9us for another slot time. So the total time is 709 us. With a fragmented payload, the time-in flight for a full frame is reduced, even the DIFS time. (i.e. -400us for payload, -34us for DIFS). This helps in increasing the throughput.

3) What is the range of
fragmentation threshold ?

Typically the range used for fragmentation threshold is 256-2346. The default value for many devices is set to be 2346. Typically this means that it is disabled and will never be used.

4) Does it will apply to broadast and multicast packets ?

No, it is meant for only unicast packets.

5) How fragmentation and reassembly takes place in wireless using fragmentation threshold parameter?

When we enable Fragmentation parameters the AP/station fragments the packets and send it on air. Each packet will have its own MAC header+frame body ,FCS.  and fragment number which is to know the sequence of the fragments. It has a fragment header which consists of
Sequence control field. It includes a Fragment Number sub field, indicating the fragment number of the frame.This number is zero for first fragment and gets increments by one for next fragment of a single frame.The single bit "More Fragment field" in the fragment header indicates
that this is the last fragment of the series. Also for all others fragments the the More Fragment field is set to "1" and its set to zero if no more fragments are present in the sequence.
 The destination station reassembles the fragments back into the original frame using fragment numbers found in the header of each frame. When it receives the full complete frame , the station hands the frame up to higher layers for processing.

6) What is relation between MTU and fragmentation threshold / Why we have not used MTU for wireless also why new parameter is required ?

This is the first question which i had in mind when i first came to know about this parameter. MTU and fragmentation threshold does the same thing , they fragment the packet if the data packet is more than this value. But we have not used this parameter in Wireless also because one of the reason i could understand was as it is wireless there is lot of chances of collision and interference and data getting lost. Even 1500 byte packet size is more if we have a noisy or RF interference environment so we can divide the wireless packets in to small size say 500 and send them over wireless. As each fragment is send in burst mode and requires ACK for each one ,only those fragments which are lost needs to be transmitted, not all.

Also if we have lets say Ethernet MTU as 1500 and Fragmentation threshold as 2000, does it make sense ? No. Because in any case you will not get packet which is larger than 1500 so practically your FT value will never be used. But if your MTU is 1500 and your Fragmentation threshold value is say 800 then it will used and you can see the fragmented packets over the air using some sniffer.