OSI Model - PowerPoint PPT Presentation

1 / 172
About This Presentation
Title:

OSI Model

Description:

A. Tanenbaum, Computer Networks, 3rd edition. Prof Ivo Jirasek CPSC ... ARPANET: Grandparent of all computer networks ... Networking Essentials. 3. Contd. ... – PowerPoint PPT presentation

Number of Views:425
Avg rating:3.0/5.0
Slides: 173
Provided by: alb3
Category:
Tags: osi | model | networking

less

Transcript and Presenter's Notes

Title: OSI Model


1
OSI Model
  • Source
  • J. Henshall, OSI Explained, 2nd edition
  • A. Tanenbaum, Computer Networks, 3rd edition
  • Prof Ivo Jirasek CPSC 441Networking course
  • Groove Systems
  • Othman Laraki, 15.020 Competition in Telecoms
    Recitation 2
  • Prof M T Harandi, Lou, Vaidya, Gupta, UIUC,
    Networking

2
Background
  • ARPANET Grandparent of all computer networks
  • A research network sponsored by U.S. Department
    of Defense
  • It eventually connected hundreds of universities
    and government installations using leased
    telephone lines

10/9/2009
Networking Essentials
2
3
Contd.
  • When satellite and radio networks were added
    later, the existing protocols had trouble
    interworking with them, so a new reference
    architecture was needed
  • Thus the ability to connect multiple networks
    together in a seamless way was one of the major
    design goals from very beginning

10/9/2009
Networking Essentials
3
4
World of Networking
  • Macro Picture
  • Types of Networks
  • LAN, WAN, MAN, PAN, etc.
  • Components of Networks
  • Computers, Servers, Satellites, Cables, Routers,
    Modems, etc.
  • Micro Picture
  • Network Architectures
  • Communication Protocols

10/9/2009
Networking Essentials
4
5
Two Paramount Concepts
  • Protocols
  • Computer-communications architecture

10/9/2009
Networking Essentials
5
6
Protocols
  • Protocols are used for communication between
    entities in different systems
  • Entity Anything capable of sending and receiving
    information
  • User application programs, file transfer
    packages, email facilities etc.
  • System A physically distinct object that
    contains one or more entities
  • Computers, terminals, remote sensors etc.

10/9/2009
Networking Essentials
6
7
Key Elements
  • Syntax includes such things as data format and
    signal levels
  • Semantics includes control information for
    coordination and error handling
  • Timing includes speed matching and sequencing

10/9/2009
Networking Essentials
7
8
  • Protocols
  • Each layer is designed as if it communicates
    directly with the same layer on a different
    computer (called peer processes)
  • The rules of how two peer layers talk to each
    other is called a protocol.
  • Different peer layers will use different
    protocols
  • Data is passed from one layer to the layer below
    until it reaches the bottom layer where the
    physical communication takes place.
  • After receiving data from the network, the data
    passes up the corresponding layers of the
    computer
  • It appears that two peer layers are communicating
    directly

10/9/2009
Networking Essentials
8
9
  • Analogy - 2 Philosophers example
  • One English speaking philosopher wishes to send a
    message to a colleague in France (Peers in layer
    3)
  • Since they have no common language, they both
    hire a translator. The translators (Peers in
    layer 2) decide which language they will
    translate to.
  • The translators send their message to their
    secretary (Peers in Layer 1) who may decide to
    send the message by fax, or email or telephone
    (Layer 1 protocol)
  • Note that logically each layer communicates with
    its peer. In practice, each layer communicates
    with the layers below them

10/9/2009
Networking Essentials
9
10
10/9/2009
Networking Essentials
10
11
  • Analogy - Things to remember
  • Message is passed from layer 3 down through
    layers 2 and 1 before transmission
  • At the opposite side, the message travels up
    through layer 1 and 2 before arriving at layer 3
  • Layer 3 does not care how the message is
    transformed or how it is transmitted by the lower
    layers
  • Layer 2 is only concerned with transforming the
    message (i.e. translation) and does not concern
    itself with how the message is transmitted
  • Layer 1 is only concerned with transmitting the
    message and does not concern itself with the
    contents of the message

10/9/2009
Networking Essentials
11
12
  • Advantages of Protocols
  • A protocol between two layers should be detailed
    enough to allow anyone to develop hardware or
    software for that layer so that it correctly
    obeys each protocol
  • Thus protocols allow interoperability between
    different types of computer equipment
  • PC can communicate with a Macintosh
  • Different manufacturers make different types of
    network cards (Layer 1) that can inter-operate
  • Therefore users are not restricted to one
    particular manufacturer, allowing greater choice
    and increasing competition between the various
    manufacturers

10/9/2009
Networking Essentials
12
13
  • Different protocols are designed to address
  • Physical transmission
  • Cable, fiber optic, radio frequency
  • Encoding techniques
  • How do you differentiate between the end of one
    message and the beginning of another?
  • Network to Network Communication
  • How do you route a message from one computer to
    another computer a number of hops away?
  • Reliability
  • Messages can get corrupted and lost during
    transmission

10/9/2009
Networking Essentials
13
14
ISO
  • International Standards Organization Responsible
    for developing standards, over a wide range of
    technical areas
  • ISO adopted the title OSI for the set of
    standards concerned with computer communications

10/9/2009
Networking Essentials
14
15
The goal of OSI
  • Will remove two constraints from the end user
  • By reducing the dependency on a single supplier
    (commercial)
  • The users of any two computer systems may
  • Exchange files
  • Exchange electronic messages
  • Log on to the others system
  • Submit jobs to the others system

10/9/2009
Networking Essentials
15
16
Advantages
  • Isolated systems and closed groups of
    internetworking systems will be opened to each
    other as OSI products become widely available
  • A wide range of communication based services will
    be sustained amongst a global community of
    computer systems

