LLC: Frame Construction. Layer 2: Division into two Parts. Error-detecting and -correcting Codes. Error-correcting Codes



Similar documents
High-Level Data Link Control

Data Link Layer(1) Principal service: Transferring data from the network layer of the source machine to the one of the destination machine

TCOM 370 NOTES LOCAL AREA NETWORKS AND THE ALOHA PROTOCOL

Local Area Networks transmission system private speedy and secure kilometres shared transmission medium hardware & software

Computer Networks. Data Link Layer

Data Link Layer Overview

LANs. Local Area Networks. via the Media Access Control (MAC) SubLayer. Networks: Local Area Networks

Data Link Layer. Page 1. Ethernet

CMPE 150 Winter 2009

Network Categories. Network Types for the Local Range. Ethernet. Carrier Sense Multiple Access

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

CS263: Wireless Communications and Sensor Networks

EECS 122: Introduction to Computer Networks Multiaccess Protocols. ISO OSI Reference Model for Layers

Ethernet. Ethernet Frame Structure. Ethernet Frame Structure (more) Ethernet: uses CSMA/CD

Controlled Random Access Methods

Data Link Protocols. 5.4 Framing

Random Access Protocols

Based on Computer Networking, 4 th Edition by Kurose and Ross

How To Communicate With A Token Ring Network (Dihon)

Ring Local Area Network. Ring LANs

Chapter 4. Medium Access Control. IN2P3 Octobre 2002 Jean-Pierre Thomesse

Chapter 3: Sample Questions, Problems and Solutions Bölüm 3: Örnek Sorular, Problemler ve Çözümleri

ECE 333: Introduction to Communication Networks Fall 2002

Network Categories. Network Types for the Local Range. Ethernet

Real-Time (Paradigms) (51)

Unit of Learning # 2 The Physical Layer. Sergio Guíñez Molinos sguinez@utalca.cl

DATA COMMUNICATION AND NETWORKS

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

EXAMPLES AND PROBLEMS. Competence Based Education Internet Protocols

How To Make A Multi-User Communication Efficient

CSE331: Introduction to Networks and Security. Lecture 6 Fall 2006

Applied Data Communication Lecture 14

Collision of wireless signals. The MAC layer in wireless networks. Wireless MAC protocols classification. Evolutionary perspective of distributed MAC

LAN Switching Computer Networking. Switched Network Advantages. Hubs (more) Hubs. Bridges/Switches, , PPP. Interconnecting LANs

Stop And Wait. ACK received; transmit frame 2 CS 455 3

CSE 123A Computer Networks

Ethernet, VLAN, Ethernet Carrier Grade

RFC 2544 Testing of Ethernet Services in Telecom Networks

CS6956: Wireless and Mobile Networks Lecture Notes: 2/11/2015. IEEE Wireless Local Area Networks (WLANs)

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

RTT 60.5 msec receiver window size: 32 KB

Token Ring and. Fiber Distributed Data Interface (FDDI) Networks: Token Ring and FDDI 1

Data Link Protocols. Link Layer Services. Framing, Addressing, link access: Error Detection:

Attenuation (amplitude of the wave loses strength thereby the signal power) Refraction Reflection Shadowing Scattering Diffraction

ECE 358: Computer Networks. Homework #3. Chapter 5 and 6 Review Questions 1

The finite field with 2 elements The simplest finite field is

IEEE Broadband Wireless Access Working Group. ATM Based MAC Layer Proposal for the Air Interface Specification

Link Layer. 5.6 Hubs and switches 5.7 PPP 5.8 Link Virtualization: ATM and MPLS

Data Link Protocols. TCP/IP Suite and OSI Reference Model

: Instructor

COMPUTER NETWORKS REVIEW QUESTIONS AND PROBLEMS

Transport Layer Protocols

What is it all about? Some simple solutions. Multiple Access. Contexts for the multiple access problem. Outline. Contexts

TCP and Wireless Networks Classical Approaches Optimizations TCP for 2.5G/3G Systems. Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

Lecture 7 Multiple Access Protocols and Wireless

CSMA/CA. Information Networks p. 1

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)

CCNA R&S: Introduction to Networks. Chapter 5: Ethernet

ESSENTIALS. Understanding Ethernet Switches and Routers. April 2011 VOLUME 3 ISSUE 1 A TECHNICAL SUPPLEMENT TO CONTROL NETWORK

