1 Computer Networks
Overview
Part 2
Protocols and Architecture
1
Protocols
A Protocol can be defined as a set of
rules governing the exchange of data
between two entities.
Used for communications between entities
in a system
Two entities have to speak the same
language to successfully communicate
Part 2 – Protocols and Architecture 2
Protocols
Entities: anything capable of sending and receiving
information
User application programs
e-mail facilities
file transfer packages
terminals
Systems: physically distinct object that contains
one or more entities
Computer
Terminal
Remote sensor
Part 2 – Protocols and Architecture 3
Protocols: Example
A human protocol and a computer network protocol:
Howzit TCP connection
req.
Howzit TCP connection
reply
Got the
Get http://duck.cs.und.ac.za/science/index.html
time?
1:15 <file>
time
Part 2 – Protocols and Architecture 4
Layered Protocols
Networks are complex and consist of
many “pieces”: How can we
hosts reduce the
design
routers complexity?
switches
links of various media
applications
protocols
reliability
connection type
Part 2 – Protocols and Architecture 5
1
Layers
Number of layers
Name of each layer differs from
Contents of each layer network to network
Function of each layer
Part 2 – Protocols and Architecture 6
2
Layers
Layer N uses the services of layer N-1
Layer N provides a service to layer N+1
Implementation-specific interface between layer N and
layer N-1
Entity at layer N implements the layer N protocol
Well-defined protocol between layer N entities
Peer entities comprising the corresponding layers on
different machines
Part 2 – Protocols and Architecture 7
Layers, Protocols and Interfaces
A set of layers and protocols is called a network architecture
Host 1 Host 2
Layer 5 layer 5 protocol Layer 5
layer 4/5 interface
Layer 4 layer 4 protocol Layer 4
layer 3/4 interface
Layer 3 layer 3 protocol Layer 3
layer 2/3 interface
Layer 2 layer 2 protocol Layer 2
layer 1/2 interface
Layer 1 layer 1 protocol Layer 1
virtual
physical Physical medium
modified after Tanenbaum (1996) Part 2 – Protocols and Architecture 8
Philosopher-translator-secretary architecture
Location A Location B
I like Message J’aime le
rabbits lapins
3 Philosopher 3
Information for
L: Dutch the remote L: Dutch
Ik hou Ik hou
translator
2 van
Translator van 2
konijnen konijnen
Information for
Fax #--- the remote Fax #---
L: Dutch secretary L: Dutch
Ik hou Ik hou
van Secretary van
1 konijnen konijnen 1
modified after Tanenbaum (1996)
Protocol Data Units (PDU)
To control the handling of data from one layer to the next,
control information, as well as the data, must be transmitted
At each layer, protocols are used to
communicate
Control information is added to user data at
each layer
Part 2 – Protocols and Architecture 10
Protocol Data Units (PDU)
Headers and Trailers
Source machine Destination machine
Layer 5 protocol
5 M M
Layer 4 protocol
4 H4 M H4 M
Layer 3
protocol
3 H3 H4 M1 H3 M2 H3 H4 M1 H3 M2
Layer 2
protocol
2 H2 H3 H4 M1 T2 H2 H3 M2 T2 H2 H3 H4 M1 T2 H2 H3 M2 T2
1
Part 2 – Protocols and Architecture 11
Protocols - Characteristics
Direct or Indirect
Monolithic or Structured
Symmetric or Asymmetric
Standard or Nonstandard
Part 2 – Protocols and Architecture 12
Protocols - Characteristics
Direct or Indirect
Communication between two entities may be direct or indirect.
Direct
Systems share a point to point link or
Systems share a multi-point link
Data can pass without intervening active agent
Indirect
Switched networks or
Internetworks or Internets
Data transfer depend on other entities
Part 2 – Protocols and Architecture 13
Protocols - Characteristics
Direct or Indirect - Examples
Direct
Point-to Point
Indirect
Switched network
Part 2 – Protocols and Architecture 14
Protocols - Characteristics 1
Monolithic or Structured
Communications between entities on different
systems is sometimes too complex to be
handled as a single unit
Part 2 – Protocols and Architecture 15
Protocols - Characteristics 2
Monolithic or Structured
Monolithic
the whole logic (e.g. breaking up mail
into packet size chunks, or request a
virtual circuit) are implemented in a
single protocol
Whole packet must be modified if there
is a single change
Part 2 – Protocols and Architecture 16
Protocols - Characteristics 3
Monolithic or Structured
Structured
Set of protocols that exhibits a layered or
hierarchical structure
Structured design breaks down problem
into smaller units
Part 2 – Protocols and Architecture 17
Protocols - Characteristics
Symmetric or Asymmetric
Symmetric
Most protocols we are looking at are
symmetric
Symmetric protocols involve
communication between peer entities
Asymmetric
Dedicated to the logic of an exchange
(Client/server process)
Part 2 – Protocols and Architecture 18
Protocols - Characteristics
Standard or Nonstandard
Nonstandard protocols
One protocol built for specific computers and
tasks
K sources and L receivers leads to K*L
protocols and 2*K*L protocol implementations
Common (standard) protocol
K + L implementations needed
Part 2 – Protocols and Architecture 19
Protocols - Characteristics
Use of Standard Protocols
Nonstandard Standard
K*L = 4*3 = 12 protocols 1 protocol
2*K*L = 24 protocol implementations K+L = 7 protocol implementations
S1 S1
D1 D1
S2 S2
D2 D2
S3 S3
D3 D3
S4 S4
Part 2 – Protocols and Architecture 20
Protocols - Functions
Encapsulation
Fragmentation and reassembly
Connection control
Ordered delivery
Flow control
Error control
Addressing
Multiplexing
Transmission services
Part 2 – Protocols and Architecture 21
Protocols - Functions
Encapsulation
Encapsulation: Addition of control
information to data
Three categories of control information:
Address information
Application data
Error-detecting code
Protocol control
Transport Transport
header header
Network Network
header header
Part 2 – Protocols and Architecture 22
Protocols - Functions
Encapsulation
Fragmentation and reassembly
Connection control
Ordered delivery
Flow control
Error control
Addressing
Multiplexing
Transmission services
Part 2 – Protocols and Architecture 23
Protocols - Functions 1
Fragmentation (Segmentation)
Fragmentation break up of data into
blocks of smaller blocks
Application layer messages may be large
Network packets may be smaller
Block of data exchanged between two
entities via a protocol Protocol Data Unit
(PDU)
Part 2 – Protocols and Architecture 24
Protocols - Functions 2
Fragmentation (Segmentation)
One reasons for fragmentation: networks
may only accept data blocks of a specific
size
ATM blocks (cells) are 53 octets long
Ethernet blocks (frames) are up to 1526 octets
long
Part 2 – Protocols and Architecture 25
Protocols - Functions 3
Why Fragmentation?
Advantages
More efficient error control, because fewer bits need to
be retransmitted if PDU error occurs.
More equitable access to network facilities
Shorter delays
Smaller PDU smaller buffers needed
Disadvantages
The smaller the blocks the greater the overheads
Each PDU generate an interrupt increased interrupts
at receiver
More processing time because of smaller numerous PDUs
Part 2 – Protocols and Architecture 26
Protocols - Functions
Reassembly
Counterpart of fragmentation
Segmented data must be reassembled into
messages appropriate to the application
level
Can be complicated if PDUs arrive out of
order
Part 2 – Protocols and Architecture 27
Protocols - Functions
Encapsulation
Fragmentation and reassembly
Connection control
Ordered delivery
Flow control
Error control
Addressing
Multiplexing
Transmission services
Part 2 – Protocols and Architecture 28
Protocols - Functions 1
Connection Control
Connectionless data transmission
PDUs are transmitted independently from one entity to
the other
e.g. use of datagram
Connection-oriented data transmission
preferred if stations want a lengthy exchange of data
and/or certain protocol details must be worked out
dynamically
e.g. virtual circuit
Part 2 – Protocols and Architecture 29
Protocols - Functions 2
Connection Control
Logical connection must be established in
connection-oriented data transfer
Connection establishment
Data transfer
Connection termination
More sophisticated protocols may include
connection interruption and recovery
phases to cope with errors and other
interruptions
Part 2 – Protocols and Architecture 30
Protocols - Functions 3
Connection Oriented Data Transfer
Howzit, is it you?
Connection request
Howzit, yes its me Connection accept
My message, connection-
oriented data transfer uses
sequence numbers to
support three main
functions. Data
Thanks for the Multiple
information Acknowledgement exchanges
See you
Terminate-connection request
Bye time
Terminate-connection accept
Protocols - Functions 4
Connection Control
Connection-oriented data transfer uses
sequence numbers to support three main
functions:
Ordered delivery
Flow control
Error control
Part 2 – Protocols and Architecture 32
Protocols - Functions
Encapsulation
Fragmentation and reassembly
Connection control
Ordered delivery
Flow control
Error control
Addressing
Multiplexing
Transmission services
Part 2 – Protocols and Architecture 33
Protocols - Functions
Ordered Delivery
PDUs may arrive out of order,
because PDUs may traverse different
paths through network
Sequentially number PDUs to allow for
ordering in connection-oriented-protocols
Maximum sequence number must be
greater than the maximum number of
PDUs that could be outstanding
Part 2 – Protocols and Architecture 34
Protocols - Functions
Encapsulation
Fragmentation and reassembly
Connection control
Ordered delivery
Flow control
Error control
Addressing
Multiplexing
Transmission services
Part 2 – Protocols and Architecture 35
Protocols - Functions
Flow Control
Done by receiving entity
Function to limit amount or rate of data
sent by a transmitting entity
Simplest form: stop-and-wait procedure
More efficient protocols: Credit systems
Sliding window
Needed at application as well as
network layers
Part 2 – Protocols and Architecture 36
Protocols - Functions
Encapsulation
Fragmentation and reassembly
Connection control
Ordered delivery
Flow control
Error control
Addressing
Multiplexing
Transmission services
Part 2 – Protocols and Architecture 37
Protocols - Functions 1
Error Control
Guard against loss or damage of data and
control information
Part 2 – Protocols and Architecture 38
Protocols - Functions 2
Error Control
Error control is implemented as two separate
functions:
Error detection
Sender inserts error detecting bits
Receiver checks these bits
If OK, acknowledge
If error, discard packet
Retransmission
If no acknowledge in given time, re-transmit
Performed at various layers of protocol
Part 2 – Protocols and Architecture 39
Protocols - Functions
Encapsulation
Fragmentation and reassembly
Connection control
Ordered delivery
Flow control
Error control
Addressing
Multiplexing
Transmission services
Part 2 – Protocols and Architecture 40
Protocols - Functions 1
Addressing
Addressing level
Addressing scope
Connection identifiers
Addressing mode
Part 2 – Protocols and Architecture 41
Protocols - Functions 2
Addressing: Addressing level
Level in architecture at which entity is named
Unique address for each end system
(computer) and each intermediate system
(router)
Network level address
IP or internet address (TCP/IP)
Network service access point or NSAP (OSI)
Process within the system
Port number (TCP/IP)
Service access point or SAP
Part 2 – Protocols and Architecture 42
Protocols - Functions 3
Addressing: Address Concepts
Host A Host B
Port or
Service Access Point (SAP)
App Y App Y
App X App X
Logical connection
TCP (TCP connection)
TCP
Global network
address
IP IP
Network access Network access
protocol 1 protocol 1
Physical Router X Physical
Subnetwork attachment IP on
point address e c ti it )
nn cu
l c o l c ir
a a
g ic v ir tu
NAP 1 NAP 2 o
L g. ,
(e .
Network 1 Network 2
Phy 1 Phy 2
Protocols - Functions 4
Addressing: Addressing Scope
Global nonambiguity
Global address identifies unique system
There is only one system with address X
Global applicability
It is possible at any system (any address) to
identify any other system (address) by the global
address of the other system
Address X identifies that system from anywhere on
the network
e.g. MAC address on IEEE 802 networks
Part 2 – Protocols and Architecture 44
Protocols - Functions 5
Addressing: Connection Identifiers
Connection oriented data transfer (virtual
circuits)
Allocates a connection name during the transfer
phase
the advantages are:
Reduced overhead as connection identifiers are
shorter than global addresses
Routing may be fixed and identified by connection
name
Entities may want multiple connections - multiplexing
State information
Part 2 – Protocols and Architecture 45
Protocols - Functions
Addressing: Addressing Mode
Usually an address refers to a single system
Unicast address
Sent to one machine or person
May address all entities within a domain
Broadcast
Sent to all machines or users
May address a subset of the entities in a
domain
Multicast
Sent to some machines or a group of users
Part 2 – Protocols and Architecture 46
Protocols - Functions
Encapsulation
Fragmentation and reassembly
Connection control
Ordered delivery
Flow control
Error control
Addressing
Multiplexing
Transmission services
Part 2 – Protocols and Architecture 47
Protocols - Functions
Multiplexing
Supporting multiple connections on one
machine
Mapping of multiple connections at one
level to a single connection at another
Carrying a number of connections on one
fiber optic cable
Aggregating or bonding ISDN lines to gain
bandwidth
Part 2 – Protocols and Architecture 48
Protocols - Functions
Encapsulation
Fragmentation and reassembly
Connection control
Ordered delivery
Flow control
Error control
Addressing
Multiplexing
Transmission services
Part 2 – Protocols and Architecture 49
Protocols - Functions
Transmission Services
Priority
e.g. control messages
Quality of service
Minimum acceptable throughput
Maximum acceptable delay
Security
Access restrictions
Part 2 – Protocols and Architecture 50
Open System Interconnection
OSI – The Model
Not a network architecture, because it does not specify
the exact services and protocols to be used in each layer
formally defines and codifies the concept of layered
network architecture
Each layer describe what happens at each stage in the
processing of data for transmission
Layers help to reduce complexity
Each layer relies on the next lower layer to perform more
primitive functions
Each layer provides services to the next higher layer
Changes in one layer should not require changes in other
layers
Part 2 – Protocols and Architecture 51
OSI as Framework for
Standardization
peer layer = corresponding layer
Layer 7
(Application)
Service to
. layer N + 1
.
.
Total protocol
communication Layer N Layer N with peer
function entity layer N
• Decompose .
into modules .
• information . Service from
hiding layer N - 1
Layer 1
(Physical)
Part 2 – Protocols and Architecture 52
The OSI Environment
Host A (sending) name of unit Host B (receiving)
exchanged
AH User data Application APDU Application AH User data
PH A-PDU
Presentation PPDU Presentation PH A-PDU
SH P-PDU Session SPDU Session SH P-PDU
TH S-PDU
Transport TPDU Transport TH S-PDU
NH T-PDU
Network packets Network NH T-PDU
LH N-PDU LT
Data link frames Data link LH N-PDU LT
DL-PDU Physical bits Physical DL-PDU
Physical Medium
Part 2 – Protocols and Architecture 53
OSI Layers: Physical
Application layer (7)
responsible for transmitting raw
bits over a communication path
Presentation layer (6)
Session layer (5)
concerned with issues such as
mechanical interfaces, e.g. design
Transport layer (4)
of a network connector
Network layer (3)
electrical interfaces, e.g. voltage
Data Link layer (2) level of bits
Physical layer (1)
procedural interfaces, e.g. whether
transmission may proceed
simultaneously in both directions
Part 2 – Protocols and Architecture 54
OSI Layers: Data Link
Responsible for the transfer of
Application layer (7)
data between the ends of a
Presentation layer (6) physical link
Session layer (5) Provides for error detection,
Transport layer (4) "framing", and flow control
Network layer (3)
Resolves problems due to
Data Link layer (2) damaged, lost, or duplicate frames
Physical layer (1)
Formatted messages are referred
to as frames rather than packets
Part 2 – Protocols and Architecture 55
1
OSI Layers: Network
Responsible for the source to
Application layer (7)
destination routing
Presentation layer (6)
Addresses and resolves all
Session layer (5)
inherent problems related to
the transmission of data
Transport layer (4)
Network layer (3)
between heterogeneous
Data Link layer (2)
networks
Formatted messages are
Physical layer (1)
referred to as packets
Part 2 – Protocols and Architecture 56
2
OSI Layers: Network
In broadcast networks the
Application layer (7)
network layer is often thin or
Presentation layer (6)
nonexistent, because of easy to
Session layer (5)
solve routing problems
Sometimes no need for a
Transport layer (4)
Network layer (3)
network layer if using point-to-
Data Link layer (2)
point link
Physical layer (1)
Part 2 – Protocols and Architecture 57
OSI Layers: Transport
Provides for error-free delivery of
Application layer (7)
data
Presentation layer (6) Accepts data from the session
Session layer (5) layer and splits data into smaller
Transport layer (4) packets if necessary
Network layer (3)
passes these packets to the
Data Link layer (2)
network layer, and ensures that
packets arrive in sequence, with no
Physical layer (1)
losses or duplications, at their
destination
Part 2 – Protocols and Architecture 58
OSI Layers: Session
Provides for coordination between
Application layer (7)
communicating processes between
Presentation layer (6) nodes.
Session layer (5)
Manages dialog control (e.g. Can
allow traffic to go in both direction
Transport layer (4)
at the same time, or in only one
Network layer (3) direction at time.)
Data Link layer (2) Responsible for synchronizing the
Physical layer (1)
flow of data, and reestablishing a
connection in the event a failure
occurs.
Part 2 – Protocols and Architecture 59
OSI Layers: Presentation
Provides for data formats, and
Application layer (7)
code conversions
Presentation layer (6) Concerned with syntax and
Session layer (5) semantics of data being
Transport layer (4) transmitted
Network layer (3)
Encodes messages in a form that
Data Link layer (2)
is suitable for electronic
transmission
Physical layer (1)
Data compression and encryption
is done at this layer
Part 2 – Protocols and Architecture 60
OSI Layers: Application
Application layer (7)
Presentation layer (6) Consists of protocols that
Session layer (5) define specific user-oriented
Transport layer (4) applications such as e-mail,
Network layer (3) file transfer, and virtual
Data Link layer (2) terminal
Physical layer (1)
Part 2 – Protocols and Architecture 61
ISO/OSI functions: file transfer
Sender Receiver
7 Send file Application Receive file 7
6 Presentation 6
5 Open dialogue Session Close dialogue 5
4 Segment file Transport Reassemble file 4
Send M1 Network Receive M1
3 Send M2 Receive M2 3
Send M3 Receive M3
2 Data Link Data Link 2
1 Physical Physical 1
Physical Media Physical Media
Application (7)
Provides user-application services and procedures
Presentation (6)
Structures data in a mutually agreed format; concerned Application or
with the issues such as how to code and format data; Service-Oriented
includes data encryption Layers
Software
Session (5)
Controls process communications; responsible for
segmenting, buffering, and synchronization
Transport (4) Delivery and
Provides end-to-end control; responsible for partitioning Verification
and reassembling messages Services
Network (3)
Provides routing services for transferring data across the
network; performs network management, packet
formatting
Communication
Data Link (2)
Hardware or Network-
Organizes data into frames; provides flow initialization,
Oriented layers
flow control, link termination, and error control
Physical (1)
Transfer bits across link, defines physical characteristics
of media
Transmission Control Protocol/Internet Protocol
TCP/IP Protocol Suite (1)
Developed by the US Defense Advanced
Research Project Agency (DARPA) for its
packet switched network (ARPANET)
Used by the global Internet
No general agreement about TCP/IP model
usually described as a four- or five-layered
model
Part 2 – Protocols and Architecture 64
Transmission Control Protocol/Internet Protocol
TCP/IP Protocol Suite (2)
Formal protocol suite mainly based on two
sub protocols: TCP (OSI layer-4 protocol)
and IP (OSI layer-3 protocol)
Dominant commercial protocol architecture
Specified and extensively used before OSI
Part 2 – Protocols and Architecture 65
TCP/IP Protocol Architecture
5 layer model 4 layer model
Application layer Application layer
Host to host Host to host
or transport layer or transport layer
Internet layer Internet layer
Network access layer
or link layer
Network Interface
Physical layer
Part 2 – Protocols and Architecture 66
TCP/IP: Physical Layer
Physical interface between
data transmission device (e.g.
Application layer
computer) and transmission
Host to host
or transport layer medium or network
Internet layer Specifies characteristics of
Network access layer transmission medium
or link layer
Physical layer
Specifies nature of signals
Specifies data rates
etc.
Part 2 – Protocols and Architecture 67
TCP/IP: Link Layer
Application layer
Exchange of data between
Host to host end system and network
or transport layer
Internet layer
Provides destination address
Network access layer
Invokes services like priority
or link layer
Physical layer
Part 2 – Protocols and Architecture 68
TCP/IP: Internet Layer (IP) (1)
Transfers user messages from
Application layer
source host to destination host
Host to host
or transport layer Uses Internet or IP addresses
Internet layer as a road map to locate a host
Network access layer
or link layer within the Internet
Physical layer Systems may be attached to
different networks
Part 2 – Protocols and Architecture 69
TCP/IP: Internet Layer (IP) (2)
Application layer
Routing functions across
Host to host
or transport layer
multiple networks
Internet layer
Internet protocol (IP) is used
Network access layer to provide routing function
or link layer
Physical layer
Implemented in end systems
and routers
Part 2 – Protocols and Architecture 70
TCP/IP: Transport Layer
Application layer
Host to host
Defined by two protocols
or transport layer
User Datagram Protocol (UDP)
Internet layer
Transmission Control Protocol
Network access layer
or link layer (TCP)
Physical layer
Part 2 – Protocols and Architecture 71
TCP/IP: Transport Layer
User Datagram Protocol (UDP)
Is a connectionless protocol
Application layer Provides unreliable datagram
Host to host
or transport layer
services (no end-to-end error
Internet layer detection or correction)
Network access layer
or link layer
Does not retransmit any
Physical layer unreceived data
Requires little overhead
Part 2 – Protocols and Architecture 72
TCP/IP: Transport Layer
Transmission Control Protocol (TCP)
Is a connection-oriented protocol
Provides reliable data transmission
Application layer via end-to-end error detection and
Host to host correction
or transport layer Guarantees data are transferred
Internet layer across a network accurately and in
Network access layer proper order
or link layer
Retransmits any data not received
Physical layer
by destination node
Guarantees against data duplication
between sending and receiving
nodes
Part 2 – Protocols and Architecture 73
TCP/IP: Application Layer
Similar to OSI application layer
Application layer Serves as communication
Host to host
or transport layer interface by providing specific
Internet layer application services
Network access layer
or link layer
Examples include e-mail,
Physical layer virtual terminal, file transfer,
WWW
Part 2 – Protocols and Architecture 74
TCP/IP Protocol Architecture Model
Transmission
System
Transmitter Transmitter
Source Destination
Application Application
TCP TCP
IP IP
Network Access Network Network Access
Physical Physical
Source System Destination System
Part 2 – Protocols and Architecture 75
PDUs in TCP/IP
Application
User data
byte stream
TCP TCP
header segment
IP IP
header
datagram
Network Network-level
header packet or frame
Part 2 – Protocols and Architecture 76
OSI v TCP/IP (1)
TCP/IP development proceeded OSI
model
TCP/IP never intends to be a
international standard
TCP/IP was not specifically designed
with layers like OSI doesn't fit neatly
into the seven OSI layers
Part 2 – Protocols and Architecture 77
OSI v TCP/IP (2)
Conceptulized TCP/IP layers
Application
Transport
Host-to-Host
Internet
Network
Acces or Link
Physical
Part 2 – Protocols and Architecture 78
OSI v TCP/IP (3)
Application SNMP FTP
TFTP Telnet
Presentation NFS Finger Application
DNS SMTP
Session
BOOTP POP
Host-to-Host
Transport UDP TCP
Transport
Network IP Internet
Network
Data Link Network Interface cards
Access Network
Interface
Physical Transmission media Physical
Part 2 – Protocols and Architecture 79
Network Standards
Required to allow for interoperability between
different hardware
Advantages
Ensures a large market for equipment and software
Allows products from different vendors to communicate
Disadvantages
Freeze technology
May be multiple standards for the same thing
Part 2 – Protocols and Architecture 80
Standards Organizations
Standard Organizations can be classified into four
major groups:
National Standards Organizations
ANSI, BSI, AFNOR, DIN
Regional Standards Organizations
CEPT, CEN, ECMA
International Standards Organizations
ISO, ITU, ITU-T (former CCITT), ITU-R
Industry, Trade, and Professional Standards
Organizations
EIA, TIA, IEEE, IETF
Part 2 – Protocols and Architecture 81
Further Reading
Recommended Texts
Web sites for IETF, IEEE, ITU-T, ISO
Part 2 – Protocols and Architecture 82