10/9/2009
Networking Essentials
16
17
ISORM
  • As a basis for the development of these
    standards, ISO developed a reference model
    (ISORM) to partition the problem into discrete
    layers
  • ISORM provides a conceptual framework for
    understanding the complex processes involved in
    computer communication
  • OSI model has seven layers

10/9/2009
Networking Essentials
17
18
Fundamental Principles of OSI
  • A layer is created where a different layer of
    abstraction is needed
  • Each layer performs a well defined function
  • The function of each layer is chosen with an eye
    toward defining internationally standardized
    protocols

10/9/2009
Networking Essentials
18
19
Contd.
  • The layer boundaries need to be chosen to
    minimize the information flow across the
    interfaces
  • The number of layers need to be large enough that
    distinct functions need not be thrown together in
    the same layer out of necessity, and small enough
    that architecture does not become unwieldy

10/9/2009
Networking Essentials
19
20
Layer Cooperation
  • When two computer systems, end systems are
    involved in OSI communication, they do by obeying
    the rules or Standards, associated with each
    layer of the ISORM
  • The standards dictate how the functionality of
    layers can be achieved, by the cooperation of two
    implementations of a layer standard, one on each
    end-system

10/9/2009
Networking Essentials
20
21
Why such a Layering?
  • Three main reasons
  • Conceptual Simplicity
  • Modularity of code (facilitates writing software
    for a layer independent of other layers)
  • Packet processing well organized

10/9/2009
Networking Essentials
21
22
OSI 7-Layer Protocol Model
  • Protocol
  • Specifies the sequence of messages to be
    exchanged
  • Specifies the format of data in messages

Message Sent
Message Received
Application
Presentation
Session
OSI Layered Protocol Model
Transport
Network
Data link
Physical
Communication Channel
10/9/2009
Networking Essentials
22
23
Features
  • A fundamental rule of the ISORM is that a
    potential user of an OSI application can access
    OSI only by requests to an application entity
  • No other layer can be accessed directly by a user
  • The stack of entities on both of the cooperating
    endsystems can be regarded as a black-box with
    access only at the top
  • The general rule of operation is that two peer
    entities of a particular layer (one on each
    end-system) cooperate to provide services to the
    next higher layer, and do so by the use of
    services offered by the next lower layer

10/9/2009
Networking Essentials
23
24
Protocol Layers
  • Physical ? how to transmit bits
  • Data link ? how to transmit frames
  • Network ? how to route packets to the node
  • Transport ? how to send packets to the
    application
  • Session ? manage connections
  • Presentation ? encode/decode msgs, security
  • Application ? everything else!

10/9/2009
Networking Essentials
24
25
Physical Layer
  • Physical is responsible for sending bits from one
    computer to another
  • Is not concerned with the meaning of the bits
  • Defines electrical details (what represents a 0
    or 1)
  • Mechanical connections shape and number of
    connector

10/9/2009
Networking Essentials
25
26
Contd.
  • What signals are sent on which pins
  • Devices at the physical layer
  • Simple Hubs (passive and active)
  • Couplers , T connectors, terminators, cables,
    and cabling, repeaters
  • Repeaters, multiplexers

10/9/2009
Networking Essentials
26
27
Contd.
  • The following are addressed at the physical layer
  • Network connections
  • multipoint, point to point
  • Physical topologies
  • bus, star, or ring
  • Analog / digital signaling
  • Bit synchronization
  • Baseband / Broadband
  • Multiplexing

10/9/2009
Networking Essentials
27
28
Data Link Layer
  • Provides for error free transfer of FRAMES over a
    single link from one device to another
  • Link
  • the circuit established between two adjacent
    nodes, with no intervening nodes
  • Path
  • a group of links that allows a message to move
    from origin to destination

10/9/2009
Networking Essentials
28
29
Links and Paths
10/9/2009
Networking Essentials
29
30
Contd.
  • Adds Cyclic Redundancy Check (CRC) to detect
    damaged frames
  • Adds control information
  • frame type
  • segmentation details
  • Detects when a frame is lost and asks for
    retransmission

10/9/2009
Networking Essentials
30
31
Contd.
  • Broadcast networks
  • all devices on the LAN receive the data
    transmission
  • Point to Point
  • only the destination computer receives the
    message
  • Uses physical address

10/9/2009
Networking Essentials
31
32
Contd.
  • Split into two sub-layers
  • Media Access Control (MAC)
  • Controls how devices share the same media
  • Logical Link Control (LLC)
  • establishing and maintaining links between
    communicating devices
  • synchronization
  • flow control
  • error checking

10/9/2009
Networking Essentials
32
33
Network Layer
  • Makes routing decisions for devices that are
    farther than one link away
  • Translates logical address into physical address
  • Routers work at the network layer
  • Example IP addressing

10/9/2009
Networking Essentials
33
34
Transport Layer
  • Responsible for process to process (end to end)
    delivery of messages
  • Breaks messages into segments
  • Can be Connection-oriented or Connection-less
  • Example TCP or UDP

10/9/2009
Networking Essentials
34
35
Session Layer
  • Allows applications on different computers to
    share a connection
  • Provides for checkpoints (if a connection is lost
    only the required info is resent)
  • Dialog control who can transmit

10/9/2009
Networking Essentials
35
36
Presentation Layer
  • Handles the format of the data
  • Protocol conversion
  • Data translation (ASCII)
  • Compression
  • Encryption

10/9/2009
Networking Essentials
36
37
Application Layer
  • Provides services to support user applications
    such as
  • FTP (file transfer)
  • TELNET (remote login)
  • SMTP (simple mail transfer protocol ) e-mail

