Copyright 2010, Elsevier Inc. All rights Reserved

Similar documents
Lecture 28: Data Link Layer

Introduction to Wireless & Mobile Systems. Chapter 6. Multiple Radio Access Cengage Learning Engineering. All Rights Reserved.

Media Access Protocols. Spring 2018 CS 438 Staff, University of Illinois 1

Reliable Transmission. Spring 2018 CS 438 Staff - University of Illinois 1

Announcements. Reading. Project #4 is on the web. Homework #1. Midterm #2. Chapter 4 ( ) Note policy about project #3 missing components

ECE 4450:427/527 - Computer Networks Spring 2017

Reliable Transmission

Using the Keyboard. Using the Wireless Keyboard. > Using the Keyboard

Security of Bluetooth: An overview of Bluetooth Security

K-NET bus. When several turrets are connected to the K-Bus, the structure of the system is as showns

Direct Link Networks (II)

Bluetooth Basics. Bluetooth Overview

1. SWITCHING FUNDAMENTALS

Lecture 6. Reminder: Homework 2, Programming Project 2 due on Thursday. Questions? Tuesday, September 13 CS 475 Networks - Lecture 6 1

Lecture 10 Collision resolution. Collision resolution

Using VTR Emulation on Avid Systems

Quality of Service. Spring 2018 CS 438 Staff - University of Illinois 1

Introduction to Network Technologies & Layered Architecture BUPT/QMUL

Ethernet. Lecture 6. Outline. Ethernet - Physical Properties. Ethernet - Physical Properties. Ethernet

Message Integrity and Hash Functions. TELE3119: Week4

Python Programming: An Introduction to Computer Science

Combination Labelings Of Graphs

Introduction to OSPF. ISP Training Workshops

Switching Hardware. Spring 2018 CS 438 Staff, University of Illinois 1

IS-IS in Detail. ISP Workshops

CSC 220: Computer Organization Unit 11 Basic Computer Organization and Design

Basic allocator mechanisms The course that gives CMU its Zip! Memory Management II: Dynamic Storage Allocation Mar 6, 2000.

Copyright 2016 Ramez Elmasri and Shamkant B. Navathe

Transitioning to BGP

One advantage that SONAR has over any other music-sequencing product I ve worked

Copyright 2010, Elsevier Inc. All rights Reserved

BGP Attributes and Path Selection. ISP Training Workshops

Throughput-Delay Scaling in Wireless Networks with Constant-Size Packets

History Based Probabilistic Backoff Algorithm

MOTIF XF Extension Owner s Manual

Data diverse software fault tolerance techniques

MAC Throughput Improvement Using Adaptive Contention Window

ICS Regent. Communications Modules. Module Operation. RS-232, RS-422 and RS-485 (T3150A) PD-6002

Chapter 1. Introduction to Computers and C++ Programming. Copyright 2015 Pearson Education, Ltd.. All rights reserved.

. Written in factored form it is easy to see that the roots are 2, 2, i,

CS 457 Networking and the Internet. Link Layer Protocols. Problems 8/31/16. Fall 2016 Indrajit Ray

The CCITT Communication Protocol for Videophone Teleconferencing Equipment

Computers and Scientific Thinking

Operating System Concepts. Operating System Concepts

Switch Construction CS

Guaranteeing Hard Real Time End-to-End Communications Deadlines

Global Support Guide. Verizon WIreless. For the BlackBerry 8830 World Edition Smartphone and the Motorola Z6c

Improvement of the Orthogonal Code Convolution Capabilities Using FPGA Implementation

On (K t e)-saturated Graphs

Counting Regions in the Plane and More 1

IMP: Superposer Integrated Morphometrics Package Superposition Tool

Learning to Shoot a Goal Lecture 8: Learning Models and Skills

NVP-903 Series. Multi-Stream Network Video Encoder REFERENCE GUIDE

Improving Template Based Spike Detection

WYSE Academic Challenge Sectional Computer Science 2005 SOLUTION SET

The isoperimetric problem on the hypercube

Communication methods. Communication methods. Communication methods. Dimensions to consider. Waveform

Adaptive Graph Partitioning Wireless Protocol S. L. Ng 1, P. M. Geethakumari 1, S. Zhou 2, and W. J. Dewar 1 1

