midterm exam review
Download
Skip this Video
Download Presentation
Midterm Exam Review

Loading in 2 Seconds...

play fullscreen
1 / 146

Midterm Exam Review - PowerPoint PPT Presentation


  • 680 Views
  • Uploaded on

Midterm Exam Review Communication Networks A communication network provides a general solution to the problem of connecting many devices: Connect each device to a network node (router) Network nodes exchange information and carry the information from a source device to a destination device

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Midterm Exam Review' - paul2


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
midterm exam review
Midterm ExamReview

COMP361 by M. Hamdi

communication networks
Communication Networks
  • A communication network provides a general solution to the problem of connecting many devices:
    • Connect each device to a network node (router)
    • Network nodes exchange information and carry the information from a source device to a destination device
    • Note: Network nodes do not generate information
    • Connect devices to a single shared medium (LAN)

COMP361 by M. Hamdi

communication networks3
Communication Networks
  • A generic communication network:

Other names for Device: station, host, terminal

Other names for Node: switch, router, gateway

COMP361 by M. Hamdi

classification of communications
Classification of Communications
  • Communication networks can be classified based on the way in which the nodes exchange information:
  • Communication Network
    • Switched Communication Network
      • Circuit-Switched Communication Network
      • Packet-Switched Communication Network
        • Datagram Network
        • Virtual Circuit Network
    • Broadcast Communication Network

COMP361 by M. Hamdi

broadcast network examples
Broadcast Network Examples

Packet Radio

Network

Satellite

Network

Bus Local

Network

COMP361 by M. Hamdi

circuit switching
Circuit Switching
  • A node in a circuit-switching network:

COMP361 by M. Hamdi

circuit switching7
Circuit Switching

COMP361 by M. Hamdi

packet switching
Packet Switching

COMP361 by M. Hamdi

datagram packet switching
Datagram Packet Switching

COMP361 by M. Hamdi

network technologies
Network Technologies
  • Telephone Networks
  • IP Networks
  • ATM Networks

COMP361 by M. Hamdi

three network technologies
Three Network Technologies
  • Telephone Network
    • The largest worldwide computer network, specialized for voice
    • Switching technique: Circuit-switching
  • Internet
    • A newer global and public information infrastructure
    • Switching technique: Datagram packet switching
  • ATM
    • Was intended to replace telephone networks and data networks, but lost momentum due the success of the Internet
    • Switching technique: VC packet switching

COMP361 by M. Hamdi

telephone networks
Telephone Networks

Starting in 1876, the public switched telephone network (PSTN) has become a global infrastructure for voice communications

COMP361 by M. Hamdi

addressing and routing
Addressing and Routing
  • Each subscriber has an address (telephone number)
  • Addresses are hierarchical
  • The information contained in a telephone address is exploited when establishing a route from caller to callee

Country code

Number of local exchange

Subscriber number

Area

code

852

2358

6984

My office number

COMP361 by M. Hamdi

the internet a network of networks
The Internet - A Network of Networks
  • The Internet is a loose collection of networks
  • Networks are organized in a (loose) multi-layer hierarchy

COMP361 by M. Hamdi

what defines the internet
What defines the Internet
  • Use of a globally unique address space (Internet Addresses)
  • Support of the Transmission Control Protocol/Internet Protocol (TCP/IP) suite for communications
  • The physical networks widely differ (cable, optical, wireless, radio, etc.) - IP on top of ANYTHING.

COMP361 by M. Hamdi

internet addresses
Internet Addresses
  • Each network interface on the Internet has a unique global address, called the IP address.
  • An IP address:
    • is 32 bits long
    • encodes a network number and a host number
  • IP addresses are written in a dotted decimal notation. 128.142.136.146 means:
    • 10000000 in 1 st Byte
    • 10001110 in 2 nd Byte
    • 10001000 in 3 rd Byte
    • 10010011 in 4 th Byte

COMP361 by M. Hamdi

domain names and ip addresses
Domain Names and IP Addresses
  • Users and applications on the Internet normally do not use IP addresses directly. No one says: http://128.142.136.29/
  • Rather users and applications use domain names: http://www.cs.ust.hk
  • A service on the Internet, called the Domain Name System (DNS) performs the translation between domain names and IP addresses

COMP361 by M. Hamdi

b isdn
B-ISDN

COMP361 by M. Hamdi

protocol architecture
Protocol Architecture
  • Layered Protocol Architectures
  • OSI Reference Model
  • TCP/IP Protocol Stack

COMP361 by M. Hamdi

need for protocols
Need for Protocols
  • The task of exchanging information between devices
    • requires a high degree of cooperation between the involved parties
    • can be quite complex
  • Protocols are a set of rules and conventions. By enforcing that communicating parties adhere to a common protocol, communication is made possible.
  • The complexity of the communication task is reduced by dividing it into subtasks:
    • Each subtask is implemented independently.
    • Each subtask provides a service to another subtask.

