Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop....

74
1 Multiple access layer

Transcript of Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop....

Page 1: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

1

Multiple access layer

Page 2: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

2

Medium Access Sublayer (5.3)

Network Layer

Data Link Layer

Physical Layer

Medium Access Sublayer

Page 3: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

3

Medium Access Sublayer (cont’d)

Medium access (MAC) sublayer is not important on point-to-point linksThe MAC sublayer is only used in broadcast or shared channel networksExamples: Satellite, Ethernet, Wireless, Cellular

Page 4: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

4

Contents

Channel partitioning protocolsCellular networks

Random access protocolsIEEE 802 LANs, IEEE 802.11 Wireless LANS

Page 5: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

5

Channel partitioning Protocols

Static and predetermined allocation of channel access: independent of user activityIdle users may be assigned to the channel, in which case channel capacity is wastedExamples: TDMA, FDMA, CDMA

Page 6: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

6

Multiple Access Techniques TDMA/FDMA/CDMA

Allow multiple users to share a common transmission mediumTechniques

TDMA: Time division Multiple Access– The spectrum usage is divided in the time domain

People take turns using the spectrum (amount of time allocated is the slot time)

FDMA: Frequency division multiple access– The spectrum usage is divided in the frequency domain

People are assigned portions of the spectrum for their own use (portion of the spectrum is the channel)

CDMA: Code Division Multiple Access– The entire spectrum is used by everyone but in a coded format– The signal is spread and only the receiver who knows the code can recover the

signal– Analogy: people talking in different languages all at the same time

Page 7: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

7

Spread Spectrum Techniques (Types of CDMA)

Two types of techniques existDS-CDMA and Frequency hopping CDMADirect sequence CDMA (DS-CDMA or DSSS)Each bit of the signal is replaced by a code (longer bit sequence)

A narrow band signal (R bps) is multiplied by a wideband signal (W bps)Receiver who knows the code will recover the signal; for the rest it appears as random noiseUsed in IEEE 802.11 Wavelan

Page 8: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

8

Example

1

0

1010 1010

0101 1010

Data

Code

Output

Receiver uses the code and the received signal to recoverOriginal data

Page 9: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

9

Frequency hopping

Frequency sequence CDMA (FS-CDMA or FSSS)A single user’s signal is spread out over a number of channels

(1011) is transmitted as f1, f9, f11, f13The receiver who tunes to f1, f9, f11 and f13 in sequence will be able to recover the bit streamUsed in Blue tooth wireless technology

Page 10: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

10

Random access protocols (5.3.2)

Single channel shared by a large number of hostsNo coordination between hostsControl is completely distributedExamples: ALOHA, CSMA, CSMA/CD

Page 11: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

11

Contention Access (cont’d)

Advantages:Short delay for bursty trafficSimple (due to distributed control)Flexible to fluctuations in the number of hostsFairness

Page 12: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

12

Contention Access (cont’d)

Disadvantages:Low channel efficiency with a large number of hostsNot good for continuous traffic (e.g., voice)Cannot support priority trafficHigh variance in transmission delays

Page 13: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

13

Contention Access Methods

Pure ALOHASlotted ALOHACSMA

1-Persistent CSMANon-Persistent CSMAP-Persistent CSMA

CSMA/CD

Page 14: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

14

Pure ALOHA

Originally developed for ground-based packet radio communications in 1970Goal: let users transmit whenever they have something to send

Page 15: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

15

The Pure ALOHA Algorithm

1. Transmit whenever you have data to send2. Listen to the broadcast

Because broadcast is fed back, the sending host can always find out if its packet was destroyed just by listening to the downward broadcast one round-trip time after sending the packet

3. If the packet was destroyed, wait a random amount of time and send it again

The waiting time must be random to prevent the same packets from colliding over and over again

Page 16: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

16

Pure ALOHA (cont’d)

Note that if the first bit of a new packet overlaps with the last bit of a packet almost finished, both packets are totally destroyed.

t : one packet transmission timeVulnerable period: 2t

t0 t0+t t0+2t t0+3t

t

Vulnerable

Page 17: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

17

