Enhanced CSMA

23
Enhanced CSMA • Additional improvement Use CSMA access Listen while transmitting Stop immediately if collision sensed Called collision detection Reduces time lost due to collisions • Carrier Sense Multiple Access/Collision Detection protocols (CSMA/CD)

description

Enhanced CSMA. Additional improvement Use CSMA access Listen while transmitting Stop immediately if collision sensed Called collision detection Reduces time lost due to collisions Carrier Sense Multiple Access/Collision Detection protocols ( CSMA/CD ). Shared channel. A. B. CSMA/CD. - PowerPoint PPT Presentation

Transcript of Enhanced CSMA

Page 1: Enhanced CSMA

Enhanced CSMA

• Additional improvement Use CSMA access Listen while transmitting Stop immediately if collision sensed Called collision detection Reduces time lost due to collisions

• Carrier Sense Multiple Access/Collision Detection protocols (CSMA/CD)

Page 2: Enhanced CSMA

CSMA/CDHow long should a station listen while transmitting to ensure no collision?

Shared channel

A B

- Suppose A begins to transmit

- Suppose B wants to transmit before hearing A’s transmission

☼☼ collision

- How long before A hears collision?

Page 3: Enhanced CSMA

Collision Detection

• Let p = maximum propagation delayp = time for signal to travel full length of channel

• To ensure detection of a collision, transmitter must listen 2 x propagation delay

• Thus, the time we need listen depends on size of network

• If we set a limit to size of network, we could define a maximum time to listen

• On wired networks we consider propagation delay as 2 * 108 meters per second

Page 4: Enhanced CSMA

Collision Detection

• Suppose time to transmit frame is longer than

2 * propagation delay• What can we say about the channel if we have

not heard a collision after 2 * propagation delay? • By that time, station will have seized the channel• What if we required a minimum frame size?• What if the time to transmit a frame of minimum

size was ≥ 2 * propagation delay?• Under this condition, if transmission completes

without collision, we are assured none will occur

Page 5: Enhanced CSMA

Ethernet/IEEE 802.3• 1975 – Original Ethernet

• Based on a paper by Robert Metcalfe• Based on Aloha concepts• 2.94 Mbps (3 Mbps)• Maximum size of 1 Km• Used CSMA/CD protocol• Used coaxial cable as media

• First version developed in collaboration with• Xerox• Intel• Digital Equipment Corporation

Page 6: Enhanced CSMA

Ethernet/IEEE 802.3• 1980 Ethernet Version 1.0

• 10 Mbps• 500 meter segment• Used 50 ohm coaxial cable• CSMA/CD – 1-persistent

• 1982 Ethernet Version 2.0• Some electrical revisions

• 1985 IEEE 802.3• Defined a family of networks• Minor differences with Ethernet

– Some additional electrical functions– Frame format variations

Page 7: Enhanced CSMA

IEEE 802.3• Family of Networks

CSMA/CD 1-persistent Different speeds Different media

• 10BASE5 Thick Coax 500 meters• 10BASE2 Thin Coax 185 meters• 10BASET Twisted pairs 100 meters• 10BASEF Fiber 1 & 2 Km• 100BASET twisted pairs 100 meters• 1000BaseTtwisted pairs 100 meters• Others

Page 8: Enhanced CSMA

10BASE5

• 500 meters

• 10 Mbps

• Maximum 100 stations on a segment

• Minimum 2.5 meters apart

• Manchester encoding ± .85 volts High to low = 1 bit Low to high = 0 bit

Page 9: Enhanced CSMA

10BASE5500 meters

host

Transceiver – EthernetMedia Access Unit (MAU) - IEEE

Transceiver/AUI Cable50 meters maximum

Attachment Unit Interface (AUI)

How long must we listen to assure no collision?How large a minimum frame do we need to detect any collision before end of transmission?

Page 10: Enhanced CSMA

10BASE5500 meters

500 meters

RepeaterTransceiver/AUI Cable50 meters maximum

A

BHow long must we listen to assure no collision?

