link layer - uwcs456/s08/week3.pdf · a note on the use of these ppt slides: we’re making these...

54
1 Link Layer 5.1 Introduction and services 5.2 Error detection and correction 5.3Multiple access protocols 5.4 Link-Layer Addressing 5.5 Ethernet 5.6 Link-layer switches 5.7 PPP 5.8 Link Virtualization: MPLS

Upload: others

Post on 27-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

1

Link Layer

❒ 5.1 Introduction and services

❒ 5.2 Error detection and correction

❒ 5.3Multiple access protocols

❒ 5.4 Link-Layer Addressing

❒ 5.5 Ethernet

❒ 5.6 Link-layer switches

❒ 5.7 PPP

❒ 5.8 Link Virtualization: MPLS

Page 2: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

2

Ethernet

“dominant” wired LAN technology:

❒ cheap $20 for NIC

❒ first widely used LAN technology

❒ simpler, cheaper than token LANs and ATM

❒ kept up with speed race: 10 Mbps – 10 Gbps

Metcalfe’s Ethernetsketch

Page 3: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

3

Star topology

❒ bus topology popular through mid 90s❍ all nodes in same collision domain (can collide with each

other)

❒ today: star topology prevails❍ active switch in center

❍ each “spoke” runs a (separate) Ethernet protocol (nodes do not collide with each other)

switch

bus: coaxial cable star

Page 4: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

4

Ethernet Frame Structure

Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame

Preamble:

❒ 7 bytes with pattern 10101010 followed by one byte with pattern 10101011

❒ used to synchronize receiver, sender clock rates

Page 5: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

5

Ethernet Frame Structure (more)

❒ Addresses: 6 bytes❍ if adapter receives frame with matching destination address,

or with broadcast address (eg ARP packet), it passes data in frame to network layer protocol

❍ otherwise, adapter discards frame

❒ Type: indicates higher layer protocol (mostly IP but others possible, e.g., Novell IPX, AppleTalk)

❒ CRC: checked at receiver, if error is detected, frame is dropped

Page 6: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

6

Ethernet: Unreliable, connectionless

❒ connectionless: No handshaking between sending and receiving NICs

❒ unreliable: receiving NIC doesn’t send acks or nacks to sending NIC

❍ stream of datagrams passed to network layer can have gaps (missing datagrams)

❍ gaps will be filled if app is using TCP

❍ otherwise, app will see gaps

❒ Ethernet’s MAC protocol: unslotted CSMA/CD

Page 7: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

7

Ethernet CSMA/CD algorithm

1. NIC receives datagram from network layer, creates frame

2. If NIC senses channel idle, starts frame transmission If NIC senses channel busy, waits until channel idle, then transmits

3. If NIC transmits entire frame without detecting another transmission, NIC is done with frame !

4. If NIC detects another transmission while transmitting, aborts and sends jam signal

5. After aborting, NIC enters exponential backoff: after m th collision, NIC chooses K at random from {0,1,2,…,2m-1}. NIC waits

K * 512 bit times, returns to Step 2

Page 8: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

8

Ethernet’s CSMA/CD (more)

Jam Signal: make sure all other transmitters are aware of collision; 48 bits

Bit time: .1 microsec for 10 Mbps Ethernet ;for K=1023, wait time is about 50 msec

Exponential Backoff:

❒ Goal: adapt retransmission attempts to estimated current load

❍ heavy load: random wait will be longer

❒ first collision: choose K from {0,1}; delay is K * 512 bit transmission times

❒ after second collision: choose K from {0,1,2,3}…

❒ after ten collisions, choose K from {0,1,2,3,4,…,1023}

See/interact with Javaapplet on AWL Web site:highly recommended !

Page 9: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

9

CSMA/CD efficiency

❒ Tprop = max prop delay between 2 nodes in LAN

❒ ttrans = time to transmit max-size frame

❒ efficiency goes to 1 ❍ as tprop goes to 0

❍ as ttrans goes to infinity

❒ better performance than ALOHA: and simple, cheap,

decentralized!

transprop /ttefficiency

51

1

+=

Page 10: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

10

802.3 Ethernet Standards: Link & Physical Layers

❒ many different Ethernet standards❍ common MAC protocol and frame format

❍ different speeds: 2 Mbps, 10 Mbps, 100 Mbps,

1 Gbps, 10 Gbps

❍ different physical layer media: fiber, cable

applicationtransportnetwork

linkphysical

MAC protocoland frame format

100BASE-TX

100BASE-T4

100BASE-FX100BASE-T2

100BASE-SX 100BASE-BX

