Nothing Special   »   [go: up one dir, main page]

OSI Model: Functions of Physical Layer

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

PAPER-B (SECTION-A) UNIT#5 OSI MODEL

OSI Model
The OSI (Open Systems Interconnection) model was created by the ISO to help standardize
communication between computer systems. It was first introduced in 1970. The OSI model is
layered based network model that allows communication between all type of computer system. It
is called Open System because it allows any two different systems to communicate with each
other without making any change to their hardware. The OSI is a model not a protocol because it
is never practically implemented. It is just a model for understanding the communication process.
The OSI Model breaks down this data transfer/communication procedure into different
components (called layers). Why layers, because those components follow a proper order of
execution.

OSI model has following layers:

Physical Layer
Physical layer is the lowest layer of the OSI reference model. It is responsible for sending bits from one
hop (device) to another. This layer defines the hardware, cabling, power output etc.
FUNCTIONS OF PHYSICAL LAYER:

1. Representation of Bits: Data in this layer consists of stream of bits. The bits must be encoded
into signals for transmission. It defines the type of encoding i.e. how 0's and 1's are changed to
signal.
2. Data Rate: This layer defines the rate of transmission which is the number of bits per second.
3. Synchronization: It deals with the synchronization of the transmitter and receiver. The sender and
receiver are synchronized at bit level. There will be a precise coordination between sender and
receiver.
4. Physical characteristic of interface and medium: The physical layer defines the transmission
interface between devices and transmission medium.

Notes of C.sc. | B.SC -II by Muhammad Fayaz 26


PAPER-B (SECTION-A) UNIT#5 OSI MODEL

5. Line Configuration: This layer connects devices with the medium: connection may be Point to
Point configuration and Multipoint.
6. Topologies: this layer defines how devices are connected. i.e. star, bus, mesh, ring topologies etc.
7. Transmission Modes: Physical Layer defines the direction of transmission between two devices:
Simplex, Half Duplex, Full Duplex.

Data Link Layer


Data link layer is responsible for most reliable node to node delivery of data. It forms frames from the
bits that are received from physical layer and transmit these frames from one hop to next.
FUNCTIONS OF DATA LINK LAYER:

1. Framing: Frames are the streams of bits received from the network layer into manageable data
units. This division of stream of bits is done by Data Link Layer.
2. Physical Addressing: The Data Link layer adds a header to the frame in order to define physical
address of the sender or receiver of the frame, if the frames are to be send to different systems on
the network.
3. Flow Control: A flow control mechanism provide by data link layer is used to control the speed of
transferring frames form sender to receiver. This prevents traffic jam at the receiver side.
4. Error Control: Error control is achieved by adding a trailer at the end of the frame. Duplication of
frames are also prevented by using this mechanism. Data Link Layers adds mechanism to prevent
duplication of frames.
5. Access Control: Protocols of this layer determine which of the devices has control over the link at
any given time, when two or more devices are connected to the same link.

Network La
The main function of this layer is to deliver packets from source to destination across multiple links
(networks). This layer is responsible for delivery of individual packets across network device (from
source to destination). If two computers (system) are connected on the same link, then there is no
need for a network layer.
FUNCTIONS OF NETWORK LAYER:

1. Logical addressing: this layer adds a logical address (address of device across network) to the
packets.

Notes of C.sc. | B.SC -II by Muhammad Fayaz 27


PAPER-B (SECTION-A) UNIT#5 OSI MODEL

2. Routing: Routers operate in the network layer. The network layer is thus responsible for choosing
the best paths for the flow of packets.
3. Connection services: Network layer also perform some more function such as network layer flow
control, network layer error control and packet sequence control.

Transport Layer
The transport layer is responsible for process to process delivery of entire message. There are many
processes in a computer, so only source to destination delivery is not enough, the message must be
delivered to correct process. This task is handled by transport layer.
FUNCTIONS OF TRANSPORT LAYER:

