Chapter-4 SN

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

Data Communication and Computer Networks

INSY3071

Instructor: Tsegaye Berhanu


Chapter 4

Protocols and OSI Reference Model


Outline
Network Protocols
Layered Models
The OSI Model
The TCP/IP Model
Comparing OSI Model with TCP/IP Model
Overview & functions of each layer

Encapsulation
3 Data Communication and Computer Networks
Network Protocols
 In order for data packets to travel from a source to a
destination on a network, it is important that all the
devices on the network speak the same language or
protocol.
 A data communications protocol is a set of rules or
agreements that determines the data format, and how
transmission of data occurs.
 A protocol is a set of standards that make communication
on a network more efficient.
4 Data Communication and Computer Networks
Network Protocols
 Network protocols are formal standards and
policies made up of rules, procedures and formats
that defines communication between two or more
devices over a network
 Protocols are Rules that specify:
 How the messages are sent
 How they are directed through the network, and
 How they are interpreted at the destination devices

5 Data Communication and Computer Networks


Example of Network Protocols
 TCP/IP (Transmission Control Protocol/Internet Protocol) suite
 ARP (Address Resolution Protocol)
 DHCP (Dynamic Host Configuration Protocol)
 DNS (Domain Name System)
 FTP (FileTransfer Protocol)
 HTTP (HyperTextTransfer Protocol)
 HTTPS (HypertextTransfer Protocol Secure)
 ICMP (Internet Control Message Protocol)
 IGMP (Internet Group Management Protocol)
 IMAP4 (Internet Message Access Protocol version 4)
 NTP (Network Time Protocol)
 SNMP2/3 (Simple Network Management Protocol version 2 or 3)
 SSH (Secure Socket Shell)
 POP3 (Post Office Protocol version 3)
 RTP (Real-timeTransport Protocol
 SIP (Session Initiation Protocol)
 TFTP (Trivial FileTransfer Protocol)
 TLS (Transport Layer Security)
 UDP (User Datagram Protocol)

6 Data Communication and Computer Networks


Layered Models
 A reference model (Layered Model) is a
conceptual blueprint of how communications
should take place.
 It addresses all the processes required for
effective communication and divides these
processes into logical groupings called layers.
 When a communication system is designed in
this manner, it’s known as layered architecture.
7 Data Communication and Computer Networks
Advantage of Layered Models
 It divides the network communication process into
smaller and simpler components, thus aiding
component development, design, and troubleshooting.
 It encourages industry standardization by defining
what functions occur at each layer of the model.
 It allows various types of network hardware and
software to communicate.
 It prevents changes in one layer from affecting other
layers, so it does not hamper development.
8 Data Communication and Computer Networks
Examples of Layered Models

 OSI Reference Model


 TCP/IP Model

9 Data Communication and Computer Networks


OSI Model
 OSI stands for Open Systems Interconnection. It has
been developed by ISO – 'International Organization
of Standardization', in the year 1974. It is a 7 layer
architecture with each layer having specific
functionality to perform
 The OSI isn’t a physical model. Rather, it’s a set of
guidelines that application developers can use to
create and implement applications that run on a
network.
 It also provides a framework for creating and
implementing networking standards, devices, and
internetworking schemes.
10 Data Communication and Computer Networks
The OSI Model
 The OSI model defines a networking framework to
implement protocols in layers, with control passed
from one layer to the next
 The OSI has seven different layers, divided into two
groups.
 The top three layers define how the applications within
the end stations will communicate with each other and
with users.
 The bottom four layers define how data is transmitted
end-to-end.
11 Data Communication and Computer Networks
Layers of the OSI Model

Top 3 layers

Bottom 4 layers

12 Data Communication and Computer Networks


The TCP/IP Model
 The U.S. Department of Defense (DoD) created the
TCP/IP reference model, because it wanted to design a
network that could survive under any conditions,
including a nuclear war.
 In a world connected by different types of
communication media such as copper wires,
microwaves, optical fibers and satellite links, the DoD
wanted transmission of packets every time and under
any conditions. This very difficult design problem
brought about the creation of the TCP/IP model.
13 Data Communication and Computer Networks
The TCP/IP Model
 The DoD model is basically a condensed version of
the OSI model
 It’s composed of four, instead of seven, layers:
Application layer
Transport layer
Internet layer
Network Access layer

14 Data Communication and Computer Networks


OSI vs TCP/IP Model

15 Data Communication and Computer Networks


TCP/IP vs OSI
Similarities include:
 Both have layers.
 Both have application layers, though they include very
different services.
 Both have comparable transport layers.
 Both models need to be known by networking
professionals.
 Both assume packets are switched.

16 Data Communication and Computer Networks


TCP/IP vs OSI
Differences include:
 TCP/IP combines the presentation and session layer
issues into its application layer.
 TCP/IP combines the OSI data link and physical
layers into the network access layer.
 TCP/IP appears simpler because it has fewer layers.
 TCP/IP protocols are the standards around which
the Internet developed, so the TCP/IP model gains
credibility just because of its protocols.
17 Data Communication and Computer Networks
TCP/IP vs OSI
Although TCP/IP protocols are the standards with which the Internet has
grown, the OSI model is useful for the following reasons:
 It is a generic standard.
 It has more details, which make it more helpful for teaching
and learning, and for troubleshooting.
 Networking professionals differ in their opinions on which
model to use. Due to the nature of the industry it is
necessary to become familiar with both.
 Remember that there is a difference between a model and an
actual protocol that is used in networking. The OSI model
will be used to describe TCP/IP protocols.
18 Data Communication and Computer Networks
Two Models: Side-By-Side
7 Application
Application
6 Presentation

5 Session

4 Transport Transport

3 Network Internet

2 Data Link Network


Access Layer
1 Physical
OSI Reference Model
 OSI model is a set of guidelines that application
developers can use to create and implement
applications that run on a network.
 It also provides a framework for creating and
implementing networking standards, devices, and
internetworking schemes.
 The OSI model divides the networking process into
seven logical layers, each of which has unique
functionality and to which are assigned specific
services and protocols.
20 Data Communication and Computer Networks
Overview & Functions of
each layer

21 Data Communication and Computer Networks


Application Layer (Layer 7)
 The Application layer of the OSI model marks the
spot where users actually communicate to the
computer.
 This layer only comes into play when it’s apparent
that access to the network is going to be needed soon.
 It consists of protocols that focus on process-to-
process communication across an IP network and
provides a firm communication interface and end-
user services.
22 Data Communication and Computer Networks
Application Layer

 The OSI model defines the application layer as the user


interface responsible for displaying received
information to the user.
 The application layer abstraction is used in both of
the standard models of computer networking: the
Internet Protocol Suite (TCP/IP) and the OSI
model.

23 Data Communication and Computer Networks


Application Layer

 Defines interface to user processes for


communication and data transfer in
network

24 Data Communication and Computer Networks


Application Layer
The different Protocols available at the Application layer
are:
 Domain Name System (DNS) - Port 53
 Hypertext Transfer Protocol (HTTP) - Port 80
 Simple Mail Transfer Protocol (SMTP) - Port 25
 Post Office Protocol (POP) - Port 110
 Telnet - Port 23
 Dynamic Host Configuration Protocol - UDP Port 67
File Transfer Protocol (FTP) - Ports 20 and 21
25 Data Communication and Computer Networks
WWW services and HTTP
(Hyper Text Transfer Protocol)
 When a web address (or URL) is typed into a web
browser, the web browser establishes a connection to
the web service running on the server using the
HTTP protocol.
 URLs (or Uniform Resource Locator) and URIs
(Uniform Resource Identifier) are the names most
people associate with web addresses.
(http://www.google.com/resources.html)
26 Data Communication and Computer Networks
Cont’d
 Web browsers are the client applications our
computers use to connect to the World Wide Web and
access resources stored on a web server.
 As with most server processes, the web server runs as
a background service and makes different types of files
available.
 Web clients make connections to the server and
request the desired resources. The server replies with
the resources and, upon receipt, the browser
interprets the data and presents it to the user.
27 Data Communication and Computer Networks
Cont’d
 Browsers can interpret and present many data types,
such as plain text or Hypertext Markup Language
(HTML, the language in which web pages are
constructed). Example: user types
http://www.google.com/resources.html
First, the browser interprets the three parts of the URL:
1) HTTP (the protocol or scheme)
2) www.google.com (the server name)
3) resource.html (the specific file name requested).
28 Data Communication and Computer Networks
Cont’d
 The browser then checks with a DNS server to convert