Pure ALOHA (cont’d)

Due to collisions and idle periods, pure ALOHA is limited to approximately 18% throughput in the best caseCan we improve this?

Page 18: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

18

Slotted ALOHA

Slotted ALOHA cuts the vulnerable period for packets from 2t to t.This doubles the best possible throughput from 18.4% to 36.8%How?

Time is slotted. Packets must be transmitted within a slot

Page 19: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

19

The Slotted ALOHA Algorithm

1. If a host has a packet to transmit, it waits until the beginning of the next slot before sending

2. Listen to the broadcast and check if the packet was destroyed

3. If there was a collision, wait a random number of slots and try to send again

Page 20: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

20

CSMA

We could achieve better throughput if we could listen to the channel before transmitting a packetThis way, we would stop avoidable collisions.To do this, we need “Carrier Sense Multiple Access,” or CSMA, protocols

Page 21: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

21

Assumptions with CSMA Networks

1. Constant length packets2. No errors, except those caused by collisions3. No capture effect4. Each host can sense the transmissions of all

other hosts5. The propagation delay is small compared to

the transmission time

Page 22: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

22

CSMA (cont’d)

There are several types of CSMA protocols:

1-Persistent CSMANon-Persistent CSMAP-Persistent CSMA

Page 23: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

23

1-Persistent CSMA

Sense the channel.If busy, keep listening to the channel and transmit immediately when the channel becomes idle.If idle, transmit a packet immediately.

If collision occurs,Wait a random amount of time and start over again.

Page 24: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

24

1-Persistent CSMA (cont’d)

The protocol is called 1-persistent because the host transmits with a

probability of 1 whenever it finds the channel idle.

Page 25: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

25

The Effect of Propagation Delayon CSMA

A Bcarrier sense = idle

Transmit a packet

Collision

packet

Page 26: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

26

Propagation Delay and CSMA

Contention (vulnerable) period in Pure ALOHA

two packet transmission timesContention period in Slotted ALOHA

one packet transmission timeContention period in CSMA

up to 2 x end-to-end propagation delay

Performance of CSMA > Performance of Slotted ALOHA >

Performance of Pure ALOHA

Page 27: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

27

1-Persistent CSMA with Satellite Systems

Satellite system: long prop. delay (270 msec)

Carrier sense makes no sense

It takes 270 msecs to sense the channel, which is a really long time

Vulnerability time = 540 msec(1/2 a second is forever in a network!)

Page 28: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

28

1-Persistent CSMA (cont’d)

Even if prop. delay is zero, there will be collisionsExample:

If stations B and C become ready in the middle of A’s transmission, B and C will wait until the end of A’s transmission and then both will begin transmitted simultaneously, resulting in a collision.

If B and C were not so greedy, there would be fewer collisions

Page 29: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

29

Non-Persistent CSMA

Sense the channel.If busy, wait a random amount of time and sense the channel againIf idle, transmit a packet immediately

If collision occurswait a random amount of time and start all over again

Page 30: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

30

Tradeoff between 1- and Non-Persistent CSMA

If B and C become ready in the middle of A’s transmission,

1-Persistent: B and C collideNon-Persistent: B and C probably do not collide

If only B becomes ready in the middle of A’s transmission,

1-Persistent: B succeeds as soon as A endsNon-Persistent: B may have to wait

Page 31: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

31

P-Persistent CSMA

Optimal strategy: use P-Persistent CSMAAssume channels are slottedOne slot = contention period (i.e., one round trip propagation delay)

Page 32: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

32

P-Persistent CSMA (cont’d)

1. Sense the channelIf channel is idle, transmit a packet with probability p

– if a packet was transmitted, go to step 2– if a packet was not transmitted, wait one slot and go to step 1

If channel is busy, wait one slot and go to step 1.

2. Detect collisionsIf a collision occurs, wait a random amount of time and go to step 1

Page 33: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

33

P-Persistent CSMA (cont’d)

Consider p-persistent CSMA with p=0.5When a host senses an idle channel, it will only send a packet with 50% probabilityIf it does not send, it tries again in the next slot.The average number of tries is:

Σ i (1-p)i p = 1p

