0% found this document useful (0 votes)
13 views

Unit 2 The Reference Model

The document describes the OSI model which defines 7 layers of network communication: physical, data link, network, transport, session, presentation and application. It provides details on the functions of each layer and how they work together to transmit data between computers.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Unit 2 The Reference Model

The document describes the OSI model which defines 7 layers of network communication: physical, data link, network, transport, session, presentation and application. It provides details on the functions of each layer and how they work together to transmit data between computers.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

UNIT 2 The Reference Model for Network Communication

What is OSI Model?

 The OSI model, created in 1984 by ISO, is a reference framework that explains the process of
transmitting data between computers.
 It is divided into seven layers that work together to carry out specialized network functions,
allowing for a more systematic approach to networking.

If we go from bottom to top the 7 layers of this model are as given below

1. Physical Layer
2. Data Link Layer
3. Network Layer
4. Transport Layer
5. Session Layer
6. Presentation Layer
7. Application Layer
1. Physical Layer

 The lowest layer of the OSI reference model is the physical layer.
 It is responsible for the actual physical connection between the devices.
 The physical layer contains information in the form of bits.
 It is responsible for transmitting individual bits from one node to the next.
 When receiving data, this layer will get the signal received and convert it into 0s and 1s
and send them to the Data Link layer

 Functions of the Physical Layer

 Bit synchronization: The physical layer provides the synchronization of the bits by
providing a clock. This clock controls both sender and receiver thus providing
synchronization at the bit level.
 Bit rate control: The Physical layer also defines the transmission rate i.e. the number of
bits sent per second.
 Physical topologies: Physical layer specifies how the different, devices/nodes are arranged
in a network i.e. bus, star, or mesh topology.
 Transmission mode: Physical layer also defines how the data flows between the two
connected devices. The various transmission modes possible are simplex, half-duplex and
full-duplex.

2. Data link layer


 The data link layer is responsible for the node-to-node delivery of the message.
 The main function of this layer is to make sure data transfer is error-free from one
node to another, over the physical layer.
 When a packet arrives in a network, it is the responsibility of the DLL to transmit
it to the Host using its MAC address.

The Data Link Layer is divided into two sub layers:


1. Logical Link Control (LLC)
2. Media Access Control (MAC)

The packet received from the Network layer is further divided into frames depending on the
frame size of the NIC(Network Interface Card). DLL also encapsulates Sender and Receiver’s
MAC address in the header.
The Receiver’s MAC address is obtained by placing an ARP(Address Resolution
Protocol) request onto the wire asking “Who has that IP address?” and the destination host will
reply with its MAC address.

Functions of the Data Link Layer

 Framing: Framing is a function of the data link layer. It provides a way for a sender to
transmit a set of bits that are meaningful to the receiver. This can be accomplished by
attaching special bit patterns to the beginning and end of the frame.
 Physical addressing: After creating frames, the Data link layer adds physical addresses
(MAC addresses) of the sender and/or receiver in the header of each frame.
 Error control: The data link layer provides the mechanism of error control in which it
detects and retransmits damaged or lost frames.
 Flow Control: The data rate must be constant on both sides else the data may get corrupted
thus, flow control coordinates the amount of data that can be sent before receiving an
acknowledgment.
 Access control: When a single communication channel is shared by multiple devices, the
MAC sub-layer of the data link layer helps to determine which device has control over the
channel at a given time.

3. Network Layer
 The network layer works for the transmission of data from one host to the other
located in different networks.
 It also takes care of packet routing i.e. selection of the shortest path to transmit the
packet, from the number of routes available.
 The sender & receiver’s IP addresses are placed in the header by the network layer.

Functions of the Network Layer

 Routing: The network layer protocols determine which route is suitable from source to
destination. This function of the network layer is known as routing.
 Logical Addressing: To identify each device on Internetwork uniquely, the network layer
defines an addressing scheme. The sender & receiver’s IP addresses are placed in the
header by the network layer. Such an address distinguishes each device uniquely and
universally.

4. Transport Layer
 The transport layer provides services to the application layer and takes services from
the network layer.
 The data in the transport layer is referred to as Segments.
 It is responsible for the End to End Delivery of the complete message.
 The transport layer also provides the acknowledgment of the successful data
