Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 17

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02

ISSUE C REV:0.0 UNIT II-Medium Access

R ando m Ac ce ss : CSM A

ALO H A & slotted A LO H A are ineffic ien t because hosts don t take in to account w hat other hos ts are doing before they transm it

Instead,lis ten before you talkCarrier = Sense M ultiple Access (CSM A)


Packet A Host B lis te ns de la y Packet B

T alk eforelisten p rotoc ols -b Exa mp le: at p arty , every on e sp eak s w hen ev er t hey w ant t o, regardle ss of w het her an other p erson is sp eak ing

Sen se for carriers (see if any on e else is tran smittin g) b efor e y ou b egin tran smi ttin g Packet X Y time Packet C ollis io n still poss ib le Host B se nd s P ro f. Rick H an , U n i v ers ity over lo ng prop. de la ys of Co lo rad o at Bo uld er

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

If channel is busy,

Random Access: 1-Persistent CSMA

A host listens continuously When channel becomes free, a host transmits its packet i mmediately (with probability 1) Packet A Packet B PacketPacket Y X Collision time

Host B listens

Host B sends

Collision scenarios

Hosts A and B are far apart (long prop. delay). As signal takes a long time to reach B. So, B thinks channel is free, and begins transmi tting. Hosts B and C transmit as soon as A finishes Still, CSMA is more efficient than ALOHA variants
P rof. Rick Han, University of Colorado at Boulder

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

Generalization of 1-persistent CSMA


Random Access: p-Persistent CSMA

A host senses the channel, and


Typically applied to slotted channels Slot length is chosen as maximum propagation delay If slot is idle, transmit with probability p, or defer with probability q=1-p If next slot is idle, transmit with probability p, or defer with probability 1-p, repeat If channel is busy, then sense channel continuously until it becomes free, begin again
P rof. Rick Han, University of Colorado at Boulder

Host does not sense channel continuously Instead, if channel is busy,


Random Access: Non-Persistent CSMA

Random interval reduces collisions

Wait/sleep a random interval before sensing again As with 1-persistent CSMA, as soon as channel is idle, then send a packet Higher throughput than 1-persistent CSMA when many senders Packet B Random Sleep Host B sends
P rof. Rick Han, University of Colorado at Boulder

Packet A Host B listens

time

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

Ethernet uses CSMA/CD, i.e. CSMA with Collision Detection (CD) Listen-while-talk protocol
Not transmitted
Packet A

Random Access: Ethernet CSMA/CD

A host listens even while it is transmitting, and if a collision is detected, stops transmitting Packet B delay Host B starts sending Packet B
P rof. Rick Han, University of Colorado at Boulder

Host B senses carrier

time Host B detects collision And stops sending

Can abort transmission sooner than end-ofpacket if there is a collision CSMA/CD doesnt require explicit acknowledgement
Can happen if prop. delays are long Better efficiency than pure CSMA

Random Access: Ethernet CSMA/CD (2)

Unlike CSMA, which requires an ACK or timeout to detect a collision Collision detection is built into the transmitter When collision detected, begin retransmission

P rof. Rick Han, University of Colorado at Boulder

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

Exponential backoff strategy


Random Access: Ethernet CSMA/CD (3)


When a collision is detected, a host waits for some randomly chosen time, then retransmits a packet If a second collision is detected, a host doubles the original wait time, then retransmits the packet Each time there is another collision, the wait time is doubled before retransmission Variants:
At eac h retransmission, choose a rando m value from the exponentially increasing wait time. At eac h retransmission, choose randomly from a mong a discrete set of values within exponentially increasing wait time Retransmi t a finite # of times
P rof. Rick Han, University of Colorado at Boulder

CSMA/CD can be used with nonpersistent, 1persistent, or p-persistent variants of CSMA Ethernet is synonymous with the IEEE 802.3 standard To extend an Ethernet, repeaters are placed.
Start to run into propagation delay issues and noise amplification issues Ethernet keeps its maximum length to 2500 m to keep prop. delays tight, so that CSMA/CD responds well
P rof. Rick Han, University of Colorado at Boulder

Random Access: Ethernet CSMA/CD (4)

Initial work on Ethernet at Xerox in early 70s Ethernet specifies 1-persistent CSMA/CD

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

Ethernet CSMA/CD requires a minimum size to a frame:


Hosts A and B at opposite ends of the Ethernet A Ethernet t t+d, d=prop. delay B transmits @ time t+d Just before As packet arrives B sees Collision at t+d, Transmits a runt packet B

Random Access: Ethernet CSMA/CD (5)

Bs packet arrives at t+2d

P rof. Rick Han, University of Colorado at Boulder

If Bs packet arrives at A and A is no longer transmitting, then Host A will