8

i=0- 1

Page 34: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

34

Comparison of CSMA and ALOHA Protocols

(Number of Channel Contenders)

Page 35: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

35

CSMA/CD

In CSMA protocolsIf two stations begin transmitting at the same time, each will transmit its complete packet, thus wasting the channel for an entire packet time

In CSMA/CD protocolsThe transmission is terminated immediately upon the detection of a collisionCD = Collision Detect

Page 36: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

36

CSMA/CD

Sense the channelIf idle, transmit immediatelyIf busy, wait until the channel becomes idle

Collision detectionAbort a transmission immediately if a collision is detectedTry again later after waiting a random amount of time

Page 37: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

37

CSMA/CD (cont’d)

Carrier sensereduces the number of collisions

Collision detectionreduces the effect of collisions, making the channel ready to use sooner

Page 38: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

38

Collision detection time

How long does it take to realize there has been a collision?

Worst case: 2 x end-to-end prop. delay

A B

packet

Page 39: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

39

5.5 Ethernet Physical Layer

TransceiverTransceiver Cable

4 Twisted Pairs15 Pin Connectors

Channel LogicManchester Phase Encoding64-bit preamble for synchronization

Page 40: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

40

Ethernet Physical Configuration(for thick coaxial cable)

Segments of 500 meters maximumMaximum total cable length of 1500 meters between any two transceiversMaximum of 2 repeaters in any pathMaximum of 100 transceivers per segmentTransceivers placed only at 2.5 meter marks on cable

Page 41: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

41

Manchester Encoding

1 bit = high/low voltage signal0 bit = low/high voltage signal

1 0 1 1 0 0Data stream

Encodedbit pattern

Page 42: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

42

Ethernet Synchronization

64-bit frame preamble used to synchronize reception7 bytes of 10101010 followed by a byte containing 10101011Manchester encoded, the preamble appears like a sine wave

Page 43: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

43

Ethernet: MAC Layer

Data encapsulationFrame FormatAddressingError Detection

Link ManagementCSMA/CDBackoff Algorithm

Page 44: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

44

Frame Check Seq.(4 bytes)

MAC Layer Ethernet Frame Format

Destination(6 bytes)

Length (2 bytes)

Data(46-1500 bytes)

Pad

Source(6 bytes)

Multicast bit

Page 45: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

45

Ethernet MAC Frame Address Field

Destination and Source Addresses:6 bytes each

Two types of destination addressesPhysical address: Unique for each userMulticast address: Group of usersFirst bit of address determines which type of address is being used

0 = physical address1 = multicast address

Page 46: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

46

Ethernet MAC FrameOther Fields

Length Field2 bytes in lengthdetermines length of data payload

Data Field: between 0 and 1500 bytesPad: Filled when Length < 46Frame Check Sequence Field

4 bytesCyclic Redundancy Check (CRC-32)

Page 47: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

47

Ethernet Backoff Algorithm:Binary Exponential Backoff

If collision,Choose one slot randomly from 2k slots, where k is the number of collisions the frame has suffered.One contention slot length = 2 x end-to-end propagation delay

This algorithm can adapt to changes in network load.

Page 48: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

48

Binary Exponential Backoff (cont’d)

slot length = 2 x end-to-end delay = 50 µs

A B

t=0µs: Assume A and B collide (kA = kB = 1)A, B choose randomly from 21 slots: [0,1]Assume A chooses 1, B chooses 1

t=100µs: A and B collide (kA = kB = 2)A, B choose randomly from 22 slots: [0,3]Assume A chooses 2, B chooses 0

t=150µs: B transmits successfullyt=250µs: A transmits successfully

Page 49: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

49

Binary Exponential Backoff (cont’d)

In Ethernet,Binary exponential backoff will allow a maximum of 15 retransmission attemptsIf 16 backoffs occur, the transmission of the frame is considered a failure.

Page 50: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

50

Ethernet Performance

Page 51: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

51

Ethernet Features and Advantages

1. Passive interface: No active element2. Broadcast: All users can listen3. Distributed control: Each user makes own

decision

SimpleReliable