transmission and re-transmits the data if an error is found.
At the sender’s side: The transport layer receives the formatted data from the upper layers,
performs Segmentation, and also implements Flow & Error control to ensure proper data
transmission. It also adds Source and Destination port numbers in its header and forwards the
segmented data to the Network Layer.

Functions of the Transport Layer

 Segmentation and Reassembly: This layer accepts the message from the (session) layer,
and breaks the message into smaller units. Each of the segments produced has a header
associated with it. The transport layer at the destination station reassembles the message.
 Service Point Addressing: To deliver the message to the correct process, the transport
layer header includes a type of address called service point address or port address. Thus by
specifying this address, the transport layer makes sure that the message is delivered to the
correct process.
Services Provided by Transport Layer
1. Connection-Oriented Service
2. Connectionless Service
1. Connection-Oriented Service: It is a three-phase process that includes
 Connection Establishment
 Data Transfer
 Termination/disconnection
In this type of transmission, the receiving device sends an acknowledgment, back to the source
after a packet or group of packets is received. This type of transmission is reliable and secure.
2. Connectionless service: It is a one-phase process and includes Data Transfer. In this type of
transmission, the receiver does not acknowledge receipt of a packet. This approach allows for
much faster communication between devices. Connection-oriented service is more reliable
than connectionless Service.

5. Session Layer
This layer is responsible for the establishment of connection, maintenance of sessions, and
authentication, and also ensures security.

Functions of the Session Layer

 Session establishment, maintenance, and termination: The layer allows the two
processes to establish, use and terminate a connection.
 Synchronization: This layer allows a process to add checkpoints that are considered
synchronization points in the data. These synchronization points help to identify the
error so that the data is re-synchronized properly, and ends of the messages are not cut
prematurely and data loss is avoided.
 Dialog Controller: The session layer allows two systems to start communication with
each other in half-duplex or full-duplex.

6. Presentation Layer
The presentation layer is also called the Translation layer. The data from the application layer
is extracted here and manipulated as per the required format to transmit over the network.

Functions of the Presentation Layer

 Translation: For example, ASCII to EBCDIC.


 Encryption/ Decryption: Data encryption translates the data into another form or code.
The encrypted data is known as the cipher text and the decrypted data is known as plain
text. A key value is used for encrypting as well as decrypting data.
 Compression: Reduces the number of bits that need to be transmitted on the network.

7. Application Layer
At the very top of the OSI Reference Model stack of layers, we find the Application layer
which is implemented by the network applications. These applications produce the data, which
has to be transferred over the network. This layer also serves as a window for the application
services to access the network and for displaying the received information to the user.
Example: Application – Browsers, Skype Messenger, etc.

 TCP/IP model
o he TCP/IP model was developed prior to the OSI model.
o The TCP/IP model is not exactly similar to the OSI model.
o The TCP/IP model consists of five layers: the application layer, transport layer,
network layer, data link layer and physical layer.
o The first four layers provide physical standards, network interface, internetworking, and
transport functions that correspond to the first four layers of the OSI model and these
four layers are represented in TCP/IP model by a single layer called the application
layer.
o TCP/IP is a hierarchical protocol made up of interactive modules, and each of them
provides specific functionality.

Here, hierarchical means that each upper-layer protocol is supported by two or more lower-
level protocols.
 Functions of TCP/IP layers:

 Network Access Layer


o A network layer is the lowest layer of the TCP/IP model.
o A network layer is the combination of the Physical layer and Data Link layer defined in
the OSI reference model.
o It defines how the data should be sent physically through the network.
o This layer is mainly responsible for the transmission of the data between two devices
on the same network.
o The functions carried out by this layer are encapsulating the IP datagram into frames
transmitted by the network and mapping of IP addresses into physical addresses.
o The protocols used by this layer are ethernet, token ring, FDDI, X.25, frame relay.

 Internet Layer
o An internet layer is the second layer of the TCP/IP model.
o An internet layer is also known as the network layer.
o The main responsibility of the internet layer is to send the packets from any network,
and they arrive at the destination irrespective of the route they take.

Following are the protocols used in this layer are:

o IP Protocol: IP protocol is used in this layer, and it is the most significant part
o of the entire TCP/IP suite.

Following are the responsibilities of this protocol:

o IP Addressing: This protocol implements logical host addresses known as IP addresses.


