Data and Computer Communications: - Protocol Architecture, TCP/IP, and Internet-Based Applications

You might also like

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

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 protocol
Dr. Mohammed Arafah 2
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

Dr. Mohammed Arafah 3


OSI Layers

Dr. Mohammed Arafah 4


ISO/OSI Reference Model
Host A Host B
Application Application

Presentation Presentation

Session Session

Transport Transport

Network Network

Data Link Data Link

Physical Physical

Physical Medium
Dr. Mohammed Arafah 5
ISO/OSI Reference Model
Host A Exchanged Unit
Host B
Layer 7 Protocol
Application Application APDU
Layer 6/7 Interface
Layer 6 Protocol
Presentation Presentation PPDU
Layer 5/6 Interface Layer 5 Protocol
Session Session SPDU
Layer 4/5 Interface
Layer 4 Protocol
Transport Transport Segment
Layer 3/4 Interface
Layer 3 Protocol
Network Network Packet (Datagram)
Layer 2/3 Interface
Layer 2 Protocol
Data Link Data Link Frame
Layer 1/2 Interface Layer 1 Protocol
Physical Physical Bit

Physical Medium
Dr. Mohammed Arafah 6
ISO/OSI Reference Model
 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.

Dr. Mohammed Arafah


Standardized Protocol
Architectures

Dr. Mohammed Arafah 8


Layer Specific Standards

Dr. Mohammed Arafah 9


The OSI Environment

Dr. Mohammed Arafah 10


ISO/OSI Reference Model

Dr. Mohammed Arafah 11


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.

Dr. Mohammed Arafah 12


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
Header Message Trailer

 Addressing:
 MAC (Physical) Addressing.
 Point-to-point Error Detection
 Point-to-point flow control
 Medium Access Control (MAC) Protocols
Dr. Mohammed Arafah 13
Ethernet Frame

7 bytes 1 byte 6 bytes 6 bytes 2 bytes  1500 bytes 4 bytes

Destination Source Data = IP


Preamble SFD Length Pad FCS
Address Address Packet

PACKET

Dr. Mohammed Arafah 14


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 wire (e.g., shared RF


cabled Ethernet) (e.g., 802.11 WiFi)

Dr. Mohammed Arafah 15


ISO/OSI Reference Model
2. 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

Dr. Mohammed Arafah 16


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.

Dr. Mohammed Arafah 17


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

Dr. Mohammed Arafah 18


ISO/OSI Reference Model
5. The Session Layer:
• It allows users on different machines to establish sessions
between them.
• Interaction Management: The data exchange associated with a
dialog 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.

Dr. Mohammed Arafah 19


Use of a Relay

Dr. Mohammed Arafah 20


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

Dr. Mohammed Arafah 21


OSI v TCP/IP

Dr. Mohammed Arafah 22


Internet protocol stack
• application: supporting network
applications
– FTP, SMTP, HTTP application
• transport: process-process data transfer
– TCP, UDP transport
• network: routing of datagrams from
source to destination network
– IP, routing protocols
• link: data transfer between neighboring Data link
network elements
– PPP, Ethernet physical
• physical: bits “on the wire”

Dr. Mohammed Arafah 23


Operation of TCP/IP

Dr. Mohammed Arafah 24


Encapsulation

Transport
Network Header
Data
Header Header Trailer
Segment
Packet

Frame

Dr. Mohammed Arafah 25


Protocol Data Units

Segments

Packets

Dr. Mohammed Arafah 26


TCP/IP Reference Model

Host A Host B
Application Application

Transport Transport

Network Network

Data Link Data Link

Physical Physical

Physical Medium

Dr. Mohammed Arafah 27


TCP/IP Reference Model

Sender Repeater
Receiver

Host A Host B
Application Application

Transport Transport

Network Network

Data Link Data Link

Physical Physical Physical Physical


Repeater
Dr. Mohammed Arafah 28
TCP/IP Reference Model Switch
10 83 Receiver
10 83 Frame
Frame
Sender

