ece544: communication networks-ii, spring 2006 d. raychaudhuri & max ott lecture ii includes...

28
ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Post on 20-Dec-2015

218 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

ECE544: Communication Networks-II, Spring 2006

D. Raychaudhuri & Max Ott

Lecture II

Includes teaching materials from L. Peterson

Page 2: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Today’s Lecture• Recap of network architecture &

top-down design– architecture paper discussion

• Shared media (MAC) protocols– Ethernet– Token ring– IEEE 802.11

Page 3: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Shared Media Networks

Cable (Ethernet)Token ring (FDDI)Wireless (802.11,

DTDMA)

Page 4: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Ethernet Overview• History

– developed by Xerox PARC in mid-1970s– roots in Aloha packet-radio network– standardized by Xerox, DEC, and Intel in 1978– similar to IEEE 802.3 standard

• CSMA/CD– carrier sense– multiple access– collision detection

• Frame Format

Destaddr

64 48 32

CRCPreamble Srcaddr

Type Body

1648

Page 5: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Ethernet (cont)• Addresses

– unique, 48-bit unicast address assigned to each adapter– example: 8:0:2b:e4:b1:2– broadcast: all 1s– multicast: first bit is 1

• Bandwidth: 10Mbps, 100Mbps, 1Gbps• Length: 2500m (500m segments with 4 repeaters)• Problem: Distributed algorithm that provides fair

access

Page 6: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Transmit Algorithm

• If line is idle…– send immediately– upper bound message size of 1500 bytes– must wait 9.6us between back-to-back

frames

• If line is busy…– wait until idle and transmit immediately– called 1-persistent (special case of p-

persistent)

Page 7: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Algorithm (cont)

• If collision…– jam for 32 bits, then stop transmitting frame– minimum frame is 64 bytes (header + 46 bytes

of data)– delay and try again

• 1st time: 0 or 51.2us• 2nd time: 0, 51.2, or 102.4us• 3rd time51.2, 102.4, or 153.6us• nth time: k x 51.2us, for randomly selected

k=0..2n - 1• give up after several tries (usually 16)• exponential backoff

Page 8: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

CollisionsA B

A B

A B

A B

Page 9: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Ethernet Bridging• Bridge device for scaling network

span

Bridge

Ethernet A

Ethernet B

Pkt forwardingtable..can “learn”from packet source addr

Page 10: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Ethernet Performance• Max throughput <1 as a function of

span– instability can occur unless load is reduced

under congestion conditions– retransmission backoff policy for stability

Overloadregion

Normal operatingpoint

Capacity Limit~0.8

load lines

Offered Traffic

ThruTrafficmargin

stable policy(retx backoff)

stable policy(backoff too high)

unstable policy(no backoff)

Page 11: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Token Ring Overview

• Examples– 16Mbps IEEE 802.5 (based on earlier IBM

ring)– 100Mbps Fiber Distributed Data Interface

(FDDI)

Page 12: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Token Ring (cont)• Idea

– Frames flow in one direction: upstream to downstream

– special bit pattern (token) rotates around ring– must capture token before transmitting– release token after done transmitting

• immediate release• delayed release

– remove your frame when it comes back around– stations get round-robin service

• Frame Format

Control

8 8 8 24

CRCStart offrame

End offrame

Destaddr

Body

4848

Srcaddr

Status

32

Page 13: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Timed Token Algorithm• Token Holding Time (THT)

– upper limit on how long a station can hold the token

• Token Rotation Time (TRT)– how long it takes the token to traverse the ring.– TRT <= ActiveNodes x THT + RingLatency

• Target Token Rotation Time (TTRT)– agreed-upon upper bound on TRT

Page 14: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Algorithm (cont)

• Each node measures TRT between successive tokens– if measured-TRT > TTRT: token is late so don’t send– if measured-TRT < TTRT: token is early so OK to send

• Two classes of traffic– synchronous: can always send– asynchronous: can send only if token is early

• Worse case: 2xTTRT between seeing token• Back-to-back 2xTTRT rotations not possible

Page 15: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Token Maintenance• Lost Token

– no token when initializing ring– bit error corrupts token pattern– node holding token crashes

• Generating a Token (and agreeing on TTRT)– execute when join ring or suspect a failure– send a claim frame that includes the node’s TTRT bid– when receive claim frame, update the bid and forward– if your claim frame makes it all the way around the

ring:• your bid was the lowest• everyone knows TTRT• you insert new token