Easy to reconfigure

Page 52: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

52

Ethernet Disadvantages

Lack of priority levels

Cannot perform real-time communication

Security issues

Page 53: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

53

Interconnecting LANS

Why not just one big LAN? Limited amount of supportable traffic: on single LAN, all stations must share bandwidth limited length: 802.3 specifies maximum cable length limited number of stations: 802.4/5 have token passing delays at each station

Physical layer extensionRepeaterscopies (amplifies, regenerates) bits between LAN segments

Link Layer extensionsBridgesreceives, stores, forward (when appropriate) packets between LANs has two layers of protocol stack: physical and link-level (media access)

Page 54: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

54

Hubs

Acts as a physical layer repeaterFrame on a port broadcast on all other ports

All ports see the same traffic

Hubs used to connect many devices to extend a single ethernet tapSmart hub: can shut down misbehaving ports

Page 55: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

55

Bridges (forwarding)

Techniques for forwarding packets flood packets (obvious drawbacks)

router-discovery-like protocol Bridge "observes" traffic and "learns" which stations are attached allows bridge to identify hosts on LAN segment

drawback?

Page 56: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

56

Forwarding Algorithm

1. bridge receives every packet transmitted on every attached LAN 2. bridge stores for each packet

physical address of sender port (incoming LAN segment) on which packet was received

3. for each packet received on any port: lookup destination. physical address in table

if not found, flood onto all attached LANs if found, forward only out to specified LAN

4. forwarding table deleted if not refreshed

Page 57: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

57

Limitations of Bridges

Do not scaleRequires careful placement of nodesbroadcast does not scale

Learning time Do not accommodate heterogeneity

Different networking technologies cannot be bridged

Page 58: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

58

Ethernet Switching

Connect many Ethernet segments or subnets through an “Ethernet switch”Every port acts as a bridgeThe switch maintains a list of devices connected to its portsAllows simultaneous communication between non-overlapping portsMore expensive than hubs or routers (cost is proportional to number of ports)No collisions

to segment 1

to segment 2to segment 3

to segment 4

Page 59: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

59

Why Ethernet switching?

LANs may grow very largeThe switch has a very fast backplaneIt can forward frames very quickly to the appropriate subnet

Cheaper than upgrading all host interfaces to use a faster network

Page 60: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

60

A Brief Note: Fast Ethernet

IEEE 802.3u100 Mbps EthernetThe MAC sublayer for Fast Ethernet is the same as for normal EthernetPhysical layer is slightly different: no more Manchester encoding (4B5B, 8B6T coding are used instead)Gigabit ethernet already exists, 10 Gpbsethernet (coming)

Page 61: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

61

802.11 Wireless Networking (Chapter 5.7.1)

Basically wireless EthernetConnects a number of computers in a wireless LANAd-hoc mode (AHM) as well as Access Point mode (APM) supportedAHM - Only direct communication, no routing functionalityAPM - Computers connected to the Internet via an AP

Typical mode of operationAccess point name refers to a channel; a host connected to an AP tunes to the same channel as the AP

Page 62: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

62

802.11 Physical Layer

Operates in the ISM bandLBand 915 to 928 MHz and the SBand 2.4 to 2.4835 Ghz band are used for 802.11

Uses Direct Sequence Spread Spectrum (DSSS)Signal is sent in a “coded”form

Topic of a course in communications

Initial versions were 1 to 2 Mbps. Now 11 Mbps (802.11b) availableFuture 802.11a can provide up to 50 Mbps

Expected to operate in 5.7 Ghz band

Page 63: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

63

802.11 DSSS

83 MHz divided into eleven 22 MHz wide stationary channelsAt any point only 3 non-overlapping channels available

Spreading sequence is 11 bit barker word1 is mapped to 1, -1, 1, 1, -1, 1, 1, 1, -1, -1, -10 is mapped to -1, 1, -1, -1, 1, -1, -1, -1, 1, 1,1Same sequence is used by all hostsMultiple access problem needs to be solved

Input signal is spread to 22 MHz wide spectrumDifferent modulation schemes used to obtain different rates

