Ethernet Timing
Ethernet is extremely reliant on timing. Frame lengths, collision detection and the end-to-end size of an Ethernet network - number of segments, repeaters etc. are all based on various timing rules. These important timings are...
~~ Slot Time and Minimum Frame Size~~
Slot time is a critical timing rule for half-duplex Ethernet network operations. It is not required for Ethernet operations that must operate at full-duplex, such as 10 Gbps Ethernet.
Slot time is the minimum time a station must transmit a single frame for. This means a frame cannot be too small or a station would not be able to transmit for long enough to abide by the slot-time rule. The reason a station has to transmit continuously for a particular length of time is as follows:-
Suppose a station is transmitting a frame and a collision occurs at the far end of the network. The transmitting station will only be able to detect the collision when the collision wave has propagated back again. This takes time. If the sending station finishes transmitting before the collision wave makes it back to it, then it will not realise a collision has occurred. The slot time rule makes sure a transmitting station transmits for a long enough period of time, so it can detect any returning collision wave. On Ethernet networks operating at 10 and 100 Mbps, slot time is 512 bit times.
A bit time is the time it takes for a transmitter to send a single bit out onto the medium. Faster networks like Gigabit Ethernet can send out bits at a faster rate than slower networks like 10 to100 Mbps Ethernet. If the slot time for Gigabit Ethernet was also 512 bit times, then the transmission time period would not be long enough for a station to detect collision waves. So the slot time for Gigabit Ethernet is 4096 bit times.
To think about what slot and bit time means, look at an Ethernet frame below. If a transmitter has to transmit 512 bits of data to satisfy slot time, how many bytes is that? Which frame fields below must be transmitted to satisfy the slot time rule?
Since 512 bits is 64 bytes, then on 10/100 Mbps Ethernet a transmitter must send out the preamble, destination, source, type and FCS fields. Ignoring the preamble, that only makes 18 bytes. So to satisfy slot time, a transmitter must send out at least 46 more bytes of data. This is why there is the 46 byte minimum size for the data/pad field of a frame - to ensure that slot time is satisfied. A station is not allowed to transmit a frame shorter in length than this.
When Gigabit Ethernet first arrived on the scene, there was clearly a problem with the 512 bit slot time used on 10/100 Mbps Ethernet. Gigabit Ethernet can transmit 512 bits onto the medium so quickly, the signal would travel less than 100 meters before the station stopped transmitting. In other words, a station would have stopped transmitting way before any collision wave made its way back along a 100m of cable.
So, the slot time for Gigabit Ethernet was increased to 4096 bit times - this is 512 bytes of data. If a short frame must be transmitted that meets the minimum data/pad field field length of an Ethernet frame but is too short to meet slot time requirements, then an "extension field" can be added to the frame. The extension field helps bring the total transmission size up to the required 512 bytes. Any extension field is discarded by the receiving station. Extension field are only used on half-duplex Gigabit operations. They are not necessary for full-duplex.
~~ Slot Time and Overall Network Size~~
Slot time also limits the size of a network in terms of the maximum cable segment lengths and number of repeaters allowed. If the size of a network grows too big, a phenomenon known as "late collisions" can occur. Late collisions arrive too late in the frame transmission to be dealt with properly by the transmitting MAC and so the frame is dropped and is not retransmitted. Higher layers, such as the application layer must deal with the problem and force a retransmission of the frame.
~~ Interframe Spacing~~
Once a frame has been transmitted, all station are expected to wait a specific period of time before another frame is transmitted. This is called the Interframe Spacing. For 10 Mbps Ethernet, the interframe spacing is 96 bit times (approx 9600 nanoseconds). The interframe spacing is the same for 100 Mbps and Gigabit Ethernet. This means that for the faster networks, the time between transmission of frames is shorter.
~~ Backoff~~
If a collision occurs, then the two transmitting stations are required to stop transmitting. All station must wait the interframe spacing time before attempting to transmit after the collision. The two colliding stations must wait an additional random period of time, known as the backoff period before attempting to retransmit. This is to stop the two stations retransmitting at exactly the same time again and causing a further collision.
So, following a collision, each station generates a random number (r). The value r is a number between 0 and 2k where k is the number of collisions that have occurred so far. The formula is shown below.
0 =< r < 2k
On the first attempt at retransmission r is a number from 0 to 1; on the second attempt, 0 to 3; on the third, 0 to 7 and so on. The number range for r can continue to increase for up to 10 collisions, whereupon the range reaches 0 to 1023. The station is allowed 16 attempts at retransmitting. The maximum range for r stays at 0 to 1023 after the 10th attempt. After the 16th attempt, the MAC sublayer is required to give up and it will report a 'excessive collision error' to the higher layers. Excessive collision errors occur most often on networks experiencing high traffic loads.
|