www.google.com <http://www.google.com > into a
numeric address, which it uses to connect to the server.
 Using the HTTP protocol requirements, the browser
sends a GET request to the server and asks for the file
resource.html.
 The server in turn sends the HTML code for this web
page to the browser. Finally, the browser deciphers the
HTML code and formats the page for the browser
window.
29 Data Communication and Computer Networks
DNS (Domain Name System)
 In data networks each device has a unique IP address in
order to communicate with devices on the data
network. (198.132.219.25)
 Difficult to remember each and every IP address,
hence domain names were used as a solution
(www.google.com)
 As networks grew larger it became difficult to
maintain or resolve the domain names and IP addresses
manually, hence a system was formulated.
30 Data Communication and Computer Networks
Cont’d
 The Domain Name System (DNS) was created for
domain name to address resolution for these networks.

 DNS uses a distributed set of servers to resolve the


names associated with these numbered addresses (IP
Addresses).

 The DNS protocol defines an automated service that


matches resource names with the required numeric
network address.
31 Data Communication and Computer Networks
FTP (File Transfer Protocol)
 FTP was developed to allow for file transfers between
a client and a server.
 An FTP client is an application that runs on a
computer that is used to push and pull files from a
server running the FTP daemon (FTPd).
 The file transfer can happen in either direction. The
