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

Lecture 2

The document discusses the need for protocol architecture in networking, emphasizing the importance of layering to manage complexity in communication processes. It outlines how each layer has specific responsibilities and interacts with adjacent layers through protocols, which define the rules for communication. Additionally, it covers the OSI and TCP/IP reference models, detailing their respective layers and functions.

Uploaded by

kanzaakram123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views

Lecture 2

The document discusses the need for protocol architecture in networking, emphasizing the importance of layering to manage complexity in communication processes. It outlines how each layer has specific responsibilities and interacts with adjacent layers through protocols, which define the rules for communication. Additionally, it covers the OSI and TCP/IP reference models, detailing their respective layers and functions.

Uploaded by

kanzaakram123
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

The Need for Protocol Architecture

• Let us consider that two


friends communicate through
postal mail.
• Instead of implementing
entire logic as a single module
, the entire process is divided
into hierarchy of tasks.
• Each layer is responsible for a
set of tasks.

Spring Semester 2021


5
The Need for Protocol Architecture

• A network is a combination of hardware and software that sends data


from one location to another.
• The hardware consists of the physical equipment that carries signals
from one point of the network to another.
• The software consists of instruction sets that provide services that we
expect from a network.
• To reduce design complexity, most networks are designed as stack of
layers, each one built upon below it.
• A key principle for networking software is layering: the functionality is
decomposed into a chain of layers so that layer N offers services to
layer N + 1 and itself is only allowed to use services offered by layer
N − 1.

Spring Semester 2021 6


The Need for Protocol Architecture

• It takes two to communicate, so the same set of layered functions


must exist in two systems.
• Layer N on one machine carries conversation with layer N on another
machine.
• The rules and conventions used in this conversation are collectively
called layer N protocol.
• A protocol is an agreement between the communicating parties on
how communication is to proceed.
• The key features of a protocol are as follows:
• Syntax: Describes the format of the data blocks
• Semantics: Includes control information for coordination and error handling
• Timing: Includes speed matching and sequencing
Spring Semester 2021 7
The Need for Protocol Architecture
HOST A
• No data are directly transferred L5 protocol
HOST B
Layer 5
from layer N on one machine to Layer 5
L 4/5 interface
layer N on another machine. Layer 4
L4 protocol
Layer 4
• Instead each layer passes data L 3/4 interface
& control information to layer
L3 protocol Layer 3
Layer 3
immediately below it, until the L 2/3 interface
lower layer is reached. Layer 2
L2 protocol
Layer 2
L 1/2 interface
• Below layer 1 is physical Layer 1
L1 protocol
Layer 1
layer/medium through which
actual communication occurs. Physical medium

Spring Semester 2021 8


The Need for Protocol Architecture
• Between each pair of adjacent HOST A
L5 protocol
HOST B
layer is an interface, called N- Layer 5 Layer 5
service interface. L 4/5 interface
L4 protocol
• The N-interface offers services at Layer 4 Layer 4
service access point(SAP),the L 3/4 interface
lower layer makes available to the Layer 3 L3 protocol Layer 3
upper one. L 2/3 interface
• The N-interface can offer several Layer 2
L2 protocol
Layer 2
SAPs, this allows to multiplex L 1/2 interface
L1 protocol
between different layer N + 1 Layer 1 Layer 1
connections or sessions.
• The layer N-service is implemented Physical medium
through an N-protocol
Spring Semester 2021 9
The Need for Protocol Architecture
• A layer exchanges protocol data units
(PDUs) with a peer N-protocol entity. N+1 data N+1 data

• It constructs these PDUs itself and


hands them over to its local N − 1-
layer to deliver them to peer N- N Hdr N+1 data N Trl N Hdr N+1 data N Trl

protocol entity.
• An N-PDU is treated as payload / user N-1
Hdr
N Hdr N+1 data N Trl
N-1
Trl
N-1
Hdr
N Hdr N+1 data N Trl N-1
Trl
data by the N − 1 layer.
N-1
• Each layer adds own header and
N-2 N-1 N Trl N-2
N-2 N-1 N-1 N-2 N Hdr N+1 data Trl
N Hdr N+1 data N Trl Hdr Hdr Trl
Hdr Hdr Trl Trl
trailer before handing down to lower
layer.
• Receiving layer removes its header /
trailer before handing payload to
upper layer.

