Data and Computer
Communications
Chapter 2 – Protocol Architecture,
TCP/IP, and Internet-Based
Applications
1
Need For Protocol Architecture
data exchange can involve complex
procedures
better if task broken into subtasks
implemented separately in layers in stack each layer provides functions needed to perform
communication for layers above
using functions provided by layers below
modularization eases maintenance, updating of
system
peer layers communicate with a protocol2Dr. Mohammed Arafah
OSI
OSI: Open Systems Interconnection
Developed by the International
Organization for Standardization (ISO)
Has seven layers – too many
Is a theoretical system delivered
TCP/IP is the de facto standard
3Dr. Mohammed Arafah
OSI Layers
4Dr. Mohammed Arafah
Application
Data Link
Presentation
Network
Physical
Session
Transport
Physical Medium
Application
Data Link
Presentation
Network
Physical
Session
Transport
Host A Host B
ISO/OSI Reference Model
5Dr. Mohammed Arafah
Application
Data Link
Presentation
Network
Physical
Session
Transport
Physical Medium
Application
Data Link
Presentation
Network
Physical
Session
Transport
Layer 7 Protocol
Layer 1 Protocol
Layer 2 Protocol
Layer 3 Protocol
Layer 4 Protocol
Layer 5 Protocol
Layer 6 ProtocolLayer 6/7 Interface
Layer 5/6 Interface
Layer 4/5 Interface
Layer 3/4 Interface
Layer 2/3 Interface
Layer 1/2 Interface
Host A Host B
ISO/OSI Reference Model
Exchanged Unit
Bit
Frame
Packet (Datagram)
Segment
SPDU
PPDU
APDU
6Dr. Mohammed Arafah
ISO/OSI Reference Model
Dr. Mohammed Arafah
The entities comprising the corresponding layers on
different machines are called peers.
Protocol: It is an agreement between peers on how
communication is to proceed.
Peers can communicate by using Protocols.
Interface: It defines the primitive operations and services
the lower layer makes available to the upper layer.
A Service Access Point (SAP) has an address that
uniquely identifies where the service can be accessed.
A set of layers and protocols is called a Network
Architecture.
Standardized Protocol
Architectures
8Dr. Mohammed Arafah
Layer Specific Standards
9Dr. Mohammed Arafah
The OSI Environment
10Dr. Mohammed Arafah
ISO/OSI Reference Model
11Dr. Mohammed Arafah
ISO/OSI Reference Model
1. The Physical Layer:
It concerns with transmitting raw bits over a communication
channel.
Voltage Levels for 0 and 1.
Connectors: Number of bins and purpose of each bin.
Transmission Media.
Attenuation and Distortion.
Analog PSTN Circuits and Digital Leased Circuits.
12Dr. Mohammed Arafah
ISO/OSI Reference Model
2. The Data Link Layer:
FRAME is the basic protocol unit
Framing:
create and recognize frame boundaries.
encapsulate datagram into frame, adding header, trailer
Addressing:
MAC (Physical) Addressing.
Point-to-point Error Detection
Point-to-point flow control
Medium Access Control (MAC) Protocols
Header Message Trailer
13Dr. Mohammed Arafah
Ethernet Frame
14Dr. Mohammed Arafah
Preamble SFDDestination
Address
7 bytes 1 byte 6 bytes 4 bytes2 bytes6 bytes
Source
AddressLength
Data = IP
PacketPad
1500 bytes
FCS
PACKET
ISO/OSI Reference Model
2. The Data Link Layer:
Medium Access Control (MAC)
single shared broadcast channel
two or more simultaneous transmissions by nodes:
interference
collision if node receives two or more signals at the
same time
shared RF
(e.g., 802.11 WiFi)
shared wire (e.g.,
cabled Ethernet)
15Dr. Mohammed Arafah
ISO/OSI Reference Model2. The Data Link Layer:
Medium Access Control (MAC) Protocols:
Channel Partitioning
divide channel into smaller “pieces” (time slots, frequency,
code)
allocate piece to node for exclusive use
Random Access
channel not divided, allow collisions
“recover” from collisions
“Taking turns”
nodes take turns, but nodes with more to send can take
longer turns
16Dr. Mohammed Arafah
ISO/OSI Reference Model
3. The Network Layer:
PACKET (DATAGRAM) is the basic protocol unit
Addressing
IP Addressing
Routing: It determines how packets are routed from
source to destination.
Congestion Control: Many packets in the subnet trying to
use the same route.
Internetworking: It allows heterogeneous networks to be
interconnected.
17Dr. Mohammed Arafah
ISO/OSI Reference Model
4. The Transport Layer:
SEGMENT is the basic protocol unit
Disassembling and Reassembling: It accepts data from
a session layer, split it up to smaller units if needed, pass
these to the network layer, and ensure that the pieces all
arrive correctly at the other end.
End-to-end error control.
End-to-end flow control.
Addressing
Ports
18Dr. Mohammed Arafah
ISO/OSI Reference Model5. The Session Layer:
• It allows users on different machines to establish sessionsbetween them.
• Interaction Management: The data exchange associated with adialog may be:
– Duplex: Two-way simultaneous.– Half-Duplex: Two-way alternate.– Simplex: One-way.
6. The Presentation Layer:
• Data Compression.
• Data Encryption.
7. The Application Layer:• The application layer contains a variety of protocols that are
commonly needed.
19Dr. Mohammed Arafah
Use of a Relay
20Dr. Mohammed Arafah
TCP/IP Protocol Architecture
developed by US Defense Advanced Research Project Agency (DARPA)
for ARPANET packet switched network
used by the global Internet
protocol suite comprises a large collection of standardized protocols
21Dr. Mohammed Arafah
OSI v TCP/IP
22Dr. Mohammed Arafah
Internet protocol stack• application: supporting network
applications
– FTP, SMTP, HTTP
• transport: process-process data transfer
– TCP, UDP
• network: routing of datagrams from
source to destination
– IP, routing protocols
• link: data transfer between neighboring
network elements
– PPP, Ethernet
• physical: bits “on the wire”
application
transport
network
Data link
physical
23Dr. Mohammed Arafah
Operation of TCP/IP
24Dr. Mohammed Arafah
Encapsulation
DataTransport Header
Segment
Network Header
Packet
Header Trailer
Frame
25Dr. Mohammed Arafah
Protocol Data Units
26Dr. Mohammed Arafah
Segments
Packets
Application
Data Link
Network
Physical
Transport
Physical Medium
Application
Data Link
Network
Physical
Transport
Host A Host B
TCP/IP Reference Model
27Dr. Mohammed Arafah
TCP/IP Reference Model
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Physical Physical
Repeater
RepeaterSenderReceiver
28Dr. Mohammed Arafah
TCP/IP Reference Model
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Physical
Data Link
Physical
Switch
Sender
Receiver
MAC: 10
MAC: 45
MAC: 55
MAC: 83
MAC: 42
10 83
Frame
Switch10 83
Frame
29Dr. Mohammed Arafah
TCP/IP Reference Model
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
a b
MAC Addresses
IP Addresses
w z
a b c d
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
c d
w z
z Interface 3w z
30Dr. Mohammed Arafah
TCP/IP Reference Model
Application
Data Link
Network
Physical
Transport
Host A
Data Link
Physical
Data Link
Network
Physical
Router
Application
Data Link
Network
Physical
Transport
Host B
Data Link
Physical
Data Link
Network
Physical
Router
Sender Receiver
Router
MAC: a
IP = uMAC: b
IP = vMAC: c
IP = w
MAC: f
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Router
MAC: d
IP = xMAC: e
IP = y
Interface 4 Interface 1
Interface 2Interface 3
a b c d e f
z Interface 3u z z Interface 1u z
u z
e f
u z
a b
31Dr. Mohammed Arafah
TCP/IP Reference Model
application
transport
network
data link
physical
application
transport
network
data link
physical
network
data link
physical network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physical
network
data link
physicalnetwork
data link
physical
Dr. Mohammed Arafah CT1403 32
source
applicationtransportnetwork
linkphysical
HtHn M
segment Ht
datagram
destination
applicationtransportnetwork
linkphysical
HtHnHl M
HtHn M
Ht M
M
networklink
physical
linkphysical
HtHnHl M
HtHn M
HtHn M
HtHnHl M
router
switch
Encapsulationmessage M
Ht M
Hn
frame
33Dr. Mohammed Arafah
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
34Dr. Mohammed Arafah
Send Data
1
Application
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
35Dr. Mohammed Arafah
Disassembling:
Split data into smaller
units
Reliable Data Transfer:
Sequence Number
Retransmission list
Start timer upon
transmission
Flow Control:
Receiver Window
size
Forming Segments
2Transport
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
36Dr. Mohammed Arafah
IP addressing
Forming Packets
3Network
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
37Dr. Mohammed Arafah
Forming Frames
Encapsulate Packet
into frame, adding
header, trailer
MAC (Physical)
Addressing for point
to point connection
Computing
checksum for error
detection
4
Data Link
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
38Dr. Mohammed Arafah
Convert bits to a
signal
5
Physical
Transmission Media
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
39Dr. Mohammed Arafah
Convert the received
signal into bits
6
Physical
Transmission Media
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
40Dr. Mohammed Arafah
Frame Boundary
Detection
Error Detection
Checking the
correctness of the
frame
Checking the MAC
Address
De-encapsulate the
frame and extract the
packet
7
Data Link
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
41Dr. Mohammed Arafah
Routing
8
Network
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
42Dr. Mohammed Arafah
Forming Frames
Encapsulate Packet
into frame, adding
header, trailer
MAC (Physical)
Addressing for point
to point connection
Computing the
checksum for error
detection
9
Data Link
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
43Dr. Mohammed Arafah
Convert bits to a
signal
10
Physical
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
44Dr. Mohammed Arafah
Convert the received
signal into bits
11
Physical
Transmission Media
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
45Dr. Mohammed Arafah
Frame Boundary
Detection
Error Detection
Checking the
correctness of the
frame
Checking the MAC
Address
De-encapsulate the
frame and extract the
packet
12
Data Link
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
46Dr. Mohammed Arafah
Extract the Segment
13 Network
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
47Dr. Mohammed Arafah
Reliable Data Transfer:
Send to the sender an
ACKNOWLEDGEMENT
for a correct segment, and
a NEGATIVE
ACKNOWLEDGEMENT
for an incorrect segment
Ordered Delivery:
Sequence Number
Re-assembling
14Transport
Example of Data Transmission
Sender Receiver
Router
MAC: a
IP = wMAC: b
IP = xMAC: c
IP = y
MAC: d
IP = z
Interface 1 Interface 3
Interface 4Interface 2
Application
Data Link
Network
Physical
Transport
Application
Data Link
Network
Physical
Transport
Host A Host B
Data Link
Physical
Data Link
Network
Physical
Router
48Dr. Mohammed Arafah
Receive Data
15
Application
TCP/IP Layers
Application layer
Transport layer
Internet layer
Network access layer
Physical layer
49Dr. Mohammed Arafah
Addressing Requirements
two levels of addressing required
each host on a subnet needs a unique
global network address
its IP address
each application on a (multi-tasking) host
needs a unique address within the host
known as a port
50Dr. Mohammed Arafah
Operation of TCP and IP
51Dr. Mohammed Arafah
Transmission Control Protocol (TCP)
usual transport layer is (TCP)
provides a reliable connection for transfer of data between applications
a TCP segment is the basic protocol unit
TCP tracks segments between entities for duration of each connection
52Dr. Mohammed Arafah
TCP Header
53Dr. Mohammed Arafah
User Datagram Protocol
(UDP)
an alternative to TCP
no guaranteed delivery
no preservation of sequence
no protection against duplication
minimum overhead
54Dr. Mohammed Arafah
UDP Header
55Dr. Mohammed Arafah
IP Header
56Dr. Mohammed Arafah
IPv6 Header
57Dr. Mohammed Arafah
Ethernet Frame
58Dr. Mohammed Arafah
Preamble SFDDestination
Address
7 bytes 1 byte 6 bytes 4 bytes2 bytes6 bytes
Source
AddressLength
Data = IP
PacketPad
1500 bytes
FCS
PACKET
TCP/IP Applications
have a number of standard TCP/IP
applications such as
Simple Mail Transfer Protocol (SMTP)
File Transfer Protocol (FTP) – control and
data connections
Telnet
HTTP
59Dr. Mohammed Arafah
Some TCP/IP Protocols
60Dr. Mohammed Arafah
Traditional vs Multimedia
Applications
traditionally Internet dominated by info
retrieval applications
typically using text and image transfer
E.g. email, file transfer, web
see increasing growth in multimedia
applications
involving massive amounts of data
such as streaming audio and video
61Dr. Mohammed Arafah
Elastic and Inelastic Traffic
elastic traffic
can adjust to delay & throughput changes
over a wide range
E.g. traditional “data” style TCP/IP traffic
some applications more sensitive though
inelastic traffic
does not adapt to such changes
E.g. “real-time” voice & video traffic
need minimum requirements on net arch62Dr. Mohammed Arafah
Summary
introduced need for protocol architecture
OSI Model & protocol architecture
standardization
TCP/IP protocol architecture
traditional vs multimedia application needs
63Dr. Mohammed Arafah