fiber physical layercopper (twisterpair) physical layer

Page 11: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

11

Link Layer

❒ 5.1 Introduction and services

❒ 5.2 Error detection and correction

❒ 5.3 Multiple access protocols

❒ 5.4 Link-layer Addressing

❒ 5.5 Ethernet

❒ 5.6 Link-layer switches

❒ 5.7 PPP

❒ 5.8 Link Virtualization: MPLS

Page 12: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

12

Hubs… physical-layer (“dumb”) repeaters:

❍ bits coming in one link go out all other links at same rate

❍ all nodes connected to hub can collide with one another

❍ no frame buffering

❍ no CSMA/CD at hub: host NICs detect collisions

twisted pair

hub

Page 13: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

13

Switch

❒ link-layer device: smarter than hubs, take activerole

❍ store, forward Ethernet frames

❍ examine incoming frame’s MAC address, selectivelyforward frame to one-or-more outgoing links when frame is to be forwarded on segment, uses CSMA/CD to access segment

❒ transparent

❍ hosts are unaware of presence of switches

❒ plug-and-play, self-learning

❍ switches do not need to be configured

Page 14: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

14

Switch: allows multiple simultaneous transmissions

❒ hosts have dedicated, direct connection to switch

❒ switches buffer packets

❒ Ethernet protocol used on each incoming link, but no collisions; full duplex

❍ each link is its own collision domain

❒ switching: A-to-A’ and B-to-B’simultaneously, without collisions

❍ not possible with dumb hub

A

A’

B

B’

C

C’

switch with six interfaces(1,2,3,4,5,6)

1 23

45

6

Page 15: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

15

Switch Table

❒ Q: how does switch know that A’ reachable via interface 4, B’reachable via interface 5?

❒ A: each switch has a switch table, each entry:

❍ (MAC address of host, interface to reach host, time stamp)

❒ Q: how are entries created, maintained in switch table?

❍ later see similarity in routing protocols

A

A’

B

B’

C

C’

switch with six interfaces(1,2,3,4,5,6)

1 23

45

6

Page 16: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

16

Switch: self-learning

❒ switch learns which hosts can be reached through which interfaces

❍ when frame received, switch “learns” location of sender: incoming LAN segment

❍ records sender/location pair in switch table

A

A’

B

B’

C

C’

1 23

45

6

A A’

Source: ADest: A’

MAC addr interface TTL

Switch table (initially empty)

A 1 60

Page 17: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

17

Switch: frame filtering/forwarding

When frame received:

1. record link associated with sending host

2. index switch table using MAC dest address

3. if entry found for destinationthen {

if dest on segment from which frame arrivedthen drop the frame

else forward the frame on interface indicated

}

else flood forward on all but the interface on which the frame arrived

Page 18: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

18

Self-learning, forwarding: example

A

A’

B

B’

C

C’

1 23

45

6

A A’

Source: ADest: A’

MAC addr interface TTL

Switch table (initially empty)

A 1 60

A A’A A’A A’A A’A A’

❒ frame destination unknown:flood

A’ A

❒ destination A location known:

A’ 4 60

selective send

Page 19: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

19

Interconnecting switches

❒ switches can be connected together

A

B

❒ Q: sending from A to F - how does S1 know to forward frame destined to F via S4 and S2?

❒ A: self learning! (works exactly the same as in single-switch case!)

S1

C D

E

FS2

S4

S3

H

I

G

Page 20: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

20

Self-learning multi-switch example

Suppose C sends frame to I, I responds to C

❒ Q: show switch tables and packet forwarding in S1, S2, S3, S4

A

B

S1

CD

E

F

S2

S4

S3

H

IG

1

23

2

1

3

4

1 12 23

3

4 4

Page 21: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

21

Institutional network

to externalnetwork

router

IP subnet

mail server

web server

Page 22: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

22

Chapter 5: Summary

❒ principles behind data link layer services:❍ error detection, correction

❍ sharing a broadcast channel: multiple access

❍ link layer addressing

❒ instantiation and implementation of various link layer technologies

❍ Ethernet

❍ switched LANS

❍ PPP

Page 23: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

23

Chapter 6Wireless and Mobile Networks

A note on the use of these ppt slides:We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following:� If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!)� If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material.

Thanks and enjoy! JFK/KWR

All material copyright 1996-2007J.F Kurose and K.W. Ross, All Rights Reserved

Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith RossAddison-Wesley, July 2007.

Page 24: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

24

Chapter 6: Wireless and Mobile Networks

Background:

❒ # wireless (mobile) phone subscribers now exceeds # wired phone subscribers!