Process Control and Automation using Modbus Protocol

Local Interconnect Network Training. Local Interconnect Network Training. Overview

COMPUTER NETWORKS HANDOUTS LECTURERS # PREPARED BY: HAMMAD KHALID KHAN. Copyright Virtual University of Pakistan

How To Understand The Layered Architecture Of A Network

Communications and Computer Networks

QoS Parameters. Quality of Service in the Internet. Traffic Shaping: Congestion Control. Keeping the QoS

DATA COMMUNICATIONS AND NETWORKING. Solved Examples

Quectel Cellular Engine

WAN Data Link Protocols

Communication Systems Internetworking (Bridges & Co)

Performance Evaluation of Wired and Wireless Local Area Networks

standard. Acknowledgement: Slides borrowed from Richard Y. Yale

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT COMPUTER NETWORKS

1. The subnet must prevent additional packets from entering the congested region until those already present can be processed.

Review of Error Detection of Data Link Layer in Computer Network

EPL 657 Wireless Networks

TCP for Wireless Networks

Token-ring local area network management

Raj Jain. The Ohio State University Columbus, OH These slides are available on-line at:

Data Storage - II: Efficient Usage & Errors

Computer Networks. Chapter 5 Transport Protocols

Infrastructure Components: Hub & Repeater. Network Infrastructure. Switch: Realization. Infrastructure Components: Switch

Gigabit Ethernet: Architectural Design and Issues

2. What is the maximum value of each octet in an IP address? A. 128 B. 255 C. 256 D. None of the above

Data Link Layer. Flow Control. Flow Control

Wireless Personal Area Networks (WPANs)

Quality of Service in the Internet. QoS Parameters. Keeping the QoS. Traffic Shaping: Leaky Bucket Algorithm

Dr Markus Hagenbuchner CSCI319. Distributed Systems

a. CSMA/CD is a random-access protocol. b. Polling is a controlled-access protocol. c. TDMA is a channelization protocol.

Module 15: Network Structures

A Transport Protocol for Multimedia Wireless Sensor Networks

Protocols and Architecture. Protocol Architecture.

Sheet 7 (Chapter 10)

Final Exam. Route Computation: One reason why link state routing is preferable to distance vector style routing.

Module 1. Introduction. Version 2 CSE IIT, Kharagpur

Frame Burst Adjusting for Transmitting Video Conference in Gigabit Ethernet

Computer Networks: LANs, WANs The Internet

... neither PCF nor CA used in practice

Fast Ethernet and Gigabit Ethernet. Networks: Fast Ethernet 1

Operating System Concepts. Operating System 資 訊 工 程 學 系 袁 賢 銘 老 師

Mobile Communications Chapter 9: Mobile Transport Layer

Transcription:

Sicherungsebene Layer 2: Division into two Parts Logical Link Control (LLC) (Layer 2b) Organization of the data to be sent into frames Guarantee (if possible) an error free transmission between neighboring nodes through: Detection (and recovery) of transfer errors Flow Control (avoidance of overloading the receiver) Buffer Management Medium Access Control (MAC) (Layer 2a) Control of the access to the communication channel in broadcast networks Data Link Layer LLC MAC (Medium MAC Access Control) ISO/OSI 82.3 CSMA/CD (Ethernet) 82.4 Token Bus IEEE 82.2 Logical Link Control 82.5 Token Ring 82.6 DQDB Existing Reale Networks Netze ANSI X3T9.5 FDDI... ATM Forum... ATM LAN Emulation Page LLC: Frame Construction Organization of a message into uniform units (for simpler transmission) Well-defined interface to the upper layer (layer 3) Marking of the units: Error check Header Data Trailer (checking sequence for the frame) Control information (addresses, frame numbers, ) (Physical) mark the frame by: Start and end flags Start flag and length Code injuries FCS = Frame Checking Sequence Next task of the LLC layer: protected transmission of the frames to the communication partner. The transmission over layer is not necessarily free of errors! Question: how can errors be recognized and repaired? Page 2 Error-detecting and -correcting Codes From the data, compute a short checksum and send it together with the data to the receiver. The receiver also computes a checksum from the received data and compares it with those of the sender. Simplest procedure - parity bit: count the number of s: Sender: PB: sended: -Bit errors are detected Receiver: PB computed: 2-Bit errors are not detected Corrections are not possible! Variant: double parity Improvement of the parity bit procedure by further parity bits. For this, several blocks of bits are grouped and treated together: Sender: Receiver: An incorrect bit can be identified and corrected by this procedure. Error-correcting Codes Error correction Error correction generally means: Transmission of redundancies: Length of the transmission: n bit (2 n possible binary sequences) Message length: m (<n) bit (2 m permissible code words) k parity bits (k = n - m) Form a sphere of code words around each message Hamming Distance D: Number of places, in which two binary sequences differ Then: D 2t + code is t-error-correcting D t + code is t-error-detecting That means: for error-correction, a relatively large overhead has to be transmitted and it is not guaranteed, that the identified correction really is the right one. Page 3 Page 4

