Unit 1 02 Model
Unit 1 02 Model
Protocol Suites
CS44 Data Communications
2
End-to-End Communication
• Direct communication
◦ Most basic form of communication
TX TX
RX RX
GND GND Serial Port
• Internet communication
◦ Communication is performed over the Internet
Internet
3
Communication over Internet
• Two network applications should interact as if they were
directly connected
write read
App App
A B
Internet
4
Network Models
• Two models have been devised to define computer network
operations:
◦ TCP/IP protocol suite
◦ OSI model
• Protocol layering is used in both models
◦ protocol defines the rules that both the sender and receiver and all
intermediate devices need to follow to be able to communicate effectively
◦ Simple communication - may need only one simple protocol
◦ Complex communication - may need to divide the task between different layers
◦ a protocol at each layer - protocol layering
◦ Protocol layering enables us to divide a complex task into several smaller and simpler tasks
5
Simple communication: in Daily Life
• Assume Maria and Ann are neighbors with a lot of
common ideas
• Communication between Maria and Ann takes place in one
layer, face to face, in the same language
◦ A single-layer protocol - set of rules needs to be followed
◦ greet each other when they meet.
◦ confine their vocabulary to the level of their friendship
◦ refrain from speaking when the other party is speaking
◦ conversation should be a dialog, not a monolog: both should have the opportunity to
talk about the issue
◦ exchange some nice words when they leave.
6
Simple communication: in Daily Life
• professor and the students in a lecture hall
◦ mostly monolog
◦ the professor talks most of the time unless a student has a
question
◦ Student raise the hand and wait for permission to speak
◦ the communication is normally very formal and limited to the
subject being taught
7
Complex communication: in Daily Life
• two friends who communicate through postal mail
◦ The process of sending a letter to a friend would be
complex if there were no services available from the post
office.
8
Complex communication: in Daily Life
• Maria and Ann - located in a city very far from each other
◦ exchange ideas on innovative project to start a new business when they
both retire
◦ continue their conversation using regular mail through the post office
◦ do not want their ideas to be revealed by other people if the letters are
intercepted
◦ agree on an encryption/decryption technique
◦ The sender of the letter encrypts it to make it unreadable by an intruder; the receiver of
the letter decrypts it to get the original letter
9
Complex communication: in Daily Life
10
Layered Tasks
•Computer networks are complex systems
◦ Tasks involve varieties of hardware and software
components, and protocols
11
Advantages of Protocol Layering
• Allows to separate the services from the implementation
◦ A layer needs to be able to receive a set of services from the lower
layer and to give the services to the upper layer; don’t care about
how the layer is implemented.
◦ Layer N uses services provided by Layer N-1
Logical
Layer N communication path Layer N
Layer N protocol
Using
services Providing
services
Layer N-1 Layer N-1
Communication System
Layer N-2 Layer N-2
12
Advantages of Protocol Layering
• Communication does not always use only two end systems;
◦ intermediate systems that need only some layers, but not all layers
◦ If we did not use protocol layering, we would have to make each
intermediate system as complex as the end systems, which makes
the whole system more expensive.
◦ Eg. Internet
13
Principles of Protocol Layering
• Bidirectional communication - make each layer perform
two opposite tasks, one in each direction.
◦ Ex: The third layer task is to listen (in one direction) and
talk (in the other direction). The second layer needs to
be able to encrypt and decrypt. The first layer needs to
send and receive mail.
• two objects under each layer at both sites should be
identical.
◦ EX: For example, the object under layer 3 at both sites
should be a plaintext letter. The object under layer 2 at
both sites should be a ciphertext letter. The object
under layer 1 at both sites should be a piece of mail.
15
Logical Connections
• layer-to-layer communication = Logical connection
between peer layers
• Helps to understand networks
• Maria and Ann can think that there is a logical (imaginary)
connection at each layer through which they can send the
object created from that layer.
16
TCP/IP Protocol Suite
• Transmission Control Protocol/Internet Protocol
• a set of protocols organized in different layers
• used in the Internet today
• a hierarchical protocol: means that each upper level
protocol is supported by the services provided by one or
more lower level protocols
• A protocol defines the rules that both the sender and
receiver and all intermediate devices need to follow to be
able to communicate effectively.
17
Layers in TCP/IP Protocol Suite
The original TCP/IP protocol suite was Today, TCP/IP is thought of as a five-
defined as four software layers built layer model.
upon the hardware.
18
Layered Architecture
• To show how the layers in the TCP/IP protocol works, we
assume that we have following internet
◦ use the suite in a small internet made up of three LANs (links) -
each with a link-layer switch.
◦ links are connected by one router
• router -> 3-layers
• link-layer switch ->2-layers
19
Layers in the TCP/IP Protocol Suite
• To understand the duty of each layer, we need to think
about the logical connections between layers.
The duty of the application, transport, The duty of the data-link and physical layers
and network layers is end-to-end. is hop-to-hop, hop is a host or router.
Their domain of duty is the internet. Their domain of duty is the link.
20
Identical objects in TCP/IP protocol suite
• the second principle: identical objects below each layer
related to each device.
21
Internet Layer Model
• The Internet Protocol Stack
User
Application Layer Software
Transport Layer
Network Layer
Data Link Layer
Physical Layer Hardware
Transmission
Medium
22
Application Layer
Responsible for providing services to the user
• The only layer to interact with user
Data Data
Logical communication
Communication System
to Transport from Transport
23
Transport Layer
Responsible for delivery of a message
from one process to another
• Duties/services
◦ Port addressing
◦ Segmentation and reassembly
◦ Connection control
◦ Flow control (end-to-end)
◦ Error control (end-to-end)
24
Transport Layer
Process Process … Process Process …
PORT # PORT #
Data Data
25
Network Layer
Responsible for the delivery of packets
from the original source to the destination
• Duties/services
◦ Logical addressing
◦ Routing
26
Network Layer
from Transport to Transport
Data Data
27
Network Layer Operation
From transport layer
Data A1 C7 A.1, A.2, B.1, B.3, ... are logical addresses
A.1 A.2
Network A
A.5
Data A1 C7
R1
B.1
B.7 Network B
28
Data Link Layer
Responsible for transmitting frames
from one node to the next
• Duties/services
◦ Framing
◦ Physical addressing
◦ Flow control (hop-to-hop)
◦ Error control (hop-to-hop)
◦ Access control
29
Data Link Layer
from Network to Network
Data Data
30
Data Link Layer
9F, 3B, 82, 6D, ... are physical addresses
Data
9F 3B 82 6D
T2 Data 9F 6D
H2
31
Data Link Layer Operation
Data A.1 C.7
A.1 A.2
97 32 Network A
Data A.1 C.7 97 25 25 A.5
R1
B.7 B.1
79 Data A.1 C.7 79 62 Network B
32
Physical Layer
Responsible for transmitting individual bits
from one node to the next
• Duties/services
◦ Physical characteristics of interfaces and media
◦ Representation of bits
◦ Data rate (transmission rate)
◦ Synchronization of bits
33
Physical Layer
from Data Link to Data Link
Data Data
Transmission medium
34
Encapsulation and Decapsulation
35
The Big Picture
L5 data H5 5 5 L5 data H5
L4 data H4 4 4 L4 data H4
L3 data H3 3 3 L3 data H3
T2 L2 data H2 2 2 T2 L2 data H2
0111011010101001010101001 1 1 0111010101010010101010101
Transmission medium
36
Addressing
• Any communication that involves two parties needs two
addresses: source address and destination address.
• Although it looks as if we need five pairs of addresses, one
pair per layer, we normally have only four because the
physical layer does not need addresses; the unit of data
exchange at the physical layer is a bit, which definitely
cannot have an address.
37
Layers and Addresses
38
Multiplexing and Demultiplexing
• Since the TCP/IP protocol suite uses several protocols at
some layers, we can say that we have multiplexing at the
source and demultiplexing at the destination.
• Multiplexing in this case means that a protocol at a layer
can encapsulate a packet from several next-higher layer
protocols (one at a time).
• Demultiplexing means that a protocol can decapsulate and
deliver a packet to several next-higher layer protocols (one
at a time
39
Multiplexing and Demultiplexing…
• To be able to multiplex and demultiplex, a protocol needs
to have a field in its header to identify to which protocol
the encapsulated packets belong.
Ex: At the transport layer, either UDP or TCP can accept a message from several
application-layer protocols.
40
Layers and Types of Data Delivery
41
Internet Model
sender router router
receiver
Application Application
Transport Transport
Network Network Network Network
Data Link D.L. D.L. D.L. D.L. Data Link
Physical P.L. P.L. P.L. P.L. Physical
Transmission medium
42
Protocol Suites
• A set of protocols must be constructed
◦ to ensure that the resulting communication system is complete
and efficient
• Each protocol should handle a part of communication not
handled by other protocols
• How can we guarantee that protocols work well together?
◦ Instead of creating each protocol in isolation, protocols are
designed in complete, cooperative sets called suites or families
43
Internet Protocol Suite
Layer Protocols
Application HTTP, FTP, Telnet, SMTP, ...
Transport TCP, UDP, SCTP, ...
Network IP (IPv4), IPv6, ICMP, IGMP, ...
Data Link Ethernet, Wi-Fi, PPP, ...
Physical RS-232, DSL, 10Base-T, ...
44
OSI MODEL
• A word we hear all the time when we talk about the
Internet is protocol. A protocol defines the rules that
both the sender and receiver and all intermediate
devices need to follow to be able to communicate
effectively. When communication is simple, we may
need only one simple protocol; when the
communication is complex, we need a protocol at
each layer, or protocol layering.
45
OSI Model
User • OSI – Open Systems Interconnection
7.Application Layer • Developed by the International
6.Presentation Layer Standards Organizations (ISO)
5.Session Layer
4.Transport Layer
3.Network Layer • Two additional layers
◦ Presentation layer
2.Data Link Layer
◦ Session layer
1.Physical Layer
Transmission
Medium
46
Session Layer
Responsible for establishing, managing and
terminating connections between applications
• Duties/services
◦ Interaction management
Simplex, half-duplex, full-duplex
◦ Session recovery
47
Presentation Layer
Responsible for handling differences in
data representation to applications
• Duties/services
◦ Data translation
◦ Encryption
◦ Decryption
◦ Compression
48
OSI versus TCP/IP
• When we compare the two models, we find that two layers,
session and presentation, are missing from the TCP/IP
protocol suite. These two layers were not added to the
TCP/IP protocol suite after the publication of the OSI
model. The application layer in the suite is usually
considered to be the combination of three layers in the OSI
model
49
Lack of OSI Model’s Success
• The OSI model appeared after the TCP/IP protocol suite. Most
experts were at first excited and thought that the TCP/IP protocol
would be fully replaced by the OSI model. This did not happen for
several reasons, but we describe only three, which are agreed upon
by all experts in the field:
• 1. OSI was completed when TCP/IP was fully in place. changing it would cost a lot.
• 2. some layers in the OSI model were never fully defined. For example, although
the services provided by the presentation and the session layers were listed in the
document, actual protocols for these two layers were not fully defined, nor were
they fully described, and the corresponding software was not fully developed.
• 3. when OSI was implemented by an organization in a different application, it did
not show a high enough level of performance to entice the Internet authority to
switch from the TCP/IP protocol suite to the OSI model.
50
Summary
•Layered tasks are used for complex
communication details
•Layer models were created for reference
◦Internet model
◦ISO's OSI model
•Protocol suite is a collection of protocols
operating at various layers
51