Spring Semester 2021


10
Design Issues for the Layers
• Some of the key design issues that occur in computer networks are
present in several layers. They include:
• Addressing - Networks have many communicating devices and some of them
have multiple processes, therefore a mechanism is needed for a process on
one machine to specify with whom it wants to talk i.e. addressing is needed
to specify a specific destination in case of multiple destinations.
• No of logical channels - Many networks provide at least two channels per
connection, one for normal data transfer and one for urgent data.
• Error Control - Both sender and receiver must agree on same set of error
detecting and error correcting codes.
• Sequencing - Reassembling of packets at receiver end that arrive out of order.
• Flow Control - Avoid overflowing receiver with data from sender.
• Routing - A suitable route must be chosen when there are multiple paths
between source and destination.
Spring Semester 2021 11
Types of Service
• Layers can offer two types of services to the layers above
them.
• Connection Oriented Service – Service user first establishes the
connection , uses the connection and then releases the connection.
Order is preserved and the data arrives in order. Connection oriented
service is modeled after telephone system.

• Connection Less Service – Each message carries full destination


address and is routed through the system independent of all others.
Data sent may arrive out of order. Connection less service is modeled
after postal system.

Spring Semester 2021 12


Reference Models
• A reference 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.
• Two popular reference models are:
• OSI Reference Model
• TCP/IP Reference Model

Spring Semester 2021 13


OSI Reference Model
• OSI (Open System Interconnection) Layer 7: Application
reference model was developed by the
International Organization for
Standardization (ISO) as a model for a Layer 6: Presentation
computer protocol architecture.
• The model was not commercially
successful, but helped greatly to clarify Layer 5: Session
networking architectures and to provide
framework for developing protocol
standards. Layer 4: Transport
• OSI model consists of seven layers:
• Application Layer 3: Network
• Presentation
• Session
• Transport Layer 2: Data Link
• Network
• Data Link
• Physical Layer 1: Physical
Spring Semester 2021 14
OSI Reference Model
• Layer 1, 2 & 3 exchange HOST A HOST B Name of Unit
PDUs between physically Exchanged
connected hosts. Application Application APDU
• Upper four layers
exchange protocol Presentation Presentation PPDU
messages between end
hosts (over several Session Session SPDU
intermediate nodes, called
routers)
Transport Transport TPDU
• Hop by Hop
communication is shown
by Network Network Network Packet
• End to End
communication is shown Data Link Data Link Data Link Frame
by
Physical Physical Physical Bit

Spring Semester 2021 15


OSI RM - Physical Layer
• Responsible for transmission of bits over a physical medium.
• The protocols in this layer are link dependent and further
depend on the actual transmission medium of the link (for
example, twisted-pair ,copper wire, fiber optics).
• Often involves specification of:
• Cable types (wired) or (wireless)
• Connectors
• Electrical specifications

Spring Semester 2021 16


OSI RM – Data Link Layer
• (Reliable) transfer of messages over physical link .
• The Data Link layer will ensure that messages are delivered to the proper
device on a LAN using hardware addresses and will translate messages
from the Network layer into bits for the Physical layer to transmit.
• The Data Link layer formats the message into pieces, each called a data
frame, and adds a customized header containing the hardware destination
and source address.
• Involves specification of:
• Framing - determining the frame start and end , choice of frame size
• Error Detection and Correction - coding or retransmission-based
• Medium access control – control access to shared channel , often considered as a
separate “sub-layer” of link layer
• Flow control - Avoid overwhelming a slow receiver with too much data
Spring Semester 2021 17
OSI RM – Network Layer
• Concerned with:
• Addressing and routing
• End-to-end delivery of messages (transmission of data packets
between devices that are not locally connected)
• Network layer messages are called packets
• Involves specification of:
• Addressing formats
• Exchange of routing information and route computation
• Depending on technology: establishment, maintenance and teardown
of connections

Spring Semester 2021 18


OSI RM – Transport Layer
• Concerned with reliable, in-sequence, transparent end-to-end
data transfer.
• Transport layer data packet is called segment.
• The functions of the transport layer are:
• Break messages into packets and reassemble packets of size suitable
to network layer
• Multiplex sessions with same source/destination nodes
• Resequencing packets at destination
• Error Control
• Provide end-to-end flow control