IS-IS for IPv6. ISP Workshops

27 Refraction, Dispersion, Internal Reflection

Threads and Concurrency in Java: Part 1

CIS 121 Data Structures and Algorithms with Java Spring Stacks, Queues, and Heaps Monday, February 18 / Tuesday, February 19

Threads and Concurrency in Java: Part 1

Chapter 4 The Datapath

Recursive Procedures. How can you model the relationship between consecutive terms of a sequence?

6.854J / J Advanced Algorithms Fall 2008

Random Graphs and Complex Networks T

Lecture 6. Lecturer: Ronitt Rubinfeld Scribes: Chen Ziv, Eliav Buchnik, Ophir Arie, Jonathan Gradstein

Evaluation scheme for Tracking in AMI

Table 2 GSM, UMTS and LTE Coverage Levels

Appendix D. Controller Implementation

Examples and Applications of Binary Search

Web OS Switch Software

Python Programming: An Introduction to Computer Science

Term Project Report. This component works to detect gesture from the patient as a sign of emergency message and send it to the emergency manager.

CMSC Computer Architecture Lecture 12: Virtual Memory. Prof. Yanjing Li University of Chicago

Lecture Notes 6 Introduction to algorithm analysis CSS 501 Data Structures and Object-Oriented Programming

performance to the performance they can experience when they use the services from a xed location.

Task scenarios Outline. Scenarios in Knowledge Extraction. Proposed Framework for Scenario to Design Diagram Transformation

Communication methods. Communication methods. Communication methods. Dimensions to consider. Waveform

The Magma Database file formats

Course Information. Details. Topics. Network Examples. Overview. Walrand Lecture 1. EECS 228a. EECS 228a Lecture 1 Overview: Networks

Review: The ACID properties

Secure Software Upload in an Intelligent Vehicle via Wireless Communication Links

Prevention of Black Hole Attack in Mobile Ad-hoc Networks using MN-ID Broadcasting

The Value of Peering

Principles of modern LAN design and operation. Guido Marchetto Fulvio Risso Politecnico di Torino

Realistic Storage of Pending Requests in Content-Centric Network Routers

L I N U X. Unit 6 S Y S T E M DHCP & DNS (BIND) A D M I N I S T R A T I O n DPW

Hash Tables. Presentation for use with the textbook Algorithm Design and Applications, by M. T. Goodrich and R. Tamassia, Wiley, 2015.

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 2.

Chapter 2: Non-hierarchical Coloured Petri Nets. 1`(1,"COL")++ 1`(2,"OUR")++ 1`(3,"ED ")++ 1`(4,"PET")++ 1`(5,"RI ")++ 1`(6,"NET") (n,d) AllPackets

1.2 Binomial Coefficients and Subsets

Overview Queueing Disciplines TCP Congestion Control Congestion Avoidance Mechanisms Quality of Service

CS 111: Program Design I Lecture 19: Networks, the Web, and getting text from the Web in Python

SD vs. SD + One of the most important uses of sample statistics is to estimate the corresponding population parameters.

condition w i B i S maximum u i

Bezier curves. Figure 2 shows cubic Bezier curves for various control points. In a Bezier curve, only

CSMC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala Set 4. September 09 CMSC417 Set 4 1

Master Informatics Eng. 2017/18. A.J.Proença. Memory Hierarchy. (most slides are borrowed) AJProença, Advanced Architectures, MiEI, UMinho, 2017/18 1

Transcription:

Computer Networks: A Systems Approach, 5e Larry L. Peterso ad Bruce S. Davie (Subset of topics) Gettig Coected Framig Error Detectio. Reliable Trasmissio Sharig: Etheret ad Multiple Access Networks, Wireless Networks Copyright 2010, Elsevier Ic. All rights Reserved 1

Framig, Reliability, Sharig Delieatig the sequece of bits trasmitted over the lik ito complete messages that ca be delivered to the ed ode Techiques to detect trasmissio errors ad take the appropriate actio (coceptually same as RPC) Makig the liks reliable i spite of trasmissio problems Media Access Cotrol Problem Carrier Sese Multiple Access (CSMA) etworks Wireless Networks with differet available techologies ad protocol 2

