You are on page 1of 11

Compiled by A.K.Asokan. asokanak@hotmail.com Page No.

1 of 11

This note will complement to topics in CRM 2006 Chapter 4 Page 300

OSI MODEL – OPEN SYSTEMS INTERCONNECTION REFERENCE MODEL

The International Organisation for Standardisation (ISO) created the OSI Reference
Model. Before creating the OSI reference model, Networking was possible only
between computers from the same manufacturers. Many components go hand in hand
in networking. Therefore inter-operatability becomes a question. OSI model was
designed to help various manufacturers to create inter-operable network devices so that
different vendor networks could communicate each other. OSI is a layered approach
and is a primary architectural model for networks. The following are the seven layers of
OSI model.

7. Application Layer

6. Presentation Layer

5. Session Layer

After reading this note, pl. Refer CRM 2006.


4. Transport Layer Chapter 4 Page 300.

3. Network Layer

2. Data link Layer

1. Physical Layer

Let us see in details as to what is the responsibility of each layer in communicating with
other systems.
Compiled by A.K.Asokan. asokanak@hotmail.com Page No. 2 of 11

Physical Layer

Physical layer (layer 1) says that somehow both the systems communicating should be
“connected”. Refer the diagram below.

The media can be anything. It can be a UTP cable (Unshielded Twisted Pair), STP cable
(Shielded Twisted Pair), Coaxial cable, Fiber optic cable or wireless. (For wireless
communication, we need to understand about base stations)

System ‘A’ communicates with System ‘B’. As the data travels towards ‘B’, the signal
will become weak due to opposing factors. The opposing factors are Distance,
Resistance, interference in the line and distortions. This weakening of signal is known
as “attenuation”.

In order to regenerate the signal strength, we connect a device called “repeater” (Refer
diagram below) in between the systems. (An amplifier also can amplify signals
however, it will amplify the noise also along with the signals and hence a repeater is
preferred. Now a days, the repeaters are obsolete and replaced by hubs) Repeater
regenerates the signal to its original strength.
Compiled by A.K.Asokan. asokanak@hotmail.com Page No. 3 of 11

Therefore in the physical layer of the OSI model, we use transmission cables,
terminators, connectors, converters, repeaters etc.

Hub: A hub is a multi-port repeater. It is a physical layer device. A hub when receives
data transmits to all the active ports it has connected. Refer diagram below.

If system “A” send a message to system “B”, the hub will send the data not only to
system “B” but also to ‘C’ and ‘D’. (All other systems connected to the hub). However,
only system “B” will accept the data and ‘C’ and ‘D’ will discard the data! How the
system “B” identifies that the data is meant for it? That describes the next Layer, the
Data Link Layer.

Data Link Layer

Data link Layer is also known as Layer 2. Switches work at the Data Link Layer (Layer
2 device) of the OSI model.
Compiled by A.K.Asokan. asokanak@hotmail.com Page No. 4 of 11

Point-to-Point Protocol (PPP)

In the above diagram, Mr.A.K. will reach Himalaya for sure. A point-to-point protocol
doesn’t need identification of the target system as it has only one target. (If you are
using a dial-up internet service, when you dial and connect your system, where it will
connect? It will connect only to your ISP (Internet Service Provider). There are no
possibilities that it can connect someone else).

Multi Access Network

Please refer the above diagram carefully. In the diagram, the Ethernet is carrying the
data. Where do you think the data will reach? There are seven systems viz. sys1 till sys7
connected in the same collision domain. Notice that the Ethernet has the possibility of
going to sys1, sys2, sys3, sys4, sys5, sys6 or even sys7. Yes?. Since there are
possibilities of accessing multiple systems, we need to uniquely identify the destination
in order to deliver the data to the intended system.

In Ethernet, every system is identified by a number. This number is known as MAC


address. MAC stands for Media Access Control. Any system when received a packet,
identifies whether the packet is meant for it or not by seeing the destination MAC
Compiled by A.K.Asokan. asokanak@hotmail.com Page No. 5 of 11

address on the packet’s data link cover (header). It is a 48bit address expressed in 12
Hexadecimal format. MAC address is the unique address of a NIC card (Network
Interface Card or Ethernet card). This 48-bit number is divided into two parts. First 24
bits are known as OUI. (Organisationally Unique Identifier) The next 24 bits are the
Device ID given by the NIC card manufacturer. The OUI is assigned by the IEEE and
hence the MAC address in every NIC card you and me are using, will be unique. The
MAC address also known as Hardware Address, Physical address, Layer 2 address,
burned in address (as it is burned into the NIC) etc.

What is the MAC address of your system you are now reading these notes? Want to see.
Go to Start-Run-command prompt and issue the following command.

C:\>ipconfig / all Press enter