COMP361 by M. Hamdi

osi reference model
OSI Reference Model
  • In 1977 the International Standardization Organization (ISO) developed a model for a layered network architecture
  • This effort was completed in 1983 and is known as the Open Systems Interconnection (OSI) Reference Model
  • The OSI model defines seven layers:
    • Layer 7: Application Layer
    • Layer 6: Presentation Layer
    • Layer 5: Session Layer
    • Layer 4: Transport Layer
    • Layer 3: Network Layer
    • Layer 2: Data Link Layer
    • Layer 1: Physical Layer
    • (Layer 0: Interconnection Media)

COMP361 by M. Hamdi

osi layers
OSI Layers

COMP361 by M. Hamdi

osi layers and encapsulation
OSI Layers and Encapsulation

COMP361 by M. Hamdi

tcp ip protocol suite
TCP/IP Protocol Suite
  • The TCP/IP protocol suite was first defined in 1974
  • The TCP/IP protocol suite is the protocol architecture of the Internet
  • The TCP/IP suite has four layers: Application, Transport, Internet, and Network Interface Layer

COMP361 by M. Hamdi

encapsulation in the tcp ip suite
Encapsulation in the TCP/IP Suite
  • As data is moving down the protocol stack, each protocol is adding layer-specific control information.

COMP361 by M. Hamdi

physical layer
Physical Layer
  • Fundamentals
  • Transmissions factors
  • Transmission Media

COMP361 by M. Hamdi

physical layer31
Physical Layer
  • The physical layer deals with transporting bits between two machines.
  • The goal is to understand what happens to a signal as it travels across some physical media.

COMP361 by M. Hamdi

theoretical basis for data communication
Theoretical Basis for Data Communication
  • Fourier AnalysisFourier showed that a periodic function g(t) can be represented mathematically as an infinite series of sines and cosines:
    • fis the function's fundamentalfrequency
    • T=1/f is the function's period
    • an  and bn are the amplitudes of the nth harmonics

COMP361 by M. Hamdi

theoretical basis for data communication33
Theoretical Basis for Data Communication
  • The series representation of g(t) is called its Fourierseries expansion.
  • In communications, we can always represent a data signal using a Fourier series by imagining that the signal repeats the same pattern forever.

COMP361 by M. Hamdi

theoretical basis for data communication34
Theoretical Basis for Data Communication
  • We can compute the coefficients  an and bn
  • Suppose we use voltages (on/off) to represent ``1''s and ``0''s, and we transmit the bit string ``011000010'. The signal would look as follows:

COMP361 by M. Hamdi

theoretical basis for data communication36
Theoretical Basis for Data Communication
  • Points to note about the Fourier expansion
  • The more terms in the expansion, the more exact our representation becomes.
  • The expression represents the amplitude or energy of the signal (e.g., the harmonics contribution to the wave).

COMP361 by M. Hamdi

theoretical basis for data communication37
Theoretical Basis for Data Communication
  • Conclusion: it's essentially impossible to receive the exact signal that was sent. The key is to receive enough of the signal so that the receiver can figure out what the original signal was.
  • Note: ``bandwidth'' is an overloaded term. Engineers tend to use bandwidth to refer to the spectrum of signals a channel carries. In contrast, the term ``bandwidth'' is often also used to refer to the data rate of the channel, in bps.

COMP361 by M. Hamdi

nyquist theorem
Nyquist Theorem
  • Noise-free channel
  • Limiting factor on transmission is channel BW
  • If bandwidth is B, highest signal rate is 2B
  • Multi-level signaling:

C = 2B log2 M; where:

C is the data rate

B is the bandwidth

M is the number of levels

  • For example, a noiseless 3-kHz channel cannot transmit binary signals at a rate exceeding 6000 bps.

COMP361 by M. Hamdi

shannon s theorem
Shannon’s Theorem
  • If random noise is present, the situation deteriorates rapidly. The amount of noise present is measured by the ratio of the signal power to the noise power, called the signal-to-noise ratio (S/N).
  • Usually, the ratio itself is not quoted; instead, the quantity 10 log10S/N is given. These units are called decibels (dB).
  • Maximum number of bits/sec=Hlog2(1+S/N)
  • For telephone line: 3000log2(1+30dB)30000bps.

COMP361 by M. Hamdi

transmission media
Transmission Media
  • The purpose of the physical layer is to transport a raw bit stream from one machine to another.
  • Various physical media can be used for the actual transmission.
  • Each one has its own niche in terms of bandwidth, delay, cost, and ease of installation and maintanence.
  • Media are roughly grouped into guided media, such as copper wire and fiber optics, and unguided media such as radio and lasers through air.

COMP361 by M. Hamdi

transmission media41
Transmission Media
  • Twisted Pair
  • Coaxial Cable
  • Fiber Optic

COMP361 by M. Hamdi