Fail to detect the collision thinks its packet got through Thinks the incoming packet is a new packet

Random Access: Ethernet CSMA/CD (6)

Therefore, to detect a collision:


A

Minimum frame size >= 2*(prop. delay)*BW Hosts A & B at opposite ends of Ethernet B Ethernet t+d
P rof. Rick Han, University of Colorado at Boulder

t Bs packet arrives at t+2d

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

ETHERNET

Random Access: 802.11 Wireless Ethernet


Employs CSMA/CA, i.e. CSMA with Collision Avoidance (CA) Hidden terminal effect

Example: B can hear A and C, but A and C cant hear each other. If A is sending B, C thinks channel is clear and starts sending => collision! Doesnt happen in wired Ethernet, because hosts can hear each other Host A Host B Host C

P rof. Rick Han, University of Colorado at Boulder

Collision

Random Access: 802.11 Wireless Ethernet (2)


How to handle the hidden terminal effect?
Host A sends a Request-To-Send (RTS) Host B sends a Clear-To-Send (CTS) Host C hears the CTS, and does not interrupt transmission between A and B This helps implement Collision Avoidance RTS Host A Host B Host C CTS CTS Data ACK Host C Suppresses Its Data

P rof. Rick Han, University of Colorado at Boulder

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

Random Access: 802.11 Wireless Ethernet (3)


How does host C know when to resume sending? Three techniques:
1. RTS & CTS both include a Network Allocation Vector NAV indicating the length of their upcoming transmission; this tells C how long to sleep [technically, the RTS & CTS contain a duration field that is used to 2. Data frame also contains a NAV to indicate length of transmission 3. After Host A has finished sending its data, Host B sends an ACK; Host C hears Bs ACK and knows the data transmission is over
P rof. Rick Han, University of Colorado at Boulder

update a hosts NAV]

Example: Host A sends data to Host B


Host Z RTS Host A RTS Host B CTS Host C CTS Data Data ACK ACK

Random Access: 802.11 Wireless Ethernet (4)

* Host Z cannot transmit * Host C cannot transmit after after hearing As RTS. hearing Bs CTS * Host Z waits for a time * Host C waits for a time equal to RTSs NAV. equal to CTSs NAV. * Host Z hears As Data & RTS * Host C hears Bs CTS & P rof. but not Bs CTS nor Bs ACKRick Han, University of but not As RTS or Data ACK
Colorado at Boulder

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

Random Access: 802.11 Wireless Ethernet (5)


Host Z RTS Host A RTS CTS Data Data ACK ACK Host B CTS Host C

Final comments:

Host Z could miss RTS but could still avoid collision by hearing Data and backing off for time specified by Datas NAV
P rof. Rick Han, University of Colorado at Boulder

802.11 does not support Collision Detection


Random Access: 802.11 Wireless Ethernet (5)

What happens if two RTSs collide?

In a wired LAN, transmitter can check voltage levels to see if there is a collision. A remote transmitters power doesnt attenuate severely. In a wireless LAN, the transmitters power overwhelms a distant transmitters power, so its difficult to detect collision. Senders realize after timeout that CTS did not come back, and then practice exponential backoff in trying to send new RTSs

P rof. Rick Han, University of Colorado at Boulder

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

WHAT IS WIRELESS? A wireless LAN or WLAN is a wireless local area network that uses radio waves as its carrier. The last link with the users is wireless, to give a network connection to all users in a building or campus. The backbone network usually uses cables WHAT IS 802.11? A family of wireless LAN (WLAN) specifications developed by a working group at the Institute of Electrical and Electronic Engineers (IEEE) Defines standard for WLANs using the following four technologies Frequency Hopping Spread Spectrum (FHSS) Direct Sequence Spread Spectrum (DSSS) Infrared (IR) Orthogonal Frequency Division Multiplexing (OFDM) Versions: 802.11a, 802.11b, 802.11g, 802.11e, 802.11f, 802.11i 802.11 TRANSMISSION Most wireless LAN products operate in unlicensed radio bands 2.4 GHz is most popular Available in most parts of the world No need for user licensing Most wireless LANs use spread-spectrum radio Resistant to interference, secure Two popular methods Frequency Hopping (FH) Direct Sequence (DS)

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

Frequency Hopping Vs. Direct Sequence


FH systems use a radio carrier that hops from frequency to frequency in a pattern known to both transmitter and receiver
Easy to implement Resistance to noise Limited throughput (2-3 Mbps @ 2.4 GHz)

DS systems use a carrier that remains fixed to a specific frequency band. The data signal is spread onto a much larger range of frequencies (at a much lower power level) using a specific encoding scheme.
Much higher throughput than FH (11 Mbps) Better range Less resistant to noise (made up for by redunda ncy it transmits at least 10 fully redundant copies of the original signal at the same time)

