What to Do When a Wreck Happens
Even when you're using CSMA/CD, collisions can still occur.
Why? Well, consider this same example, but unbeknownst to Bob, Archie was also
waiting for Larry to finish sending his frame before sending a frame. So,
Larry's frame has finished, and the LAN is silent. Figure 5-4 shows both Bob's and Archie's logic.
Figure 5-4. An Imminent and Unavoidable Collision
Ethernet standards state that when no one is sending anything,
the LAN is silentin other words, there is no electricity flowing over the wires.
Both Bob and Archie realize that Larry is finished when they stop receiving an
electrical signal. So, they both try to send their frames at roughly the same
time, because they both realize at roughly the same time that the LAN is silent.
And as was shown in Figure 5-2, when Bob
and Archie both send at the same time, a collision occurs.
The hub will repeat both frames out to Larry, so Larry will
know about the collision. However, the hub won't forward Bob's frame back to Bob
or Archie's frame back to Archie, so both Bob and Archie will only be receiving
one frame. With the logic discussed so far, Bob and Archie won't know there's a
collision! To make sure Bob and Archie know when a collision happens, when a NIC
transmits a frame, the NIC also connects what it sends to its own receive pair,
right on the card. This bit of hardware is called a loopback circuit, and it simply
means that the NIC receives its own frame as well.
By using loopback, when Bob sends a frame, he receives the same
electrical signal that he sends. When Archie sends a frame at the same time, the
hub forwards Archie's frame to Boband now Bob knows there is a collision.
So, what do you do when the collision occurs? CSMA/CD suggests
The senders of the collided frames send a jamming signal to
make sure everyone knows a collision has occurred.
The senders of the collided frames independently pick a random
Each sender waits until his own random timer has expired and
then tries to send his frames again.
The jamming signal is an electrical
signal that Ethernet standards specify to let everyone know "Hey, a collision
has occurred, so let's clean it up." Next, by having both Bob and Archie wait
before trying to send again, but with each of them choosing his own random
number for the timer, Bob and Archie should not try to send again at the same
So far in this chapter, you have learned that computers send
Ethernet frameswhich include the Ethernet header, trailer, and end user dataover
an Ethernet LAN. You have also learned how CSMA/CD regulates when the LAN is
used, much like traffic laws dictate when a road is used. So, enough of this
discussion of how to get data across the LAN. Now, let's think about what
happens when the frame actually gets to the destination.