Framig We are focusig o packet-switched etworks, which meas that blocks of data (called frames at this level), ot bit streams, are exchaged betwee odes. It is the etwork adaptor that eables the odes to exchage frames. Bits flow betwee adaptors, frames betwee hosts 3

Framig Whe ode A wishes to trasmit a frame to ode B, it tells its adaptor to trasmit a frame from the ode s memory. This results i a sequece of bits beig set over the lik. The adaptor o ode B the collects together the sequece of bits arrivig o the lik ad deposits the correspodig frame i B s memory. Recogizig exactly what set of bits costitute a frame that is, determiig where the frame begis ad eds is the cetral fuctio of the adaptor 4

Framig: Byte orieted BISYNC origial Setiel Approach (late 60s, IBM) Frames trasmitted begiig with leftmost field Begiig of a frame is deoted by sedig a special SYN (sychroize) character Data portio of the frame is cotaied betwee special setiel character STX (start of text) ad ETX (ed of text) SOH : Start of Header DLE : Data Lik Escape CRC: Cyclic Redudacy Check BISYNC Frame Format 5

Framig: Bit-orieted Protocol HDLC : High Level Data Lik Cotrol Begiig ad Edig Sequeces: 0 1 1 1 1 1 1 0 Seder: ay time five cosecutive 1 s have bee trasmitted from the body of the message seder iserts 0 before trasmittig the ext bit (bit stuffig) Receiver: 5 cosecutive 1 s received: Next bit 0 : Stuffed, so discard it Next bit 1 : Either Ed of the frame marker, Or Error has bee itroduced i bitstream If 0 ( 01111110 ) à Ed of the frame marker If 1 ( 01111111 ) à Error, discard the whole frame HDLC Frame Format 6

Error Detectio Bit errors are itroduced ito frames Because of electrical iterferece ad thermal oises Commo techique for detectig trasmissio error CRC (Cyclic Redudacy Check) Used i HDLC, CSMA/CD Other approaches Checksum (IP) 7

Error Detectio Basic Idea of Error Detectio To add redudat iformatio to a frame that ca be used to determie if errors have bee itroduced Imagie (Extreme Case) Trasmittig two complete copies of data Idetical à No error Differ à Error Poor Scheme??? bit message, bit redudat iformatio Error ca go udetected I geeral, we ca provide strog error detectio techique efficietly k redudat bits, bits message, k << I Etheret, a frame carryig up to 12,000 bits of data requires oly 32- bit CRC 8

Error Detectio Extra bits are redudat They add o ew iformatio to the message Derived from the origial message usig some algorithm Both the seder ad receiver kow the algorithm IP weak checksum (sum of 16 bit words) Lik Level: CRC (see book/wikipedia for details as iterested) m r m r Seder Receiver Receiver computes r usig m, If they match, o error 9

Error Correctio Need to: Detect Error, Correct/Recover from Error Two approaches whe the recipiet detects a error Usig error correctio algorithm, the receiver recostructs the message The overhead is ofte cosidered too high for wired liks more relevat to wireless some errors go ucorrected Corrupt frames must be discarded. Notify the seder that the message was corrupted, so the seder ca sed agai. If the error is rare, the the retrasmitted message will be errorfree 10

Reliable Trasmissio A lik-level protocol that wats to deliver frames reliably must recover from discarded frames. Combiatio of two fudametal mechaisms A ackowledgemet (ACK for short) is a small cotrol frame that a protocol seds back to its peer sayig that it has received the earlier frame. A cotrol frame is a frame with header oly (o data). The receipt of a ackowledgemet idicates to the seder of the origial frame that its frame was successfully delivered. 11

Reliable Trasmissio If the seder does ot receive a ackowledgmet after a reasoable amout of time, the it retrasmits the origial frame. The actio of waitig a reasoable amout of time is called a timeout. The geeral strategy of usig ackowledgemets ad timeouts to implemet reliable delivery is sometimes called Automatic Repeat request (ARQ). Build up the cocept so you uderstad why we do t use the simplest form 12

Stop ad Wait Protocol Idea of stop-ad-wait protocol is straightforward After trasmittig oe frame, the seder waits for a ackowledgemet before trasmittig the ext frame. If the ackowledgemet does ot arrive after a certai period of time, the seder times out ad retrasmits the origial frame 13

