menu_web

my_menu_bird

OSI Model

Layered architecture

Basic aim of telecommunication is to transfer "information" from "one point" to "another point". These points may not be "connected" directly; rather there would be number of points or connections in between. The problem which is not apparent here is: though the points which are to be connected may speak same "protocol", in between points may speak different protocol.

Let us take an example.

Say point A need to be connected to point D, with points B and C connecting them as below:

A ------------ B ------------ C ------------ D

Say A speak protocol English, B speak English and French, C speak French and German, and D speak German. Now A wants to send parcel [secret code] to D. So here is what A would do, it would request B [to send parcel [secret code] to D] in English. B do not know where D is, but it "knows" that whatever comes for D need to given to C. It does that, but in French. C knows where D is, so it transfers package [secret code] to D thru their common protocol, German !

Let us draw layers for this example.






In above example, though points B and C did not understand what is inside information parcel [secret code], information was transferred !

Let us explore another similar example.

Let us say A and D are branches of a firm XYZ, A located in UK and D located in Germany. Manager M1 from branch A would like to ship an internal document to manager D1 in branch D.

So M1 gives the document to secretary S1, saying it need to go to D1. Secretary S1 puts the document in an envelope, addresses it to { D1, branch D }. S1 then hands over document to company courier department C1. Courier department puts the branch address of D and hands over the parcel to courier company U located in UK. U understanding that the document is for Germany, sends it to (partner) courier company G, located in Germany. Courier company G, sends the parcel to branch D located in Germany of firm XYZ. 

Secretary S2 of manager M2 collects parcel from company courier department C2 and hands over parcel to M2.

Here would be what layered diagram would look like:




Varius protocols, layered architectures, and their interactions are basic to today's telecommunication networks. With above two examples in mind, let us look at OSI model.

7 layers of OSI 

o OSI stand for "Open Systems Interconnection".
o Join effort of ISO and ITU-T
o Available on ITU site as X.200 document



Way to remember: Please DNot Trust Sales People's Advice


Physical layer
Here we get down to physical characteristics of medium. Modulation and Access techniques (like TDMA, FDMA, OFDM(A), CDMA) are of concern here. Aim is to use physical medium efficiently taking into account its specific characteristics. Examples are POTS, MTP-1(SS7), SONET, X.25, GSM L1, UMTS L1, 802.11 PHY, 802.16 PHY.

Data link layer
Aim of data link layer is to provide "reliable" ways to "establish", "maintain", and "release" links between network entities. Examples are MTP-2 (SS7), ATM, X.25-LAPB, LAPDm(GSM), LLC/RLC/MAC (GPRS), 802.11 MAC(WiFi), MAC(802.16/WiMAX).

Network layer
Though Date link layer takes care of links, entity decision with which the link is to be made is decided by network layer. This layer takes care of "addressing" to make sure that "end-to-end" connection is established between concerned entities. Examples are MTP (SS7), SCCP (SS7), IP (IP suite).

Transport layer
Sitting on network layer, transport layer provide "transports" between network entities. These transports could be connection oriented or connectionless. Reliable and efficient transmission is also of concern here. Famous example is TCP/UDP (IP suite).

Session layer
The transport provided by transport layer may have multiple sessions. For examples, two project engineers working one project may talk about different areas in the project. So though it is about one project, there could be different areas to work on. Session layers take care of multiple sessions created by presentation layer. In many cases, session layer is closely bound to transport layer. Good examples are SIP(VoIP), RTP(VoIP). NAS (Non-Access stratum) of GSM may be considered as combination of Session/Transport/Network layer.

Presentation layer
Till now the actual information that all the above entities worked on did not have particular meaning. Presentation layer brings the meaning to this information. This is mainly concerned with format of the bits received. MIME, ASCII are popular examples.

Application layer
Application layer is where we are only a step away from user. Application layer provide a way for actual UI (User Interface) to use a stacked layers below for the purpose. MAP/TCAP/ISUP (SS7), HTTP (IP suite), AT interface (GSM/GPRS/3G) are examples of application layer.
Let us take a simple analogy to remember major functions of these layers.
Say you are buyer B in a fish market, full of other buyers and sellers (buyers more than sellers). You would like to know the price of Salmon from S, but not able to reach S. Luckily you spot your friend F who can help you with.
You call your friend, say hi/hello, and then request him to ask S the price of Salmon.
F start talking to S and tells him that B would like to know the price of Salmon.
S tell F the price of Salmon, which F tell back to B.
Let us see if you can separate out various parts of this communication in OSI layers.
B "talk" to F in their "common language". Sound waves (modulated as per the language) become a Physical layer interface with "Air" being transmission media.
When F listen to B (and vice versa), they try "to hear" each other peoperly among lot of people's voices; they may even have to repeat or confirm to make sure they heard it correctly. This process is Data link layer function.
B and F directly talk to each other, but when B tell F to "ask S" "the price of Salmon", this is an example of Network layer function. S is destination (entity address) and F only passes B's message to S.
During this conversation, note that F only passes the B's message to S and S's message back to B without modifying it. There is (virtual) transport created between B and S, with the help of F. This is Transport layer function.
Now B and S can talk about "lot of things" (like world economy, global warming in addition to price of Salmon) with the help of F. These different things/topics become "Sessions" over the same transport.
Language that B, S, and F speak is nothing but the presentation of modulated sound they hear. Presentation layer does this function of presenting the information in agreed format to application.
Next step is to give meaning to words that was provided. After hearing "What is the price of Salmon ?", S understands that price of Salmon is needed. This is Appication layer working. S's logical mind does the later work of checking the price. This is nothing but the user of application layer.

