Java implementation of CSMA/CD protocol using Non-Persistent sensing.
CSMA :
Carrier Sense Multiple Access/Collision Detection(CSMA) is a Media Access Control(MAC) Protocol used to minimize the probability of collision in the Data Link layer.
CSMA/CD :
CSMA/Collision Detection is equipped to handle collisions. Frames that have not been successfully transferred are resent upto K times, where K is the maximum number of attempts.
There are three types of sensing used in CSMA, this project uses Non-Persistent method.
Upon collision, the algorithm waits for a specific Backoff time before retransmission.
Backoff time is calculated as, TBf = R * Transmission time
Random number R = 0 to 2^K-1