Stop ad Wait Protocol Timelie showig four differet scearios for the stop-ad-wait algorithm. (a) The ACK is received before the timer expires; (b) the origial frame is lost; (c) the ACK is lost; (d) the timeout fires too soo 14

Stop ad Wait Protocol If the ackowledgmet is lost or delayed i arrivig The seder times out ad retrasmits the origial frame, but the receiver will thik that it is the ext frame sice it has correctly received ad ackowledged the first frame As a result, duplicate copies of frames will be delivered How to solve this Same coceptual issue as with TCP, RPC Use 1 bit sequece umber (0 or 1) Whe the seder retrasmits frame 0, the receiver ca determie that it is seeig a secod copy of frame 0 rather tha the first copy of frame 1 ad therefore ca igore it (the receiver still ackowledges it, i case the first ackowledgemet was lost) 15

Stop ad Wait Protocol Timelie for stop-ad-wait with 1-bit sequece umber 16

Seder Stop ad Wait Protocol -- Limitatios The seder has oly oe outstadig frame o the lik at a time This may be far below the lik s capacity Cosider a slow 1.5 Mbps lik with a 45 ms RTT The lik has a delay badwidth product of 67.5 Kb or approximately 8 KB Sice the seder ca sed oly oe frame per RTT ad assumig a frame size of 1 KB Maximum Sedig rate Bits per frame Time per frame = 1024 8 0.045 = 182 Kbps Or about oe-eighth of the lik s capacity To use the lik fully, the seder should trasmit up to eight frames before havig to wait for a ackowledgemet QUIZ QUESTION 17

Slidig Widow Protocol: Parallelism Timelie for Slidig Widow Protocol 18

Seder Slidig Widow Protocol Seder assigs a sequece umber deoted as SeqNum to each frame Seder maitais three variables Sedig Widow Size (SWS) Upper boud o the umber of outstadig (uackowledged) frames that the seder ca trasmit Last Ackowledgemet Received (LAR) Sequece umber of the last ackowledgemet received Last Frame Set (LFS) Sequece umber of the last frame set Seder maitais ivariat: LFS LAR SWS 19

Seder Slidig Widow Protocol Whe a ackowledgemet arrives the seder moves LAR to right, thereby allowig the seder to trasmit aother frame Also the seder associates a timer with each frame it trasmits It retrasmits the frame if the timer expires before the ACK is received Note that the seder has to be willig to buffer up to SWS frames 20

Receiver Slidig Widow Protocol Receiver maitais three variables Receivig Widow Size (RWS) Upper boud o the umber of out-of-order frames that the receiver is willig to accept Largest Acceptable Frame (LAF) Sequece umber of the largest acceptable frame Last Frame Received (LFR) Sequece umber of the last frame received Receiver maitais ivariat: LAF LFR RWS 21

Receiver Slidig Widow Protocol Whe a frame with sequece umber SeqNum arrives: If SeqNum LFR or SeqNum > LAF Discard it (the frame is outside the receiver widow) If LFR < SeqNum LAF Accept it Decide whether or ot to sed a ACK Let SeqNumToAck Deote the largest sequece umber ot yet ackowledged, such that all frames with sequece umber less tha or equal to SeqNumToAck have bee received The receiver ackowledges the receipt of SeqNumToAck eve if higher-umbered packets have bee received This ackowledgemet is said to be cumulative. The receiver the sets LFR = SeqNumToAck ad adjusts LAF = LFR + RWS 22

Slidig Widow Protocol Iefficiecies Whe timeout occurs, the amout of data i trasit decreases Sice the seder is uable to advace its widow Whe the packet loss occurs, this scheme is o loger keepig the pipe full The loger it takes to otice that a packet loss has occurred, the more severe the problem becomes How to improve this -- Will discuss uaces i cotext of TCP i future lecture Negative Ackowledgemet (NAK) Additioal Ackowledgemet Selective Ackowledgemet 23

NAKs, Duplicate Acks, Selective Acks Negative Ackowledgemet (NAK) Receiver seds NAK for frame 6 whe frame 7 arrive (i the previous example) However this is uecessary sice seder s timeout mechaism will be sufficiet to catch the situatio Additioal Ackowledgemet Receiver seds additioal ACK for frame 5 whe frame 7 arrives Seder uses duplicate ACK as a clue for frame loss Selective Ackowledgemet Receiver will ackowledge exactly those frames it has received, rather tha the highest umber frames Receiver will ackowledge frames 7 ad 8 Seder kows frame 6 is lost Seder ca keep the pipe full (additioal complexity) 24