Hamming Code Goal: Use of several parity bits, each of them considering several bits (overlapping). Errors can be identified and corrected by combining the parity bits. The Hamming code is the minimal code of this category. Idea: Representation of each natural number by sum of powers to two. In a code word w = z,, z n the parity bits are placed exactly at the k positions, for them the index is a power of two. At the remaining m = n - k positions the data bits are placed. Each of the k additional bits is a parity bit for all places, for which the representation in powers of two contains the position of the additional bit. Page 5 Hamming Code ASCII-Code H A M M I N G Parity bit : Data bit 3, 5, 7, 9, 3 = + 2 Parity bit 2: Data bit 3, 6, 7,, 5 = + 4 Parity bit 4: Data bit 5, 6, 7 6 = 2 + 4 Parity bit 8: Data bit 9,, 7 = + 2 + 4 9 = + 8 Problem with Hamming code: errors involving several following bits are usually wrongly corrected = 2 + 8 = + 2 + 8 Codeword 2 3 4 5 6 7 8 9 Receiver: examine parity bits if necessary, sum up indices of the incorrect parity bits index of the incorrect bit -bit errors can definitely be identified and corrected Page 6 Hamming code Error Detection with Cyclic Codes Transmission error Receiver computes parity bits: Summing up the indizes, 2 and 4, bit 7 is detected as false Problem: how to recognize errors in several bits, especially sequences of bit errors? The use of simple parity bits is not suitable. However, in data communication (modem, telephone cables) such errors arise frequently. Weaknesses: 2-bit errors are not corrected (or wrongly corrected!) 3-bit errors are not recognized a) Bit 4 and bit inverted: parity bits, 2, 4, 8 are wrong bit 5 is to be corrected, but does not exist b) Bit 2 and bit 4 inverted parity bits 2, 4 wrong bit 6 is falsely recognized as incorrect c) Bits, 8, 9 inverted all parity bits are correct no error is recognized Page 7 Most often used: Polynomial Codes Idea: a k-bit PDU (a k-,, a ) is seen as a polynomial a k- x k- + + a with the coefficients and. Example: is seen as x 6... x x = x 6 + x 5 + x 2 + For computations, polynomial arithmetic modulo 2 is used, i.e. addition and subtraction without carriage. Both operations become Exclusive-OR operations. Page 8

Error Detection with Cyclic Codes CRC - Example Idea for error detection: Sender and receiver agree upon a generator polynomial G(x) = x r + + x. The first and the last coefficient have to be. The sender interprets a data block of length m as polynomial M(x). The sender extends M(x), i.e. adds redundant bits in a way that the extended polynomial M (x) is divisible by G(x). (Redundancy = remainder R(x) by division of the sequence with G(x)) The receiver divides the received extended M(x) by G(x). If the remainder is, there was no error, otherwise some error occurred. Name: Cyclic Redundancy Checksum (CRC) Note: also the parity bit can be seen as CRC, with generator polynomial x +! Data to be transmitted: Generator polynomial: x 4 + x + Sender: : = = x 3 + = R(x) CRC =, sending Receiver: Note: usually, the extra positions are preset with zeros but on some reason e.g. Ethernet uses the inverted bits as presets. : = Data received correctly Page 9 Page Computation of CRC: Shift Registers Shift Registers - Example Implementation by Shift Registers: XOR for substraction AND for applying substraction: first register = : no substraction first register = : substraction Data to be transmitted: Generator polynomial: x 4 + x + Generator polynomial x 4 + x +: R R R R R Simplified realization: R R R R R When no more input is given in the leftmost register, the other registers contain the CRC result. Page Page 2