1. Service Point Addressing: Transport Layer header includes service point address which is port
address. This layer gets the message to the correct process on the computer
2. Segmentation and Reassembling: A message is divided into segments; each segment contains
sequence number, which enables this layer in reassembling the message. Message is
reassembled correctly upon arrival at the destination.
3. Connection Control: this layer controls the connection between communicating devices. The
connection can be connectionless or connection oriented.
4. Flow Control: In this layer, flow control is performed end to end.
5. Error Control: Error Control is performed end to end in this layer to ensure that the complete
message arrives at the receiving transport layer without any error. Error Correction is done through
retransmission.

Session Layer
The Session Layer allows users on different devices to establish sessions between them.
Its main aim is to establish, maintain and synchronize the connection between communicating
systems. In Session layer, streams of data are marked and are resynchronized properly, so that the
ends of the messages are not cut until fully delivered and data loss is avoided.
FUNCTIONS OF SESSION LAYER:

1. Dialog Control: This layer allows two systems to start communication with each other in half-
duplex or full-duplex.

Notes of C.sc. | B.SC -II by Muhammad Fayaz 28


PAPER-B (SECTION-A) UNIT#5 OSI MODEL

2. Synchronization: This layer allows a process to add checkpoints which are considered as
synchronization points into stream of data.

Example: If a system is sending a file of 800 pages, adding checkpoints after every 50 pages is
recommended. This ensures that 50page unit is successfully received and acknowledged. This is
beneficial at the time of crash as if a crash happens at page number 110; there is no need to
retransmit 1 to100 pages.

Presentation Layer
Presentation layer is responsible for translation, compression and encryption. Presentation layer takes
care that the data is sent in such a way that the receiver will understand the information(data) and will
be able to use the data. Languages(syntax) can be different of the two communicating systems. Under
this condition presentation layer plays a role translator.
FUNCTIONS OF PRESENTATION LAYER:

1. Translation: Before being transmitted, information in the form of characters and numbers should
be changed to bit streams. The presentation layer is responsible for translating the codes between
devices as different computers use different encoding methods. It translates data between the
formats the network requires and the format the computer.
2. Encryption: It carries out encryption at the transmitter and decryption at the receiver. Encryption is
the process of converting data to an unrecognizable or "encrypted" form.
3. Compression: It carries out data compression to reduce the bandwidth of the data to be
transmitted. The primary role of Data compression is to reduce the number of bits to be
transmitted. It is important in transmitting multimedia such as audio, video, text etc.

Application Layer

It is the top most layer of OSI Model. The application layer is responsible for providing services to user.
Manipulation of data(information) in various ways is done in this layer which enables user or software
to get access to the network. Some services provided by this layer includes: E-Mail, transferring files,
distributing the results to user, directory services, network resources, etc.

Notes of C.sc. | B.SC -II by Muhammad Fayaz 29


PAPER-B (SECTION-A) UNIT#5 OSI MODEL

FUNCTIONS OF APPLICATION LAYER:

1. Mail Services: This layer provides the basis for E-mail forwarding and storage.
2. Network Virtual Terminal: It allows a user to log on to a remote host. The application creates
software emulation of a terminal at the remote host. User's computer talks to the software terminal
which in turn talks to the host and vice versa. Then the remote host believes it is communicating
with one of its own terminals and allows user to log on.
3. Directory Services: This layer provides access for global information about various services.
4. File Transfer, Access and Management: It is a standard mechanism to access files and
manages it. Users can access files in a remote computer and manage it. They can also retrieve
files from a remote computer.

Summary of OSI Model

Notes of C.sc. | B.SC -II by Muhammad Fayaz 30


PAPER-B (SECTION-A) UNIT#5 OSI MODEL

TCP/IP (Transmission Control Protocol/Internet Protocol)


