Data-link-Ethernet

Download Report

Transcript Data-link-Ethernet

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)
CSMA/CD
How long should a station listen while
transmitting to ensure no collision?
collision
☼☼
Shared channel
A
B
- Suppose A begins to transmit
- Suppose B wants to transmit before hearing A’s
transmission
- How long before A hears collision?
Collision Detection
• Let p = maximum propagation delay
p = 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
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
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
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
IEEE 802.3
• Family of Networks
 CSMA/CD 1-persistent
 Different speeds
 Different media
•
•
•
•
•
•
•
10BASE5
10BASE2
10BASET
10BASEF
100BASET
1000BaseT
Others
Thick Coax
Thin Coax
Twisted pairs
Fiber
twisted pairs
twisted pairs
500 meters
185 meters
100 meters
1 & 2 Km
100 meters
100 meters
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
10BASE5
500 meters
Transceiver – Ethernet
Media Access Unit (MAU) - IEEE
Transceiver/AUI Cable
50 meters maximum
Attachment Unit Interface (AUI)
host
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?
10BASE5
A
500 meters
Repeater
Transceiver/AUI Cable
50 meters maximum
500 meters
B
How long must we listen to assure no collision?
Calculating Propagation Delay
• 100 meters of cable adds .5 µs to delay or
1 µs roundtrip
• Repeater adds approximately .75 µs oneway 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
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
10BASE5
A
5 * 500 segments
500 meters
= 2500 meters
R
500 meters
R
= 12.5 µs
8 * 50 Transceiver cables
= 400 meters
500 meters
R
= 2 µs
4 repeaters * .75 µs
500 meters
R
= 3 µs
8 transceivers * 1 µs
500 meters
B
= 8 µs
Total one way delay = 25.5 µs
Total round trip
= 51 µs
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
Original Ethernet Diagram
Ethernet Wiring Topologies
Star wired hubs
Shared Channel
n Mbps capacity
n Mbps
n Mbps
A
B
C
D
E
All stations share n Mbps
A shared hub is actually a repeater
F
G
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
Tx
bits / fram e
U
Tx 
2p
speed
Tx 
A
1
A
• Optimal utilization when
e
Ethernet/IEEE802.3 Utilization
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
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 collision
each 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
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
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
Ethernet Frame Format
Ethernet
IEEE 802.3
10101010
Preamble
7
SFD
1
6
Destination
Address
Destination
Address
6
6
Source
Address
Source
Address
6
2
Type
Length
2
Data
46–1500 bytes
LLC Data
46– 496bytes
FCS
CRC - 32
FCS
CRC - 32
7
Preamble
1
SFD
4
………..
10101011
4