10/9/2009
Networking Essentials
37
38
OSI 7-Layer Protocol Summary
10/9/2009
Networking Essentials
38
39
Internet 5-Layer ModelTCP/IP
10/9/2009
Networking Essentials
39
40
Encapsulation of Upper-layer Data
10/9/2009
Networking Essentials
40
41
Message Encapsulation TCP over an Ethernet
10/9/2009
Networking Essentials
41
42
The Programmer's Conceptual View
TCP Transmission control protocol UDP User
datagram protocol
10/9/2009
Networking Essentials
42
43
Reference Model TCP/IP
10/9/2009
Networking Essentials
43
44
TCP/IP Model Transport Layer
TCP (Transmission Control Protocol) ? reliable,
connection-oriented, error-free byte stream
delivering handles flow control UDP (User
Datagram Protocol) ? unreliable, connectionless
No TCPs flow control applications where prompt
delivery more important than accurate delivery
(speech, video, )
Allows peers on the source and destination hosts
to carry on a conversation. Protocols TCP and
UDP
10/9/2009
Networking Essentials
44
45
Physical Layer
  • Function Provides a virtual link, called virtual
    bit pipe, for transmitting a sequence of bits
    between any pair of connected nodes.
  • Physical interface module (modem) maps the
    incoming bits from the data link layer into
    signals appropriate for the channel, and at the
    receiving end, maps the signals back into bits.
  • Interface module between the data link module and
    the modem (e.g., RS-232-C interface or X.21
    physical layer) is responsible for initiating
    data sending/receipt by providing separate wires
    between the two modules for control signals.

10/9/2009
Networking Essentials
45
46
Data Link Layer
  • Function Converts the unreliable bit pipe
    provided by the physical layer into a virtual
    communication link for sending packets error
    free.
  • The sending DL module places some control bits
    called header at the beginning of each packet and
    some more overhead bits called trailer at the end
    of each packet, resulting in a longer string of
    bits called a frame.
  • Some of the overhead bits perform error
    detection/correction, and some request
    retransmissions when error occurs.
  • For multiaccess links (e.g., Ethernet), there is
    a need for a new sublayer, called the MAC
    sublayer, to arbitrate the access to the link so
    that each node can successfully transmit its
    frames without interference from the other nodes.

10/9/2009
Networking Essentials
46
47
Network Layer
  • The transport layer provides packets and control
    information (on how to handle the packets, e.g.,
    where the packets should be delivered) to the
    network layer. The network layer then uses the
    control information to generate the packet
    header.
  • Function 1 Addressing
  • Function 2 Routes packets from their sources
    through the network to their destinations
  • Function 3 Deals with different types of
    networks, e.g., fragmentation and defragmentation

10/9/2009
Networking Essentials
47
48
Layer Entity
  • An implementation of a layer standard must be
    capable of understanding and acting on messages
    exchanged with an implementation of the same
    layer standard on another cooperating end-system
  • When such an implementation is invoked, it is
    known as Layer Entity

10/9/2009
Networking Essentials
48
49
Design Issues for the Layers
  • Every layer needs a mechanism for identifying
    senders and receivers
  • Any computer process needs to determine with whom
    it wants to talk out of dense network of
    computers

10/9/2009
Networking Essentials
49
50
Rules for Data Transfer
  • Simplex Data travel in only one direction
  • Half-duplex Data travel in either direction but
    not simultaneously
  • Full-duplex Data travel in both directions
    simultaneously
  • Networks need to determine how many logical
    channels the connection correspond to, and what
    are their priorities

10/9/2009
Networking Essentials
50
51
Error Control
  • Physical communication circuits are not perfect
  • Both ends of the connection must agree which of
    the error-detecting and error-correcting codes
    are to be used out of many codes
  • The receiver must have some way of telling the
    sender which messages have been correctly
    received and which have not

10/9/2009
Networking Essentials
51
52
Preserving the Order of Messages
  • To deal with a possible loss of sequencing
  • There needs to be explicit provision for the
    receiver to put back pieces together properly
  • An obvious solution is to number the pieces

10/9/2009
Networking Essentials
52
53
Synchronization of Speed
  • How to keep a fast sender from swamping a slow
    receiver with data
  • Solution
  • Some kind of feedback from receiver to sender,
    either directly or indirectly, about the
    receivers current situation

10/9/2009
Networking Essentials
53
54
Interfaces and Services
  • The function of each layer is to provide services
    to the layer above it
  • The active elements in each layer are often
    called as entities
  • An entity can be a software entity (such as a
    process) or a hardware entity such as an
    intelligent I/O chip
  • Entities in the same layer on different machines
    are called peer entities

10/9/2009
Networking Essentials
54
55
Services
  • The entities in layer n implement a service used
    by layer n1
  • In this case, layer n is called service provider
    and layer n1 is called service user
  • Services are available at SAP (service access
    points)
  • The layer n SAPs are the places where layer n1
    can access the services offered

10/9/2009
Networking Essentials
55
56
SAP
  • Each SAP has an address that uniquely identifies
    it
  • To call someone you must know the callees SAP
    address
  • To send a letter you must know the addressees
    SAP address

10/9/2009
Networking Essentials
56
57
Data Units
  • At a typical interface, the layer n1 entity
    passes an IDU (Interface data unit) to the layer
    n entity through the SAP
  • IDU Service Data Unit Control information
  • SDU information passed across the network to
    the peer entity and then up to layer n1

10/9/2009
Networking Essentials
57
58
Contd.
  • In order to transfer SDU, the layer n entity may
    have to fragment it into several pieces, each of
    which is given a header and sent as a separate
    PDU (Protocol Data Unit) also known as Packet
  • PDU headers are used by the peer entities to
    carry out their peer protocols
  • They identify which PDUs contain data and which
    contain control information

10/9/2009
Networking Essentials
58
59
Service Primitives (Operations)
  • Request An entity wants service to do work
  • Indication An entity is to be informed about an
    event
  • Response An entity wants to respond to an event
  • Confirm The response to an earlier request has
    come back

10/9/2009
Networking Essentials
59
60
Physical Layer
  • Source
  • George Varghese CS 423 Lectures 2-4 Physical
    Layers
  • A. Tanenbaum, Computer Networks, 3rd edition
  • Prof Ivo Jirasek CPSC 441 Networking course