TCP/IP, Short for transmission control protocol/Internet protocol, TCP/IP is a protocol suit, governing
communications among all computers on the Internet. Protocol suit is a collection of protocols that are
designed to work together. More specifically, TCP/IP dictates how information should be packaged (turned
into bundles of information called packets), sent, and received, as well as how to get to its destination. It is
the network model used in the current Internet architecture as well.
Layers of TCP/IP
There are four total layers of TCP/IP protocol, listed below with a brief description.
1. Network Access Layer: This layer is equivalent to the physical and datalink layer of OSI model.
This layer looks out for hardware addressing and physical transmission of data and concerned with
building packets. Protocols used in this layer are defined by underlaying architecture.
2. Internet Layer: This layer parallels the functions of OSI’s network layer. This layer uses IP
(Internet Protocol) to describe how packets are to be delivered across the network. Protocol used in
this layer are IP (Inter Protocol), ARP (Address Resolution Protocol), RARP (Reverse ARP), ICMP
(Internet Control Message Protocol) etc.
3. Host to Host/ Transport Layer: This layer has the equivalent functions that of OSI’s transport
layer. This layer is responsible for the proper transmission of entire data (message) from source to
destination. Protocols used in this layer are TCP (Transmission Control Protocol) and UDP (User
Datagram Protocol).
4. Process / Application Layer: This layer performs the functions of top three layers of OSI model
(Application, Presentation, Session). This layer deals with application network processes. Protocols
used in this layer are FTP (File Transfer Protocol), HTTP (Hypertext Transfer Protocol), and SMTP
(Simple Mail Transfer Protocol), Telnet., and DNS (Domain Name System) etc.

Notes of C.sc. | B.SC -II by Muhammad Fayaz 31


PAPER-B (SECTION-A) UNIT#5 OSI MODEL

Protocol
A protocol is a set of rules that govern data communications. A protocol defines what is communicated, how
it is communicated, and when it is communicated. The key elements of a protocol are syntax, semantics,
and timing.
o Syntax. The term syntax refers to the structure or format of the data, meaning the order in which they are
presented. For example, a simple protocol might expect the first 8 bits of data to be the address of the
sender, the second 8 bits to be the address of the receiver, and the rest of the stream to be the message itself.
o Semantics. The word semantics refers to the meaning of each section of bits. How is a particular pattern
to be interpreted, and what action is to be taken based on that interpretation? For example, does an address
identify the route to be taken or the final destination of the message?
o Timing. The term timing refers to two characteristics: when data should be sent and how fast they can be
sent. For example, if a sender produces data at 100 Mbps but the receiver can process data at only 1 Mbps,
the transmission will overload the receiver and some data will be lost.

Some important Protocol used in Layers of TCP/IP


1. Application Layer
Important Protocols used in this layer are:
i. HTTP (Hyper Text Transfer Protocol)
The Hypertext Transfer Protocol (HTTP) is the most commonly used TCP/IP application as it
transfers web pages from a web server to a web browser. Web pages are written using
HTML, which stands for Hypertext Markup Language. In other words, the HTTP is used to
transfer HTML files.

ii. FTP (File Transfer Protocol)


FTP provides for the uploading and downloading of files from a remote host running FTP
server software. As well as uploading and downloading files

Notes of C.sc. | B.SC -II by Muhammad Fayaz 32


PAPER-B (SECTION-A) UNIT#5 OSI MODEL

iii. SMTP (Simple Mail Transfer Protocol)


Short for Simple Mail Transfer Protocol, a protocol for sending e-mail messages
between servers. Most e-mail systems that send mail over the Internet use SMTP to send
messages from one server to another; SMTP is a protocol that defines how mail messages are
sent between hosts.

iv. DNS (Domain Name System)


A Domain Name System (DNS) enables us to browse to a website by providing the website
or domain name instead of the website’s IP address.
It maps domain names to IP addresses. A network host needs the IP address (not the domain
or host name) of the web server to generate a Packet.

