Chapter 2 - William Stallings, Data and Computer

Download Report

Transcript Chapter 2 - William Stallings, Data and Computer

EEE442
Computer Networks
Introduction: Protocols
En. Mohd Nazri Mahmud
MPhil (Cambridge, UK)
BEng (Essex, UK)
[email protected]
Room 2.14
Semester 1 2008-2009
Copyright USM
Protocols and Architecture
•
•
•
•
Simple Network Architecture
The Three Layer Model
TCP/IP
OSI Model
Semester 1 2008-2009
Copyright USM
Protocol Architecture
• When computers, terminals, and/or other data
processing devices exchange data, the procedures
involved can be quite complex
• Examples?
• The peer layers communicate using a set of rules or
conventions known as a protocol.
• Instead of implementing the complex logic for this as a
single module, the task is broken up into modules.
• In a protocol architecture, the modules are arranged in a
vertical stack, each layer in the stack performs a related
subset of the functions.
• It relies on the next lower layer to perform more primitive
functions.
Semester 1 2008-2009
Copyright USM
Simplified Network Architecture
Source: Stallings
Semester 1 2008-2009
Copyright USM
The Three Layer Model
Semester 1 2008-2009
Copyright USM
The Three Layer Model
Network Access Layer, Transport layer,
Application Layer.
Network Access Layer – concerns with the
exchange of data between a computer and
the network to which it is attached
Transport Layer – Ensure reliable exchange
of data
Application Layer – contains logic needed to
support the various user applications
Semester 1 2008-2009
Copyright USM
The Three Layer Model
Semester 1 2008-2009
Copyright USM
Protocol Data Units
Semester 1 2008-2009
Copyright USM
TCP/IP Protocol Architecture
• Most widely used
• 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
Semester 1 2008-2009
Copyright USM
TCP/IP Layers
• no official model but tasks can be
separated into 5 relatively independent
layers
– Application layer
– Host-to-host, or transport layer
– Internet layer
– Network access layer
– Physical layer
Semester 1 2008-2009
Copyright USM
TCP/IP Model
Semester 1 2008-2009
Copyright USM
Physical Layer
• concerned with physical interface between
computer and network
• concerned with issues like:
– characteristics of transmission medium
– signal levels
– data rates
– other related matters
Semester 1 2008-2009
Copyright USM
Network Access Layer
• exchange of data between an end system
and attached network
• concerned with issues like :
– destination address provision
– invoking specific services like priority
– access to & routing data across a network link
between two attached systems
• allows layers above to ignore link specifics
Semester 1 2008-2009
Copyright USM
Internet Layer (IP)
•
•
•
•
•
routing functions across multiple networks
for systems attached to different networks
using IP protocol
implemented in end systems and routers
routers connect two networks and relays
data between them
Semester 1 2008-2009
Copyright USM
Transport Layer (TCP)
•
•
•
•
common layer shared by all applications
provides reliable delivery of data
in same order as sent
commonly uses TCP
Semester 1 2008-2009
Copyright USM
Application Layer
• provide support for user applications
• need a separate module for each type of
application
Semester 1 2008-2009
Copyright USM
Protocol Functions
•
•
•
•
•
•
•
•
•
Encapsulation
Segmentation and reassembly
Connection control
Ordered delivery
Flow control
Error Control
Addressing
Multiplexing
Transmission services
Semester 1 2008-2009
Copyright USM
Protocol Functions
• Encapsulation
– The addition of control information to data
– Data are accepted or generated by an entity
and encapsulated into a PDU containing that
data plus control information
– Control information falls into 3 general
categories
• Address
• Error-detecting code
• Protocol control
Semester 1 2008-2009
Copyright USM
Protocol Functions
• Segmentation and reassembly
– Segmentation is the breaking up of data into blocks of
some smaller bounded size
– Needed because
• some communication network only accept block of certain
size (eg ATM 53 octets, Ethernet – 1526 octets)
• for more efficient error control
• for more equitable access to shared transmission medium
• Can allocate smaller buffers in the receiver
• For intermediate checking and restart/recovery operations
Semester 1 2008-2009
Copyright USM
Protocol Functions
• Connection control
– For controlling connection establishment, data
transfer and termination
– Can be in connectionless or connection-oriented
mode
– Involves connection request, accepts or rejects,
acknowledgments and termination requests
– Some complex set up include negotiation concerning
some optional features of the protocol
Semester 1 2008-2009
Copyright USM
Protocol Functions
• Ordered delivery
– PDUs may go through different paths in the
network and may arrive at the destination not
in order
– Protocol ensures that data received in the
original order it was sent
Semester 1 2008-2009
Copyright USM
Protocol Functions
• Flow control
– A function performed by the receiving entity to
limit the amount or rate of data that is sent by
a transmitting entity.
Semester 1 2008-2009
Copyright USM
Protocol Functions
• Error Control
– Too guard against loss or damage data and control
information
– Typically implemented as two separate functions for
error detection and retransmission
– The sender inserts and error detecting code in the
transmitted PDU
– The receiver checks the value of the code and if an
error is detected discards the PDU.
– The sender retransmits after timeout for
acknowledgement
Semester 1 2008-2009
Copyright USM
Protocol Functions
• Addressing
– Typically, a unique address is associated with each end system
and each intermediate system (eg router). This refers to a
network-level address
– The network-level address is used to route a PDU through a
network or networks to a system indicated by a network level
address in the PDU.
– Once data arrive at a destination system, they must be routed to
some process or application in the system.
– Typically a system supports multiple applications and each
application may support multiple users
– Each application and each concurrent user is assigned a unique
identifier referred to as port in TCP/IP architecture
Semester 1 2008-2009
Copyright USM
Protocol Functions
• Multiplexing
– One form or multiplexing is supported by means of
multiple connections into a single system for example
a number of circuits are multiplexed over a single
physical interface between the end system and the
network
– Another form permits simultaneous connections for
example multiple TCP connections terminating in a
given system, each connection supporting a different
pair of ports.
Semester 1 2008-2009
Copyright USM
Protocol Functions
• Transmission services
– Priority
– Quality of service
– Security
Semester 1 2008-2009
Copyright USM
Standardized Protocol Architecture
• Standards are needed to promote interoperability among
vendor equipment and to encourage economies of scale
• Functions are broken into more manageable parts and
organised as a communications architecture
• Functions are partitioned into a hierarchical set of layers
• Each layer performs a related subset of the functions
• It relies on the next lower layer to perform more primitive
functions
• It provides services to the next higher layer
• Ideally, the layers should be defined so that changes in
one layer do not require changes in the other layers
Semester 1 2008-2009
Copyright USM
Operation of TCP and IP
Semester 1 2008-2009
Copyright USM
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
Semester 1 2008-2009
Copyright USM
Operation of TCP/IP
Semester 1 2008-2009
Copyright USM
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
Semester 1 2008-2009
Copyright USM
TCP Header
Semester 1 2008-2009
Copyright USM
User Datagram Protocol
(UDP)
•
•
•
•
•
•
an alternative to TCP
no guaranteed delivery
no preservation of sequence
no protection against duplication
minimum overhead
adds port addressing to IP
Semester 1 2008-2009
Copyright USM
UDP Header
Semester 1 2008-2009
Copyright USM
IP Header
Semester 1 2008-2009
Copyright USM
IPv6 Header
Semester 1 2008-2009
Copyright USM
TCP/IP Applications
• have a number of standard TCP/IP
applications such as
– Simple Mail Transfer Protocol (SMTP)
– File Transfer Protocol (FTP)
– Telnet
Semester 1 2008-2009
Copyright USM
OSI
• Open Systems Interconnection
• developed by the International
Organization for Standardization (ISO)
• has seven layers
Semester 1 2008-2009
Copyright USM
OSI Layers
Semester 1 2008-2009
Copyright USM
OSI v TCP/IP
Semester 1 2008-2009
Copyright USM