transmission media wireless transmission
Transmission Media:Wireless Transmission
  • Radio : omnidirectional, AM, FM Radio, TV, ALOHA data network
  • Microwave : directional
    • Terrestrial Microwave, long-haul common carrier, government communications.
    • Satellite Microwave
      • A communication satellite is a microwave relay station.

COMP361 by M. Hamdi

data link layer
Data Link Layer
  • Framing
  • Error Detection
  • Flow Control
  • Error Control (via Retransmission)

COMP361 by M. Hamdi

introduction
Introduction

Main Task of the data link layer:

  • Provide error-free transmission over a physical link

COMP361 by M. Hamdi

introduction45
Introduction
  • The PDU at the Data Link Layer (DL-PDU) is typically called a Frame. A Frame has a header, a data field, and a trailer
  • Example

COMP361 by M. Hamdi

framing
Framing
  • Problem: Identify the beginning and the end of a frame in a bit stream
  • Solution (bit-oriented Framing): A special bit pattern (flag) signals the beginning and the end of a frame (e.g., "01111110") – use bit stuffing
  • Problem: The sequence “01111110” must not appear in the data of the frame

COMP361 by M. Hamdi

error control
Error Control
  • Two basic approaches to handle bit errors:
    • Error-correcting codes
      • Too many additional bits are needed for correction (used only in simplex communication (e.g., satellite))
    • Error-detecting codes plus retransmission
      • Used if retransmission of corrupted data is feasible
      • Receiver detects error and requests retransmission of a frame.

COMP361 by M. Hamdi

cyclic redundancy codes crc
Cyclic-Redundancy Codes (CRC)

General Method:

  • The transmitter generates an n-bit check sequence number (known as Frame Checksum Sequence (FCS)) from a given k-bit frame such that the resulting (k+n)-bit frame is divisible by some number
  • The receiver divides the incoming frame by the same number
  • If the result of the division does not leave a remainder, the receiver assumes that there was no error

COMP361 by M. Hamdi

step 2 crc encoding method
Step 2: CRC Encoding Method

Define:

  • M(x): Data block is a polynomial (= Message, Frame)
  • P(x): "Generator Polynomial" which is known to both sender and receiver (degree of P(x) is n)

COMP361 by M. Hamdi

step 2 crc encoding method50
Step 2: CRC Encoding Method
  • (I) Append n zeros to M(x), i.e., M(x)*x^n
  • (II) Divide M(x)*x^n by P(x) and obtain:
    • M(x)*x^n = Q(x)P(x) + R(x)
  • (III) Set T(x) = M(x)*x^n + R(x). T(x) is the encoded message

Note: T(x) is divisible by P(x). Therefore, if the received message does not contain an error then it can be divided by P(x).

COMP361 by M. Hamdi

flow control
Flow Control
  • Flow Control is a technique for speed-matching of transmitter and receiver. Flow control ensures that a transmitting station does not overflow a receiving station with data
  • We will discuss two protocols for flow control:
    • Stop-and-Wait Protocol
    • Sliding Window Protocol

COMP361 by M. Hamdi

stop and wait flow control
Stop-and-Wait Flow Control
  • Simplest form of flow control
  • In Stop-and-Wait flow control, the receiver indicates its readiness to receive data for each frame
  • Operations:
    • 1. Sender: Transmit a single frame
    • 2. Receiver: Transmit acknowledgment (ACK)
    • 3. goto 1.

COMP361 by M. Hamdi

analysis of stop and wait
Analysis of Stop-and-Wait

COMP361 by M. Hamdi

analysis of stop and wait54
Analysis of Stop-and-Wait

Notation:

C = Channel capacity in bps

I = Propagation delay

H = Number of bits in a frame header

D = Number of data bits in a frame

F = Total length of a frame (F= D+H)

A = Total length of an ACK frame

F/C = Transmission delay for a frame

COMP361 by M. Hamdi

analysis of stop and wait55
Analysis of Stop-and-Wait

COMP361 by M. Hamdi

analysis of stop and wait56
Analysis of Stop-and-Wait
  • Transmission of a frame (in Stop-and-Wait):

COMP361 by M. Hamdi

analysis of stop and wait57
Analysis of Stop-and-Wait
  • Efficiency of a protocol is the maximum fraction of time when the protocol is transmitting data
  • Efficiency of Stop-and-Wait Flow Control (1)
  • Assuming that H and A are negligible we obtain (2)

COMP361 by M. Hamdi

sliding window flow control
Sliding Window Flow Control
  • Major Drawback of Stop-and-Wait Flow Control:
    • Only one frame can be in transmission at a time
    • This leads to inefficiency if a>1
  • Sliding Window Flow Control
    • Allows transmission of multiple frames
    • Assigns each frame a k-bit sequence number
    • Range of sequence number is [0...2^k-1], i.e., frames are counted modulo 2^k

COMP361 by M. Hamdi