Sequece umbers How to distiguish betwee differet icaratios of the same sequece umber? Number of possible sequece umber must be larger tha the umber of outstadig frames allowed Stop ad Wait: Oe outstadig frame 2 distict sequece umber (0 ad 1) Let MaxSeqNum be the umber of available sequece umbers SWS + 1 MaxSeqNum Is this sufficiet? 25

Sequece umber space SWS + 1 MaxSeqNum Is this sufficiet? Depeds o RWS If RWS = 1, the sufficiet If RWS = SWS, the ot good eough For example, we have eight sequece umbers 0, 1, 2, 3, 4, 5, 6, 7 RWS = SWS = 7 Seder seds 0, 1,, 6 Receiver receives 0, 1,,6 Receiver ackowledges 0, 1,, 6 ACK (0, 1,, 6) are lost Seder retrasmits 0, 1,, 6 Receiver is expectig 7, 0,., 5 To avoid this, If RWS = SWS, SWS < (MaxSeqNum + 1)/2 26

Sharig Liks Etheret Wifi 27

Etheret Most successful local area etworkig techology of last 30 years. Developed i the mid-1970s by researchers at the Xerox Palo Alto Research Ceters (PARC). Uses CSMA/CD techology Carrier Sese Multiple Access with Collisio Detectio. A set of odes sed ad receive frames over a shared lik. Carrier sese meas that all odes ca distiguish betwee a idle ad a busy lik. Collisio detectio meas that a ode listes as it trasmits ad ca therefore detect whe a frame it is trasmittig has collided with a frame trasmitted by aother ode. Iterestig desig lessos for higher level distributed systems (pub/sub bus) 28

Etheret -- Origis Uses ALOHA (packet radio etwork) as the root protocol Developed at the Uiversity of Hawaii to support commuicatio across the Hawaiia Islads (early 70s). For ALOHA the medium was atmosphere, for Etheret the medium is a coax cable. DEC ad Itel joied Xerox to defie a 10-Mbps Etheret stadard i 1978. This stadard formed the basis for IEEE stadard 802.3 802.3 was later exteded to iclude a 100-Mbps Fast Etheret ad a 1000-Mbps Gigabit Etheret. 29

Etheret -- hardware Etheret segmet origial was coaxial cable of up to 500 m. Up to 5 segmets ca be joied by repeaters -- total reach 2500 m. Later thier cable kow as 10Base2 up to 200 m; Twisted pair 10Base1 up to 100 m (used with Etheret Hubs that xmit oto all liks) Hosts coect to a Etheret segmet by tappig ito it. A trasceiver (a small device directly attached to the tap) detects whe the lie is idle ad drives sigal whe the host is trasmittig, ad receives icomig sigal. Etheret adaptor plugs ito host ad implemets protocol 30

Etheret is a Bus Ay sigal placed o the Etheret by a host is broadcast over the etire etwork Sigal is propagated i both directios. Repeaters forward the sigal o all outgoig segmets. Termiators attached to the ed of each segmet absorb the sigal. Etheret hubs rebroadcast oto all attached liks so still oe broadcast etwork 31

Access Protocol for Etheret -- Framig Etheret s Media Access Cotrol (MAC). implemeted i Hardware o the etwork adaptor. Frame format Preamble (64bit): allows the receiver to sychroize with the sigal (sequece of alteratig 0s ad 1s). Host ad Destiatio Address (48bit each). Packet type (16bit): acts as demux key to idetify the higher level protocol. Data (up to 1500 bytes) Miimally a frame must cotai at least 46 bytes of data. Frame must be log eough to detect collisio. CRC (32bit) 32

Etheret Addresses Each host o a Etheret (i fact, every Etheret host i the world) has a uique Etheret Address. The address belogs to the adaptor, ot the host. It is usually burt ito ROM. Etheret addresses prited i a huma readable format sequece of six umbers separated by colos. Each umber correspods to 1 byte of the 6 byte address ad is give by a pair of hexadecimal digits, oe for each of the 4-bit ibbles i the byte; Leadig 0s are dropped. 8:0:2b:e4:b1:2 is 00001000 00000000 00101011 11100100 10110001 00000010 Each maufacturer of devices is allocated a differet prefix prepeded to address o every adaptor they build (AMD assiged 24bit prefix 8:0:20) 33