BPSK (gives 1 Mbps), QPSK (gives 2 Mbps), QPSK with CCK (gives 11 Mbps at 8 bits per symbol and chip rate of 1.375 Mcps)

Page 64: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

64

802.11 Access Control

Carrier sensingIs the medium idle? Wait for an amount of time (IFS), if still idle transmit

IFS = inter frame spacingIs the medium busy? Wait until current txmends, wait (IFS), if idle wait for random amount of time, else wait until current txmends and repeat

(exponential backoff for collisions)

ACKs and immediate response actions can be sent after SIFS (Short IFS) < IFS value used in multiple access control

Idle?

Wait IFS

Idle?

Txmt Data

Have Data

Wait EOTY

Y

Y

Y

N

N Wait IFS

Idle?

decr backoff

N

Page 65: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

65

ZX

Problems with Carrier Sensing

Hidden terminal problemZ does not hear X; hence transmits to Y and collides with transmission from XNo carrier does not imply send

Exposed terminal problemW hears Y but can safely transmit to XCarrier may not imply don’t send

Y

Hidden Terminal Problem

ZX Y

Exposed Terminal Problem

W

Page 66: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

66

Use of RTS, CTS

Sender sends a small packet RTS (request to send) before sending dataReceiver sends CTS (clear to send)All potential senders hearing RTS waits until a CTS is heard from some receiverIf no CTS, transmitIf CTS, wait for a time for sender to send dataHear RTS, but no CTS, then send

Exposed terminal caseDon’t hear RTS, but CTS receiver is close, don’t send

Hidden terminal case

Page 67: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

67

802.11 Issues

Very popular in buildings, public spacesTremendous opportunitiesFree/unlicensed spectrum interference issuesSecurity, privacy, authentication being addedNice features to have

Roaming across networksRemote authenticationMobile access

Page 68: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

68

Bluetooth

A cable replacement technologyOperates in the ISM band (2.4Ghz to 2.8 Ghz)Range is 10 cm to 10 meters can be extended to 100 meters by use of power controlData rates up to 1 Mbps (721Kbps)Supposed to be low cost, single chip radioIdeal for connecting devices in close proximity (piconet)

Phone and earpieceComputer and printerCamera and printer/fax etc

Can form personal area networks (piconet and scatternet)

Page 69: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

69

Personal area networks

PiconetMaster/slave nodesMaster and up to 7 slavesMaster allocates channels

ScatternetNode may be master in one network and slave in another networkAllows devices to be shared in different networks

Page 70: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

70

Bluetooth Radio Link

IEEE 802.11 operates in the same band using DSSSBluetooth uses Frequency Hopping83.5 MHz channel is divided into 79 1-MHz channels

1600 hops per second (stays at one frequency for 625 microsecs)Hopping sequence is 16 or 32Selected by the master based on its MAC addressMaster can connect up to seven slaves to form a piconet

All members of the piconet use the same hopping sequence

Page 71: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

71

Bluetooth Packet Format

Access code identifies control packet typeChannel access code, device access code, inquiry access code

Header contains address (3 bits) and packet types (4 bits)Voice packets with different FEC ratesData packets with low bit rate and high bit rate (with varying FEC as well)

AccessCode Header Payload (2744 bits)

54 bits72 bits

Page 72: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

72

Connection establishment

Inquiry scan

Inquiry response

Page scan

Slave response

Connection

Inquiry

Page

Master response

Connection

broadcast

Response-FHS

Unicast-DAC

ACK-DAC

FHS-sender

ACK-DAC

Page 73: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

73

piconet

A set of bluetooth devices connected to a masterScatternet: a set of piconets

Page 74: Multiple access layer - Rutgers Universitybadri/352dir/Spring04/... · Satellite system: long prop. delay (270 msec) Carrier sense makes no sense It takes 270 msecs to sense the channel,

74

Bluetooth Link Formation

Master inquires who is aroundActive slaves respond and the master learns who is around

Master pages slaves and informs them of hopping sequence, active member address

Active slaves get packets when header matches active member addressA link is formed between master and each slave

Inactive slaves can go into “park” state and give up address

Master

SlaveParked slave