operation of sliding window
Operation of Sliding Window
  • Sending Window:
    • At any instant, the sender is permitted to send frames with sequence numbers in a certain range
    • The range of sequence numbers is called the sending window

COMP361 by M. Hamdi

operation of sliding window60
Operation of Sliding Window
  • Receiving Window:
    • The receiver maintains a receiving window corresponding to the sequence numbers of frames that are accepted

COMP361 by M. Hamdi

analysis of sliding windows
Analysis of Sliding Windows
  • Define:
    • We use the same parameters for as in Stop-and-Wait
    • To simplify notation we set:
      • F/C = 1
      • I = a (Normalization)
    • W = Maximum window size (identical for sender and receiver)

COMP361 by M. Hamdi

analysis of sliding windows62
Analysis of Sliding Windows

COMP361 by M. Hamdi

analysis of sliding windows63
Analysis of Sliding Windows
  • If the window size is sufficiently large the sender can continuously transmit packets:
  • W >= 2a+1: Sender can transmit continuously
    • normalized efficiency = 1
  • W < 2a+1:Sender can transmit W frames every 2a+1 time units
    • normalized efficiency = W/(1+2a)

COMP361 by M. Hamdi

arq error control
ARQ Error Control
  • Two types of errors:
    • Lost frames
    • Damaged Frames
  • Most Error Control techniques are based on
    • (1) Error Detection Scheme (e.g., Parity checks, CRC)
    • (2) Retransmission Scheme
  • Error control schemes that involve error detection and retransmission of lost or corrupted frames are referred to as Automatic Repeat Request (ARQ) error control

COMP361 by M. Hamdi

arq error control65
ARQ Error Control
  • All retransmission schemes use all or a subset of the following procedures:
    • Receiver sends an acknowledgment (ACK) if a frame is correctly received
    • Receiver sends a negative acknowledgment (NAK) if a frame is not correctly received
    • The sender retransmits a packet if an ACK is not received within a timeout interval
    • All retransmission schemes (using ACK, NAK or both) rely on the use of timers

COMP361 by M. Hamdi

arq schemes
ARQ Schemes
  • The most common ARQ retransmission schemes:
    • Stop-and-Wait ARQ
    • Go-Back-N ARQ
    • Selective Repeat ARQ

COMP361 by M. Hamdi

go back n arq
Go-Back-N ARQ
  • Go-Back-N uses the sliding window flow control protocol. If no errors occur the operations are identical to Sliding Window
  • Operations:
    • A station may send multiple frames as allowed by the window size
    • Receiver sends a NAK i if frame i is in error. After that, the receiver discards all incoming frames until the frame in error was correctly retransmitted
    • If sender receives a NAK i it will retransmit frame i and all packets i+1, i+2,... which have been sent, but not been acknowledged

COMP361 by M. Hamdi

selective repeat arq
Selective-Repeat ARQ
  • Similar to Go-Back-N ARQ. However, the sender only retransmits frames for which a NAK is received
  • Advantage over Go-Back-N:
    • Fewer Retransmissions.
  • Disadvantages:
    • More complexity at sender and receiver
    • Each frame must be acknowledged individually (no cumulative acknowledgements)
    • Receiver may receive frames out of sequence

COMP361 by M. Hamdi

analysis of arq protocols
Analysis of ARQ Protocols
  • What is the efficiency of the discussed ARQ protocols?
  • A number of assumptions:
    • ACKs and NAKs are never lost, and frames are not dropped.
    • Sizes of ACKs, NAKs, and frame headers are negligible.

COMP361 by M. Hamdi

analysis of stop and wait arq
Analysis of Stop-and-Wait ARQ
  • Parameters
    • U=efficiency
    • Tt=F/C (transmission delay of a frame)
    • I=propagation delay
    • a=I/Tt
    • P=probability that a frame is in error
  • Without Errors (P=0)
    • U=Tt/(Tt+2I)

COMP361 by M. Hamdi

stop and wait arq with errors
Stop-and-Wait ARQ: With Errors
  • Probability that k transmission attempts are needed to successfully transmit a frame
  • Expected number of attempts (=E[A])
  • Expected efficiency with errors

COMP361 by M. Hamdi

local area networks lans
Local Area Networks (LANs)
  • Broadcast Networks
  • Multiple Access Protocols
  • Ethernet (IEEE 802.3)
  • Token Ring (IEEE 802.5, FDDI)

COMP361 by M. Hamdi

examples of broadcast network
Examples of Broadcast Network
  • If more than one station transmits at a time on the broadcast channel, a collision occurs
  • Multi-access problem: How to determine which station can transmit?

COMP361 by M. Hamdi

multi access protocols
Multi-access Protocols
  • Protocols that solve the resolution problem dynamically are called Multiple Access (Multi-access) Protocols
  • Different types of multi-access protocols
    • Contention protocols resolve a collision after it occurs. These protocols execute a collision resolution protocol after each collision
    • Collision-free protocols ensure that a collision can never occur