v. Telnet.
Telnet is a user command and an underlying TCP/IP protocol for accessing remote
computers. Through Telnet, an administrator or another user can access someone else's
computer remotely. On the Web, HTTP and FTP protocols allow you to request specific files
from remote computers, but not to actually be logged on as a user of that computer. With
Telnet, you log on as a regular user with whatever privileges you may have been granted to
the specific application and data on that computer.

Notes of C.sc. | B.SC -II by Muhammad Fayaz 33


PAPER-B (SECTION-A) UNIT#5 OSI MODEL

2. Host to Host/Transport Layer


Important Protocols used in this layer are:
i. TCP (Transmission Control Protocol)
Transmission Control Protocol (TCP) – a connection-oriented
communications protocol that facilitates the exchange of messages between computing
devices in a network. TCP takes messages from an application/server and divides them
into packets, which can then be forwarded by the devices in the network. TCP numbers each
packet and reassembles them prior to handing them off to the application/server recipient.
Because it is connection-oriented, it ensures a connection is established and maintained until
the exchange between the application/servers sending and receiving the message is complete.

ii. UDP (User Datagram Protocol)


User Datagram Protocol (UDP) is a Transport Layer protocol. UDP is a part of Internet
Protocol suite, referred as UDP/IP suite. Unlike TCP, it is unreliable and connectionless
protocol. So, there is no need to establish connection prior to data transfer. When an app uses
UDP, packets are just sent to the recipient. The sender doesn’t wait to make sure the recipient
received the packet—it just continues sending the next packets. If the recipient misses a few
UDP packets here and there, they are just lost—the sender won’t resend them. Losing all this
overhead means the devices can communicate more quickly.

Comparison of TCP and UDP:


Following table shows the main differences between TCP and UDP:

Notes of C.sc. | B.SC -II by Muhammad Fayaz 34


PAPER-B (SECTION-A) UNIT#5 OSI MODEL

3. Internet Layer
Important Protocols used in this layer are:
i. IP (Internet Protocol)
Internet Protocol (IP) is the principal set (or communications protocol) of digital message
formats and rules for exchanging messages between computers across a single network or a
series of interconnected networks, using the Internet Protocol Suite (often referred to as
TCP/IP). Messages are exchanged as datagrams, also known as data packets or just packets.
The main purpose and task of IP is the delivery of datagrams from the source host (source
computer) to the destination host (receiving computer) based on their addresses. IP is actually
a connectionless protocol, meaning that the circuit to the receiver (destination host) does not
need be set up before transmission (by the source host). Internet Protocol version 4 (IPv4)
was the first major version of IP. This is the dominant protocol of the Internet. However, iPv6
is active and in use, and its deployment is increasing all over the world.
ii. ARP (Address Resolution Protocol)
The Address Resolution Protocol (ARP) is used to associate a logical address with a physical
address. On a typical physical network, such as a LAN, each device on a link is identified by
a physical or station address, usually imprinted on the network interface card (NIC). ARP is
used to find the physical address of the node when its Internet address is known.

Notes of C.sc. | B.SC -II by Muhammad Fayaz 35


PAPER-B (SECTION-A) UNIT#5 OSI MODEL

iii. RARP (Reverse Address Resolution Protocol)


The Reverse Address Resolution Protocol (RARP) allows a host to discover its Internet
address when it knows only its physical address. It is used when a computer is connected
to a network for the first time.
iv. ICMP (Internet Control Message Protocol)
The Internet Control Message Protocol is an internet layer protocol used by network devices
to diagnose network communication issues. ICMP is mainly used to determine whether or not
data is reaching its intended destination in a timely manner. Commonly, the ICMP protocol is
used on network devices, such as routers. The primary purpose of ICMP is for error
reporting. When two devices connect over the Internet, the ICMP generates errors to share
with the sending device in the event that any of the data did not get to its intended
destination. for example, that a requested service is not available or that a host or router could
not be reached.

Classes of IP address

IP addresses are broken into different classes.