802.11 A Employs Orthogonal Frequency Division Multiplexing (OFDM) Offers higher bandwidth than that of 802.11b, DSSS (Direct Sequence Spread Spectrum) 802.11a MAC (Media Access Control) is same as 802.11b Operates in the 5 GHz range 802.11 A ADVANTAGES Ultra-high spectrum efficiency 5 GHz band is 300 MHz (vs. 83.5 MHz @ 2.4 GHz) More data can travel over a smaller amount of bandwidth High speed Up to 54 Mbps Less interference Fewer products using the frequency 2.4 GHz band shared by cordless phones, microwave ovens, Bluetooth, and WLANs

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

802.11a Disadvantages Standards and Interoperability Standard not accepted worldwide No interoperability certification available for 802.11a products Not compatible or interoperable with 802.11b Legal issues License-free spectrum in 5 GHz band not available worldwide Market Beyond LAN-LAN bridging, there is limited interest for 5 GHz adoption Cost 2.4 GHz will still has >40% cost advantage Range At equivalent power, 5 GHz range will be ~50% of 2.4 GHz Power consumption Higher data rates and increased signal require more power OFDM is less power-efficient then DSSS

802.11a Applications Building-to-building connections Video, audio conferencing/streaming video, and audio Large file transfers, such as engineering CAD drawings Faster Web access and browsing High worker density or high throughput scenarios Numerous PCs running graphics-intensive applications

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

802.11a Vs. 802.11b


802.11a vs. 802.11b Raw data rates 802.11a
Up to 54 Mbps (54, 48, 36, 24,18, 12 and 6 Mbps) 50 Meters UNII and ISM (5 GHz range) OFDM technology

802.11b
Up to 11 Mbps (11, 5.5, 2, and 1 Mbps) 100 Meters ISM (2.4000 2.4835 GHz range) DSSS technology

Range Bandwidth Modulation

802.11g 802.11g is a high-speed extension to 802.11b Compatible with 802.11b High speed up to 54 Mbps 2.4 GHz (vs. 802.11a, 5 GHz) Using ODFM for backward compatibility Adaptive Rate Shifting 802.11g Advantages

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

Provides higher speeds and higher capacity requirements for applications Wireless Public Access Compatible with existing 802.11b standard Leverages Worldwide spectrum availability in 2.4 GHz Likely to be less costly than 5 GHz alternatives Provides easy migration for current users of 802.11b WLANs Delivers backward support for existing 802.11b products Provides path to even higher speeds in the future 802.11e Introduces Quality of Service Also know as P802.11 TGe Purpose: To enhance the 802.11 Medium Access Control (MAC) to improve and manage Quality of Service (QoS) Cannot be supported in current chip design Requires new radio chips Can do basic QoS in MAC layer 802.11f Inter Access Point Protocol Also know as P802.11 TGf Purpose: To develop a set of requirements for Inter-Access Point Protocol (IAPP), including operational and management aspects

Repeater, Hub, Bridge & Switch REPEATER A repeater receives a signal, regenerates it, and passes it on.

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

It can regenerate and retime network signals at the bit level to allow them to travel a longer distance on the media. It operates at Physical Layer of OSI The Four Repeater Rule for 10-Mbps Ethernet should be used as a standard when extending LAN segments. This rule states that no more than four repeaters can be used between hosts on a LAN. This rule is used to limit latency added to frame travel by each repeater. HUB Hubs are used to connect multiple nodes to a single physical device, which connects to the network. Hubs are actually multiport repeaters. Using a hub changes the network topology from a linear bus, to a star. With hubs, data arriving over the cables to a hub port is electrically repeated on all the other ports connected to the same network segment, except for the port on which the data was sent.

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

SWITCH: Switches are Multiport Bridges. Switches provide a unique network segment on each port, thereby separating collision domains. Today, network designers are replacing hubs in their wiring closets with switches to increase their network performance and bandwidth while protecting their existing wiring investments. Like bridges, switches learn certain information about the data packets that are received from various computers on the network. Switches use this information to build forwarding tables to determine the destination of data being sent by one computer to another computer on the network BRIDGE Bridges are used to logically separate network segments within the same network. They operate at the OSI data link layer (Layer 2) and are independent of higher-layer protocols. The function of the bridge is to make intelligent decisions about whether or not to pass signals on to the next segment of a network. When a bridge receives a frame on the network, the destination MAC address is looked up in the bridge table to determine whether to filter, flood, or copy the frame onto another segment Broadcast Packets are forwarded

Code&name of the sub: CS2302& computer networks Unit: II

R/TP/02 ISSUE C REV:0.0

You might also like