COMP361 by M. Hamdi

contention protocols
Contention Protocols
  • ALOHA Protocols:
    • (Pure) Aloha
    • Slotted Aloha
  • CSMA (Carrier Sense Multiple Access):
    • persistent CSMA
    • non-persistent CSMA
    • CSMA/CD - Carrier Sense Multiple Access with Collision Detection (= Ethernet)
  • There are many more

COMP361 by M. Hamdi

collisions in pure aloha
Collisions in (Pure)ALOHA

COMP361 by M. Hamdi

slotted aloha s aloha
Slotted ALOHA (S-ALOHA)
  • The Slotted Aloha Protocol
    • Slotted Aloha - Aloha with an additional constraint
    • Time is divided into discrete time intervals (=slot)
    • A station can transmit only at the beginning of a frame
  • As a consequence:
    • Frames either collide completely or do not collide at all
    • Vulnerable period = 1

COMP361 by M. Hamdi

collisions in s aloha
Collisions in S-ALOHA

COMP361 by M. Hamdi

performance of pure aloha
Performance of (Pure)ALOHA
  • Question: What is the maximum throughput of the ALOHA protocol?
  • Notation:
    • S Throughput: Expected number of successful transmissions per time unit. Normalization: Frame transmission time is 1, maximum throughput is 1
    • G Offered Load: Expected number of transmission and retransmission attempts (from all users) per time unit

COMP361 by M. Hamdi

modeling assumptions
Modeling Assumptions
  • All frames have a fixed length of one time unit (normalized)
  • Infinite user population
  • Offered load is modeled as a Poisson process with rate G, that is,
  • Prob[k packets are generated in t frame times] =

COMP361 by M. Hamdi

throughput of aloha
Throughput of Aloha
  • Fundamental relation between throughput and offered load:
  • S = G x Prob [frame suffers no collision]

COMP361 by M. Hamdi

performance of pure aloha83
Performance of (pure)ALOHA
  • Prob [frame suffers no collision]

= Prob [no other frame is generated during the vulnerable period for this frame]

= Prob [no frame is generated during a 2-frame period]

=

Throughput in ALOHA:

COMP361 by M. Hamdi

results
Results
  • Maximum achievable throughput:
  • Take the derivative and set
  • Maximum is attained at G = 0.5
  • We obtain:
  • That is about 18% of the capacity!!!

COMP361 by M. Hamdi

performance of s aloha
Performance of S-ALOHA
  • Derivation is analogous to Aloha:
  • S = G x Prob[frame suffers no collision]
  • Prob [frame suffers no collision]

=Prob [no other frame is generated during a vulnerable period]

=Prob [no frame is generated during 1 frame period]

COMP361 by M. Hamdi

performance of s aloha86
Performance of S-ALOHA
  • Total Throughput in ALOHA:
  • Maximum achievable throughput:

COMP361 by M. Hamdi

csma carrier sense multiple access
CSMA - Carrier Sense Multiple Access
  • Improvement to ALOHA protocol:
    • If stations have carrier sense capability (stations can test the broadcast medium for ongoing transmission), and
    • if stations only transmit if the channel is idle,
    • then many collisions can be avoided.
  • Caveat: This improves ALOHA only if the ratio a is small.

COMP361 by M. Hamdi

csma carrier sense multiple access89
CSMA - Carrier Sense Multiple Access
  • CSMA protocol:
    • A station that wishes to transmit listens to the medium for an ongoing transmission
    • Is the medium in use?
      • Yes: Station back of for a specified period
      • No: Station transmits
    • If a sender does not receive an acknowledgment after some period, it assumes that a collision has occurred
    • After a collision a station backs off for a certain (random) time and retransmits

COMP361 by M. Hamdi

variations of csma protocols
Variations of CSMA Protocols
  • There are a number of variations of CSMA protocols
  • Each variant specifies what to do if the medium is found busy:
    • Non-Persistent CSMA
    • 1-Persistent CSMA
    • p-Persistent CSMA

COMP361 by M. Hamdi

comparison of aloha and csma
Comparison of ALOHA and CSMA

Load vs. Throughput:

Assumption: propagation delay << transmission delay

COMP361 by M. Hamdi

csma cd
CSMA / CD
  • Improvement to CSMA protocol:
    • Carrier Sense Multiple Access with Collision Detection
    • Widely used for bus topology LANs (IEEE 802.3, Ethernet)
    • Only works if propagation delay is small relative to transmission delay (in other words, a must be small)

COMP361 by M. Hamdi

csma cd93
CSMA/CD
  • CSMA has an inefficiency:
    • If a collision has occurred, the channel is unstable until colliding packets have been fully transmitted
  • CSMA/CD overcomes this as follows:
    • While transmitting, the sender is listening to medium for collisions. Sender stops if collision has occurred
  • Note:
    • CSMA: Listen Before Talking
    • CSMA/CD: Listen While Talking