The IP addresses are used by the internet and higher layers to identify the device and to
provide internetwork routing.
o Host-to-host communication: It determines the path through which the data is to be
transmitted.
o Data Encapsulation and Formatting: An IP protocol accepts the data from the
transport layer protocol. An IP protocol ensures that the data is sent and received
securely, it encapsulates the data into message known as IP datagram.
o Fragmentation and Reassembly: The limit imposed on the size of the IP datagram by
data link layer protocol is known as Maximum Transmission unit (MTU). If the size of
IP datagram is greater than the MTU unit, then the IP protocol splits the datagram into
smaller units so that they can travel over the local network. Fragmentation can be done
by the sender or intermediate router. At the receiver side, all the fragments are
reassembled to form an original message.
o Routing: When IP datagram is sent over the same local network such as LAN, MAN,
WAN, it is known as direct delivery. When source and destination are on the distant
network, then the IP datagram is sent indirectly. This can be accomplished by routing
the IP datagram through various devices such as routers.

ARP Protocol

o ARP stands for Address Resolution Protocol.


o ARP is a network layer protocol which is used to find the physical address from the IP
address.
o The two terms are mainly associated with the ARP Protocol:
o ARP request: When a sender wants to know the physical address of the device,
it broadcasts the ARP request to the network.
o ARP reply: Every device attached to the network will accept the ARP request
and process the request, but only recipient recognize the IP address and sends
back its physical address in the form of ARP reply. The recipient adds the
physical address both to its cache memory and to the datagram header

ICMP Protocol

o ICMP stands for Internet Control Message Protocol.


o It is a mechanism used by the hosts or routers to send notifications regarding datagram
problems back to the sender.
o A datagram travels from router-to-router until it reaches its destination. If a router is
unable to route the data because of some unusual conditions such as disabled links, a
device is on fire or network congestion, then the ICMP protocol is used to inform the
sender that the datagram is undeliverable.
o An ICMP protocol mainly uses two terms:
o ICMP Test: ICMP Test is used to test whether the destination is reachable or
not.
o ICMP Reply: ICMP Reply is used to check whether the destination device is
responding or not.
o The core responsibility of the ICMP protocol is to report the problems, not correct
them. The responsibility of the correction lies with the sender.
o ICMP can send the messages only to the source, but not to the intermediate routers
because the IP datagram carries the addresses of the source and destination but not of
the router that it is passed to.

 Transport Layer
The transport layer is responsible for the reliability, flow control, and correction of data which
is being sent over the network.

The two protocols used in the transport layer are User Datagram protocol and Transmission
control protocol.
o User Datagram Protocol (UDP)

It provides connectionless service and end-to-end delivery of transmission.

It is an unreliable protocol as it discovers the errors but not specify the error.

User Datagram Protocol discovers the error, and ICMP protocol reports the error to the sender
that user datagram has been damaged.

UDP consists of the following fields:


Source port address: The source port address is the address of the application program that
has created the message.
Destination port address: The destination port address is the address of the application
program that receives the message.
Total length: It defines the total number of bytes of the user datagram in bytes.
Checksum: The checksum is a 16-bit field used in error detection.

UDP does not specify which packet is lost. UDP contains only checksum; it does not contain
any ID of a data segment.

Transmission Control Protocol (TCP)

It provides a full transport layer services to applications.

It creates a virtual circuit between the sender and receiver, and it is active for the duration of
the transmission.

TCP is a reliable protocol as it detects the error and retransmits the damaged frames.
Therefore, it ensures all the segments must be received and acknowledged before the
transmission is considered to be completed and a virtual circuit is discarded.
At the sending end, TCP divides the whole message into smaller units known as segment, and
each segment contains a sequence number which is required for reordering the frames to form
an original message.

At the receiving end, TCP collects all the segments and reorders them based on sequence
numbers.

 Application Layer
o An application layer is the topmost layer in the TCP/IP model.
o It is responsible for handling high-level protocols, issues of representation.
o This layer allows the user to interact with the application.
o When one application layer protocol wants to communicate with another application
layer, it forwards its data to the transport layer.
o There is an ambiguity occurs in the application layer. Every application cannot be
placed inside the application layer except those who interact with the communication
system. For example: text editor cannot be considered in application layer while web
browser using HTTP protocol to interact with the network where HTTP protocol is an
application layer protocol.

Following are the main protocols used in the application layer:

o HTTP: HTTP stands for Hypertext transfer protocol. This protocol allows us to access
the data over the world wide web. It transfers the data in the form of plain text, audio,
video. It is known as a Hypertext transfer protocol as it has the efficiency to use in a
hypertext environment where there are rapid jumps from one document to another.
o SNMP: SNMP stands for Simple Network Management Protocol. It is a framework
used for managing the devices on the internet by using the TCP/IP protocol suite.
o SMTP: SMTP stands for Simple mail transfer protocol. The TCP/IP protocol that
supports the e-mail is known as a Simple mail transfer protocol. This protocol is used to
send the data to another e-mail address.
o DNS: DNS stands for Domain Name System. An IP address is used to identify the
connection of a host to the internet uniquely. But, people prefer to use the names
instead of addresses. Therefore, the system that maps the name to the address is known
as Domain Name System.
o TELNET: It is an abbreviation for Terminal Network. It establishes the connection
between the local computer and remote computer in such a way that the local terminal
appears to be a terminal at the remote system.
o FTP: FTP stands for File Transfer Protocol. FTP is a standard internet protocol used for
transmitting the files from one computer to another computer.

 Differences between OSI Model and TCP/IP Model


Parameters OSI Model TCP/IP Model

Full Form OSI stands for Open Systems TCP/IP stands for Transmission
Interconnection. Control Protocol/Internet Protocol.

Layers It has 7 layers. It has 4 layers.

Usage It is low in usage. It is mostly used.

Approach It is vertically approached. It is horizontally approached.

Delivery Delivery of the package is guaranteed Delivery of the package is not


in OSI Model. guaranteed in TCP/IP Model.

Replacement Replacement of tools and changes can Replacing the tools is not easy as it is
easily be done in this model. in OSI Model.

Reliability It is less reliable than TCP/IP Model. It is more reliable than OSI Model.
Differences between TCP and UDP
The main differences between TCP (Transmission Control Protocol) and UDP (User Datagram
Protocol) are:

Transmission Control Protocol


Basis (TCP) User Datagram Protocol (UDP)

UDP is the Datagram-oriented


TCP is a connection-oriented
protocol. This is because
protocol. Connection
there is no overhead for
orientation means that the
opening a connection,
Type of Service communicating devices should
maintaining a connection, or
establish a connection before
terminating a connection. UDP
transmitting data and should close
is efficient for broadcast and
the connection after transmitting
multicast types of network
the data.
transmission.

TCP is reliable as it guarantees The delivery of data to the


Reliability the delivery of data to the destination cannot be
destination router. guaranteed in UDP.

TCP provides extensive error-


checking mechanisms. UDP has only the basic error-
Error checking
checking mechanism using
mechanism It is because it provides flow
control and acknowledgment of checksums.
data.

An acknowledgment segment is
Acknowledgment No acknowledgment segment.
present.

Sequencing of data is a feature of There is no sequencing of data


Transmission Control in UDP. If the order is required,
Sequence
it has to be managed by the
Protocol (TCP). this means that
application layer.
packets arrive in order at the
Transmission Control Protocol
Basis (TCP) User Datagram Protocol (UDP)

receiver.

TCP is comparatively slower than UDP is faster, simpler, and


Speed
UDP. more efficient than TCP.

There is no retransmission of
Retransmission of lost packets is
Retransmission lost packets in the User
possible in TCP, but not in UDP.
Datagram Protocol (UDP).

TCP has a (20-60) bytes variable UDP has an 8 bytes fixed-


Header Length
length header. length header.

Weight TCP is heavy-weight. UDP is lightweight.

Uses handshakes such as SYN, It’s a connectionless protocol


Handshaking Techniques
ACK, SYN-ACK i.e. No handshake

TCP doesn’t support


Broadcasting UDP supports Broadcasting.
Broadcasting.

TCP is used by HTTP, UDP is used by DNS, DHCP,


Protocols
HTTPs, FTP, SMTP and Telnet. TFTP, SNMP, RIP, and VoIP.

The TCP connection is a byte UDP connection is a message


Stream Type
stream. stream.
Transmission Control Protocol
Basis (TCP) User Datagram Protocol (UDP)

Overhead Low but higher than UDP. Very low.

This protocol is used in


This protocol is primarily utilized
situations where quick
in situations when a safe and
communication is necessary but
trustworthy communication
Applications where dependability is not a
procedure is necessary, such as in
concern, such as VoIP, game
email, on the web surfing, and
streaming, video, and music
in military services.
streaming, etc.

You might also like