61
Introduction
10/9/2009
Physical Layer
61
62
Contd.
  • The Physical Layer performs bit by bit
    transmission of the frames given to it by the
    Data Link Layer
  • The specifications of the Physical Layer include
  • Mechanical and electrical interfaces
  • Sockets and wires used to connect the host to the
    network
  • Voltage levels uses (e.g. -5V and 5V)
  • Encoding techniques (e.g. Manchester encoding)
  • Modulation techniques used (e.g. square wave)
  • The bit rate and the baud rate

10/9/2009
Physical Layer
62
63
Anatomy
10/9/2009
Physical Layer
63
64
Significance
10/9/2009
Physical Layer
64
65
Definitions
10/9/2009
Physical Layer
65
66
Sine waves
10/9/2009
Physical Layer
66
67
Contd.
10/9/2009
Physical Layer
67
68
Bandwidth Inter Symbol Interference
10/9/2009
Physical Layer
68
69
NYQUIST Limit
  • Suppose we know the bandwidth (H) of a channel
    and the number of signal levels (V) being used.
    What is the maximum number of bit we could
    transmit?
  • Nyquists Limit says
  • Max_bps 2Hlog(base 2)(V)
  • For example, if the bandwidth is 3100Hz and we
    are using 16 level modulation then the maximum
    number of bits per second is max_bps 2 ?
    3100 ? log2(16) 24800 bps

10/9/2009
Physical Layer
69
70
Baud Rate and Bit Rate
10/9/2009
Physical Layer
70
71
Contd.
  • The maximum number of times a signal can change
    in a second is called the baud rate.
  • The number of bits (1s and 0s) transmitted in a
    second is called the bit rate.
  • In the examples we have seen so far, the bit rate
    and the baud rate are the same. This is not
    always the case.
  • The bit rate can be higher than the baud rate if
    we use more than two signal levels

10/9/2009
Physical Layer
71
72
Wire Propagation Effects
  • Propagation Effects
  • Signal changes as it travels
  • Receiver may not be able to recognize it

Original Signal
Final Signal
10/9/2009
Physical Layer
72
73
Propagation Effects Attenuation
  • Attenuation signal gets weaker as it propagates
  • Attenuation becomes greater with distance
  • May become too weak to recognize

Signal Strength
Distance
10/9/2009
Physical Layer
73
74
Propagation Effects Distortion
  • Distortion signal changes shape as it propagates
  • Adjacent bits may overlap
  • May make recognition impossible for receiver

Distance
10/9/2009
Physical Layer
74
75
Propagation Effects Noise
  • Noise thermal energy in wire adds to signal
  • Noise floor is average noise energy
  • Random signal, so spikes sometimes occur

Signal Strength
Noise
Noise Floor
10/9/2009
Physical Layer
75
Time
76
SNR
  • Want a high Signal-to-Noise Ratio (SNR)
  • Signal strength divided by average noise strength
  • As SNR falls, errors increase

Signal Strength
Signal
SNR
Noise Floor
10/9/2009
Physical Layer
76
77
Interference
  • Interference energy from outside the wire
  • Adds to signal, like noise
  • Often intermittent, so hard to diagnose

Signal
Signal Strength
Interference
Time
10/9/2009
Physical Layer
77
78
Termination
  • Interference can occur at cable terminator
    (connector, plug)
  • Often, multiple wires in a bundle
  • Each radiates some of its signal
  • Causes interference in nearby wires
  • Especially bad at termination, where wires are
    unwound and parallel

Termination
10/9/2009
Physical Layer
78
79
time
When noise effects an analogue signal, it is hard
to deduce the original signal.
The original digital signal can be deduced
despite the noise.
10/9/2009
Physical Layer
79
80
Modulation
  • Because attenuation is frequency dependent,
    modems use a sine wave carrier of a particular
    frequency, and then modulate that frequency

10/9/2009
Physical Layer
80
81
Contd.
  • Amplitude modulation Two different amplitudes of
    sine wave are used to represent 1's and 0's.
  • Frequency modulation Two (or more) different
    frequencies, close to the carrier frequency, are
    used.
  • Phase modulation The phase of the sine wave is
    changed by some fixed amount.

Binary Signal
10/9/2009
Physical Layer
81
82
Contd.
  • Transfer speeds
  • Bit rate BPS
  • Baud
  • Bandwidth
  • Compression
  • appears to increases speed by decreasing the
    number of bits sent (usually some data does not
    compress well)
  • sending and receiving modem must use same
    compression standard

10/9/2009
Physical Layer
82
83
Transmission Modes
Parallel Mode
Serial Mode
10/9/2009
Physical Layer
83
84
Contd.
Parallel Mode
10/9/2009
Physical Layer
84
85
Modems
  • Modulation demodulation
  • Used to connect a digital computer to an Analog
    phone system
  • Can be installed internally a card inserted into
    the motherboard
  • Can be connected to the serial port (external
    modem)

10/9/2009
Physical Layer
85
86

Modems Modern modems use combinations of
amplitude, frequency, and phase modulation to
achieve high data rates Modems can support auto
answer, auto dial, auto disconnect, and auto
redial

10/9/2009
Physical Layer
86
87
Conversion Using Modem
10/9/2009
Physical Layer
87
88

Interface Standards Many different groups
contribute to interface standards International
Telecommunications Union (ITU) (formerly
CCITT) Electronics Industries Association
(EIA) Institute for Electrical and Electronics
Engineers (IEEE) International Organization for
Standards (ISO) American National Standards
Institute (ANSI)

10/9/2009
Physical Layer
88
89


Interface Standards All interface standards
consist of four components 1. The electrical
component 2. The mechanical component 3. The
functional component 4. The procedural component
10/9/2009
Physical Layer
89
90