See the Physical address expressed in Hexadecimal. Nice to see? Well.

Both system ‘A’ and ‘B’ are connected physically. So the road is ready now. But don’t
you need some vehicles to carry the data? These vehicles, which carry the data between
systems, are known as “Networking Technologies”. The following are some of the
Networking Technologies.

Ethernet
Token Ring These three work in the Local Area Network (LAN)
FDDI
PPP
These works in Wide Area Network (WAN)
HDLC
Frame Relay These are Non-Broadcast multi Access. (Think of a telephone
ATM exchange. Will it send a call to all the telephone lines connected to
the exchange ever? No. In other words, it will NOT broadcast. But
multiple access is possible.)

Ever heard of Collisions?

Refer the following diagram. It is a shared medium, means the medium and the
bandwidth are shared between all the communicating systems.
Compiled by A.K.Asokan. asokanak@hotmail.com Page No. 6 of 11

There are six systems in a single shared medium. Systems A, B, C, D, E and F. What
will happen if two or more systems start sending data at the same time? or all the six
systems start sending data at the same time? Yes. The data will collide each other. This
is known as “Collision”. What happens if a collision occurs? The technology to solve
this problem in the Data Link Layer is called CSMA/CD. (IEEE 802.3)

CSMA/CD stands for Carrier Sense Multiple Access with Collision Detection. The
systems in the network always ‘listen’ the media whether someone is sending data or
the media is ‘idle’ to enable it, to send some data to one of the other systems in the
shared media. However, it is possible that two systems could sense that the media is idle
and hence transmit the data in the media at the same time. What will happen? The data
will collide. The systems even after sending the data ‘listen’ to the media whether
collision occurs! Once a collision occured, the CSMA/CD sends a back off algorithm to
all the devices and the devices stop transmitting and wait for a random amount of time
and transmit again. If all the systems wait for one second and then transmits what will
happen. All systems will start sending the data after waiting for a period of one second
and again collision will happen. That’s why the waiting time is random.

Now, the road is ready and the vehicle is also ready to take the data. But to go to the
destination, is it not important to know which route I need to take? Imagine the world
was NOT divided into continents, countries, states, and cities! No country, no boarders.
Then to find a place called Canada or Delhi, you need to search the entire world. Isn’t
it? Today, it is easy for you to find the route to Canada or China or Delhi or Chennai
because it has been divided and not a ‘whole’. Similarly, Networks also are divided into
several logical areas and it is because of this division, the routing is possible.

Network Layer

The Network layer (Layer 3) will add the source and destination IP addresses to the
packet. Network Layer manages location of devices on the network, device addressing,
determine the best way to move the data. Routers (a Layer 3 device) provide the routing
services within an inter-network with the use of routing tables. A routing table is a table
maintained by the routers, which has details about the neighboring routers and the best
path to reach a destination.
Compiled by A.K.Asokan. asokanak@hotmail.com Page No. 7 of 11

Please note that understanding routing table requires knowledge of routing protocols
like RIP, OSPF, IGRP, EIGRP, IS-IS etc. Each routing protocol has its own routing
table as different routing protocol compute the distance by different ways. Some follow
metrics, some follow something called hop counts meaning to say the number of routers
a packet passes through en-route to a remote destination network. Some use bandwidth,
delay of line, etc. (we will discuss this at a later time).

I said the Ethernet technologies are vehicles carrying the data to its destination.
However, at any given point of time, is there not a limit for the vehicle to carry the
data? Suppose a vehicle can carry only 2000 kgs at a time. How can it transport 4000
kgs? (My kid Anju sitting beside me tells that the vehicle has to transport the 4000 kgs
in two trips!). Of course. It has to. In that case, somebody has to break the data
into smaller packets and prepare it for transportation. That somebody is TCP/IP in the
next Layer, the Transport Layer.

Transport Layer

The Transport layer breaks the data into small small pieces called segments and
reassembles data into a data stream at the destination system. There are two important
protocols we need to understand here, the TCP and the UDP. TCP stands for
Transmission Control Protocol and the UDP is User Datagram protocol.

TCP is a connection oriented protocol. It means that it establishes a virtual end-to-end


connectivity before sending the actual data. (Imagine you are calling your friend using a
mobile phone. First you will dial and establish connectivity with his/her mobile and
only after he/she picks up, you send the data ‘hello’). UDP is connectionless protocol,
means when it gets the data, it starts running to the destination. (If you want to post a
letter to your friend, it is not necessary that you contact your friend first. You simply
mail it.). Who decides whether the data has to be given to TCP or UDP?. The
Application decides the same. If the Application requires ‘Reliability”, then it gives the
data to TCP and if ‘speed’ or faster service is the criteria, then it hand over the data to
UDP for transportation.