COMP361 by M. Hamdi

csma cd94
CSMA/CD
  • Question: How long does it take to detect a collision?
  • Answer: In the worst case, twice the maximum propagation delay of the medium

COMP361 by M. Hamdi

csma cd96
CSMA/CD
  • Restrictions of CSMA / CD:
    • Packet should be twice as long as the time to detect a collision (2 * maximum propagation delay)
    • Otherwise, CSMA/CD does not have an ad-vantage over CSMA
  • Example: Ethernet
    • Ethernet requires a minimum packet size and restricts the maximum length of the medium

COMP361 by M. Hamdi

exponential backoff algorithm
Exponential Backoff Algorithm
  • Ethernet uses the exponential backoff algorithms to determine when a station can retransmit after a collision
  • Algorithm:
    • Set "slot time" equal to 2a
    • After first collision wait 0 or 1 slot times
    • After i-th collision, wait a random number between 0 and 2^i -1 time slots
    • Do not increase random number range, if i=10
    • Give up after 16 collisions

COMP361 by M. Hamdi

performance of csma cd
Performance of CSMA/CD
  • Parameters and assumptions:
    • End-to-end propagation delay: a
    • Packet transmission time (normalized): 1
    • Number of stations: N
    • Time can be thought of as being divided in contention intervals and transmission intervals.
    • Contention intervals can be thought of as being slotted with slot length of 2a (roundtrip propagation delay).

COMP361 by M. Hamdi

performance of csma cd99
Performance of CSMA/CD
  • Contention slots end in a collision
  • Contention interval is a sequence of contention slots
  • Length of a slot in contention interval is 2a
  • We assume that the probability that a station attempts to transmit in a slot is P

COMP361 by M. Hamdi

performance of csma cd100
Performance of CSMA/CD
  • Let A be the probability that some station can successfully transmit in a slot. We get:
  • In the above formula, A is maximized when P=1/ N. Thus:

Derivation of maximum throughput of CSMA/CD:

COMP361 by M. Hamdi

performance of csma cd101
Performance of CSMA/CD

Prob [contention interval has a length of j slots] =

Prob [1 successful attempt] x Prob [ j-1 unsuccessful attempts] =

The expected number of slots in a contention interval is then calculated as:

COMP361 by M. Hamdi

performance of csma cd102
Performance of CSMA/CD
  • Now we can calculate the maximum efficiency of CSMA/CD with our usual formula:

COMP361 by M. Hamdi

ieee 802 lan standard
IEEE 802 LAN Standard

COMP361 by M. Hamdi

ieee 802 lan standard104
IEEE 802 LAN standard

COMP361 by M. Hamdi

ieee 802 lan architecture
IEEE 802 LAN Architecture
  • Functions of the LLC:
    • Similar to HDLC (sliding window protocol)
    • Provides SAPs to higher layers
    • Provides different services:
      • acknowledged connectionless service
      • unacknowledged connectionless service
      • connection-oriented service
    • Framing
    • Error control
    • Addressing

COMP361 by M. Hamdi

ieee802 3 csma cd
IEEE802.3 (CSMA/CD)
  • Generally referred to as Ethernet
  • Based on CSMA/CD
  • Applies exponential back-off after collisions
  • Data Rate: 2 - 1,000 Mbps
  • Maximum cable length is dependent on the data rate
  • Uses Manchester encoding
  • Bus topology:

COMP361 by M. Hamdi

ethernet
Ethernet
  • There are many different physical layer configurations for 802.3 LANs
  • The following notation is used to denote the configuration

COMP361 by M. Hamdi

ring local area network
Ring Local Area Network

COMP361 by M. Hamdi

states of the ring interface
States of the Ring Interface

Listen State: Incoming bits are copied to output with 1-bit delay

Transmit State: Write data to the ring

Bypass State: Idle station does not incur bit-delay

COMP361 by M. Hamdi

ring lans
Ring LANs
  • If a frame has traveled once around the ring it is removed by the sender
  • Ring LANs have a simple acknowledgment scheme:
    • Each frame has one bit for acknowledgment.
    • If the destination receives the frame it sets the bit to 1.
    • Since the sender will see the returning frame, it can tell if the frame was received correctly.

COMP361 by M. Hamdi

what is the length of a ring
What is the "Length" of a Ring?
  • The length of a ring LAN, measured in bits, gives the total number of bits which are can be in transmission on the ring at a time
  • Note: Frame size is not limited to the length of the ring since entire frame may not appear on the ring at one time.
  • Bit length = propagation speed * length of ring * data rate + No. of stations * bit delay at repeater

COMP361 by M. Hamdi