Interface Standards The electrical component
deals with voltages, line capacitance, and other
electrical characteristics The mechanical
component deals with items such as the connector
or plug description. A standard connector is the
ISO 2110 connector, also known as DB-25

10/9/2009
Physical Layer
90
91

Interface Standards The functional component
describes the function of each pin or circuit
that is used in a particular interface The
procedural component describes how the particular
circuits are used to perform an operation

10/9/2009
Physical Layer
91
92
Channel Types
  • A channel is any conduit for sending information
    between devices
  • There are three basic types of channel simplex,
    half-duplex and full-duplex
  • A simplex channel is unidirectional, which means
    data can only be sent in one direction. For
    example, a TV channel only carries data from the
    transmitter to your TV set. Your TV set cannot
    send information back

10/9/2009
Physical Layer
92
93
Contd.
  • A half-duplex channel allows information to flow
    in either direction (but not simultaneously)
  • Devices at either end of the channel must take it
    in turns to transmit information whilst the other
    listens. For example, a walky-talky either
    transmits or receives but not both at the same
    time

10/9/2009
Physical Layer
93
94
Contd.
  • A full-duplex channel allows data to be sent in
    both directions simultaneously
  • A full-duplex channel can be formed from two
    simplex channels carrying data in opposite
    directions. This may make it more expensive than
    a half-duplex channel
  • There is no waiting for turns or for the devices
    swap roles, as is the case with a half-duplex
    channel. This means full-duplex can be faster
    and more efficient

10/9/2009
Physical Layer
94
95

Terminal-to-Mainframe Computer Connections A
point-to-point connection is a direct, unshared
connection between a terminal and a mainframe
computer A multipoint connection is a shared
connection between multiple terminals and a
mainframe computer The mainframe is called the
primary, and each terminal is called a secondary

10/9/2009
Physical Layer
95
96
Terminal Mainframe Connections


10/9/2009
Physical Layer
96
97

Terminal-to-Mainframe Computer Connections To
allow a terminal to transmit data to a mainframe,
the mainframe must poll the terminal Two basic
forms of polling include roll-call polling and
hub polling In roll-call polling, the mainframe
polls each terminal in a round-robin fashion In
hub polling, the mainframe polls the first
terminal, and this terminal passes the poll onto
the next terminal

10/9/2009
Physical Layer
97
98
OSI Model Data Link Layer
  • Source
  • A. Tanenbaum, Computer Networks, 3rd edition
  • Prof Ivo Jirasek CPSC 441 Networking course
  • Shivkumar Kalyanaraman, Biplab Sikdar, ECSE-4730
    Computer Communication Networks (CCN), RPI
  • CS 851 Seminar, University of Virginia

99
OSI
Application
Presentation
LOGICAL LINK sublayer
Session
Transport
Framing Error control Flow control
Network
Data Link
Physical
MEDIA ACCESS sublayer
Transmission/reception of frames
100
Link Layer Setting the Context
10/9/2009
Networking Essentials
100
101
Contd.
  • two physically connected devices
  • host-router, router-router, host-host
  • unit of data frame

M
adapter card
10/9/2009
Networking Essentials
101
102
Link Layer Services - 1
  • Framing, link access
  • encapsulate datagram into frame, adding header,
    trailer
  • implement channel access if shared medium,
  • physical addresses used in frame headers to
    identify source, destination

10/9/2009
Networking Essentials
102
103
Link Layer Services - 2
  • Flow Control
  • pacing between sender and receivers
  • Error Detection
  • errors caused by signal attenuation, noise.
  • receiver detects presence of errors
  • signals sender for retransmission or drops frame
  • Error Correction
  • receiver identifies and corrects bit error(s)
    without resorting to retransmission

10/9/2009
Networking Essentials
103
104
Error Correction
  • Includes enough redundant information along with
    each block of data sent to enable receiver to
    deduce what the transmitted character must have
    been
  • Codeword (n) message (m) redundant bits (r)

10/9/2009
Networking Essentials
104
105
Hamming Distance
  • Consider 10001001 Sender sent it
  • 10110001 Receiver received
    it
  • ____________________
  • 3 bits differ
  • The number of bit positions in which two
    code-words differ is called Hamming Distance

10/9/2009
Networking Essentials
105
106
Contd.
  • If two Code-words are a Hamming distance d
    apart, it will require d single bit errors to
    convert one into another

10/9/2009
Networking Essentials
106
107
Error Detecting Codes
  • Polynomial Code (Cyclic Redundancy Check) method
  • Treats bit stream as polynomials
  • Example 110001 1 x5
  • 1 x4
  • 1 x0

10/9/2009
Networking Essentials
107
108
Logical Gates
  • AND 0 0 0, 0 1 0, 1 1 1
  • OR 0 0 0, 0 1 1, 1 1 1
  • XOR 0 xor 0 0, 0 xor 1 1, 1 xor 1 0

10/9/2009
Networking Essentials
108
109
Generator Polynomial
  • When the polynomial code method is employed,
    sender and receiver AGREE upon certain Generator
    Polynomial, in ADVANCE

10/9/2009
Networking Essentials
109
110
Checksumming Cyclic Redundancy Check
  • View data bits, D, as a binary number
  • Choose r1 bit pattern (generator), G
  • Goal choose r CRC bits, R, such that
  • ltD,Rgt exactly divisible by G (modulo 2)
  • receiver knows G, divides ltD,Rgt by G. If
    non-zero remainder error detected!
  • can detect all burst errors less than r1 bits
  • Widely used in practice (ATM, HDCL)

10/9/2009
Networking Essentials
110
111
Multiple Access protocols - 1
  • single shared communication channel
  • two or more simultaneous transmissions by nodes
    interference
  • only one node can send successfully at a time
  • Multiple access protocol
  • distributed algorithm that determines how
    stations share channel, i.e., determine when
    station can transmit

