Top Banner
Ethernet, Wireless LAN
27

Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Dec 15, 2015

Download

Documents

Rudy Hancher
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Ethernet, Wireless LAN

Page 2: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Ethernet Frame Format

(a) DIX Ethernet, (b) IEEE 802.3

Page 3: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Minimum Frame Size

• Why a minimum frame size is needed?• How long does it take for a station to notice a

collision?

Page 4: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Worst case

Page 5: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Minimum Frame Size

• So, if maximum delay is t, the minimum frame size is 2t*bit rate.

• t is about 50us.• So the minimum frame size of 10M Ethernet is

512 bits.• What if the speed goes up?

Page 6: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Ethernet Performance• Suppose there are k stations. Let p be the probability

that a station has a frame to send when the channel is idle. Assume it is independent across stations, and is independent for one station at different times. Find the average number of collisions before a frame is sent.

• First, the probability that one station got the chance to send is A=kp(1-p)^{k-1}.

• Second, maximized when p=1/k. So A is bounded by (1-1/k)^{k-1}.

• Third, each contention is independent, so average number of collision is 1/A, which is e when k is large.

• Each contention is 2t, so channel efficiency is P/P+2et.

Page 7: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Ethernet

• Physical medium– thin cable/thick cable/twisted pair/fiber10Base5 500 meters thick (cable) Ethernet 100 nodes/seg

10Base2 200 meters thin (cable) Ethernet 30 nodes/seg

10BaseT 100 meters twist pair 1024 nodes/seg

10BaseF 2000 meters fiber optics 1024 nodes/seg

10Base5/10Base2, cable connected to each machine

10BaseT -- connecting to a hub

10BaseF -- between building Connecting

Page 8: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Ethernet

Fast Ethernet• Keep everything in Ethernet, make the clock faster 100Mbps. • Cable

– 100Base-T4 100m category 3 UTP, 4 lines. – 100Base-Tx 100m category 5 twisted pair – 100Base-Fx 2000m Fiber optic

Page 9: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Zhenhai Duan Computer Science, FSU

IEEE 802 LAN Protocol StackIS

O/O

SI

Ref

eren

ce M

odel

802.2Logical Link Control (LLC)

802.3CSMA/CD

802.4TokenBus

802.5TokenRing

802.11Wireless

Data Link

Physical

Application

Presentation

Session

Transport

Network

Page 10: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Wireless LAN

• Basic structure:– Stations plus an access point– Stations talk to the access point, then to outside– Access point talks to stations– Stations talk to stations

• Design goal:– A MAC protocol to determine who talks next

Page 11: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Wireless communications

• Signal decays according to a power law with the distance, at least to the power of -2 with distance

• Comparing to Ethernet, what is the difference (as far as MAC is concerned)?

• When a station is sending, not all stations can hear. No real 100% carrier sense.– In Ethernet, everybody can hear everybody

Page 12: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Wireless communications

• When a station is sending, he cannot hear other stations – cannot decide if there is a collision. No CD in wireless LAN.– In Ethernet, the sender can determine if there is

collision and abort immediatelly.

Page 13: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Wireless communications

• Being able to sense the carrier does not mean that you can decode the data

• If received signal having power P means that you can decode the data, it may be true that at power P/2 you can realize that there is something going on

Page 14: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Wireless communication• The received signal can be read if the signal to noise ratio is

larger than a certain threshold. Whether there is a collision depends on the signal to noise ratio at the receiver.

• You may allow two transmissions at the same time without collision. – In Ethernet, two simultaneous transmission means collision

A DCB A DCB

A->B, C->D A->B, D->C

Page 15: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Wireless communications

• Hidden terminal

A DCB

• Exposed terminal

A DCB

Page 16: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Zhenhai Duan Computer Science, FSU

Medium Access Control (MAC) Layer

• Asynchronous Data Service– DCF (Distributed Coordination Function)

• Contention-Based Medium Access Control• CSMA/CA: Carrier Sense Multiple Access/Collision Avoidance• For elastic applications like email, file transfer

• Time-Bounded Service– PCF (Point Coordination Function)

• Contention Free Medium Access Control• Optional access method works like polling• For time-sensitive voice/video applications

Page 17: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Goals

• How to design an efficient contention-based MAC protocol for wireless LAN?

• Goals– Collision avoidance to reduce wasted

transmissions– Reasonable fairness– Cope with hidden terminals– Allow exposed terminals to talk

Page 18: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Problems

• What problems will occur if apply Ethernet MAC?

• No CD, does not know whether there is a collision

• No CD, channel waste could be large using 1-persistent

• Cannot hear all other people means the sender cannot be sure that he can reserve the whole channel.

Page 19: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Fixes

• No CD, use ACK. If there is no ACK, assume there is collision

• No CD, has to use non-persistent to reduce collision by AVOIDING COLLISION, CA

• Cannot hear other people, so devise some channel reservation technique

Page 20: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

DCF

• When got a packet to send, sense the channel, if idle, send immediately (not completely non-persistent! Why?)

• When channel is busy, wait until idle, then backoff a random time. If still idle, send. (The non-persistent part. The CA feature). If busy before reaching zero, freeze it, and reactivate when idle again.

• After receives a packet, send ACK. • If collision, use the exponential backoff.

Page 21: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

DCF

• Do you want the ACK to have the same priority as data packets?

• How do you make sure that ACK has higher priority?

• Use time. You have to wait for a certain amount time before you can send.

• High priority packets wait shorter.

Page 22: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

DCF

• The SIFS, DIFS. SIFS is for control packets. DIFS is for data packets.

• When a station wants to send, if it is a control packet, sense the channel for SIFS, then send. If it is a data packet, sense the channel for DIFS, then send.

Page 23: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

DCF

Page 24: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

Further improvement

• Further improvement by improving carrier sense

• The problem is other people cannot hear me sending, so they will send.

• So, how to make sure that they will know I am sending?

Page 25: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

RTS/CTS• RTS/CTS in the place for carrier sense

– RTS – reserves channel for a bit of time, if sender hasn’t heard other CTSes

– CTS – sender replies if it hasn’t heard any other RTSes

– Both messages include time. Network Allocation Vector (NAV)

– If no CTS, exponential backoff– “RTS-CTS-DATA”

Page 26: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

RTS/CTS• 802.11 standardized both CSMA/CA and RTS/CTS• In practice, most operators disable RTS/CTS

– Very high overhead!• RTS/CTS packets sent at “base rate” (often 1Mbit)

– Avoid collisions regardless of transmission rate

– Most deployments are celluar (base stations), not ad hoc. Neighboring cells are often configured to use non-overlapping channels, so hidden terminals on downlink are rare

• Hidden terminal on uplink possible, but if clients mostly d/l, then uplink packets are small.

• THIS MAY CHANGE. And is likely not true in your neighborhood!– When CS range >> reception range, hidden terminal less important

Page 27: Ethernet, Wireless LAN. Ethernet Frame Format (a) DIX Ethernet, (b) IEEE 802.3.

PCF

• The AP acts as the master and sends out beacon signals for polling stations and stations can sign up for certain amount of bandwidth use

• Co-exists with DCF. • How to make sure that beacon signals have

higher priority?– PIFS