❒ computer nets: laptops, palmtops, PDAs, Internet-enabled phone promise anytime untethered Internet access

❒ two important (but different) challenges❍ wireless: communication over wireless link

❍ mobility: handling the mobile user who changes point of attachment to network

Page 25: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

25

Chapter 6 outline

6.1 Introduction

Wireless

❒ 6.2 Wireless links, characteristics

❍ CDMA

❒ 6.3 IEEE 802.11 wireless LANs (“wi-fi”)

❒ 6.4 Cellular Internet Access

❍ architecture

❍ standards (e.g., GSM)

Mobility

❒ 6.5 Principles: addressing and routing to mobile users

❒ 6.6 Mobile IP

❒ 6.7 Handling mobility in cellular networks

❒ 6.8 Mobility and higher-layer protocols

6.9 Summary

Page 26: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

26

Elements of a wireless network

network infrastructure

wireless hosts

❒ laptop, PDA, IP phone

❒ run applications

❒ may be stationary (non-mobile) or mobile

❍ wireless does notalways mean mobility

Page 27: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

27

Elements of a wireless network

network infrastructure

base station

❒ typically connected to wired network

❒ relay - responsible for sending packets between wired network and wireless host(s) in its “area”

❍ e.g., cell towers, 802.11 access points

Page 28: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

28

Elements of a wireless network

network infrastructure

wireless link

❒ typically used to connect mobile(s) to base station

❒ also used as backbone link

❒ multiple access protocol coordinates link access

❒ various data rates, transmission distance

Page 29: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

29

Characteristics of selected wireless link standards

Indoor10-30m

Outdoor50-200m

Mid-rangeoutdoor

200m – 4 Km

Long-rangeoutdoor

5Km – 20 Km

.056

.384

1

4

5-11

54

IS-95, CDMA, GSM 2G

UMTS/WCDMA, CDMA2000 3G

802.15

802.11b

802.11a,g

UMTS/WCDMA-HSPDA, CDMA2000-1xEVDO 3G cellularenhanced

802.16 (WiMAX)

802.11a,g point-to-point

200 802.11n

Dat

a ra

te (

Mbp

s)

data

Page 30: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

30

Elements of a wireless network

network infrastructure

infrastructure mode

❒ base station connects mobiles into wired network

❒ handoff: mobile changes base station providing connection into wired network

Page 31: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

31

Elements of a wireless network

ad hoc mode

❒ no base stations

❒ nodes can only transmit to other nodes within link coverage

❒ nodes organize themselves into a network: route among themselves

Page 32: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

32

Wireless network taxonomy

single hop multiple hops

infrastructure(e.g., APs)

noinfrastructure

host connects to base station (WiFi,WiMAX, cellular) which connects to larger Internet

no base station, noconnection to larger Internet (Bluetooth,

ad hoc nets)

host may have torelay through severalwireless nodes to connect to larger Internet: mesh net

no base station, noconnection to larger Internet. May have torelay to reach other a given wireless nodeMANET, VANET

Page 33: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

33

Chapter 6 outline

6.1 Introduction

Wireless

❒ 6.2 Wireless links, characteristics

❍ CDMA

❒ 6.3 IEEE 802.11 wireless LANs (“wi-fi”)

❒ 6.4 Cellular Internet Access

❍ architecture

❍ standards (e.g., GSM)

Mobility

❒ 6.5 Principles: addressing and routing to mobile users

❒ 6.6 Mobile IP

❒ 6.7 Handling mobility in cellular networks

❒ 6.8 Mobility and higher-layer protocols

6.9 Summary

Page 34: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

34

Wireless Link Characteristics (1)

Differences from wired link ….

❍ decreased signal strength: radio signal attenuates as it propagates through matter (path loss)

❍ interference from other sources: standardized wireless network frequencies (e.g., 2.4 GHz) shared by other devices (e.g., phone); devices (motors) interfere as well

❍ multipath propagation: radio signal reflects off objects and the ground, arriving at destination at slightly different times

…. make communication across (even a point to point) wireless link much more “difficult”

Page 35: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

35

Wireless Link Characteristics (2)

❒ SNR: signal-to-noise ratio

❍ larger SNR – easier to extract signal from noise (a “good thing”)

❒ SNR versus BER tradeoffs

❍ given physical layer: increase power -> increase SNR->decrease BER

❍ given SNR: choose physical layer that meets BER requirement, giving highest thruput

• SNR may change with mobility: dynamically adapt physical layer (modulation technique, rate)

10 20 30 40

QAM256 (8 Mbps)