Shift Registers - Example Shift Registers - Example Page 3 Page 4 Shift Registers - Example Shift Registers - Example x x x x x x x x x x x x x x x Page 5 Page 6

CRC is not perfect CRC: Characteristics Receiver: : = Error detected Receiver: : = Error not detected Common 6-bit generator polynomials: CRC-6: G(x) = x 6 + x 5 + x 2 + CRC CCITT: G(x) = x 6 + x 2 + x 5 + Ethernet: G(x) = x 32 + x 26 + x 23 + x 22 + x 6 + x 2 + x + x + x 8 + x 7 + x 5 + x 4 + x 2 + x + Error detection (for 6-bit generator polynomials): all single bit errors all double bit errors all three-bit errors all error samples with odd number of bit errors all error bursts with 6 or fewer bits 99.997% of all 7-bit error bursts 99.998% of all error bursts with length 8 bits Remaining error rate <.5 * -5 block error rate (original) Page 7 Page 8 CRC is not perfect CRC: Error Correction.) There are still remaining some error-combinations which can occur undetected the probability is very small, but in principle it is possible 2.) Assume, the receiver only gets part of the original message: Header / Data FCS Header / Data The receiver interprets the end of the message as FCS and tries to check the rest of the received bits as sent data. Probability for assumed FCS = FCS for assumed data : /2 r for r-bit FCS, because each of the r bits is correct with probability ½. This problem can be eliminated by using a fixed byte structure for the data frame or a length field in the header. 3.) An error could consist of adding a multiple of G(x) to M (x) In exceptional cases even errors are correctable by CRCs. Example: ATM (Asynchronous Transfer Mode) Data units have fixed length 5 byte header + 48 byte data The last header byte is a checksum for the header Generator polynomial G(x) = x 8 + x 2 + x + It is even possible to correct a -bit error, due to: there are 4 possible -bit errors and those lead on 4 different non-zero remainders. Correction is not assigned with e.g. Ethernet: an Ethernet frame has a length between 64 and 52 byte. Page 9 Page 2

Error Protection Mechanisms Error correction: FEC (Forward Error Correction) Use of error-correcting codes Falsified data in most cases can be corrected. Uncorrectable data are simply dismissed. Feedback from the receiver to the sender is not necessary. Suitable for transmissions tolerating no transmission delays (video, audio) as well as for coding resp. protecting data on CDs or DVDs. Error detection: ARQ (Automatic Repeat Request) Use of error-detecting codes (CRC) Errors are detected, but cannot be corrected. Therefore, falsified data must be requested again. Introduction of flow control: number the data blocks to be sent acknowledgement of blocks by the receiver incorrectly transferred blocks are repeated Suitable for transmissions which do not tolerate errors (files). Page 2 Transmitter Receiver Flow Control: Send and Wait Simple procedure: The sender sends a data block and waits, until an acknowledgement of the receiver arrives or a timeout is reached. Incorrect blocks are repeated, otherwise the next block is sent. Disadvantage: large waiting periods between the transmission of single blocks. Thus much transmission capacity is wasted. Waiting period ACK 2 F time out ACK: Acknowledgment, i.e. everything ok 2 2 ACK 3 3 Page 22 Flow control: Sliding Window Introduction of a transmission window Common procedure to avoid long waiting periods of the sender Sender and receiver agree upon a transmission window. If W is the window size, it means: the sender may send maximally W messages without an acknowledgement of the receiver. The messages are sequentially numbered in the frame header (,, 2,, MODULUS-,, ; whereby W < MODULUS). The sender may send sequentially numbered messages up to W, without getting an acknowledgement for the first frame. The receiver confirms by acknowledgements (ACK). The sender moves the window as soon as an ACK arrives. Advantages of the procedure: The sender can take advantage of the network capacity A sender who is too fast for the receiver is slowed down (the receiver only can read data from the network slowly, thus it rarely sends ACKs) Sending and receiving speed are adapted Page 23 Sliding Window Example (for 3-bit sequence/acknowledgement number) with 3 bits for sequence/acknowledgement number, m = 8 possible combinations Stations agree upon a window size W with W < m, e.g. W = 7 The window limits the number of unconfirmed frames allowed at one time (here max. 7, because of W = 7) With receipt of an acknowledgement, the window is shifted accordingly Frames are numbered sequentially modulo m (for m = 8 thus numbers from to 7) 7 7 ACK 6 ACK 2 ACK 6 6 6 7 5 2 5 2 5 2 5 2 5 2 4 3 2 3 4 4 5 3 6 7 4 3 2 3 4 4 53 6 7 4 3 2 Station Station sendet sends Station Station receives erhält Station Station verschiebt slides Station Station receives erhält Station Station verschiebt slides Frames - Quittung Fenster um, Quittung, 2 Fenster um 2, frames - 6 acknowledgement sendet window Frame by 7 acknowledgement sendet window Frame by, 2 Time and sends,2 and sends frame 7 frames, Page 24 6 7 6 7