client can download (pull) a file from the server or,
the client can upload (push) a file to the server.

32 Data Communication and Computer Networks


DHCP
(Dynamic Host Configuration Protocol)

 The Dynamic Host Confirmation Protocol (DHCP)


service enables devices on a network to obtain IP
addresses and other information from a DHCP
server.

 This service automates the assignment of IP


addresses, subnet masks, gateway and other IP
networking parameters.
33 Data Communication and Computer Networks
Cont’d
 The DHCP server is contacted and an address requested.

 The DHCP server chooses an address from a configured


range of addresses called a pool and assigns ("leases") it
to the host for a set of periods.

 On a larger local networks, or where the user


population (number of computers) changes frequently,
DHCP is preferred.
34 Data Communication and Computer Networks
Presentation Layer (Layer 6)
 The Presentation layer gets its name from its purpose:
It presents data to the Application layer and is
responsible for data translation and code formatting.
 It is sometimes called the syntax layer

35 Data Communication and Computer Networks


Presentation Layer
 Tasks like data compression, decompression,
encryption, and decryption are associated with this
layer.
 This layer is essentially a translator and provides
coding and conversion functions.
 A successful data-transfer technique is to adapt the
data into a standard format before transmission.
 Computers are configured to receive this generically
formatted data and then convert the data back into its
native format for actual reading.
36 Data Communication and Computer Networks
Presentation Layer

 Masks the differences of data formats between


dissimilar systems
 Specifies architecture-independent data transfer format
Encodes and decodes data;
Encrypts and decrypts data;
Compresses and decompresses data

37 Data Communication and Computer Networks


Session Layer (Layer 5)
 The Session layer is responsible for setting up,
managing, and then tearing down sessions between the
sending and receiving entities.
 This layer also provides dialogue control between
multiple computers, or nodes.

38 Data Communication and Computer Networks


Session Layer

 Manages user sessions and dialogues


 Controls establishment and
termination of logic links between
users
 Reports upper layer errors

39 Data Communication and Computer Networks


Transport Layer (Layer 4)
 The Transport layer segments and reassembles data
into a data stream.
 Services located in the Transport layer both segment
and reassemble data from upper-layer applications and
unite it onto the same data stream.
 They provide end-to-end data transport services and