Page 16: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Maintenance (cont)

• Monitoring for a Valid Token– should periodically see valid transmission

(frame or token)– maximum gap = ring latency + max frame <

= 2.5ms– set timer at 2.5ms and send claim frame if it

fires

Page 17: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Wireless MAC

• Typically, three categories of radio MAC protocols :Simple packet-by-packet CSMA class protocols (802.11)Integrated packet/flow oriented protocols based on

dynamic TDMA (Hiperlan, 802.16, ...)CDMA-based (HDR, 3G, etc.)

Page 18: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Wireless LANs

• IEEE 802.11a & b, Hiperlan2• Bandwidth: ~1-20 Mbps• Physical Media

– spread spectrum radio (2.4, 5 GHz)– diffused infrared (10m)

Page 19: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Spread Spectrum• Idea

– spread signal over wider frequency band than required

– originally deigned to thwart jamming

• Frequency Hopping– transmit over random sequence of frequencies– sender and receiver share…

• pseudorandom number generator• seed

– 802.11 uses 79 x 1MHz-wide frequency bands

Page 20: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Spread Spectrum (cont)• Direct Sequence

– for each bit, send XOR of that bit and n random bits

– random sequence known to both sender and receiver

– called n-bit chipping code – 802.11 defines an 11-bit chipping code

Random sequence: 0100101101011001

Data stream: 1010

XOR of the two: 1011101110101001

0

0

0

1

1

1

Page 21: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Collision Avoidance

• Similar to Ethernet• Problem: hidden and exposed

nodes

A B C D

Page 22: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

RTS/CTS Procedure• Sender transmits RequestToSend (RTS) frame• Receiver replies with ClearToSend (CTS)

frame• Neighbors…

– see CTS: keep quiet– see RTS but not CTS: ok to transmit

• Receive sends ACK when has frame– neighbors silent until see ACK

• Collisions– no collisions detection– known when don’t receive CTS– exponential backoff

Page 23: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

RTS/CTS Procedure

RTS CTS

length (L)

Data Packet ACK

L

RTS collisionexponentialbackoff

Page 24: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Modempreamble

TDM Downlink

Frame Header

D-TDMA UplinkS-ALOHA

control

User B User C

TDMA Frame (~1-2 ms)

Cell Sequence No.

GFC VPIVPI VCI

VCIVCI PTI CLP

HEC

Standard ATMPayload

(48 bytes)

CRC-16

WATM Cell

BW Req/Alloc Pkt

AP IdentifierTDMA Frame No.

# Up contention slots

Superframe size

# Dn Control Slots

# Dn data cells

Reserved (8 Bytes)

CRC-16

# Slots Req/Start..

Resvd/# Slots Alloc

Type RSN

Mobile ID

RT....Slot

CRC-16

# Data Cells# Control Pkts

Reserved

CRC-16

Mobile ID

Uplink Subframe Header

Burst from User ATo Base Station

Burst from Base Station -> Mobiles

TDMA/TDD MAC• MAC protocol used in some broadband

wireless scenarios (Hiperlan, 802.16, WATM) supports flow QoS, etc.

Page 25: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Supporting Mobility• Case 1: ad hoc net working• Case 2: access points (AP)

– tethered– each mobile node associates with an AP

B

H

A

F

G

D

AP-2

AP-3AP-1

EC

Distribution system

Page 26: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

Mobility (cont)• Scanning (selecting an AP)

– node sends Probe frame– all AP’s w/in reach reply with ProbeResponse frame– node selects one AP; sends it AssociateRequest

frame– AP replies with AssociationResponse frame– new AP informs old AP via tethered network

• When– active: when join or move– passive: AP periodically sends Beacon frame

Page 27: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

27

Today’s Homework• Peterson & Davie, Chap 2, 3rd ed

2.62.182.232.332.442.42

Download and review Ethernet and 802.11b specs

Due next Fri (2/4)

Page 28: ECE544: Communication Networks-II, Spring 2006 D. Raychaudhuri & Max Ott Lecture II Includes teaching materials from L. Peterson

28

Class Presentations• Performance evaluation of CSMA/CD• Error control protocols: HDLC summary

and sliding window implementation• Host interface: 802.11 driver code example• ATM LAN emulation protocol (LANE)• Switch fabric tutorial: crossbar, knockout,

banyan; shared media; self-routing• VLAN and VPN• …more TBA