Need For Protocol Architecture
Chapter 2 E.g. File transfer
Source must activate comms. Path or inform network
of destination
Source must check destination is prepared to receive
Protocols and Architecture File transfer application on source must check
destination file management system will accept and
store file for his user
May need file format translation
Task broken into subtasks
Implemented separately in layers in stack
Functions needed in both systems
Peer layers communicate
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
Key Elements of a Protocol Protocol Architecture
Syntax Task of communication broken up into modules
Data formats For example file transfer could use three
Signal levels modules
Semantics File transfer application
Control information Communication service module
Error handling Network access module
Timing
Speed matching
Sequencing
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
1
Simplified File Transfer
Architecture A Three Layer Model
Network Access Layer
Transport Layer
Application Layer
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
Network Access Layer Transport Layer
Exchange of data between the computer and Reliable data exchange
the network Independent of network being used
Sending computer provides address of Independent of application
destination
May invoke levels of service
Dependent on type of network used (LAN,
packet switched etc.)
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
2
Protocol Architectures and
Application Layer Networks
Support for different user applications
e.g. e-mail, file transfer
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
Protocols in Simplified
Addressing Requirements Architecture
Two levels of addressing required
Each computer needs unique network address
Each application on a (multi-tasking) computer
needs a unique address within the computer
The service access point or SAP
The port on TCP/IP stacks
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
3
Protocol Data Units (PDU) Protocol Data Units
At each layer, protocols are used to
communicate
Control information is added to user data at
each layer
Transport layer may fragment user data
Each fragment has a transport header added
Destination SAP
Sequence number
Error detection code
This gives a transport protocol data unit
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
Operation of a Protocol
Network PDU Architecture
Adds network header
network address for destination computer
Facilities requests
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
4
Standardized Protocol
Architectures OSI
Required for devices to communicate Open Systems Interconnection
Vendors have more marketable products Developed by the International Organization for
Customers can insist on standards based Standardization (ISO)
equipment Seven layers
Two standards: A theoretical system delivered too late!
OSI Reference model TCP/IP is the de facto standard
Never lived up to early promises
TCP/IP protocol suite
Most widely used
Also: IBM Systems Network Architecture (SNA)
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
OSI - The Model OSI Layers
A layer model
Each layer performs a subset of the required
communication functions
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
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
5
OSI as Framework for
The OSI Environment Standardization
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
Layer Specific Standards Elements of Standardization
Protocol specification
Operates between the same layer on two systems
May involve different operating system
Protocol specification must be precise
Format of data units
Semantics of all fields
allowable sequence of PCUs
Service definition
Functional description of what is provided
Addressing
Referenced by SAPs
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
6
Service Primitives and
Parameters Primitive Types
Services between adjacent layers expressed in REQUEST A primitive issued by a service user to invoke some
service and to pass the parameters needed to
terms of primitives and parameters specify fully the requested service
Primitives specify function to be performed INDICATION A primitive issued by a service provider either to:
indicate that a procedure has been invoked by the
Parameters pass data and control info peer service user on the connection and to provide
the associated parameters, or
notify the service user of a provider-initiated action
RESPONSE A primitive issued by a service user to acknowledge
or complete some procedure previously invoked by
an indication to that user
CONFIRM A primitive issued by a service provider to
acknowledge or complete some procedure
previously invoked by a request by the service user
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
Timing Sequence for Service
Primitives OSI Layers (1)
Physical
Physical interface between devices
Mechanical
Electrical
Functional
Procedural
Data Link
Means of activating, maintaining and deactivating a
reliable link
Error detection and control
Higher layers may assume error free transmission
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
7
OSI Layers (2) OSI Layers (3)
Network Session
Transport of information Control of dialogues between applications
Higher layers do not need to know about underlying technology Dialogue discipline
Not needed on direct links Grouping
Transport Recovery
Exchange of data between end systems
Presentation
Error free
In sequence
Data formats and coding
No losses Data compression
No duplicates Encryption
Quality of service Application
Means for applications to access OSI environment
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
Use of a Relay TCP/IP Protocol Architecture
Developed by the US Defense Advanced
Research Project Agency (DARPA) for its packet
switched network (ARPANET)
Used by the global Internet
No official model but a working one.
Application layer
Host to host or transport layer
Internet layer
Network access layer
Physical layer
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
8
Physical Layer Network Access Layer
Physical interface between data transmission Exchange of data between end system and
device (e.g. computer) and transmission network
medium or network Destination address provision
Characteristics of transmission medium Invoking services like priority
Signal levels
Data rates
etc.
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
Internet Layer (IP) Transport Layer (TCP)
Systems may be attached to different networks Reliable delivery of data
Routing functions across multiple networks Ordering of delivery
Implemented in end systems and routers
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
9
Application Layer OSI v TCP/IP
Support for user applications
e.g. http, SMPT
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
TCP UDP
Usual transport layer is Transmission Control Protocol Alternative to TCP is User Datagram Protocol
Reliable connection
Not guaranteed delivery
Connection
Temporary logical association between entities in different No preservation of sequence
systems No protection against duplication
TCP PDU
Minimum overhead
Called TCP segment
Includes source and destination port (c.f. SAP) Adds port addressing to IP
Identify respective users (applications)
Connection refers to pair of ports
TCP tracks segments between entities on each
connection
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
10
TCP/IP Concepts Addressing level
Level in architecture at which entity is named
Unique address for each end system (computer)
and 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 (OSI)
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
Trace of Simple Operation PDUs in TCP/IP
Process associated with port 1 in host A sends
message to port 2 in host B
Process at A hands down message to TCP to
send to port 2
TCP hands down to IP to send to host B
IP hands down to network layer (e.g. Ethernet)
to send to router J
Generates a set of encapsulated PDUs
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
11
Example Header Information Some Protocols in TCP/IP Suite
Destination port
Sequence number
Checksum
Corneliu Zaharia Corneliu Zaharia
CNET - 2005 CNET - 2005
12