Spring Semester 2021 19


OSI RM – Presentation & Session Layer
• Session layer:
• Concerned with establishing communication sessions between
applications
• A session can involve several transport layer connections in parallel or
sequentially
• The Session layer basically keeps different applications’ data separate
from other applications’ data.

• Presentation layer:
• Translates between different representations of data types used on
different end hosts
• Example: host A uses low-endian , host B big-endian
Spring Semester 2021 20
OSI RM – Application Layer
• Contains variety of protocols that are commonly needed by
users.
• Examples:
• HTTP(HyperText Transfer Protocol) – for Web document request and
transfer
• SMTP(Simple Mail Transfer Protocol) – for transfer of email messages
• FTP(File Transfer Protocol) – for transfer of files between two end
systems
• Packet of information at the application layer is called a
message.
• Focus: Transport Layer and Lower.
Spring Semester 2021 21
TCP/IP Reference Model
• The TCP/IP protocol architecture is a
result of protocol research and Layer 5: Application
development conducted on the
experimental packet-switched network,
ARPANET, funded by the Defense Layer 4: Transport
Advanced Research Projects Agency
(DARPA).
• It is generally referred to as the TCP/IP Layer 3: Internet
protocol suite.
• This model is used in the Internet.
Layer 2: Network Access
• TCP/IP model consists of five layers:
• Application
• Transport Layer 1: Physical
• Internet
• Network Access
• Physical

Spring Semester 2021 22


TCP/IP Reference Model
HOST A
• Hop by Hop communication is HOST B
shown by Application Application
• End to End communication is
shown by Transport Transport

Internet Internet Internet

Network Network Network

Physical Physical Physical

Spring Semester 2021 23


TCP/IP RM – Application Layer
• A vast array of protocols combine at the Application Layer to
integrate the various activities and duties spanning the focus of the
OSI’s corresponding top three layers (Application, Presentation, and
Session).
• Accesses transport layer through socket interface
• Well known application layer protocols are:
• Telnet
• FTP
• SMTP
• HTTP/HTTPS
• DNS
• RTP

Spring Semester 2021 24


TCP/IP RM – Transport Layer
• Provides end-to-end communications to applications
• Offers its services through socket interface
• Standard transport layer protocols:
• TCP: reliable, in-sequence byte-stream transfer
• UDP: unreliable, un-ordered message transfer
• SAPs are called ports, used for application multiplexing
• Ports are identified by numbers
• Several applications / processes can use transport service
• One application is bound to one port
• The PDUs generated by TCP / UDP are called segments

Spring Semester 2021 25


TCP/IP RM – Internet Layer
• This is a key part of the TCP/IP reference model.
• Uses IP (Internet Protocol), its PDUs are called datagrams.
• IP looks at each packet’s address. Then, using a routing table, it
decides where a packet is to be sent next, choosing the best
path.
• Other protocols found here are:
• ARP
• ICMP
• IGMP
• RARP
Spring Semester 2021 26
TCP/IP RM – Physical & Network Access Layer

• The physical layer is similar to the PHY of the OSI RM

• The Network Access Layer:


• Accepts IP datagrams and delivers them over physical link
• Receives IP datagrams and delivers them to local IP layer
• Includes medium access control, framing, address resolution
• May include link layer error and flow control

Spring Semester 2021 27


Encapsulation of Data
• The process of placing data behind headers (& before trailers) of
data packet is called encapsulation.
• Application Layer(APDU): Creates application header and places the data (created
by application) after the header.
• Presentation Layer(PPDU):Creates presentation header and places the data
(received from application layer) after the header.
• Session Layer(SPDU):Creates session header and places the data (received from
presentation layer) after the header.
• Transport Layer(Segment):Creates the header and places the data (received from
session layer) after the header.
• Network Layer(Packet):Creates the header and places the data (received from
transport layer) after the header.
• Data Link Layer(Frame):Creates the header and places the data (received from
network layer) after the header and also adds the trailer.
• Physical Layer(Bits):Encodes the signal to transmit the data.
Spring Semester 2021 28
Encapsulation of Data

Spring Semester 2021 29

You might also like