Maximum Window Size with Sliding Window There is a reason why window size W has to be smaller than MODULUS: Sequence numbers e.g. have 3 bits: 2 3 = 8 sequence numbers (,, 7) I.e. MODULUS = 8 Assume the window size to be W = 8. A sends frames to B. B last acknowledged frame 2 (ACK 3 was sent to A) B has acknowledged 2 A sends 8 frames, without receiving an acknowledgement of B A sent 2 3 4 5 6 7 2 It arrives an acknowledgement ACK 3. Case : B only has received 2 Case 2: B has received 2 3 4 5 6 7 2 Elimination of Errors: Go-back-n The sender sends data blocks continuously (within the transmission window). The receiver answers: ACK j : everything up to block j is correct REJ j /NACK j : up to block j- everything is correct, block j is incorrect Go-back-n: with a REJ j, starting from block j everything is transferred again Disadvantage: With a REJ j the transmitter must repeat all blocks starting from j Advantage: the receiver needs only one buffer place Example of W = 5; MODULUS = 8 Source 2 3 4 5 2 3 4 5 6 A does not know whether case or 2 holds for B: the acknowledgement is not clear! W 7 (W < MODULUS in general) Destination ACK ACK REJ 2 ACK 2 Page 25 Page 26 Extensions Implementation of Protocols Selective Repeat SREPEAT: Only positive acknowledgements are given When a PDU is missing, the receiver buffers the following (correct) PDUs If the sender gets no acknowledgement for a PDU, a timeout occurs and the sender repeats (like in go-back-n) everything beginning with the missing PDU When the missing PDU arrives, an acknowledgement for the subsequently received PDUs is sent When the sender gets this acknowledgement, it stops repeating old PDUs and goes on with new PDUs Thus, the capacity is used more efficiently, but the receiver needs more buffer Example of use: Implementation of a protocol for layer 2 First: Definition of some data types (protocol.h): Selective Reject SREJ j Like in SREPEAT, correctly received PDUs after a missing PDU are buffered The receiver gives a negative acknowledgement for the missing PDU j The sender repeats only PDU j. By this, no unnecessary duplicates are sent, the efficiency of capacity usage again is enhanced. Variant: the receiver can send a list of missing PDUs to the sender, not only single negative acknowledgements But: again the receiver needs more buffer. Page 27 Page 28

Step : Send without restrictions No transmission errors No flow control Page 29 Page 3 Step 2: Simple flow control No transmission errors Step 3: Error handling and flow control - sender Send-and-Wait as flow control Page 3 Page 32

High Level Data Link Control (HDLC) Step 3: Error handling and flow control - receiver Protocol for layer 2: HDLC Frame identification: mark the beginning and end with a flag: Flag may never occur within a frame Used for this purpose: Bitstuffing Sender inserts a zero after each sequence of five ones. The receiver removes this zero. Sender: Receiver: Page 33 Page 34 HDLC Frame Frame Types for HDLC For synchronization on layer Header Data Trailer 8 8 8 (6) 6 8 Address Control DATA FCS Flag D/C N(S) P/F Flag In the idle state, only s are sent. The receiver recognizes a transmission with the first. Address contains an identifier to inform the receiver about what to do, e.g. means IP protocol used for processing the data. The checksum is computed by using a CRC. Since CRC conducts no error correction, flow control is necessary. Control contains the sequence number N(S) for the message; at the same time, in the opposite direction a message can be acknowledged using the acknowledgement number ( Piggybacking ). Bits D/C: DATA () resp. control () P/F: Poll/final for the coordination of several senders Page 35 Information Supervisory Unnumbered I-Frame I-Rahmen S-Frame S-Rahmen U-Frame U-Rahmen N(S) Sequence Number Sequence number N(S) S S M M P F P F P F Acknowledgement number M M M Acknowledgement Number (Frame is expected next all frames up to - are acknowledged, counted modulo the maximum sequence number plus.) with 3 bit for N(S) and, only a window size of 7 is possible; long signal transmission time, low data transmission rates Solution: Extended numbering mode with additional control byte (2 * 4 bits) 7 bits per direction, window size W 27 Page 36

