March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 1
Telecommunication Protocols Laboratory Course
Lecture 1
G721 (KTF)
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 2
Behind the name
• Telecommunication: the science and technology of
transmitting information (words, sounds, images) over great distances, in the form of electromagnetic signals (telegraph, telephone, radio, TV)
• In short: communication at a distance
• Protocol: a set of conventions governing the treatment and especially the formatting of data in an electronic
communications system
=> underlying framework : COMPUTER NETWORKS
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 3
Preliminaries
• 2 credits, 20h–course, weeks 10-19, Thu from 8:30 to 10 AM
• Goal of the course: to understand the
specifics of telecommunication protocols
• How to get there
– Simulate protocols
– Teams formed, of 2-4 persons
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 4
Preliminaries 2
• How to get to the goal
– Each team chooses their protocols and simulate them in whatever framework they agree upon – The result has to work
– User interface not essential but not neglected
either
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 5
Other details
• Lectures 1-6: teaching, forming groups, choosing protocols, start implementing
• Remaining time: implementation and feedback
• Individuals are graded based on the log
• There is no exam
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 6
Networks
• Definition
– autonomous computing systems (NODES) are interconnected
• Result
– resources and information are accessible, independently of their physical location
• Advantages
– resource sharing and redundancy – parallel processing
⇒ improved reliability, availability, and performance
• Tradeoff
− increased complexity
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 7
Network taxonomy
• Criterion: transmission technology
– Broadcast links – Point-to-point links
• Criterion: scale (geographical extent)
– Very local area networks (personal area network) – Local area networks LAN
– Metropolitan area networks MAN – Wide area networks WAN
– Internetworks
• Criterion: organization
– Private networks – Public networks
• Other criterions
– Wireless networks – Home networks
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 8
Networks for Communication
• Basic form of communications
– shared memory – message exchange
• Networks are loosely coupled, they are links w/o memory
⇒ there is no shared memory
⇒ applications residing on different nodes cooperate ONLY by passing messages to each other
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 9
Communication
Application Application
Network
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 10
Network Layers
• Networks organized as stacks of layers
• Each layer
– is built upon the one below it
– offers certain services to the higher layers
– shields higher layers from the implementation of the services
• The number, contents, functions and names of layers depends on the network
• Layer n on one machine communicates with layer n on another machine
– Rules and conventions used in this: layer n protocol
– Entities comprising the corresponding layers on different machines:
peers (processes, hardware devices, humans)
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 11
Interfaces
• Between each pair of adjacent layers
• Define which primitive operations and services the lower layer makes available to the upper one
• Clean interfaces between layers -> an important issue for network designers
⇒each layer performs a specific collection of well-understood functions
• Clear-cut interfaces
• Make it simpler to replace the implementation of one layer with a completely different implementation
• Minimize the amount of information that must be passed between layers
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 12
Layers, protocols, and interfaces
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 13
Network architecture
• Is a set of layers and protocols
• The spec of the architecture should contain enough
information for building layers that obbey the protocols
• Interfaces and details of implementation are not part of the architecture
• Protocol stack Æ list of protocols, one per layer, used by a certain system
Protocol Stack 1
I like rabbits Location A
3
2
1
3
2
1 Location B
Message Philosopher
Translator
Secretary Information
for the remote translator
Information for the remote secretary L: Dutch
Ik vind konijnen leuk
Fax #--- L: Dutch Ik vind konijnen leuk
J'aime bien les lapins
L: Dutch Ik vind konijnen leuk
Fax #--- L: Dutch Ik vind konijnen leuk
The philosopher-translator-secretary architecture.
Protocol Stack 2
Example information flow supporting virtual communication in layer 5.
Design Issues for the Layers
• Addressing
– Layers need to identify senders and receivers
• Data Transfer Rules
– Directions of data travel, logical channels
• Error Control
– Many error-detecting and error-controlling codes exist – The peers have to agree on which ones are used
– The receiver has to inform the sender about correctly received messages
• Flow Control
– Keep a faster sender from swamping a slow receiver
• Arbitrarily long messages
• Multiplexing and demultiplexing
– Using the same connection for multiple, unrelated communications
• Routing
– If multiple paths between source and destination exist, a route must be chosen
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 17
Types of services
• Layers offer 2 types of services to the layers above them
– Connection-oriented – Connectionless
• Connection-oriented network service
– Service user establishes connection, uses it, then releases it – Connection Æ tube
– Negotiation between sender, receiver, subnet on parameters such as: maximum message size, quality of service, etc
• Connectionless network service
– Each message carries the full destination address and is routed through the system independently of all the others
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 18
Types of services 2
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 19
Quality of service
• Usually
– refers to reliability of services (not losing data)
– implemented by having the receiver acknowledge the receipt of each message so the sender is sure it arrived
– acknowledgement process introduces overhead and delays
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 20
Service primitives
• A service is formally specified by a set of primitives (operations) available to a user process to access the service
(Primitives for implementing a simple connection-oriented service)
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 21
Service primitives 2
Packets sent in a simple client-server interaction on a connection-oriented network.
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 22
Services and protocols
• Service
– Set of primitives that a layer provides to the layer above it
– Defines what operations the layer is prepared to perform on behalf of its users
– Relates to an interface between 2 layers: service provider and service user
• Protocol
– Set of rules governing the format and meaning of packets (messages) that are exchanged by peer entities within a layer – Implements service definitions
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 23
A layer with services and protocols
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 24
Reference models
• Network architectures
– OSI reference model – TCP/IP reference model
• OSI
– The associated protocols are not really used – The model is quite general and still valid
– Features discussed at each layer are still important
• TCP/IP
– The model is not of much use – The protocols are widely used
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 25
OSI/ISO reference model
• Based on a proposal of ISO (International Standards Organization)
• Intended as a first step toward international standardization of protocols used in the various layers (1983, revised 1995)
• Called ISO/OSI (Open Systems Interconnection)
– It deals with connecting open systems (systems open for communication with other systems)
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 26
OSI model
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 27
OSI model principles
• A layer should be created where a different abstraction is needed
• Each layer should perform a well-defined function
• The function of each layer should be chosen so that
internationally standardized protocols can be then defined
• The layer boundaries should be chosen to minimize the information flow across interfaces
• The number of layers should be large enough that distinct functions are not thrown together in the same layer and small enough so that architecture does not become unhandy
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 28
Physical layer
• Concerned with transmitting raw bits over a communication channel
• When a 1-bit is sent, a 1-bit has to be received, not a 0-bit
• Typical questions
– How many volts used to represent a 1, how many for a 0 – How many ns a bit lasts
– Whether transmission can proceed simultaneously in both directions – How the initial connection is established and how is it then torn down – How many pins the network connector has and what are their uses
• Design issues deal with
– Mechanical, electrical and timing interfaces – Physical transmission medium
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 29
Data Link Layer
• Transforms a raw transmission facility into a line that
appears free of undetected transmission errors to the above network layer
• Obliges the sender to break up input data into data frames (few hundred or thousands bytes each) and transmit frames sequentially
• If service reliable => receiver confirms correct receipt of each frame by sending back an acknowledgement frame
• Flow control regulations and error handling are integrated
• Medium access control sublayer
– Controls access to a shared channel (for broadcast networks)
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 30
Network layer
• Controls the operation of a subnet
• Key design issue: how are packets routed from source to destination
• Routes: static / determined at intialization / highly dynamic
• Controls the bottlenecks in the subnet
• Handles quality of service issues: delay, transit time, jitter, etc
• Compatibility among different networks (addressing, max message sizes, different protocols)
• Broadcast networks: this layer is very thin
Transport layer
• Accepts data from the above layers and manipulates it, ensuring that it arrives correctly at the destination
• Efficiency is important
• Hiding the hardware from the above layers also important
• When a connection is established, the type of service is determined, e.g.
– Error-free, point-to-point channel – Transporting isolated messages – Broadcasting
• True end-to-end layer
– a program on the source machine carries on a conversation with a similar program on the destination machine using message headers and control messages
– In contrast, layers 1-3 are chained
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 32
Session layer
• Allows users on different machines to establish sessions between them
• Session services
– Dialog control: keeping track of whose turn it is to transmit
– Token management: preventing 2 parties from attempting the same critical operation at the same time
– Synchronization: check-pointing long transmissions to allow them to continue from where they were after a crash
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 33
Presentation layer
• Concerned with the syntax and semantics of the transmitted information
• Data structures to be exchanged can be defined in an abstract way, along with a standard encoding to be used on the wire
– Useful for computers with different data representation
• Manages these abstract data structures and allows higher-level data structures to be defined and exchanged
– E.g. banking records
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 34
Application layer
• Contains a variety of protocols commonly needed by users
• E.g.
– HTTP – basis for WWW – File transfer
– Electronic mail – Network news
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 35
TCP/IP reference model
• US Department of Defense sponsored a research network called ARPANET (1960s) that needed ultimately to
interconnect with satellites and radio networks Î a reference architecture was needed
• Major goal: the ability to connect multiple networks in a seamless way
• Another major goal: the ability to survive loss of subnet hardware with existing conversations not being broken off
• Also: flexible architecture
⇒a packet-switching network, based on a connectionless internetwork layer was conceived
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 36
TCP/IP model
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 37
Internet layer
• Connectionless internetwork layer that holds TCP/IP architecture together
• It permits hosts to inject packets into any network and have them travel independently to the destination (in possibly another
network)
• Defines an official packet format and protocol called IP (internet protocol)
• It delivers IP packets to their destination
• Major issues: packet routing and avoiding congestion
• Similar in functionality to OSI network layer
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 38
Transport layer
• Allows peer entities on the source and destination hosts to carry on a conversation
• Similar to the OSI transport layer
• 2 end-to-end transport protocols are defined here:
– TCP (transmission control protocol) – UDP (user datagram protocol)
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 39
TCP
• Reliable connection oriented protocol
– A byte stream originating on one machine is delivered w/o error on any other machine in the internet
– It fragments the byte stream into discrete messages and passes each one to the internet layer
– At destination the receiving TCP process reassembles the received messages into the output stream
– Also handles flow control
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 40
UDP
• Unreliable, connectionless protocol
• Used for applications not desiring TCP’s sequencing or flow control but wishing to provide their own
• Widely used also for one-shot, client-server type request- reply queries and applications
– Prompt delivery more important than accurate delivery
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 41
TCP/IP Other Layers
• Application layer - contains all the higher level protocols
– TELNET, FTP, SMTP, DNS, NNTP, HTTP
• Host-to-network layer
– Not really specified
– The host should connect to the network (with some protocol) so that it could send IP packets to it
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 42
TCP/IP Protocols and Networks
(initially)
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 43
Similarities between OSI and TCP/IP reference models
• Both are based on the concept of a stack of independent protocols
• Functionality of layers is roughly similar
– Layers up through and including the transport layer provide an end- to-end, network-independent transport service to processes wishing to communicate
– These layers are application-oriented users of the transport service
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 44
Central concepts to OSI
• Service: what the layer does; it defines the layer’s semantics
• Interface: tells the processes above it how to access it
– It specifies the parameters and expected results
• Protocol: implements the services
– Peer protocols used in a layer are the layer’s own business
– The layer can use any protocols as long as it gets the job done (provides the offered services)
– The layer can also change the protocols at will without affecting software in higher layers
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 45
Protocols and models
• OSI model was devised before the corresponding protocols
– The model was not biased toward one set of protocols
– Designers did not have experience and did not know well what to put in which layer
• TCP/IP model was devised just as a description of the existing protocols
– The protocols hence fit perfectly into the layers
– The model does not fit any other protocol stack => not useful for describing other, non-TCP/IP networks
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 46
Other differences
• Except for the (inter)network, transport and application layers, other layers are different in OSI and TCP/IP
• Connection vs connectionless services
– OSI supports both in the network layer but only connection- oriented in the transport layer
– TCP/IP has only connectionless services in the internet layer but supports both in the transport layer
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 47
A Critique of the OSI Model and Protocols
Why OSI did not take over the world
– Bad timing
– Bad technology
– Bad implementations – Bad politics
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 48
Bad Timing
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 49
A Critique of the TCP/IP Reference Model
Problems:
• Service, interface, and protocol not distinguished
• Not a general model
• Host-to-network “layer” not really a layer
• No mention of physical and data link layers
• Minor protocols deeply entrenched, hard to replace
March 4, 2004 http://www.abo.fi/~lpetre/teleprot/teleprot.html 50