CSMA/CD (carrier-sense multiple access with collision detection)
Let’s represent our Ethernet segment as a dinner table, and let several people engaged in polite conversation at the table represent the nodes. The term multiple access covers what we already discussed above: When one Ethernet station transmits, all the stations on the medium hear the transmission, just as when one person at the table talks, everyone present is able to hear him or her.
Now let's imagine that you are at the
table and you have something you would like to say. At the moment, however, I
am talking. Since this is a polite conversation, rather than immediately speak
up and interrupt, you would wait until I finished talking before making your
statement. This is the same concept described in the Ethernet protocol as carrier
sense. Before a station transmits, it "listens" to the medium to
determine if another station is transmitting. If the medium is quiet, the
station recognizes that this is an appropriate time to transmit.
In our conversation, we can handle this situation gracefully. We both hear the other speak at the same time we are speaking, so we can stop to give the other person a chance to go on. Ethernet nodes also listen to the medium while they transmit to ensure that they are the only station transmitting at that time. If the stations hear their own transmission returning in a garbled form, as would happen if some other station had begun to transmit its own message at the same time, then they know that a collision occurred. A single Ethernet segment is sometimes called a collision domain because no two stations on the segment can transmit at the same time without causing a collision. When stations detect a collision, they cease transmission, wait a random amount of time, and attempt to transmit when they again detect silence on the medium.
The random pause and retry is an
important part of the protocol. If two stations collide when transmitting once,
then both will need to transmit again. At the next appropriate chance to
transmit, both stations involved with the previous collision will have data
ready to transmit. If they transmitted again at the first opportunity, they
would most likely collide again and again indefinitely. Instead, the random
delay makes it unlikely that any two stations will collide more than a few
times in a row.
Simplified Above:
1.
Sense the medium before sending
data.
2.
If Medium is free send data
else wait
3.
If all go well then no collision.
4.
But if 2 senders found the
medium is free and wait to send the data simultaneously.
5.
Collision happened.
6.
When Collection happed, they
detect it
7.
All sender stop sending any
data
8.
A signal is send to all party
to wait for Random period of time.
9.
Then if after some time if
sender find medium is free, data transfer start again.
No comments:
Post a Comment