MAC: 83

MAC: 10
MAC: 45
Host A MAC: 42 MAC: 55 Host B
Application Application

Transport Transport

Network Network

Data Link Data Link Data Link

Physical Physical Physical Physical


Switch
Dr. Mohammed Arafah 29
TCP/IP Reference Model
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
Application Application

Transport Transport
w z z  Interface 3

w z Network Network Network w z


IP Addresses
a b c d
a b Data Link Data Link Data Link Data Link c d
MAC Addresses

Physical Physical Physical Physical


Router

Dr. Mohammed Arafah 30


TCP/IP Reference Model
MAC: a MAC: b MAC: c MAC: d MAC: e MAC: f
IP = u IP = v IP = w IP = x IP = y IP = z
Interface 1 Interface 3 Interface 1
Interface 4
Interface 2 Interface 4 Interface 3 Interface 2
Router Router
Sender Receiver

Host A Host B
Application Application

Transport Transport
u z z  Interface 3 u z z  Interface 1

Network Network Network Network u z


u z

a b c d e f
Data Link Data Link Data Link Data Link Data Link Data Linke f
a b

Physical Physical Physical Physical Physical Physical

Router Router

Dr. Mohammed Arafah 31


TCP/IP Reference Model
application
transport
network
data link
physical
network network
data link data link
network physical
physical
data link
physical network network
data link data link
physical physical

network network
data link data link
physical physical
network
data link
physical
application
network transport
data link network
network
physical data link
network data link
physical
data link physical
physical

Dr. Mohammed Arafah CT1403 32


source
message M application
Encapsulation
segment Ht M transport
datagram Hn Ht M network
frame Hl Hn Ht M link
physical
link
physical

switch

destination H n Ht M network
M application Hl Hn Ht M link Hn Ht M
Ht M transport physical
Hn Ht M network
Hl Hn Ht M link router
physical

Dr. Mohammed Arafah 33


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

 Send Data
Host A Host B
Application Application
1
Transport Transport

Network Network Network

Data Link Data Link Data Link Data Link

Physical Physical Physical Physical


Router

Dr. Mohammed Arafah 34


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
Application Application

2
Transport
Transport Transport
 Disassembling:
 Split data into smaller
units
Network Network Network
 Reliable Data Transfer:
 Sequence Number
 Retransmission list
 Start timer upon
transmission
Data Link Data Link Data Link Data Link
 Flow Control:
 Receiver Window
size Physical Physical Physical Physical
 Forming Segments

Router

Dr. Mohammed Arafah 35


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
Application Application

Transport Transport
3
Network Network Network
 IP addressing

 Forming Packets
Data Link Data Link Data Link Data Link

Physical Physical Physical Physical


Router

Dr. Mohammed Arafah 36


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
Application Application

Transport Transport

Network Network Network


4
Data Link Data Link Data Link Data Link
 Forming Frames
 Encapsulate Packet
into frame, adding
header, trailer
Physical Physical Physical Physical
 MAC (Physical)
Addressing for point
to point connection
 Computing
Router
checksum for error
detection

Dr. Mohammed Arafah 37


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
Application Application

Transport Transport

Network Network Network

Data Link Data Link Data Link Data Link

 Convert bits to a Physical Physical Physical Physical


signal

5
Transmission Media
Router

Dr. Mohammed Arafah 38


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
Application Application

Transport Transport

Network Network Network

Data Link Data Link Data Link Data Link

Physical Physical
Physical Physical Physical
 Convert the received
signal into bits

Transmission Media
6 Router

Dr. Mohammed Arafah 39


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
Application Application
 Frame Boundary
Detection

Transport
 Error Detection Transport
 Checking the
correctness of the
frame
Network
 Checking the MAC Network Network
Address

 De-encapsulate the
Data Link frame and extract the
packet
Data
DataLink
Link Data Link Data Link
7
Physical Physical Physical Physical
Router