can establish a logical connection between the sending
host and destination host on an internetwork.

40 Data Communication and Computer Networks


Transport Layer
 Transport layer, transports and regulates the flow
of information from the source to the
destination, reliably and accurately.
 End-to-end control and reliability are provided
by sliding windows, sequencing numbers, and
acknowledgments.

41 Data Communication and Computer Networks


Transport Layer
 Sliding windows (Windowing) is a technique used by
TCP as a method of controlling the flow of packets
between two computers or network hosts with an
acknowledgment.
 All bytes in a TCP connection are numbered,
beginning at a randomly chosen initial sequence
number (ISN). The SYN packets consume one
sequence number, so actual data will begin at
ISN+1. The sequence number is the byte number
of the first byte of data in the TCP packet sent (also
called a TCP segment)
42 Data Communication and Computer Networks
Transport Layer
 Manages end-to-end message delivery in
network
 Provides reliable and sequential packet
delivery through error recovery and flow
control mechanisms
 Provides connectionless oriented packet
delivery

43 Data Communication and Computer Networks


Transport Layer
 It also hides details of any network-dependent
information from the higher layers by providing
transparent data transfer.
 The Transport layer can be:

 Connectionless oriented

 Connection-oriented (reliable).

44 Data Communication and Computer Networks


Connection –Oriented (Reliable)
A service is considered connection-oriented if it has the
following characteristics:
 A virtual circuit is set up (e.g. three-way handshake).
 It uses Sequencing.
 It uses Acknowledgments.
 It uses Flow Control.

45 Data Communication and Computer Networks


Three-way handshake
 In reliable transport operation , a device that wants to
transmit sets up a connection-oriented
communication with a remote device by creating a
session.
 The transmitting device first establishes a
connection-oriented session with its peer system,
which is called a call setup, or a three-way handshake.
 Data is then transferred; when finished, a call
termination takes place to tear down the virtual
circuit.
46 Data Communication and Computer Networks
Session establishment, maintenance,
and termination

47 Data Communication and Computer Networks


Acknowledgment
 Reliable data delivery ensures the integrity of a stream of
data sent from one machine to the other through a fully
functional data link. It guarantees that the data won’t be
duplicated or lost. This is achieved through something
called positive acknowledgment with retransmission.
 This technique requires a receiving machine to
communicate with the transmitting source by sending an
acknowledgment message back to the sender when it
receives data.

48 Data Communication and Computer Networks


Acknowledgment
 The sender documents each segment it sends and waits for
this acknowledgment before sending the next segment.
 When it sends a segment, the transmitting machine starts a
timer and retransmits if it expires before an
acknowledgment is returned from the receiving end.
 A three-way handshake is a method used in a TCP/IP
network to create a connection between a local host/client
and server. It is a three-step method that requires both the
client and server to exchange SYN and ACK
(acknowledgment) packets before actual data
communication begins.
49 Data Communication and Computer Networks
Three-way handshake

51 Data Communication and Computer Networks


Flow Control
 Flow control prevents a sending host on one side of
the connection from overflowing the buffers in the
receiving host—an event that can result in lost data.
 A buffer is a temporary area for data storage.
 As the transport layer sends data segments, it tries to
ensure that data is not lost. A receiving host that is
unable to process data as quickly as it arrives could
be a cause of data loss. The receiving host is then
forced to discard it.
52 Data Communication and Computer Networks
Flow control

Flow control avoids the problem of a transmitting host


overflowing the buffers in the receiving host.
TCP provides the mechanism for flow control by allowing the
sending and receiving host to communicate. The two hosts
then establish a data-transfer rate that is agreeable to both.
53 Data Communication and Computer Networks
Flow Control

54 Data Communication and Computer Networks


Transport Layer Protocols

 TCP: Transfer Control Protocol


 (Connection Oriented/Reliable)

 UDP: User Datagram Protocol


 (Connectionless Oriented /unreliable)

55 Data Communication and Computer Networks


TCP (Transfer Control Protocol)
 TCP is responsible for breaking messages into