ring lan
Ring LAN
  • Advantages:
    • Can achieve 100 % utilization
    • No collisions
    • Can achieve deterministic delay bounds
    • Can be made efficient at high speeds
  • Disadvantages:
    • Long delays due to bit-delays
      • Solution: Bypass state eliminates bit-delay at idle station
    • Reliability Problems
      • Solution 1: Use a wire center
      • Solution 2: Use a second ring (opposite flow)

COMP361 by M. Hamdi

token ring lans
Token Ring LANS
  • Token is a small packet that rotates around the ring
  • When all stations are idle, the token is free and circulates around the ring
  • Possible Problem: All stations are idle and in the Bypass state. What is the problem?

COMP361 by M. Hamdi

802 5 token ring mac protocol
802.5(Token Ring) MAC Protocol
  • In order to transmit a station must catch a free token
  • The station changes the token from free to busy
  • The station transmits its frame immediately following the busy token
  • IF station has completed transmission of the frame AND the busy token has returned to the station THEN station inserts a new free token into the ring

COMP361 by M. Hamdi

properties of the 802 5 token ring
Properties of the 802.5 Token Ring
  • No collisions of frames
  • Full utilization of bandwidth is feasible
  • Transmission can be regulated by controlling access to token
  • Recovery protocols is needed if token is not handled properly, e.g., token is corrupted, station does not change to "free" etc

COMP361 by M. Hamdi

priority of transmission in 802 5
Priority of Transmission in 802.5
  • Eight levels of priorities
  • Priorities handled by 3-bit priority field and 3-bit reservation field
  • Define:
    • Pm = priority of the message to be transmitted
    • Pr = token priority of received token
    • Rr = reservation priority of received token

COMP361 by M. Hamdi

effect of propagation delay
Effect of propagation delay
  • Effect of propagation delay on throughput:
    • Case 1: a < 1 (Packet longer than ring)
      • T2 = time to pass token to the next station = a/N
    • Case 2: a > 1 (Packet shorter than ring)
      • Note: Sender finishes transmission after T1 = 1, but cannot release the token until the token returns
      • T1+T2 = max(1, a) + a/N

COMP361 by M. Hamdi

slide120
FDDI
  • FDDI distinguishes 4 Service Classes:
    • Asynchronous
    • Synchronous
    • Immediate (for monitor and control)

COMP361 by M. Hamdi

station types class a station
Station Types - Class A Station
  • Two PHY (and one or two MAC) entities
  • Connects to another Class A station or to a concentrator

COMP361 by M. Hamdi

station types class b station
Station Types - Class B Station
  • Class B station has one PHY (and one MAC) entity
  • Connects to a concentrator

COMP361 by M. Hamdi

slide123
dual attach node

c

o

n

c

e

n

t

r

a

t

o

r

dual attach node

single attach nodes

FDDI Dual Ring Structure

COMP361 by M. Hamdi

fddi media access control
FDDI Media Access Control
  • FDDI uses a Token Ring Protocol, similar to 802.5
  • Differences of FDDI and 802.5:
    • To release a token, a station does not need to wait until the token comes back after a transmission. The token is released right after the end of transmission
    • In FDDI, multiple frames can be attached to the token
    • FDDI has a different priority scheme

COMP361 by M. Hamdi

timed token protocol
Timed Token Protocol
  • FDDI has a timed token protocol which determines how long a station can transmit
  • Each station has timers to measure the time elapsed since a token was last received
  • TTRT Target Token Rotation Time
    • Value of TTRT is negotiated during initialization (default is 8 ms)
    • Set to the maximum desired rotation time

COMP361 by M. Hamdi

parameters of timed token protocol
Parameters of Timed Token Protocol
  • Station Parameters:
  • TRT Token Rotation Time
    • Time of the last rotation of the token.
    • If TRT < TTRT, then token is “early”, asynchronous traffic can be transmitted
    • If TRT > TTRT then token is “late”, asynchronous traffic cannot be transmitted.
  • THT Token Holding Time
    • Controls the time that a station may transmit asynchronous traffic.
    • fi Percentage of the TTRT that is allocated for synchronous traffic at station i.

COMP361 by M. Hamdi

timed token protocol127
Timed Token Protocol
  • If a station receives the token it sets
    • THT:= TRT
    • TRT:= TTRT
    • Enable TRT (i.e., start the timer)
  • If the station has synchronous frames are waiting the transmit synchronous traffic for up to time TTRT*fi (with sum(fi) <1)
  • If the station has asynchronous traffic
    • enable THT
    • while THT > 0 transmit asynchronous traffic.

COMP361 by M. Hamdi

fddi mac operation
FDDI MAC Operation

When a token arrives each station follows this procedure

  • THT = TTRT – TRT
  • TRT = 0
  • Send Synchronous Data
  • IF THT > 0, enable THT and start sending Asynchronous data as long as THT > 0

COMP361 by M. Hamdi

fddi mac example
FDDI MAC Example

COMP361 by M. Hamdi