As the data travels from the Application layer to Physical layer en-route to its
destination, at different stages it is known in different names. At the Transport layer if
TCP carries the data (because the application programme needs reliability and decides
to give it to TCP) it is known as Segments, if it carries by UDP protocol, it is known as
Datagrams. At the Network layer, it is known as Packets. At the Data link layer it is
known as Frames. At the physical layer, it is known as bits. It can be compared to
calling a child at different stages like child– boy – man – old man etc. You refer to the
same thing.
Compiled by A.K.Asokan. asokanak@hotmail.com Page No. 8 of 11

When we say ‘reliable networking’ it means that TCP use acknowledgements,


sequencing and flow control. Let us see these in detail.

When establishing the connectivity with a destination host (system), TCP exchange 3
packets. This is known as Call setup or a Three-way handshake.

System ‘A’ communicating with system ‘B’. First the System ‘A’ will send a Syn
packet. (Synchronisation packet) to ‘B’. Refer the following diagram.

‘A’ says to ‘B’ that my sequence number is 500 and you keep track of it. Since this is
the first packet being sent by “A” there is nothing to acknowledge and the
acknowledgement field (ack field) is not significant.
Compiled by A.K.Asokan. asokanak@hotmail.com Page No. 9 of 11

‘B’ replies to ‘A’. Refer the following diagram.

‘B’ says that my sequence number is 800 and you keep track of it. Also I acknowledge
your first packet (500) and you send 501.

‘A’ acknowledges the ‘B’s syn/ack packet. Refer the following diagram.

In the above diagram, ‘A’ acknowledges the starting sequence number of ‘B’ i.e. 800
and keeps track of it. And since it employs forward number acknowledgement, its
acknowledgement field has a value 801. Since ‘B’ requested 501 segment, it sends 501.
Did you notice that Diagram 1 and Diagram 2 are “Syn” packets and in Diagram 3 it is
“Ack” packet.

Please note that acknowledgements will never say that it has received the specific
packets. It requests for packet, which has the sequence number 501 means, it has
received upto 500. Supposing ‘A’ send four packets 500, 501, 502 and 503 then if all
the packets are received at ‘B’, its acknowledgement field will have a value 504 telling
“A” that upto 503 I have received, you send 504. Refer the following diagram.
Compiled by A.K.Asokan. asokanak@hotmail.com Page No. 10 of 11

This is known as forward number acknowledgement. If suppose ‘B’ has received only
500 and 501 and other 2 packets were lost in transit, then ‘B’s acknowledgement
number will be 502. By seeing this, 'A' re-transmits segments sequence numbered from
502 onwards to ‘B’. Refer the following diagram.

How many segments can it send?. 501, 502, 503 and 504, four segments?. It can be
more or less depends upon the capacity of ‘B’ receiving the segments. The quantity of
data segments that the transmitting host is allowed to send without receiving an
acknowledgement for them is known as “Window Size” i.e. the above transmission has
a window size of four.

Another important thing to understand in reliable transport is “Flow Control”. Flow


control prevents a sending host on one side of the connection from overflowing the
Compiled by A.K.Asokan. asokanak@hotmail.com Page No. 11 of 11

buffers in the receiving host. If it doesn’t control, it will overflow and result in loss of
data.

We have discussed Sequence numbers, Window size, forward number


acknowledgement, and sequence number synchronization. The Transport Layer ensures
that the following is achieved while communicating using reliable transport protocol i.e.
the TCP.

1. The segments delivered are acknowledged back to the sender upon their
reception
2. Any segment not acknowledged are retransmitted
3. Segments are sequenced back into their proper order upon arrival at their
destination
4. A manageable data flow is maintained in order to avoid congestion, overloading
and data loss.

Session Layer

The sessions layer is responsible for setting up, managing, and then disconnecting the
sessions. This layer also provides dialogue control between systems. It keeps one
application’s data separate from other application’s data.

Presentation Layer

The presentation layer presents data to the Application layer and is responsible for data
translation and code formatting. The encryption, decryption, data compression,
decompression are associated with this layer.

Application Layer

The Application layer comes into play when it is apparent that access to the network is
going to be needed soon. We should not confuse the Application programmes in our
computer like MS word, Excel etc. with Application Layer. These two are different.
The application in the Application layer we mean FTP, TFTP, HTTP, SMTP, DNS,
TELNET, and SNMP etc. These are the Network Server Applications.

FTP File Transfer Protocol


TFTP Trivial File Transfer Protocol
HTTP Hyper text Transfer Protocol
SMTP Simple Mail Transfer Protocol
DNS Domain Name system
TELNET Terminal emulation (for remote access)
SNMP Simple Network Management Protocol

You might also like