Dr. Mohammed Arafah 40


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
Application Application

Transport Transport
Routing
Network Network Network
8
Data Link Data Link Data Link Data Link

Physical Physical Physical Physical


Router

Dr. Mohammed Arafah 41


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
Application Application

Transport Transport

Network Network Network


9
Data Link Data Link Data Link  Forming Frames Data Link
 Encapsulate Packet
into frame, adding
header, trailer
Physical Physical Physical  MAC (Physical) Physical
Addressing for point
to point connection
Router  Computing the
checksum for error
detection

Dr. Mohammed Arafah 42


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
Application Application

Transport Transport

Network Network Network

Data Link Data Link Data Link Data Link

Physical Physical Physical Physical


 Convert bits to a
signal

Router 10

Dr. Mohammed Arafah 43


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
Application Application

Transport Transport

Network Network Network

Data Link Data Link Data Link Data Link

Physical Physical Physical Physical


 Convert the received
signal into bits

Transmission Media
Router 11

Dr. Mohammed Arafah 44


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
Application Application
 Frame Boundary
Detection

Transport  Error Detection


 Checking the
Transport
correctness of the
frame

Network Network  Checking the MAC


Address
Network
 De-encapsulate the
frame and extract the
Data Link Data Link Data Link packet Data Link
12
Physical Physical Physical Physical
Router

Dr. Mohammed Arafah 45


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
Application Application

Transport Transport
 Extract the Segment

Network Network 13 Network

Data Link Data Link Data Link Data Link

Physical Physical Physical Physical


Router

Dr. Mohammed Arafah 46


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router  Reliable Data Transfer:
Sender  Send to the sender an Receiver
ACKNOWLEDGEMENT
for a correct segment, and
Host A a NEGATIVE
Host B
ACKNOWLEDGEMENT
for an incorrect segment
Application Application
 Ordered Delivery:
 Sequence Number

 Re-assembling
Transport Transport
14

Network Network Network

Data Link Data Link Data Link Data Link

Physical Physical Physical Physical


Router

Dr. Mohammed Arafah 47


Example of Data Transmission
MAC: a MAC: b MAC: c MAC: d
IP = w IP = x IP = y IP = z
Interface 1 Interface 3

Interface 2 Interface 4
Router
Sender Receiver

Host A Host B
 Receive Data

Application Application
Application
15
Transport Transport

Network Network Network

Data Link Data Link Data Link Data Link

Physical Physical Physical Physical


Router

Dr. Mohammed Arafah 48


TCP/IP Layers
 Application layer
 Transport layer
 Internet layer
 Network access layer
 Physical layer

Dr. Mohammed Arafah 49


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

Dr. Mohammed Arafah 50


Operation of TCP and IP

Dr. Mohammed Arafah 51


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

Dr. Mohammed Arafah 52


TCP Header

Dr. Mohammed Arafah 53


User Datagram Protocol
(UDP)
 an alternative to TCP
 no guaranteed delivery
 no preservation of sequence
 no protection against duplication
 minimum overhead

Dr. Mohammed Arafah 54


UDP Header

Dr. Mohammed Arafah 55


IP Header

Dr. Mohammed Arafah 56


IPv6 Header

Dr. Mohammed Arafah 57


Ethernet Frame

7 bytes 1 byte 6 bytes 6 bytes 2 bytes  1500 bytes 4 bytes

Destination Source Data = IP


Preamble SFD Length Pad FCS
Address Address Packet

PACKET

Dr. Mohammed Arafah 58


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

Dr. Mohammed Arafah 59


Some TCP/IP Protocols

Dr. Mohammed Arafah 60


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

Dr. Mohammed Arafah 61


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 arch
Dr. Mohammed Arafah 62
Summary
 introduced need for protocol architecture
 OSI Model & protocol architecture
standardization
 TCP/IP protocol architecture
 traditional vs multimedia application needs

Dr. Mohammed Arafah 63

You might also like