Transcript Ethernet

Ethernet
Ethernet Goals
•
•
•
•
•
Simplicity
Low Cost
Compatibility
Address flexibility
Fairness
– All nodes have equal access to the network
• High speed
• Stability
Ethernet Non-Goals
• Full Duplex
– At an given time, there can be only one source station.
• Error Control
– Limited to detection of bit errors in the physical channel, and
detection and recovery from collisions
• Security
– No data encryption is employed
• Speed flexibility
• Priority
– Does not provide any priority mechanism.
• Hostile user
– There is no attempt to protect the network from a malicious user
at the date link level.
Ethernet MAC Sublayer
Protocol
Frame formats. (a) DIX Ethernet, (b) IEEE
802.3.
Preamble is a 64-bit pattern consisting of 7 bytes of 10101010
followed by one byte of 10101011. Data + Pad should be at least 46
bytes.
Typical MAC Address 8:0:2b:e4:b1:2
00001000 00000000 00101011 11100100 10110001 00000010
Ethernet MAC Sublayer Protocol
Collision detection can take as long as 2 .
At 10 Mbps, each bit takes 100 nsec
The round-trip time (max 2500 meters and 4 repeaters) is about 500
bit-time.
So, each frame should take at least 500 bit-time
Slot time= 512 bit time
512 bit times = 64 bytes at 10Mbps; which is the minimum frame
length
Carrier Sense in Ethernet
• Whenever the channel is busy, it defers to
the passing frame. When the last bit of the
passing frame is gone by, that is, the
medium is sensed idle, it continues to
defer for another 9.6 micro seconds (12
bytes @ 10 Mbps) to provide proper
interframe spacing
• Question: What “stuffing” technique does
Ethernet use?
Collision Handling in Ethernet
• When a collision is detected during a frame
transmission, the sending station does not
terminate transmission immediately. Instead, the
transmission continues until at least 32 (but not
more than 48) additional bits have been
transmitted from the time that collision is
detected. This is called the jamming sequence. It
ensures that all transmitting station would be
able to detect the collision.
Collision Handling in Ethernet…
• The jamming sequence can be anything
except the 32-bit CRC value
corresponding to the partial frame
transmitted prior to the jamming sequence.
• Question: How would the receiving
stations detect collision?
Backoff and retransmission
• In case of a collision, transmission is tried for up
to 16 times (1 original + 15 retries).
• At the end of the jamming sequence, the station
delays before attempting to retransmit. The
delay is an integral multiple of the slot time. The
number of slot times to delay before the n-th
attempt is chosen as a uniformly distributed
random integer r in the range
0 ≤ r < 2k where k =
min{n,10}.
• This is called truncated binary exponential
backoff policy.
Truncated binary exponential
backoff
• For the 1st retransmission:
– k = min{1,10}, this give 0 ≤ r < 21. Thus, the station
waits either 0 or 1 slot time.
• For the 2nd retransmission:
– k = min{2,10}, this give 0 ≤ r < 22. Thus, the station
waits either 0, 1, 2, or 3 slot times.
• On the average, the station will backoff
(2n – 1)/2 time slots for the n-th retry; n ≤ 10.
A Summary of 10Mbpb Ethernet Specs
• Date Rate 10 Mbps = 107 bits per second
• Smallest frame = 8 bytes of preamble + 64 bytes of
frame = 72 bytes, taking 57.6 μsec.
• Largest frame = 8 bytes of preamble + 1518 bytes of
frame = 1526 bytes, taking 1220.8 μsec.
• FCS is computed for all fields using the following
generating polynomial:
G( x )  x  x  x  x  x  x  x 
32
26
23
22
16
12
11
x10  x8  x 7  x5  x 4  x 2  x  1.
Performance Analysis of
Ethernet
• We will do a simple analysis of CSMA
part.
  one way propagation time
2  slot time
T  time required to complete a successful
transmission
L  message length
Assumption: Each station transmit during an
available slot time with probability p.
Performance Analysis of
Ethernet…
If there are N stations, the probability A that
some station acquires the channel is
N
A    p (1  p ) N 1  NP (1  p ) N 1
1
1
A is maximized when p 
and the maximum
N
1
value is Amax  .
e
Performance Analysis of
Ethernet…
• Next, we need to get hold of the average
contention time, that is, on the average,
how long would it take for a typical station
to seize the channel. We express that in
terms of A, the probability of no collusion
Performance Analysis of
Ethernet…
Thus, the probability of a collision is (1  A).
The probability that a contention interval consists
of exactly j slots is A(1  A) j 1
Thus the expected number of slots per contention

is given by
 jA(1  A)
j 0
j 1
1

A
2
Thus the mean contention interval w 
A
Performance Analysis of Ethernet…
L
T imeto transmita frame L R  w
1
U


wR
data rate
R
1
L
1
Substituting for w (using A  ) we get
e
1
U
2eR
1
L
WithR  10Mbps,2  51.2 sec we get
1
1
U

6
7
1392
51.2  10  2.71 10
1
1
L
L
Performance Analysis of
Ethernet…
1
1
1


2eR
2e
propagat io
n t ime
1
1
1  2e 
L
L R
t ransmission t ime
1
1
U 

1  2ea 1  5.4a
U 
Ethernet Performance
• Efficiency of Ethernet at 10 Mbps with 512-bit
slot times.
Fast Ethernet
• Ethernet Cablings
Gigabit Ethernet…
• Features
– Frame bursting; a station can send more than one
frame at a time
– Uses 8B/10B codes
– Uses five different voltage levels
– Transmits four symbols in parallel in each clock
period (125MHZ)
– Each symbol carries two bits, for a total of 8 bits per
clock period to get 8x125MHz=1Gbps.
– Flow control, using a PAUSE frame to slow down