Etheret Receiver Each frame trasmitted o a Etheret is received by every adaptor coected to that Etheret. Each adaptor recogizes those frames addressed to its address ad passes oly those frames o to the host. I additio, to uicast address, a Etheret address cosistig of all 1s is treated as a broadcast address. All adaptors pass frames addressed to the broadcast address up to the host. Similarly, a address that has the first bit set to 1 but is ot the broadcast address is called a multicast address. A give host ca program its adaptor to accept some set of multicast addresses. 34

Etheret Trasmitter Liste before Talk Whe the adaptor has a frame to sed ad the lie is idle, it trasmits the frame immediately. The upper boud of 1500 bytes i the message meas that the adaptor ca occupy the lie for a fixed legth of time. Whe the adaptor has a frame to sed ad the lie is busy, it waits for the lie to go idle ad the trasmits immediately. ( Carrier Sese =Liste before talk) The Etheret is said to be 1-persistet protocol because a adaptor with a frame to sed trasmits with probability 1 wheever a busy lie goes idle. 35

Etheret Trasmitter Collisio Detectio Sice there is o cetralized cotrol it is possible for two (or more) adaptors to begi trasmittig at the same time, Either because both foud the lie to be idle, Or, both had bee waitig for a busy lie to become idle. The two (or more) frames are said to be collide o the etwork. Each seder is able to determie that a collisio is i progress (sigal is abormal) by Listeig while trasmittig". At the momet a adaptor detects that its frame is collidig with aother, it first makes sure to trasmit a 32- bit jammig sequece ad the stops trasmissio. Trasmitter miimally seds 96 bits i the case of collisio with earby host: 64-bit preamble + 32-bit jammig sequece 36

Collisio Detectio ot istataeous The worst case sceario happes whe the two hosts are at opposite eds of the Etheret. To kow for sure that the frame its just set did ot collide with aother frame, the trasmitter may eed to sed as may as 512 bits. Every Etheret frame must be at least 512 bits (64 bytes) log. 14 bytes of header + 46 bytes of data + 4 bytes of CRC The farther apart two odes are, the loger it takes for a frame set by oe to reach the other, ad the etwork is vulerable to collisio durig this time 37

Collisio detectio delay A begis frame at time t; d is oe lik latecy The first bit of A s frame arrives at B at time t + d Suppose a istat before host A s frame arrives, host B begis to trasmit its ow frame B s frame will immediately collide with A s frame ad this collisio will be detected by host B Host B will sed the 32-bit jammig sequece Host A will ot kow that the collisio occurred util B s frame reaches it, which could happe at t + 2 * d Host A must cotiue to trasmit util this time i order to detect the collisio (liste while talkig) Host A must trasmit for 2 * d to be sure that it detects all collisios (d= 51.2 µs if 2500 màtrasmit 512 bits o 10 Mbps Etheret) 38

Etheret Trasmitter Algorithm Cosider that a maximally cofigured Etheret is 2500 m log, ad there may be up to four repeaters betwee ay two hosts, the roud trip delay has bee determied to be 51.2 µs Which o 10 Mbps Etheret correspods to 512 bits The other way to look at this situatio, We eed to limit the Etheret s maximum latecy to a fairly small value (51.2 µs) for the access algorithm to work efficietly Hece the maximum legth for the Etheret is o the order of 2500 m. Copyright 2010, Elsevier Ic. All rights Reserved 39

Expoetial backoff What if the etwork is very busy lots of host wat to trasmit a lot Collisio rate goes up Oce a adaptor has detected a collisio, ad stopped its trasmissio, it waits a certai amout of time ad tries agai. Each time the adaptor tries to trasmit but fails, it doubles the amout of time it waits before tryig agai. This strategy of doublig the delay iterval betwee each retrasmissio attempt is kow as Expoetial Backoff. 40