segments, reassembling them at the destination
station, resending anything that is not received, and
reassembling messages from the segments.

 TCP acknowledges that data is successfully received


and guarantees the data is reassembled in the correct
order.

56 Data Communication and Computer Networks


UDP (User Datagram Protocol)
• UDP is the connectionless transport protocol in the
TCP/IP protocol stack.
• UDP is a simple protocol that exchanges datagrams,
without acknowledgments or guaranteed delivery.
• UDP doesn't establish connections as TCP does, so
UDP does not perform this 3-way handshake and for
this reason, it is referred to as an unreliable protocol.
• That doesn't mean UDP can't transfer data, it just
doesn't negotiate how the connection will work,
UDP just transmits and hopes for the best.
57 Data Communication and Computer Networks
Network Layer (Layer 3)
 It manages device addressing (IP Addressing)
 tracks the location of devices on the network and
determines the best way to move data, which means
that the Network layer must transport traffic between
devices that aren’t locally attached.
 Routers (layer 3 devices) are specified at the Network
layer and provide the routing services within an
internetwork.

58 Data Communication and Computer Networks


Network Layer
• Determines how
data are transferred
between network
devices
• Routes packets
according to unique
network device
addresses
• Provides flow and
congestion control
to prevent network
resource depletion

59 Data Communication and Computer Networks


Data link Layer
• The data link layer is the protocol layer in a program
that handles the moving of data into and out of a
physical link in a network.
• The data link layer is Layer 2 in the Open Systems
Interconnection (OSI) architecture model for a set of
telecommunication protocols
• Defines procedures for operating the communication
links
• The datagram on the data link layer is a Frames
• It manages physical addressing (MAC Address)

60 Data Communication and Computer Networks


Data Link layer

61 Data Communication and Computer Networks


Physical Layer

 Defines physical means of sending data


over network devices
 Interfaces between network medium and
devices
 Defines optical, electrical and mechanical
characteristics

62 Data Communication and Computer Networks


Detailed encapsulation process
 All communications on a network originate at a
source, and are sent to a destination.
 The information sent on a network is referred to as
data or data packets.
 If one computer (host A) wants to send data to
another computer (host B), the data must first be
packaged through a process called encapsulation.
 Encapsulation is the process of taking data from one
protocol and translating it into another protocol, so
the data can continue across a network
63 Data Communication and Computer Networks
Top three layer • Build the data.
As a user sends an e-mail message, its
alphanumeric characters are
converted to data that can travel across
the internetwork.

• Package the data for end-to-end


transport.
The data is packaged for
internetwork transport. By
using segments, the transport
function ensures that the
message hosts at both ends of
the e-mail system can reliably
communicate.

64 Data Communication and Computer Networks


Network Layer
Add the network IP
address to the header.

The data is put into a packet


or datagram that contains a
packet header with source
and destination logical
addresses. These addresses
help network devices send
the packets across the
network along a chosen
path.
65 Data Communication and Computer Networks
Data Link Layer
Add the data link layer
header and trailer.
Each network device must
put the packet into a
frame. The frame allows
connection to the next
directly-connected
network device on the
link. Each device in the
chosen network path
requires framing in order
for it to connect to the
next device.
66 Data Communication and Computer Networks
Physical Layer

Convert to bits for


transmission.
The frame must be converted into a
pattern of 1s and 0s (bits) for
transmission on the medium. A
clocking function enables the devices
to distinguish these bits as they travel
across the medium. The medium on
the physical internetwork can vary
along the path used. For example, the
e-mail message can originate on a
LAN, cross a campus backbone, and
go out a WAN link until it reaches its
destination on another remote LAN.

67 Data Communication and Computer Networks


Data Encapsulation Example

Once the packet has


been sent to the
destination, the protocols
undo the construction of
the packet that was done
on the source side. This
is done in reverse order.
The protocols for each
layer on the destination
return the information to
its original form, so the
application can properly
read the data.

68 Data Communication and Computer Networks


Peer-to-peer cont’d

69 Data Communication and Computer Networks

You might also like