Page 11: Enhanced CSMA

Calculating Propagation Delay

• 100 meters of cable adds .5 µs to delay or 1 µs roundtrip

• Repeater adds approximately .75 µs one-way or 1.5 µs roundtrip

• Transceiver adds 1.0 µs one-way or 2.0 µs roundtrip (if not connected to host)

• On a 10 Mbps Ethernet, 1 µs is equivalent to transmitting 10 bits

• We can calculate delay in time units or in bits

Page 12: Enhanced CSMA

Ethernet/IEEE 802.3

• Use CSMA/CD

• Detect collisions while transmitting frame

• Requires a minimum size frame Transmission rate (speed) Frame size Network size

All related

Page 13: Enhanced CSMA

10BASE5

B

A

500 meters

500 meters

500 meters

500 meters

500 meters

R

R

R

R

5 * 500 segments

= 2500 meters

= 12.5 µs

8 * 50 Transceiver cables

= 400 meters

= 2 µs

4 repeaters * .75 µs

= 3 µs

8 transceivers * 1 µs

= 8 µs

Total one way delay = 25.5 µs

Total round trip = 51 µs

Page 14: Enhanced CSMA

Ethernet/IEEE 802.3

• Minimum frame size = 512 bits

= 64 bytes• Vulnerable time or contention slot = 51.2 µs• After 51.2 µs, station has seized channel• What happens if a station sends unlimited size

frame?• Maximum size frame also specified at 1518 bytes• Maximum size frame enforced by transceiver

Page 15: Enhanced CSMA

Original Ethernet Diagram

Page 16: Enhanced CSMA

Ethernet Wiring Topologies

Star wired hubs

Shared Channeln Mbps capacity

A B F GC ED

n Mbpsn Mbps

All stations share n Mbps

A shared hub is actually a repeater

Page 17: Enhanced CSMA

Efficiency of CSMA/CD

• Let p = propagation delay (one way)• A = probability a station acquires channel during

a contention slot• Tx = time to transmit an average size frame• It can be shown that

• Optimal utilization when

Ap

Tx

TxU

2

eA

1

speed

framebitsTx

/

Page 18: Enhanced CSMA

Ethernet/IEEE802.3 Utilization

Page 19: Enhanced CSMA

Ethernet/IEEE 802.3

• Advantages Most widely used network architecture New stations can be installed on live network Low delay at low load Simple access mechanism

• Disadvantages Limited distances Non deterministic High collisions rate at high loads No provisions for priority traffic

Page 20: Enhanced CSMA

Collisions• Minimum frame defined as 512 bits• At 10 Mbps contention slot = 51.2 µs• After a collision

each station waits 0 or 1 contention slots

• After a second collisioneach station waits 0, 1, 2, or 3 contention slots

• After j collisions, each station waits

0, 1, 2, . . . . . ., 2j-1 contention slots

until j = 10

then continue until 16 total tries

• This is called binary exponential backoff

Page 21: Enhanced CSMA

Ethernet/IEEE 802.3 Addressing• Each station on a multiple access LAN must be

uniquely identified• For Ethernet, addresses are assigned to network

interfaces by vendors• Each address is 48 bits

XXXXXX XXXXXX (X = 4 bits) vendors address

• There is a special broadcast address FFFFFF FFFFFF (all 1s)

All stations on shared channel

• There are provisions for subgroups (multicast)• This is called the Media Access Control (MAC)

address

Page 22: Enhanced CSMA

Ethernet/IEEE 802.3 Addressing

• You can look up the vendor of the adaptor for your machine

http://standards.ieee.org/regauth/oui/index.shtml

Page 23: Enhanced CSMA

Ethernet Frame Format

Preamble

SFD

Destination Address

Source Address

Type

Data46–1500 bytes

FCSCRC - 32

Ethernet

7

1

6

6

2

4

Preamble

SFD

Destination Address

Source Address

Length

LLC Data46– 496bytes

FCSCRC - 32

IEEE 802.3

7

1

6

6

2

4

10101010

………..

10101011