ALL > Computer and Education > courses > university courses > graduate courses > Modern Computer Networking > ZSTU class(2019-2020-1) > student directories > AJIBODE ADEKUNLE L20192E060109 >
CSMA/CD Version 0
šŸ‘¤ Author: by damajibodegmailcom 2019-11-21 05:00:57

BRIEF INTRODUCTION


CSMA/CD is divided into several steps. The procedure is based on a normal group conversation: for good communication, it is important that the participants don’t all speak at once, which can be confusing. Instead, they should speak one after the other, so that each participant can fully understand what the others are contributing to the discussion. Without realising, we actually behave like this ourselves in conversations: When someone else is talking, we stand back and listen.
After the other participant has finished their contribution for the time being, we wait a short time and only start talking when the same participant or another participant in the conversation doesn’t start to say anything else. If we happen to start talking to someone else at the same time, we stop our attempt, wait a bit, and then try again.
The CSMA/CD process is very similar. First, the station monitors the transmission medium. As long as this is occupied, the monitoring will continue. Only when the medium is free and for a certain time (in interframe spacing), will the station send a data packet. Meanwhile, the transmitter continues to monitor the transmission medium to see if it detects any data collisions. If no other participant tries to send its data via the medium by the end of transmission, and no collision occurs, the transmission has been a success.


Carrier Sense Multiple Access (CSMA)


Ethernet uses a refinement of ALOHA, known as Carrier Sense Multiple Access (CSMA), which improves performance when there is a higher medium utilisation. When a NIC has data to transmit, the NICĀ firstĀ listens to the cable (using a transceiverĀ ) to see if a carrier (signal) is being transmitted by another node. This may be achieved by monitoring whether a current is flowing in the cable (each bit corresponds to 18-20 milliAmps (mA)). The individual bits are sent by encoding them with a 10 (or 100 MHz for Fast Ethernet) clock using Manchester encoding. Data is only sent when no carrier is observed (i.e. no current present) and the physical medium is therefore idle. Any NIC which does not need to transmit, listens to see if other NICs have started to transmit information to it.

However, this alone is unable to prevent two NICs transmitting at the same time. If two NICsĀ simultaneouslyĀ try transmit, then both could see an idle physical medium (i.e. neither will see the other's carrier signal), and both will conclude that no other NIC is currently using the medium. In this case, both will then decide to transmit and aĀ collisionĀ will occur. The collision will result in the corruption of the frame being sent, which will subsequently be discarded by the receiver since a corrupted Ethernet frame will (with a very high probability) not have a valid 32-bit MAC CRCĀ at the end.



Collision Detection (CD)


A second element to the Ethernet access protocol is used to detect when a collision occurs. When there is data waiting to be sent, each transmitting NIC also monitors its own transmission. If it observes a collision (excess current above what it is generating, i.e. > 24 mA for coaxial Ethernet), it stops transmission immediately and instead transmits a 32-bit jam sequence. The purpose of this sequence is to ensure that any other node which may currently be receiving this frame will receive the jam signal in place of the correct 32-bit MAC CRC, this causes the other receivers to discard the frame due to a CRC error.

To ensure that all NICs start to receive a frame before the transmitting NIC has finished sending it, Ethernet defines a minimum frame size (i.e. no frame may have less than 46 bytes of payload). The minimum frame size is related to the distance which the network spans, the type of media being used and the number of repeaters which the signal may have to pass through to reach the furthest part of the LAN. Together these define a value known as theĀ Ethernet Slot Time, corresponding to 512 bit times at 10 Mbps.


When two or more transmitting NICs each detect a corruption of their own data (i.e. a collision), each responds in the same way by transmitting the jam sequence. The following sequence depicts a collision:



At time t=0, a frame is sent on the idle medium by NIC A.



A short time later, NIC B also transmits. (In this case, the medium, as observed by the NIC at B happens to be idle too).



After a period, equal to the propagation delay of the network, the NIC at B detects the other transmission from A, and is aware of a collision, but NIC A has not yet observed that NIC B was also transmitting. B continues to transmit, sending the Ethernet Jam sequence (32 bits).



After one complete round trip propagation time (twice the one way propagation delay), both NICs are aware of the collision. B will shortly cease transmission of the Jam Sequence, however A will continue to transmit a complete Jam Sequence. Finally the cable becomes idle.


How CSMA/CD works?


Step 1:Ā Check if the sender is ready for transmitting data packets.


Step 2:Ā Check if the transmission link is idle?


Sender has to keep on checking if the transmission link/medium is idle. For this it continously senses transmissions from other nodes. Sender sends dummy data on the link.If it does not receive any collision signal, this means the link is idle at the moment.If it senses that the carrier is free and there are no collisions, it sends the data. Otherwise it refrains from sending data.


Step 3:Ā Transmit the data & check for collisions.


Sender transmits its data on the link. CSMA/CD does not use ā€˜acknowledgement’ system. It checks for the successful and unsuccessful transmissions through collision signals. During transmission, if collision signal is received by the node, transmission is stopped. The station then transmits a jam signal onto the link and waits for random time interval before it resends the frame. After some random time, it again attempts to transfer the data and repeats above process.


Step 4:Ā If no collision was detected in propagation, the sender completes its frame transmission and resets the counters.


In summary,Ā CSMA/CD (Carrier Sense Multiple Access/ Collision Detection) is a media-access control method widely used in Ethernet technology/LANs.


Consider a scenario where there are ā€˜n’ stations on a link and all are waiting to transfer data through that channel. In this case all ā€˜n’ stations would want to access the link/channel to transfer their own data. Problem arises when more than one station transmits the data at the moment. In this case, there will be collisions in the data from different stations.

CSMA/CD is one such technique where different stations that follow this protocol agree on some terms and collision detection measures for effective transmission. This protocol decides which station will transmit when so that data reaches the destination without corruption.

 

Please login to reply. Login

Reversion History

Loading...
No reversions found.