Expoetial backoff w/ radomizatio The adaptor first delays either 0 or 51.2 µs, selected at radom. If this effort fails, it the waits 0, 51.2, 102.4, 153.6 µs (selected radomly) before tryig agai; This is k * 51.2 for k = 0, 1, 2, 3 After the third collisio, it waits k * 51.2 for k = 0 2 3 1 (agai selected at radom). I geeral, the algorithm radomly selects a k betwee 0 ad 2 1 ad waits for k * 51.2 µs, where is the umber of collisios experieced so far. 41

Experiece with Etheret Etherets work best uder lightly loaded coditios. Uder heavy loads, too much of the etwork s capacity is wasted by collisios. Most Etherets are used i a coservative way. Have fewer tha 200 hosts coected to them which is far fewer tha the maximum of 1024. Most Etherets are far shorter tha 2500m with a roudtrip delay of closer to 5 µs tha 51.2 µs. Etherets are easy to admiister ad maitai. There are o switches that ca fail ad o routig ad cofiguratio tables that have to be kept up-to-date. It is easy to add a ew host to the etwork. It is iexpesive. Cable is cheap, ad oly other cost is the etwork adaptor o each host. Copyright 2010, Elsevier Ic. All rights Reserved 42

Wireless Liks Wireless liks trasmit electromagetic sigals Radio, microwave, ifrared Wireless liks all share the same wire (so to speak) The challege is to share it efficietly without uduly iterferig with each other Most of this sharig is accomplished by dividig the wire alog the dimesios of frequecy ad space Cotrol Rage through trasmit sigal power Cotrol Frequecy through frequecy hoppig, spread spectrum 43

Wireless across various scales Wireless techologies differ i a variety of dimesios How much badwidth they provide How far apart the commuicatio odes ca be Four promiet wireless techologies Bluetooth; Wi-Fi (more formally kow as 802.11); WiMAX (802.16); 3G-4G cellular wireless 44

Most wireless etworks use asymmetry Mostly widely used wireless liks today are usually asymmetric-- Two ed-poits are differet kids of odes Oe ed-poit usually has o mobility, but has wired coectio to the Iteret (kow as base statio or Access Poit (AP)) The ode at the other ed of the lik is ofte mobile 45

IEEE 802.11 Also kow as Wi-Fi Like its Etheret ad toke rig sibligs, 802.11 is desiged for use i a limited geographical area (homes, office buildigs, campuses) Primary challege is to mediate access to a shared commuicatio medium i this case, sigals propagatig through space 802.11 supports additioal features power maagemet ad security mechaisms May variats over time, may details, will focus o shared cocepts 46

IEEE 802.11 Origial 802.11 stadard defied two radio-based physical layer stadard Oe usig the frequecy hoppig Over 79 1-MHz-wide frequecy badwidths Secod usig direct sequece Usig 11-bit chippig sequece Both stadards ru i the 2.4-GHz ad provide up to 2 Mbps The physical layer stadard 802.11b was added Usig a variat of direct sequece 802.11b provides up to 11 Mbps Uses licese-exempt 2.4-GHz bad The came 802.11a which delivers up to 54 Mbps usig OFDM 802.11a rus o licese-exempt 5-GHz bad Most recet stadard is 802.11g which is backward compatible with 802.11b Uses 2.4 GHz bad, OFDM ad delivers up to 54 Mbps Copyright 2010, Elsevier Ic. All rights Reserved 47

Wireless chaels more challegig Example: each of four odes able to sed ad receive sigals with select other odes ot all B ca exchage frames with A ad C, but it caot reach D C ca reach B ad D but ot A If they were all coected to a Etheret they would all reach each other 48

Collisio maagemet challege -- Hidde odes Suppose both A ad C wat to commuicate with B ad so they each sed it a frame. A ad C are uaware of each other sice their sigals do ot carry that far These two frames collide with each other at B But ulike a Etheret, either A or C is aware of this collisio A ad C are said to hidde odes with respect to each other The Hidde Node Problem. Although A ad C are hidde from each other, their sigals ca collide at B. (B s reach is ot show.) 49