QAM16 (4 Mbps)

BPSK (1 Mbps)

SNR(dB)B

ER

10-1

10-2

10-3

10-5

10-6

10-7

10-4

Page 36: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

36

Wireless network characteristics

Multiple wireless senders and receivers create additional problems (beyond multiple access):

AB

C

Hidden terminal problem❒ B, A hear each other

❒ B, C hear each other

❒ A, C can not hear each other

means A, C unaware of their interference at B

A B C

A’s signalstrength

space

C’s signalstrength

Signal attenuation:❒ B, A hear each other

❒ B, C hear each other

❒ A, C can not hear each other interfering at B

Page 37: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

37

Code Division Multiple Access (CDMA)

❒ used in several wireless broadcast channels (cellular, satellite, etc) standards

❒ unique “code” assigned to each user; i.e., code set partitioning

❒ all users share same frequency, but each user has own “chipping” sequence (i.e., code) to encode data

❒ encoded signal = (original data) X (chipping sequence)❒ decoding: inner-product of encoded signal and chipping

sequence❒ allows multiple users to “coexist” and transmit

simultaneously with minimal interference (if codes are “orthogonal”)

Page 38: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

38

Chapter 6 outline

6.1 Introduction

Wireless

❒ 6.2 Wireless links, characteristics

❍ CDMA

❒ 6.3 IEEE 802.11 wireless LANs (“wi-fi”)

❒ 6.4 cellular Internet access

❍ architecture

❍ standards (e.g., GSM)

Mobility

❒ 6.5 Principles: addressing and routing to mobile users

❒ 6.6 Mobile IP

❒ 6.7 Handling mobility in cellular networks

❒ 6.8 Mobility and higher-layer protocols

6.9 Summary

Page 39: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

39

IEEE 802.11 Wireless LAN

❒ 802.11b❍ 2.4-5 GHz unlicensed spectrum

❍ up to 11 Mbps

❍ direct sequence spread spectrum (DSSS) in physical layer

• all hosts use same chipping code

❒ 802.11a❍ 5-6 GHz range

❍ up to 54 Mbps

❒ 802.11g❍ 2.4-5 GHz range

❍ up to 54 Mbps

❒ 802.11n: multiple antennae

❍ 2.4-5 GHz range

❍ up to 200 Mbps

❒ all use CSMA/CA for multiple access

❒ all have base-station and ad-hoc network versions

Page 40: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

40

802.11 LAN architecture

❒ wireless host communicates with base station

❍ base station = access point (AP)

❒ Basic Service Set (BSS) (aka “cell”) in infrastructure mode contains:

❍ wireless hosts

❍ access point (AP): base station

❍ ad hoc mode: hosts only

BSS 1

BSS 2

Internet

hub, switchor router

AP

AP

Page 41: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

41

802.11: Channels, association

❒ 802.11b: 2.4GHz-2.485GHz spectrum divided into 11 channels at different frequencies

❍ AP admin chooses frequency for AP

❍ interference possible: channel can be same as that chosen by neighboring AP!

❒ host: must associate with an AP❍ scans channels, listening for beacon framescontaining AP’s name (SSID) and MAC address

❍ selects AP to associate with

❍ may perform authentication [Chapter 8]

❍ will typically run DHCP to get IP address in AP’s subnet

Page 42: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

42

802.11: passive/active scanning

AP 2AP 1

H1

BBS 2BBS 1

122

3 4

Active Scanning: (1) Probe Request frame broadcast

from H1(2) Probes response frame sent from

APs(3) Association Request frame sent:

H1 to selected AP (4) Association Response frame

sent: H1 to selected AP

AP 2AP 1

H1

BBS 2BBS 1

12

3

1

Passive Scanning:(1) beacon frames sent from APs(2) association Request frame sent:

H1 to selected AP (3) association Response frame sent:

H1 to selected AP

Page 43: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

43

IEEE 802.11: multiple access

❒ avoid collisions: 2+ nodes transmitting at same time

❒ 802.11: CSMA - sense before transmitting❍ don’t collide with ongoing transmission by other node

❒ 802.11: no collision detection!❍ difficult to receive (sense collisions) when transmitting due to

weak received signals (fading)

❍ can’t sense all collisions in any case: hidden terminal, fading

❍ goal: avoid collisions: CSMA/C(ollision)A(voidance)

AB

CA B C

A’s signalstrength

space

C’s signalstrength

Page 44: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

44

IEEE 802.11 MAC Protocol: CSMA/CA

802.11 sender

1 if sense channel idle for DIFS then