10/9/2009
Networking Essentials
111
112
Multiple Access protocols - 2
  • Multiple access protocol (cont.)
  • communication about channel sharing must use
    channel itself!
  • What to look for in multiple access protocols
  • synchronous or asynchronous
  • information needed about other stations
  • robustness (e.g., to channel errors)
  • performance

10/9/2009
Networking Essentials
112
113
MAC Protocols A Taxonomy
  • Three broad classes
  • Channel Partitioning
  • divide channel into smaller pieces (time slots,
    frequency)
  • allocate piece to node for exclusive use
  • Random Access
  • allow collisions
  • recover from collisions
  • Taking turns
  • tightly coordinate shared access to avoid
    collisions

Goal efficient, fair, simple, decentralized
10/9/2009
Networking Essentials
113
114
Channel Allocation Problem
  • How to allocate a single broadcast channel among
    competing users?
  • Static
  • FDM /TDM (Frequency/Time Division Multiplexing)
  • FDM Radio/TV broadcasts
  • TDM POTS (Plain Old Telephone System)
  • Dynamic
  • Pure/ Slotted ALOHA
  • Carrier Sense Multiple Access (CSMA) Protocols
  • Collision free protocols

10/9/2009
Networking Essentials
114
115
Performance of Fixed Assignment Protocols - 1
  • Fixed assignment protocols are ideal for
    continuous streams such as video or audio
  • For packet switched data
  • A perfect multiple access scheme would always
    use the channel when there are packets waiting
    (static multiplexing)
  • If ? is the arrival rate and ? is the service
    rate then delay/station

10/9/2009
Networking Essentials
115
116
Performance of Fixed Assignment Protocols - 2
  • Fixed assignment protocols divide the channel
    into N separate independent, ?/N identical
    subchannels
  • If each user has arrival rate ?/N, each
    user/subchannel pair helps to calculate mean
    delay

10/9/2009
Networking Essentials
116
117
Contd.
  • And the mean delay for a packet is
  • So, if we use fixed assignment protocols for
    packet switched data, mean delay goes up by a
    factor of N!!

10/9/2009
Networking Essentials
117
118
Performance of Fixed Assignment Protocols - 3
  • This analysis is only appropriate for TDMA due to
    the discrete-time (slotted) nature of TDMA but
    the rough factor of N still holds
  • Fixed assignment protocols are not appropriate
    for multiple access in a packet switched network
    with a large number of users
  • Packet arrivals are fairly random, so there will
    be many times when packets are waiting at one
    user while other users are idle
  • The idle resources (time slots or bandwidth or
    both are wasted in this case)

10/9/2009
Networking Essentials
118
119
Dynamic Channel Allocation Protocols
  • Pure ALOHA
  • Slotted ALOHA
  • CSMA
  • CSMA/CD (old ETHERNET)
  • Switching (Fast ETHERNET)
  • Token passing (Token Ring )

10/9/2009
Networking Essentials
119
120
Random Access Protocols - 1
  • When node has packet to send
  • transmit at full channel data rate R.
  • no a priori coordination among nodes
  • Two or more transmitting nodes -gt collision,
  • Random access MAC protocol specifies
  • how to detect collisions
  • how to recover from collisions (e.g., via delayed
    retransmissions)

10/9/2009
Networking Essentials
120
121
Random Access Protocols - 2
  • Examples of random access MAC protocols
  • ALOHA
  • slotted ALOHA
  • CSMA and CSMA/CD

10/9/2009
Networking Essentials
121
122
ALOHA
  • Back in 1970, the University of Hawaii built a
    network out of radios that broadcast signals.
  • Basic Idea
  • Anyone may transmit whenever they want.
    (Continuous time model.)
  • Each radio detects collisions by listening to its
    own signal. A collision is detected when a sender
    doesn't receive the signal that it just sent.
  • After a collision, wait a random amount of time
    and transmit the same frame again. This technique
    is known as backoff.

10/9/2009
Networking Essentials
122
123
Pure (unslotted) ALOHA - 1
  • Unslotted Aloha simpler, no synchronization
  • pkt needs transmission
  • send without awaiting for beginning of slot
  • Collision probability increases
  • pkt sent at t0 collide with other pkts sent in
    t0-1, t01

10/9/2009
Networking Essentials
123
124
In Pure Aloha, frames are transmitted in
completely arbitrary fashion
10/9/2009
Networking Essentials
124
125
Slotted Aloha
  • Time is divided into equal size slots ( pkt
    trans. time)
  • Node with new arriving pkt transmit at beginning
    of next slot
  • If collision retransmit pkt in future slots with
    probability p, until successful.

Success (S), Collision (C), Empty (E) slots
10/9/2009
Networking Essentials
125
126
Contd.
  • Time is divided into slots can only transmit at
    start of slot
  • Requires sync of clocks
  • Still poor at hi-loads

10/9/2009
Networking Essentials
126
127
Performance Comparison
  • S throughput goodput
  • (success rate)

10/9/2009
Networking Essentials
127
128
Data Link Layer Protocols
  • Source
  • A. Tanenbaum, Computer Networks, 3rd edition
  • Prof Ivo Jirasek CPSC 441 Networking course
  • Shivkumar Kalyanaraman, Biplab Sikdar, ECSE-4730
    Computer Communication Networks (CCN), RPI
  • CS 851 Seminar, University of Virginia

129
CSMA
  • We can improve the performance of our simple
    network greatly if we introduce carrier sensing
    (CS). With carrier sensing, each host listens to
    the data being transmitted over the cable
  • A host will only transmit its own frames when it
    cannot hear any data being transmitted by other
    hosts
  • When a frame finishes, an interframe gap of about
    9.6?sec is allowed to pass before another host
    starts transmitting its frame