IEEE 802.11 Collisio Avoidace 802.11 addresses these two problems with a algorithm called Multiple Access with Collisio Avoidace (MACA). Key Idea less radom access, more coordiatio Seder ad receiver exchage cotrol frames with each other before the seder actually trasmits ay data. This exchage iforms all earby odes that a trasmissio is about to begi Seder trasmits a Request to Sed (RTS) frame to the receiver. The RTS frame icludes a field that idicates how log the seder wats to hold the medium - Legth of the data frame to be trasmitted Receiver replies with a Clear to Sed (CTS) frame This frame echoes this legth field back to the seder 50

IEEE 802.11 Collisio Avoidace Ay ode that sees the CTS frame kows that it is close to the receiver, therefore caot trasmit for the period of time it takes to sed a frame of the specified legth Ay ode that sees the RTS frame but ot the CTS frame is ot close eough to the receiver to iterfere with it, ad so is free to trasmit 51

IEEE 802.11 Collisio Avoidace Usig ACK i MACA Proposed i MACAW: MACA for Wireless LANs Receiver seds a ACK to the seder after successfully receivig a frame All odes must wait for this ACK before tryig to trasmit If two or more odes detect a idle lik ad try to trasmit a RTS frame at the same time Their RTS frame will collide with each other 802.11 does ot support collisio detectio So the seders realize the collisio has happeed whe they do ot receive the CTS frame after a period of time I this case, they each wait a radom amout of time before tryig agai. The amout of time a give ode delays is defied by the same expoetial backoff algorithm used o the Etheret. Copyright 2010, Elsevier Ic. All rights Reserved 52

IEEE 802.11 Access Poit Distributio System Followig figure illustrates a distributio system that coects three access poits, each of which services the odes i the same regio Each of these regios is aalogous to a cell i a cellular phoe system with the APs playig the same role as a base statio Each odes associates itself with oe access poit For ode A to commuicate with ode E, A first seds a frame to its AP- 1 which forwards the frame across the distributio system to AP-3, which fially trasmits the frame to E 53

Frame Format for Distributio across APs Source ad Destiatios addresses: each 48 bits Data: up to 2312 bytes; CRC: 32 bit Cotrol field: 16 bits 6 bit Type field: idicates whether the frame is a RTS or CTS frame or beig used by the scaig algorithm; A pair of 1 bit fields : called ToDS ad FromDS Simplest case: Both DS bits are 0 -- oe ode seds directly to aother, Addr1 idetifies the target ode, ad Addr2 idetifies the source ode Complex case: Both DS bits are 1 -- message wet from wireless ode oto distributio system, ad from distributio system to aother wireless ode Addr1 idetifies the ultimate destiatio, Addr2 idetifies the immediate seder (the oe that forwarded the frame from the distributio system to the ultimate destiatio) Addr3 idetifies the itermediate destiatio (the oe that accepted the frame from a wireless ode ad forwarded across the distributio system) Addr4 idetifies the origial source Addr1: E, Addr2: AP-3, Addr3: AP-1, Addr4: A 54

IEEE 802.11 AP associatio How do the odes select their access poits How does it work whe odes move from oe cell to aother The techique for selectig a AP is called scaig The ode seds a Probe frame All APs withi reach reply with a Probe Respose frame The ode selects oe of the access poits ad seds that AP a Associatio Request frame The AP replies with a Associatio Respose frame A ode egages this protocol wheever it jois the etwork, as well as whe it becomes uhappy with its curret AP This might happe, for example, because the sigal from its curret AP has weakeed due to the ode movig away from it Wheever a ode acquires a ew AP, the ew AP otifies the old AP of the chage via the distributio system Copyright 2010, Elsevier Ic. All rights Reserved 55

Bluetooth Used for very short rage commuicatio betwee mobile phoes, PDAs, otebook computers ad other persoal or peripheral devices Operates i the licese-exempt bad at 2.45 GHz Has a rage of oly 10 m Commuicatio devices typically belog to oe idividual or group Sometimes categorized as Persoal Area Network (PAN) Versio 2.0 provides speeds up to 2.1 Mbps Power cosumptio is low 56

ZigBee ZigBee competes with Bluetooth Devised by the ZigBee alliace ad stadardized as IEEE 802.15.4 It is desiged for situatios where the badwidth requiremets are low ad power cosumptio must be very low to give very log battery life It is also iteded to be simpler ad cheaper tha Bluetooth, makig it fiacially feasible to icorporate i cheaper devices such as a wall switch that wirelessly commuicates with a ceilig-mouted fa 57