Frame Types for HDLC PPP Point-to-Point Protocol Type Name Fields 2 3 4 5 6 7 8 I I (Data Frame) N(S) P RR P/ F (Receive Ready) S RNR P/ F (Receive not Ready) REJ P/ F (Reject) SREJ P/ F (Selective Reject) SABM (Set Asynchronous P Balanced Mode) DISC (Disconnect) P UA U (Unnumbered ACK) F CMDR (Command Reject) F FRMR (Frame Reject) F DM (Disconnect Mode) F Send frame N(S), ACK up to - in the other direction Ready to receive, ACK up to - in the other direction Temporarily not ready to receive, acknowledge up to - in the other direction NACK for, ACK up to -. The sender should repeat everything beginning with ACK up to -, selective NACK for Connection Establishment Announcement of connection termination General ACK (e.g. for connection establishment) Frame/command not valid (invalid frame, wrong sequence number, ) Connection Termination Page 37 Often used: point-to-point connections between network nodes Variant of HDLC for point-to-point connections: PPP The structure of frames is oriented at HDLC: Flag: same as for HDLC Address: unnecessary, therefore set to Control: unnumbered mode (marked by ) without sequence numbers and acknowledgments as default procedure Protocol: specifies contents of the data part (Payload) Checksum: 2 byte error detection is usually used Page 38 Medium Access Control (MAC) MAC - Reservation Protocols Controlling the competitive access of several users to a shared medium Simplest procedures: firm assignment of a limited capacity Time Division Multiple Access (TDMA) Frequency 2 3 3 2 3 3 2 3 3 Frequency Division Multiple Access (FDMA) Frequency User User 2 User 3 Time Time Each user gets the entire transmission capacity for fixed time intervals (Baseband transmission) Each user gets a fixed portion of the transmission capacity (a frequency range) for the whole time (Broadband transmission) Page 39 Communication follows a two-phase schema (alternating phases): In the reservation phase the sender makes a reservation by indicating the wish to send data (or even the length of the data to be sent) In the transmission phase the data communication takes place (after successful reservation) Advantage: very efficient use of the capacity Disadvantage: Delay by two-phase procedure; further, often a master station is needed, which cyclically queries all other stations whether they have to send data. This master station assigns sending rights. Techniques for easy reservation without master station: Explicit reservation Implicit reservation Page 4

Explicit Reservation Uses two frame types: reservation frame (very small) in the first phase data frame (constant length) in the second phase Variant : without contention Only suitable for small number of users Each user i is assigned the i-th slot in the reservation frame. If it wants to send data, it sets the i-th bit in the reservation frame to. After the reservation phase, all stations having set their reservation bit can send their data in the order of their bits in the reservation frame. reservation frame data frames of stations having reserved 2 5 7 4 Explicit Reservation Uses two frame types: reservation frame (very small) in the first phase data frame (constant length) in the second phase Variant 2: with contention For higher number of users The reservation frame consists of a limited number of contention slots (smaller than the number of participating stations) Users try to get a contention slot (and by that make a reservation for a data slot) by random choice, writing their station number into a slot If there is no collision in the reservation phase, a station may send. reservation frame with contention slots 7 45 4 data frames of stations having reserved 7 45 4 22 3 5 22 3 34 25 2 This procedure is called Bitmap Protocol Page 4 Page 42 Implicit Reservation Implicit Reservation No reservation slots, only data slots of certain length. A window consists of N data slots, windows a cyclically repeated The duration of the window must be longer than the round-trip time Procedure: A station which wants to send observes N slots without doing anything and marks the slots as follows:, if the slot if empty or collided, if the slot is used by somebody else In the following window the station randomly chooses one of the slots marked with (Simplification: choose the first slot marked with ) Two cases: conflict: try again successful transmission: slot reserved for the station as long as it sends data. If the station is not using its slot in one window, the reservation is dismissed. Example: 8 data slots, Stations A - F Reservation Slots: 2 3 4 5 6 7 8 Window Window 2 A C D A B A B/D F ACDABA-F Window 3 A C A B A AC-ABA-- Window 4 A B/F B A F A---BAF- Window 5 A B A F D A---BAFD Window 6 A C E E B A F D t Stations observing 8 slots Collision within slot 7; the other slots are reserved Page 43 Page 44