10/9/2009
Networking Essentials
129
130
Carrier Sense Multiple Access (CSMA) - 1
  • In some shorter distance networks, it is possible
    to listen to the channel before transmitting
  • In radio networks, this is called sensing the
    carrier
  • The CSMA protocol works just like Aloha except
    If the channel is sensed busy, then the user
    waits to transmit its packet, and a collision is
    avoided
  • This really improves the performance in short
    distance networks!

10/9/2009
Networking Essentials
130
131
Contd.
  • Improves performance when higher medium
    utilization
  • When a node has data to transmit, the node first
    listens to the cable (using a transceiver) to see
    if a carrier (signal) is being transmitted by
    another node.

10/9/2009
Networking Essentials
131
132
Carrier Sense Multiple Access (CSMA) - 2
  • How long does a blocked user wait before trying
    again to transmit its packet?
  • Three basic variants
  • 1-persistent Blocked user continuously senses
    channel until its idle, then transmits
  • 0-persistent Blocked user waits a randomly
    chosen amount of time before sensing channel again

10/9/2009
Networking Essentials
132
133
Carrier Sense Multiple Access (CSMA) - 3
  • P-persistent Let T end-to-end propagation
    delay
  • If channel is idle then transmit packet
  • If channel busy then toss coin with P(heads)
    P
  • Heads Transmit at first idle
  • Tails wait until first idle plus T, sense,
    repeat
  • Human analogy Dont interrupt others

10/9/2009
Networking Essentials
133
134
Persistent and Non Persistent CSMA
10/9/2009
Networking Essentials
134
135
CSMA collisions
Collisions can occur propagation delay means two
nodes may not hear each others transmission
Collision entire packet transmission time wasted
Note role of distance and propagation delay in
determining collision probability
10/9/2009
Networking Essentials
135
136
CSMA/CD (Collision Detection)
  • CSMA improves performance, but still it wastes
    the channel during collisions
  • In some very short distance networks (e.g. coax
    LANs), it is possible to listen while
    transmitting (in addition to listening before
    transmitting)
  • If we detect a collision while transmitting, we
    can abort the transmission and free up the
    channel sooner
  • This idea was proposed by R. Metcalfe and Boggs
    at Xerox PARC in the mid 1970s under the name
    Ethernet
  • Human analogy the polite conversationalist

10/9/2009
Networking Essentials
136
137
Taking Turns MAC protocols - 1
  • 1. Channel partitioning MAC protocols
  • share channel efficiently at high load
  • inefficient at low load delay in channel access,
    1/N bandwidth allocated
  • 2. Random access MAC protocols
  • efficient at low load single node can fully
    utilize channel
  • high load collision overhead
  • 3. Taking turns protocols
  • look for best of both worlds!

10/9/2009
Networking Essentials
137
138
Taking Turns MAC protocols - 2
  • Token Passing
  • Control token passed from one node to next
    sequentially.
  • Token message
  • Concerns
  • token overhead
  • latency
  • single point of failure (token)
  • Polling
  • Master node invites slave nodes to transmit in
    turn
  • Request to Send, Clear to Send messages
  • Concerns
  • polling overhead
  • latency
  • single point of failure (master)

10/9/2009
Networking Essentials
138
139
Reservation-based protocols - 1
  • Distributed Polling
  • Time divided into slots
  • Begins with N short reservation slots
  • reservation slot time equal to channel end-end
    propagation delay
  • station with message to send posts reservation
  • reservation seen by all stations

10/9/2009
Networking Essentials
139
140
Reservation-based protocols - 2
  • After reservation slots, message transmissions
    ordered by known priority

10/9/2009
Networking Essentials
140
141
  • MAC Protocols
  • in
  • WIRELESS MEDIUM

10/9/2009
Networking Essentials
141
142
Why Need MAC in Wireless also?
  • Wireless medium is an open, shared, and broadcast
    medium
  • Multiple nodes may access the medium at the same
    time
  • Medium Access Control Protocol
  • Define rules to force distributed nodes to access
    wireless medium in an orderly and efficiently
    manner

10/9/2009
Networking Essentials
142
143
Classification of Wireless MAC Protocols
10/9/2009
Networking Essentials
143
144
Distributed MAC Protocols
  • Collision avoidance mechanisms
  • Collision avoidance with out-of-band signaling
  • Collision avoidance with in-band control messages
  • Two distributed random access protocols
  • DFWMAC Distributed Foundation Wireless MAC (used
    in IEEE 802.11)
  • EY-NPMA Elimination Yield-Nonpreemptive Priority
    Multiple Access (used in HyperLan)

10/9/2009
Networking Essentials
144
145
Centralized MAC Protocols
  • Work for centralized wireless networks
  • Base station has explicit control for who and
    when to access the medium
  • All nodes can hear from and talk to base station
  • All communications go through the base station
  • The arbitration and complexity are in base
    station

10/9/2009
Networking Essentials
145
146
Features of Ideal MAC Protocol
  • Limited Delay
  • High Throughput
  • Fairness
  • Stability
  • Scalability
  • Robustness against channel fading
  • Low power consumption
  • Support for multimedia

10/9/2009
Networking Essentials
146
147
Wireless MAC Issues
  • Location Dependent Carrier Sensing
  • Hidden Terminal
  • Exposed Terminal
  • Capture Effect

10/9/2009
Networking Essentials
147
148
Hidden Terminal Problem
  • Node B can communicate with A and C both
  • A and C cannot hear each other
  • When A transmits to B, C cannot detect the
    transmission using the carrier sense mechanism
  • If C transmits to B, collision will occur at B

B
C
A
D
10/9/2009
Networking Essentials
148
149
Exposed Terminal Problem
  • Node C can communicate with B and D both
  • Node B can communicate with A and C
  • Node A cannot hear D
  • Node D can not hear B
  • When C transmits to D, B detect the transmission
    using the carrier sense mechanism and postpone to
    transmit to A, even though such transmission will
    not cause collision