fddi mac example130
FDDI MAC Example

COMP361 by M. Hamdi

fddi mac example131
FDDI MAC Example

COMP361 by M. Hamdi

fddi mac example132
FDDI MAC Example

COMP361 by M. Hamdi

fddi mac example sync ttrt 80
FDDI MAC Example-Sync. (TTRT = 80)

Maximum Throughput = 80 / 84 = 95.23%

COMP361 by M. Hamdi

fddi mac example asyn ttrt 100135
FDDI MAC Example(Asyn. TTRT=100)

Time = 404, station 1 gets the token

COMP361 by M. Hamdi

analysis of fddi
Analysis of FDDI
  • Analysis of
    • Synchronous traffic
    • Asynchronous traffic
  • Synchronous Traffic:
    • Recall that each station can transmit synchronous traffic for up to time TTRT*fi (with sum(fi)<=1)
    • If sum(fi)=1, the maximum throughput of synchronous traffic is 100%.
    • One can show that the maximum delay until a frame is completely transmitted is:
      • Maximum Access Delay <= 2*TTRT

COMP361 by M. Hamdi

analysis of fddi137
Analysis of FDDI
  • Asynchronous Traffic
  • Parameters:
    • D: Ring latency
    • n: Number of active sessions (all heavily loaded)
    • T: Value of TTRT
  • Assumption:
    • No synchronous traffic

COMP361 by M. Hamdi

analysis of fddi138
Analysis of FDDI
  • From the Example we see:
    • Cycle in a system has a length of: nT + D
    • Time in a cycle used for transmission: n(T - D)
  • We obtain for the maximum throughput for asynchronous traffic is:
  • ... and the maximum access delay for asynchronous traffic:
    • Max. Access Delay=T(n-1)+2D

COMP361 by M. Hamdi

ieee 802 4 token bus
IEEE 802.4 (Token Bus)
  • Problems with 802.3:
    • Collisions of frames can lead to unpredictable delays
    • In some real-time scenarios, collisions and unpredictable delays can be catastrophic
  • Solution via Token Bus:
    • A control packet (Token) regulates access to the bus
    • A station must have the token in order to transmit
    • A station can hold the token only for a limited time
    • The token is passed among the stations in a cyclic order
    • This structures the bus as a logical ring

COMP361 by M. Hamdi

ieee 802 4 token bus140
IEEE 802.4 (Token Bus)
  • Stations form a logical ring
  • Each station knows its successor and predecessor in the ring

COMP361 by M. Hamdi

feature of token bus
Feature of Token Bus
  • Bandwidth is 1, 5, or 10 Mbps
  • The token bus MAC protocol is very complex
  • Typically, token bus is free of collisions
  • Defines priority transmissions and can offer bounded transmission delays

COMP361 by M. Hamdi

ieee 802 4 token bus142
IEEE 802.4 (Token Bus)
  • 802.4 requires each station to implement the following management functions:
  • Ring Initialization
  • Addition to ring
  • Deletion from ring
  • Fault management

COMP361 by M. Hamdi

adding a station to the token bus
Adding a Station to the Token Bus
  • Each node periodically sends a solicit successor packet which invites nodes with an address between itself and the next node to join the ring
  • Sending node waits for response for one round trip
  • One of the following three cases apply
    • (1) No Response:
      • Pass token
    • (2) Response from one node:
      • Reset successor node
      • Pass token to new successor node
    • (3) Response from more than one node:
      • Collision has occurred
      • Node tries to resolve contention

COMP361 by M. Hamdi

add a station to the token bus
Add a station to the Token Bus
  • Assume: Response from more than one node has resulted in a collision.
  • Station sends a resolve contention packet and waits for four windows
  • (window = 1 round trip time) for a response:
    • In window 1, stations with address prefix 00 can reply
    • In window 2, stations with address prefix 01 can reply
    • In window 3, stations with address prefix 10 can reply
    • In window 4, stations with address prefix 11 can reply
  • If there is a another collision, procedure is repeated for the second pair of bits. Only the nodes which replied earlier can join the next round
  • First successful reply joins the ring

COMP361 by M. Hamdi

ieee 802 4 token bus145
IEEE 802.4 (Token Bus)
  • Four priority levels:
    • Levels 6, 4, 2, 0
    • Priority 6 is the highest level
  • Token Holding Time (THT):
    • Maximum time a node can hold a token
  • Token Rotation Time for class i (TRTi):
    • Maximum time of a full token circulation at which priority i transmissions are still permitted

COMP361 by M. Hamdi

token bus transmission rules
Token Bus Transmission Rules
  • Each station can transmit class 6 data for a time THT
  • For i= 4, 2, 0:
    • Transmit class i traffic if all traffic from class i+2 or higher is transmitted
    • and the time of the last token circulation (including the transmission time of higher priority packets during the current holding of the token) is less than TRT i .

COMP361 by M. Hamdi

ad