MAC Decentralized Protocols Best known protocol has the name ALOHA Developed on the Hawaiian islands: stations are connected by satellite Very simple principle, no coordination: Stations are sending completely uncoordinated, all using the same frequencies When two (or more) stations are sending at the same time, a collision occurs: both messages are destroyed. Problem: collisions occur even with very small overlaps! Vulnerability period: 2 times the length of a frame When a collision occurs, frames are repeated after a random time Problem: since traffic runs over a satellite, a sender only hears after very long time, whether the transmission was successful or not. Collision MAC Decentralized Protocols Problem with ALOHA: even small laps already lead to transmission conflicts. Therefore often collisions arise, causing many repetitions: No guaranteed response times Low throughput Improvement: Slotted ALOHA The whole time axis is divided into time slots (similar to TDMA, but time slots are not firmly assigned to stations) The transmission of a block starts at the beginning of a time slot fewer collisions, vulnerability period of one frame length But: the stations must be synchronized! Collision Sender A Sender A Sender B Sender B Sender C t Sender C t Page 45 Page 46 How to estimate the Efficiency of ALOHA? Randomness Which possible states do we have in ALOHA? thinking users backlogged users common channel total traffic G no conflict conflict G: average number of frames per time unit S: throughput, i.e. rate of successful transmissions Relation between G and S? Depends significantly on the traffic structure. Model A: only one sender. No collisions, so S = G is possible Model B: many users, each of them inactive most time new arrivals are totally random Suppose that the total traffic is absolutely random. What is the biggest randomness possible? arrival Random arrivals: t consider time interval of length h. Observe arrivals in that interval. h Arrivals have a certain intensity G (average rate per time unit) Randomness : probability of an arrival in a (small) time interval h is proportional o(h): disturbance function with to the intensity G o( h) for h to h h... to G h For very small h, only or arrivals are possible: Prob(exactly one arrival within interval length h) = G h + o(h) Prob(no arrivals within interval length h) = G h + o(h) Page 47 Page 48

Use for ALOHA Throughput vs. Offered Traffic These conditions/requirements lead to the Poisson distribution. Consider the total number i of events in an interval of length T i ( G T) G T Prob(exactly i arrivals in [;T]) = e Back to ALOHA: relation between S and G Suppose that G follows the poisson distribution, i.e. G is totally random. i! S = G Prob(no collision occurs) = G Prob(nobody else started in my vulnerability period) = G Prob(no arrival in interval of length T = 2) for pure ALOHA G Prob(no arrival in interval of length T = ) for slotted ALOHA Prob( arrivals in [;T]) = e -G T = G e -2G for pure ALOHA G e -G for slotted ALOHA Note: randomness (i.e. Poisson) is not valid for high traffic and if waiting time after retransmission is short Page 49 Analytical computation: Both, Pure ALOHA and Slotted ALOHA cannot achieve a high throughput But: simple principle, no coordination necessary between the stations Page 5 MAC Decentralized Protocols MAC Coordination by using a Token Variant of ALOHA for networks with small range exists Similar to ALOHA: no coordination of the stations But: each station which wants to send first examines whether already another station is sending If no sending takes place, the station begins to send. (Carrier Sense Multiple Access, CSMA) Notice: this principle only works within networks having a short transmission delay using the principle within satellite systems is not possible because there would be no chance to know whether a conflict occurred before end of the transmission Advantages: simple, because no master station and no tokens are needed; nevertheless good utilization of the network capacity Disadvantage: no guaranteed medium access, a large delay up to beginning a transmission is possible Introduction of a token (determined bit sequence) Only the holder of the token is allowed to send Token is cyclically passed on between all stations particularly suitable for ring topologies Token Ring (4/6/ Mbit/s) Characteristics: Guaranteed accesses, no collisions Very good utilization of the network capacity, high efficiency Fair, guaranteed response times Possible: multiple tokens But: complex and expensive Passing on of the token Page 5 Page 52