B
C
A
D
10/9/2009
Networking Essentials
149
150
Capture Effect
Power Difference Of A and D signals
D
B
A
C
  • A and D transmit simultaneously to B, the signal
    strength received by B from D is much higher than
    that from A, and Ds transmission can be decoded
    without errors. This will result unfair sharing
    of bandwidth.

10/9/2009
Networking Essentials
150
151
MACA A New Channel Access Method for Packet
RadioPhil Karn 1990
152
Goals , New Ideas, and Main Contributions
  • Goals
  • Try to overcome hidden exposed terminal
    problems
  • New idea
  • Reserve the channel before sending data packet
  • Minimize the cost of collision (control packet is
    much smaller than data packet)
  • Main Contribution
  • A three-way handshake MAC protocol MACA

CSMA/CA
MA/CA
MACA
10/9/2009
Networking Essentials
152
153
Fundamental Assumptions
  • Symmetry
  • A can hear from B ? B can hear from A
  • No capture
  • No channel fading
  • Packet error only due to collision
  • Data packets and control packets are transmitted
    in the same channel

10/9/2009
Networking Essentials
153
154
Three-Way Handshake
  • A sends Ready-to-Send (RTS)
  • B responds with Clear-to-Send (CTS)
  • RTS and CTS announce the duration of the data
    transfer
  • A sends DATA PACKET
  • Nodes overhearing RTS keep quiet for some time to
    allow A to receive CTS
  • Nodes overhearing CTS keep quiet for some time to
    allow B to receive data packet

10/9/2009
Networking Essentials
154
155
Contd.
D
B
A
C
E
10/9/2009
Networking Essentials
155
156
More Details for MACA
  • A sends out RTS and set a timer and waits for CTS
  • If A receives CTS before timer go to zero, OK!
    sends data packet
  • Otherwise, A assumes there is a collision at B
  • Double the backoff counter interval
  • Randomly pick up a timer from 1,backoff counter
  • Send next RTS after timer go to zero
  • B sends out CTS, then set a timer and waits for
    data packet
  • If data packet arrives before timer go to zero,
    OK!
  • Otherwise, B can do other things
  • C overhears As RTS, set a timer which is long
    enough to allow A to receive CTS. After the timer
    goes to zero, C can do other things
  • D overhears Bs CTS, set a timer which is long
    enough to allow B to receive data packet.
  • E overhears As RTS and Bs CTS, set a timer
    which is long enough to allow B to receive data
    packet.
  • RTS and CTS can also contain info to allow sender
    A to adjust power to reduce interference
  • Note no carrier sense

10/9/2009
Networking Essentials
156
157
Hidden Terminal Problem Still Exists (1)
  • Data packet still might suffer collision

10/9/2009
Networking Essentials
157
158
Hidden Terminal Problem Still Exists (2)
  • Data packet still might suffer collision

E
10/9/2009
Networking Essentials
158
159
Exposed Terminal Problem Still Exists
  • Node C can not receive CTS

D
10/9/2009
Networking Essentials
159
160
Summary
  • MACA did not solve hidden exposed terminal
    problems
  • MACA did not provide specifications about
    parameters
  • What are RTS, CTS packet sizes ?
  • How to decide timers?
  • What is initial backoff window size?
  • A lot things need to do if using MACA

10/9/2009
Networking Essentials
160
161
MACAW A Media Access Protocol for Wireless
LANsV. Bharghavan, A. Demers, S. Shenker, and
L. Zhang (Sigcomm 1994)
162
Goals, New Ideas, and Main Contributions
  • Goals
  • This paper refined and extended MACA
  • New Idea Information sharing to achieve fairness
  • Main Results
  • Modified control messages
  • Four-way handshake (reliable, recover at MAC
    layer)
  • Five-way handshake (relieve exposed terminal
    problem)
  • RRTS (unfairness)
  • Modified back-off algorithms
  • Multiplicative Increase and Linear Decrease
    (MILD)
  • Synchronize back-off counter using piggyback
    message
  • Multiple stream model (V-MAC)

10/9/2009
Networking Essentials
162
163
Four-Way Handshake
  • Sender sends Ready-to-Send (RTS)
  • Receiver responds with Clear-to-Send (CTS)
  • Sender sends DATA PACKET
  • Receiver acknowledges with ACK
  • RTS and CTS announce the duration of the transfer
  • Nodes overhearing RTS/CTS keep quiet for that
    duration
  • Sender will retransmit RTS if no ACK is received
  • If ACK is sent out, but not received by sender,
    after receiving new RTS, receiver returns ACK
    instead of CTS for new RTS

destination
source
10/9/2009
Networking Essentials
163
164
Comparison of with ACK without ACK
10/9/2009
Networking Essentials
164
165
Revisit Exposed Terminal Problem
  • RTS/CTS/DATA/ACK cannot solve exposed terminal
    problem
  • When overhearing RTS, the node needs to wait
    longer enough to allow the data packet being
    completely transmitted even it does not overhear
    CTS
  • To relieve exposed terminal problem,
  • Let exposed terminal know the DATA packet needs
    to be transmitted
  • Extra message DS (data send)
  • Five Handshaking to let exposed terminal know how
    long it should wait

10/9/2009
Networking Essentials
165
166
Five-Way Handshake
  • Sender sends Ready-to-Send (RTS)
  • Receiver responds with Clear-to-Send (CTS)
  • Sender sends DATA SENDING (DS)
  • Sender sends DATA PACKET
  • Receiver acknowledge with ACK
  • RTS and CTS announce the duration of the transfer
  • Nodes overhearing RTS/CTS keep quiet for that
    duration

B
A
C
10/9/2009
Networking Essentials
166
167
Unfairness
  • Using RTS/CTS/DATA/ACK or RTS/CTS/DS/DATA/ACK
    might cause unfairness
  • A sends data to B D sends data to C
  • A and D have enough data to send
  • C can hear from B and D, but
Write a Comment
User Comments (0)
About PowerShow.com