Though we tried our best to separate out various OSI layers in above analogy, we may not be able to see distinct and all OSI layers in all protocols. This is because protocols are specific to type of traffic (like IP suite for Internet traffic), physical media (like GSM/GPRS/3G/WiMAX protocols for wireless traffic), area of application of protocol (like VoIP protocols) etc. Depending on these factors, specifications/standards may have to combine, separate out, or eliminate the layers and/or their functions.

In effect, layered architecture/OSI model logically separate the functions required (for telecommunications) in layers, with each layer handling its own set of functions.

Physical layer (also called L1) consist of mostly hardware and firmware interfaces. Layers above are mainly softwares.

Let us see rules of game !

Every layer provide services to layer above, which in turn mean, each layer use services of layer below.

Like Network layer say to Transport layer, "Hey, I will take care of finding the peer entity which you wanna connect to in network". Transport layer uses this service to do its own function of creating transport.

In software terminology, each layer provide a interface to a layer above. This interface could be message based (asynchronous) or function/API based (synchronous). Typically this interface is message based. Technical name for these inter-layer messages is "primitives". These primitives are actually queued up to layer and layer processes it one by one. This queue is known as SAP (Service Access Point). There could be multiple number of SAPs between two layers.

As shown in OSI model diagram below, each layer is likely to have a "peer layer" to which it "talks".



Let us see how it works.

Each layer while using services of lower layer hands over its own information - that is meant to be delivered to its peer layer - while requesting service from lower layer. Lower layer in turn appends its own information to this parcel (typically without modifying it but not necessarily) and passes it to its lower layer while requesting service from it. Refer a diagram below.



At peer entity (and in-between entities) this happen in reverse way and bottom to top.

Now what does standards/specifications do ? Standards specify or recommend functions of each layer, interface details, various scenarios (may be in terms of states- events or procedures), messages (that goes in & out of entity), message formats, message parameters, values etc.

Examples would be 3GPP GSM specifications 24.007, 24.008 (which talk about Layer 3 and above of GSM) available at www.3gpp.org or SS7 standard Q.931.

Many times inter layer messages (even though specified by standard) are proprietary in nature as two layers next to each other are present on one entity, but the messages between two peer layers need to follow specifications properly so that a entity implemented by one vendor can inter-work with peer entity implemented by another vendor. This is where conformance tests come into picture. Typically specifications mention these tests like 3GPP specs for GSM or it may be done by industry wide body like WiMAX forum (with collaboration with ETSI) for 802.16 standard.

Last point which need mentioning about layers is: today's protocols/standards are based on their area of application and need not follow OSI model layers religiously. So may be functionalities of few layers are put together in one layer and/or layer may be split etc. But yes, OSI model forms an excellent reference for protocol design, implementation, and study. 

When two entities talk to each other, if you see closely, their communication sequence can be logically separated in two parts.

Better explained with an analogy.

Let us say a manager would like to meet a subordinate, probably they would first decide a meeting room or place to meet. And after this initial negotiation or communication, they would eventually meet and proceed with actual discussion.

In telecommunication, when two entities would like to talk to each other, they first do initial communication to decide about transmission channel. And then actually this transmission channel used for user data transfer. (Channel is nothing but a communication link)

When you use your cell to make a call, your cell first does the signaling to setup a communication channel, then uses this communication channel to transfer your voice conversation !

The initial communication is known as signaling and transfer of user data is transmission. In technical terms, we call signaling plane and transmission plane. Note that even though user data is being transmitted over transmission plane, signaling plane can remain (which may be in idle state).

Refer a diagram below.



So when you are on a call and say another person makes a call to your cell, the waiting call (assuming call waiting is activated by your network operator) is informed to your cell over signaling plane or channel.

Note that signaling plane and transmission plane is a logical division and standard/specification specify exact implementation of it (transmission and signaling may be part of same communication channel or may be actually different channel).

Another point which - though apparent - needs mention is during setup of communication channels or links, lower layers act first. For example, before Data link layer could establish reliable data link, Physical layer need to do setup specific to transmission media.

Let us see in brief what telecommunication network look like in general.
Refer a diagram below.
User device is connected to network via a network entity, we can call it 1st level Network Access device. This device in turn can connect to 2nd level Network Access device. 2nd level network access device will handle mainly Network layer functions. If user device requested (or required) connection to another user device present in another network, 2nd level network access device will need to take help of Gateway Access device. Gateway access device will typically be knowlegeable in both network protocol and gateway or common protocol with another network. Network may also contain other devices for authentication, location mapping (required if user is mobile) etc. All devices will have layers for signaling/transmission planes as specified in corresponding standards.
Let us take an example of GSM mobile.
User device is of course Mobile (or Cell), supporting GSM and GPRS. Access would be over air (Wireless access) through "Access protocol/interface", called as "Um/Air interface".
1st level Network Access device is known here as BSS (Base Station Subsystem). BSS takes care of access over air. When user dial a number for making a voice call, BSS will provide all required access functions (Physical layer, Data Link layer functions). It transparently passes rest of the higher layer information to 2nd level Network Access device over "Network protocol/interface", called as "A interface".
2nd level Network Access device is known as MSC (Mobile Switching Centre). MSC takes care of higher layer functions (Network layer, Transport/Session/Presentation layer functions). For these functions in GSM, MSC may need to take of additional Network devices (like VLR (for location information), AuC (for authentication), EIR (for equipment validation) etc.), but not included here for simplicity. If user is trying to make a call to user in another network (let us say landline number of public telephone network), MSC need to take help of GMSC (Gateway MSC) connected to public telephone network. GMSC talks to MSC over "E interface".
This complete the brief on OSI model.