transmit entire frame (no CD)

2 if sense channel busy then

start random backoff time

timer counts down while channel idle

transmit when timer expires

if no ACK, increase random backoff interval, repeat 2

802.11 receiver

- if frame received OK

return ACK after SIFS (ACK needed due to hidden terminal problem)

sender receiver

DIFS

data

SIFS

ACK

Page 45: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

45

Avoiding collisions (more)

idea: allow sender to “reserve” channel rather than random access of data frames: avoid collisions of long data frames

❒ sender first transmits small request-to-send (RTS) packets to BS using CSMA

❍ RTSs may still collide with each other (but they’re short)

❒ BS broadcasts clear-to-send CTS in response to RTS

❒ CTS heard by all nodes

❍ sender transmits data frame

❍ other stations defer transmissions

avoid data frame collisions completely using small reservation packets!

Page 46: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

46

Collision Avoidance: RTS-CTS exchange

APA B

time

CTS(A) CTS(A)

DATA (A)

ACK(A) ACK(A)

RTS(A)

RTS(B)

reservation collision

RTS(A)

defer

Page 47: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

47

framecontrol

durationaddress

1address

2address

4address

3payload CRC

2 2 6 6 6 2 6 0 - 2312 4

seqcontrol

802.11 frame: addressing

Address 2: MAC addressof wireless host or AP transmitting this frame

Address 1: MAC addressof wireless host or AP to receive this frame

Address 3: MAC addressof router interface to which AP is attached

Address 4: used only in ad hoc mode

Page 48: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

48

Internetrouter

AP

H1 R1

AP MAC addr H1 MAC addr R1 MAC addr

address 1 address 2 address 3

802.11 frame

R1 MAC addr H1 MAC addr

dest. address source address

802.3 frame

802.11 frame: addressing

Page 49: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

49

framecontrol

durationaddress

1address

2address

4address

3payload CRC

2 2 6 6 6 2 6 0 - 2312 4

seqcontrol

TypeFromAP

SubtypeToAP

More frag

WEPMoredata

Powermgt

Retry RsvdProtocolversion

2 2 4 1 1 1 1 1 11 1

802.11 frame: more

duration of reserved transmission time (RTS/CTS)

frame seq #(for reliable ARQ)

frame type(RTS, CTS, ACK, data)

Page 50: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

50

hub or switch

AP 2

AP 1

H1 BBS 2

BBS 1

802.11: mobility within same subnet

router❒ H1 remains in same IP

subnet: IP address can remain same

❒ switch: which AP is associated with H1?

❍ self-learning (Ch. 5): switch will see frame from H1 and “remember” which switch port can be used to reach H1

Page 51: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

51

802.11: advanced capabilities

Rate Adaptation

❒ base station, mobile dynamically change transmission rate (physical layer modulation technique) as mobile moves, SNR varies

QAM256 (8 Mbps)QAM16 (4 Mbps)BPSK (1 Mbps)

10 20 30 40SNR(dB)

BE

R

10-1

10-2

10-3

10-5

10-6

10-7

10-4

operating point

1. SNR decreases, BER increase as node moves away from base station

2. When BER becomes too high, switch to lower transmission rate but with lower BER

Page 52: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

52

802.11: advanced capabilities

Power Management

❒ node-to-AP: “I am going to sleep until next beacon frame”

❍AP knows not to transmit frames to this node

❍node wakes up before next beacon frame

❒ beacon frame: contains list of mobiles with AP-to-mobile frames waiting to be sent

❍node will stay awake if AP-to-mobile frames to be sent; otherwise sleep again until next beacon frame

Page 53: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

53

Mradius ofcoverage

S

SS

P

P

P

P

M

S

Master device

Slave device

Parked device (inactive)P

802.15: personal area network

❒ less than 10 m diameter

❒ replacement for cables (mouse, keyboard, headphones)

❒ ad hoc: no infrastructure

❒ master/slaves:❍ slaves request permission to

send (to master)

❍ master grants requests

❒ 802.15: evolved from Bluetooth specification

❍ 2.4-2.5 GHz radio band

❍ up to 721 kbps

Page 54: Link Layer - UWcs456/S08/Week3.pdf · A note on the use of these ppt slides: We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint

54

802.16: WiMAX

❒ like 802.11 & cellular: base station model❍ transmissions to/from base station by hosts with omnidirectionalantenna

❍ base station-to-base station backhaul with point-to-point antenna

❒ unlike 802.11:❍ range ~ 6 miles (“city rather than coffee shop”)

❍ ~14 Mbps

point-to-multipoint

point-to-point