Friday, November 26, 2010

Wi-Fi (802.11abgn) - 4

In last articles we had an introduction to Wi-Fi network, Channels and started looking into BSS. Refer

Introduction to Wi-Fi

Wi-Fi Channels

Addresses in 802.11, Beacons

Let us start trying to visualize the beacon frame in the Air.

Not only beacons but all the WLAN (Wireless LAN) packets in the air should have the MAC header right at the beginning.

The MAC Header:

In 802.11, A specific header to the protocol was introduced and being used called the 802.11 MAC header. Have a look at the image below. (Click it and keep open in neighboring tab)
802.11 MAC Header
This MAC header is common for all the 802.11 frames.

Version: It is of size two bits, and as of now the value is fixed as 0 (indeed 00 in binary as it is of size two bits).

Type: It is of also size two bits. There are actually three types of frames in 802.11, viz.

(i) Management - 00
(ii) Control -01
(iii) Data - 10

Subtype: For every type of frame lot of subtypes are defined. I will donate a separate article for subtypes. At present we will stop with knowing "Beacon" as a "Management frame (00)" and the subtype value for it is "1000".

Frame Control:
Order:  This is to specify whether the "strictly ordering of frames" is used or not. Mostly the strictly ordering of frame service will not be implemented. Only for the LAT protocol, the strict ordering of frames need to be provided (Order Bit will be 1). Beacons (Management and Control frames) follows "No strict Order (0)".

WEP: Wired Equivalent Privacy (WEP) is the first security scheme proposed for 802.11. If the frame is an encrypted frame with WEP, then the bit will be set (1) otherwise it will be cleared (0). For management frames, No encryption mechanism specified, hence for beacons the bit will be 0.

Cisco has it's own proprietary protocol for encrypting Beacons and other management frames. Later IEEE has came up with standardizing the Management frame encryption as 802.11w

More Data: This bit is also mostly for data frames, to indicate whether any more data needs to be received by the receiver (1) or not (0). In case of beacon, it is not followed by any more data, hence this bit will be 0.

Power Management: To indicate whether the device is in power save mode (1) or active mode (0). The beacons are from Infrastructure Devices which will never go to power save. Hence Frames from Infrastructure devices will always have this bit as 0.

Retransmission: To indicate whether this is the first copy of the frame getting transmitted (0) or it is duplicate of previous transmission due to several reasons (1). There are several reasons for the frame getting retransmitted in wireless because the air is more prone to collisions of packets. We will focus shortly on this when we go for distribution functions.

Fragmentation: Usually the bigger frames will be fragmented and transmitted into the air to reduce the probability of getting corrupted. Under that case if the bit is set (1) it indicates, there are more fragments which belongs to the same frame will be transmitted. If the bit is clear (0), then that frame is a complete frame which is not fragmented or it can be a last fragment of the fragmented frame. Management and Control frames will not be fragmented because their size will be less the threshold defined for the fragmentation. Hence beacon has this value as 0.

From Distribution System: If the frame is from the distribution system (Infrastructure Device) then this bit will be set. This bit is not defined for management and control frames ( It clears your thoughts saying why the bit is not set for beacon which is getting transmitted by Infrastructure Device :P !!!)

To Distribution System: Yet another frame defined only for data frames (!!!) to indicate that the frame's Destination is an Infrastructure device.