Class A: IP addresses are used for huge networks, like those deployed by Internet Service Providers (ISPs).
The first bye of class A, IP address start with “0” (in binary notation) while in decimal form the first byte
consists of numbers ranges from 0-127.
Class B: IP addresses are used for medium and large-sized networks in enterprises and organizations. The
first bye of class B, IP address start with “10” (in binary notation) while in decimal form the first byte
consists of numbers ranges from 128-191.
Class C: addresses are most common and used in small business and home networks. The first bye of class
C, IP address start with “110” (in binary notation) while in decimal form the first byte consists of numbers
ranges from 192-223.

Class D: The addresses of this class are least used. Class D is reserved for a not widely used, and reserved
for special cases largely for services and applications to stream audio and video to many subscribers at once.
The first bye of class D, IP address start with “1110” (in binary notation) while in decimal form the first byte
consists of numbers ranges from 224-239.

Class E: Class E addresses are reserved for research purposes by those responsible for Internet networking
and IP address research, management, and development. The first bye of class E, IP address start with
“1111” (in binary notation) while in decimal form the first byte consists of numbers ranges from 240-255.

Notes of C.sc. | B.SC -II by Muhammad Fayaz 36


PAPER-B (SECTION-A) UNIT#5 OSI MODEL

Type of Addresses

An address is an identifier of a device (node) or process /application. Following are the important type
addresses commonly used in networking.

Physical Address:

The physical address, also known as the link address, is the address of a node as defined by its LAN or WAN. It
is included in the frame used by the data link layer. It is the lowest-level address. The size and format of these
addresses vary depending on the network. For example, Ethernet uses a 6-byte (48-bit) physical address that is
imprinted on the network interface card (NIC).

Most local area networks use a 48-bit (6-byte) physical address written as 12 hexadecimal digits; every byte (2
hexadecimal digits) is separated by a colon, as shown below.

Logical Address:

Logical addresses (also called IP addresses) are necessary for universal communications that are independent of
underlying physical networks. Physical addresses are not adequate in an internetwork environment where
different networks can have different address formats. A universal addressing system is needed in which each
host can be identified uniquely, regardless of the underlying physical network. The logical addresses are
designed for this purpose. A logical address in the Internet is currently a 32- bit address that can uniquely define
a host connected to the Internet. No two publicly addressed and visible hosts on the Internet can have the same IP
address. Example:

Port Address:

The IP address and the physical address are necessary for a quantity of data to travel from a source to the
destination host. However, arrival at the destination host is not the final objective of data communications on
the Internet. Computers are devices that can run multiple processes at the same time. The end objective of
Internet communication is a process communicating with another process. For example, computer A can

Notes of C.sc. | B.SC -II by Muhammad Fayaz 37


PAPER-B (SECTION-A) UNIT#5 OSI MODEL

communicate with computer C by using TELNET. At the same time, computer A communicates with
computer B by using the File Transfer Protocol (FTP). For these processes to receive data simultaneously,
we need a method to label the different processes.

In other words, they need addresses. In the TCP/IP architecture, the label assigned to a process is called a
port address. A port address in TCP/IP is 16 bits in length.
A port address is a 16-bit address represented by one decimal number as shown.
13

Application-Specific Addresses
Some applications have user-friendly addresses that are designed for that specific application. Examples
include the e-mail address (for example, fayazof@outlook.com) and the Universal Resource Locator (URL)
(for example, www.sbbu.com). The first defines the recipient of an e-mail; the second is used to find a
document on the World Wide Web. These addresses, however, get changed to the corresponding port and
logical addresses by the sending computer.

Prepared by: Muhammad Fayaz


M.Sc. Computer Science SBBU Shiringal Dir Upper
Contact# 0342-5850786
Email: fayazsbbu786@gmail.com
fayazof@outlool.com

Notes of C.sc. | B.SC -II by Muhammad Fayaz 38

You might also like