CSMA/CD
There is no central control management when computers transmit on Ethernet.
For this purpose the Ethernet employs CSMA to coordinate transmission among multiple attached computers.
CSMA is a coordination scheme that defines how to take turns using a shared cable.
A computer listen to codes i.e. it sense the carrier. If the cable is idle it starts transmitting and if the cable is in use then it waits.
If simultaneous transmission occurs, the frames interfere with each other and this phenomenon is called collision.
COLLISION DETECTION:
As explained earlier, the signals from two computers will interfere with each other and the overlapping of frames is called a collision. It does not harm to the hardware but data from both frames is grabbled.
ETHERNET CD:
To detect the collision , Ethernet interfaces include hardware to detect transmission. It performs two operations:
It monitors outgoing signals.
Grabbled signal is interpreted as a collision.
After collision is detected computers stop transmission . Internet uses CSMA/CD to coordinate transmission.
All wiring technologies use identical Ethernet specifications .e.g they use same frame format. They use same CSMA/CD algorithms. They can mix different technologies in a Ethernet.
For Example :
In a bus topology all computers are attached to single long cable and any computer can send data to any other computer.
For this purpose , coordination is required to decide which computer has to use the line at what time. In this situation , they use CSMA/CD to sense the carrier if line is idle , they transmit their data to other computer attached on this line.
Recovery From Collision :
Computer that detects sends special signal to force all other interfaces to detect collision.
Computer then waits for other to be idle before transmission . But if both computers wait for same length of time, frames will collide again. So the standard specifies maximum delay and both computers choose random delay, which is lesser . After waiting, computers use carrier sense to avoid subsequence collision.
After waiting, computers use carrier sense to avoid subsequence collision.
The computer with shorter delay will go first and other computer may transmit later.
Exponential Back Off:
Even with random delays, collision may occur especially likely with busy segments. Computers double delay with each subsequent collision. It reduces likely hood of sequence of collision.
Data Stuffing
Sometimes the special character (i-e soh and eot) may appear in data as a part of data they will be misinterpreted as framing data.
The solution to this problem is Byte stuffing.
In general to distinguish between data being sent and control information such as frame delimiters network systems arrange for the sending side to change the data slightly before it is sent because systems usually insert data or bytes to change data of transmission , the technique is known as Data Stuffing.
There are two types of data stuffing:
Byte Stuffing
Bit Stuffing
Byte stuffing refers stuffing with character oriented hardware and bit stuffing refers to bit oriented hardware.
Byte stuffing translates each reserved byte into two unreserved bytes . For example:
It can use esc as prefix followed by x for soh, y for eot and z for eco.
The receiver then replaces each occurrence of esc y and esc z by the corresponding single character .
No comments:
Post a Comment