Duration: There is something called NAV (Network Allocation Vector) which is useful for avoiding collision. For now we will just see what NAV is. NAV is a time unit which needs to be updated in the hardware counter of the wireless device, for which the device needs to wait before trying to compete for the medium. (Oops. Don't worry if you got confused, you will get it cleared when we deal with the Collision Avoidance implementation in wireless!!!).

This Duration will serve another purpose as well. On Power save data packets it will say the AID (Association ID) of the device in power save for which the infrastructure device has buffered packets. (Yeps. We will dig this deeper in power save)

Destination, Source, BSSID: We have seen this in previous article is it not. Just some points to add. Beacons are broadcasted hence destination is broadcast (FF:FF:FF:FF:FF:FF), source and BSSID are same as MAC of Infrastructure device.

The following details are easy to represent in table. Look at the table below (Courtesy Thanks: This table is taken from IEEE spec)

Address field contents
DA - Destination Address, SA - Source Address, BSSID  - Basic Service Set ID, RA - Receiver Address, TA - Transmitter Address.

The Table is self explanatory. It will say us what is the value of Address 1,2,3 and 4, based on whether it is a frame to DS or frame from DS.

Sequence and Fragment Number: These two parameters are used for fragmentation and reassembling. If the frame is fragmented and transmitted, these are the parameters with which the receiving device arrange the fragments to get a complete frame. These are defined for MSDU and MMPDUs (We will see them clearly as we go ahead) packets.

Sequence number is 12 bit and it will indicate the sequence number of the frames.

Fragment number is 4 bit and it will indicate the fragment number if the frame is fragmented one.

These two are basically counters and their values will be same over retransmission. Of course right, if the frame is fragmented into 4, and take 3rd frame. The third frame is always third frame immaterial how many time it got retransmitted, is it not? Extend the same idea for consequent data frames. Assume there is a data of 13 (lucky number yaar) sequential frames, the 9th frame is always 9th frame no!!!

Indeed Fragmentation is worth an article, we will deal it left and right.

Lot of things to speak about. The digging of beacon is not complete :( Next article will be continuing on beacon frame, then we will switch for pending promise made here, the article on collision to explain NAV, retransmission.

Thursday, November 25, 2010

Wi-Fi (802.11abgn) - 3

In last articles we had an introduction to Wi-Fi network and Channels. Refer

Introduction to Wi-Fi

Wi-Fi Channels

Let us start digging deep the BSS.

Address:

Yes, the addresses are the most important factors in any form of communication. It will sound indeed ugly if we are sending a telegram or post without an address is it not. In 802.11 four address are defined, and they are

a. Destination Address - This address is the MAC of the device which is the intended receptor of the packet.
  
    Receiver Address - This is the address of the immediate next station, if the data packet needs to pass through multiple nodes to reach the actual destination.

b. Source Address - It is the MAC of the device which is transmitting the packet.
  
    Transmitter Address - This is the address of the node which actually transmitted the packet to the air. This is the case similar to receiver address, when the data packet needs to pass through multiple nodes to reach the actual destination. In this scenario, the source address of the packet will also be changed no when it passes through the intermediate person.

c. BSS Address - This is to identify to which BSS the packet actually belongs to. This is basically for filtering out the unwanted packets. We will discuss this further on this very shortly.

d. Actual Source Address - This address is optional and we will discuss this when we proceed for Wireless Distribution System (WDS). We will still dig this when we move for Ad-hoc network or IBSS. For now we will have this alone in our mind: "This is an optional address which will have the MAC ID of the actual Source which have sent the packet to the Air".

All these addresses are 6 byte size and they are unique. No two devices will have same physical address. We will see further on this when we proceed for 802.11 MAC header.

Beacon:

This will serve almost like a backbone for the BSS. As we saw earlier, Every BSS will have an infrastructure element which can be either routers, access points or gateways. All of these devices have similar implementations on the layer 2 and 1.

Beacons are management frames which delivers the complete information about the infrastructure element. The major elements are

a. SSID - It is the name of the service set, it can be any alphanumeric string and some device manufacturers may be having some restrictions.
b. Channel - The channel in which the service set is operating.
c. Security and authentication scheme related parameters.
d. Data rates supported
e. Power save related informations for station.
f. Quality of service parameters for stations.
e. Informations related to 11n, 11g, 11b standards.
g. Several vendor specific informations.

and lot more.

Every devices associated to the infrastructure element should listen for the beacons periodically. The infrastructure will be transmitting beacons to the air periodically with the interval specified by "Beacon Interval" which is usually 100 ms and can be increased or decreased.

In the next article we will take a sample beacon frame and try to understand how the protocols are implemented.

Tuesday, November 2, 2010

Songs

9. Song on Iyyappan:

Raaga: Mohanam
Talam: Roopakam

pallavi:

hariharathmajam anisham varadhayaka

samashti charanam:

mahishi marthanam sabarigiri nivasitham
sadha tapa kola mohana roopam

madhima kalam:

pampa balam pandhala raajam
bakthapalam venkatesanutham

sketch:

pallavi:
sa dha pa || ga ga ri   || sa -- -- || sa dha sa sa-ri-ga-pa-dha-ri||
ha ri ha    || rath- ma  || jam       || a ni sham varadhayaka        ||

sa-dha-ri-sa-dha pa || " || " || " ||
hari ha                     || " || " || " ||

sa-dha-ri-sa-dha pa || gapagari ri || " || " ||
hari ha                     || raath ma    || " || " ||

" || " ri   || sa-ri-sa sa-ri-ga-ri-sa|| " ||
" || " ma || -- jam                       || " ||

" || " ri   || sa-ri-sa sa-ri-ga-ri-sa|| sa-dha dha-ri sa ri-ga-pa-dha-ri ||

" || " ma || -- jam                      || a ni sham varadhayaka                ||


samashti charanam:

sa dha pa || dha-ri ri sa   || sari gari sari || dhapa dhari sa || dha ri sa ||

ma hi shi  || mar dha nam || sa bha ri     || gi ri ni              || va si tham||

sa dha - ||dha pa ga        || ga pa dha   || ga ri sa             || sadha paga risa ||

sa dha   || ta pa ko          || - la mo       || - ha na             || roo -- pam||

(give jandai prayogams to dha gha in charam)

madhima kalam:

sadha dhapa-dharisa riga-paga || gadhapa dhasa-dhapa garisa || sarigapa dhasari ||

pampa ba lam pan thala              || raa jam bhak tha palam        || venkatesa vinutham ||

Monday, November 1, 2010

துயரக் கடிதம்

முந்தைய மடல்கள் இதோ  - மடல்-1 மடல்-2 மடல்-3  மடல்-4

மடல் - 5

பின்னி ரோட்டில் ஒரு சிறிய சலசலப்பு..

சென்னை பொதுமக்கள் அனைவரும் கடமை உணர்ச்சி தவறாது வண்டியை ஓரமாய் நிறுத்தி விட்டு சாலை கூட்டத்தில் கலந்து வேடிக்கை பார்த்தனர். சிலர் ரவி சாஸ்திரி range இற்கு கமெண்ட்ரி கொடுத்தனர்.

"circus மாதிரி இருந்துச்சுங்க சும்மா நல்ல வேகமா வந்து 4 பல்டி அடிச்சாருங்க"

"சூப்பரா ஓட்னு வந்தாப்டி என்ன நெனச்சாரோ வித்தை காம்சாரு பா நா பைக் நிறுத்திட்டு விசில் அடிச்சேன்னா பாத்துகோயேன்"

"மும்பை எக்ஸ்பிரஸ் படத்துல கூண்டுக்குள்ள கமல் பண்ணத இவரு ரோட்ல பன்னாருயா சாகசகாரன் பா இவரு"

 இந்த கலாய்க்கும் கூட்டத்தின் நடுவே சுமார் 50  வயது மனிதர் ஒருவர் "நீ அபினவ் தானே. இந்த பக்கம் என்ன பண்றே"

"நாஷ்தா துன்றாங்கோ" என்று மனதுள் நினைத்துக்கொண்டு "சேஷு அங்கிள் இந்த பக்கம் friend  பார்க்க வந்துர்ந்தேன் ஸ்லிப் ஆய்டுச்சு"

"அடி பட்டு இருக்கா" என்று அக்கறையாய் அருகில் சென்று விசாரித்தார்.

"நல்லா கேட்குறான்யா detailu" (இதுவும் மனதிற்குள் தான்) "இல்ல அங்கிள் லேசா ஸ்க்ராட்ச் அவ்ளோதான்"

"ok  கார்ல ஏறிக்கோ வண்டி என் டிரைவர் எடுத்து கொண்டுவந்து வீட்ல கொடுத்துருவான்"

"அயோயோ இந்த கிரகம் புடிச்ச பெருசு அப்பா கிட்ட செமயா போட்டு கொடுக்குமே" "இல்ல அங்கிள் என் friend  கு போன் பண்ணி இருக்கேன் ஸ்பென்சர் ல தான் இருக்கான் நான் அவனோட போய்டுவேன். தேங்க்ஸ் அங்கிள் ஒன்னும் problem  இல்லை" என்று சமாளிக்கவும் விக்கி "மச்சி செம dive அடிச்சியாமா அந்த பொண்ண நெனசினு ஒட்டினியா" என்று நக்கலுடன் வரவும் timing செமயா மேட்ச் ஆனது.

"மாப்ள நீ குண்டும் குழியுமா இருக்கற ரோட்ல விழுந்து இருந்தா கூட பரவா இல்ல இப்டி மூக்கு முழியுமா இருக்கற பொண்ண நெனச்சு நல்ல ரோட்ல பல்டி அடிச்டியே டா"

சூழ்நிலை புரியாமல் மொக்க போடும் விக்கியை மனதுள் திட்டி கொண்டு "அங்கிள் என் friend  வந்துட்டான் நா போய்டுவேன் நீங்க போங்க அங்கிள், விக்கி இது என் அப்பா colleague " என்று அவன் வாயை அடைக்க intro செய்தான்.

சேஷாத்ரியும் தலையில் அடித்துக்கொண்டு அங்கிருந்து நகர்ந்தார். டிராபிக் போலீஸ் ஒருவரும் வந்து கூட்டத்த கலைங்க  என்று அனைவரையும் நகர்த்த விக்கி மற்றும் அபியும் ஓடும் டிராபிக் இல் கலந்தனர்.

பின்னி ரோடு மீண்டும் பரபரப்பானது.

(தொடர்ந்து எழுதுவோம் )

துயரக் கடிதம்

முந்தைய மடல்கள் இதோ  - மடல்-1 மடல்-2 மடல்-3

மடல் - 4

அயோயோ இது ததரிந பார்ட்டி போலருக்கே தப்பான இடத்துல சிக்கிகிட்டியே அபி எஸ்கேப் என்று வந்த வழி மெல்ல திரும்பி நடக்கலானான் அவன் பைக் நோக்கி. சிறிது தூரம் சென்றவுடன் ஒரு முறை அவள் இல்லத்தை திரும்பி பார்த்தான்.. சற்றே அதிர்ந்து போனான். இவன் பைக் ஏற்றிய பெண்ணும் இன்னொரு பெண்ணும் இவனை பார்த்து சிரித்துக் கொண்டிருந்தார்கள். லூசுங்க என்று மனதுள் ஒரு குரல் ஒலிக்க அவன் மொபைலும் "பாஸு பாஸு பாஸு" என்று அந்த தெரு முழுக்க கேட்குமாறு அலறியது..

அருகில் சைக்கிள் ஒட்டிகொண்டிருந்த சிறுவர்களில் ஒருவன் "பாஸு ஆமா லூசு" என்று சிரிக்க, கோபம் வந்தாலும் சிரித்துக் கொண்டு phone எடுக்க வசை மழை செந்தமிழாய் இல்லை இல்லை சென்னை தமிழாய் ஒலித்தது.. போனில் நண்பன் விக்கி. கேநா  புநா முதல் ஓநா கூநா வரை அனைத்தும் சரவெடியாய்.

"மச்சான் மச்சான் சாரி டா.. இங்க ஒரு figure  டா அவள பாத்துடே போய்டேன்டா இன்னும் 10  நிமிஷத்துல வந்துடறேன்" இது அபி.

"எங்ககீர"

"ஏரியா கரெக்டா தெரில பட் எதிராஜ் பக்கம் டா"

"10  நிமிஷத்துல ம** புடுங்குவ"

"இல்ல மச்சான் செம figure  டா அதான் டா ரூட் மாறிடுச்சி"

"டே பக்கி அது நிறைய அசோக் leyland  போற highway  யா இருக்க போகுது"

"வாய கழுவுடா ** ***"

"சரி சரி நா இங்க wait பணின்னு கீறேன் நீ வந்துரு" என்றான் தூய சென்னை தமிழில்.

"jiggry  dhoshtu  டா நீயி" என்று வண்டி எடுத்து ஸ்பென்சர் நோக்கி முறுக்கலானான்.. இன்னமும் அந்த இரு பெண்கள் இவனை நோக்கி சிரித்த வண்ணம் இருந்தனர். இவன் மனமும் கவனமும் pulsar மேலும் சாலை மீதும் இல்லாமல் வினுதாவை நோக்கி பறக்க ஆரம்பித்தது.

வானம் தன் வனப்பிற்கு வனப்பு சேர்க்க அந்தி வெயில் ஆடை அணிந்து இருக்க, அபியின் மனமோ அந்த பெண்ணை அந்தி வண்ண ஆடையில் உருவகப்படுத்தி பார்க்க

டோம் டும் டாமட டும் என்று metal தரையில் மோதும் சத்தமும் அபியின் அம்ம்ம்மாஆ என்ற சத்தமும் இணைந்து harmony  யாய் ஒலித்தது.

(தொடர்ந்து எழுதுவோம்..)