I am interested to know if the CSMA/CD protocol is still active in modern Networks and if it is active why and what is his role now?
Switch – Is the CSMA/CD protocol active in modern ethernet networks that use LAN switches? If it is active, does it ever detects a collision
ethernetprotocol-theoryswitch
Related Solutions
Assume you have the following situation...
- PC with the NIC hard-coded to 100Mbps, Full-duplex
- RJ45 cable, pinned EIA-568B (not that the colors in the pinout matter)
- Cisco Catalyst Switch, using autonegotiation (at 100Mbps)
Since the PC's NIC is locked at 100/full, the Cisco's Ethernet autonegotiation fails and it falls back to 100/half. Now there is a duplex mismatch on the line. The Cisco switch uses CSMA/CD for access to the link.
Let's assume the PC and the Cisco both transmit at exactly the same instant; the logical diagram and physical layer diagram show the same behavior from two different perspectives, but the physical layer diagram is most relevant to your question.
LOGICAL DIAGRAM
===============
Tx Tx
100/full -----> <----- 100/half
PC ----------------------------------- Cisco Catalyst Switch
PHYSICAL LAYER PIN DIAGRAM
==========================
PC Cisco Catalyst Switch
100/full 100/half
Tx D1
----->
568B 568B
Pin Signal Pin Signal
1 TX+ D1 --------------------------- 3 RX+ D2
2 TX- D1 --------------------------- 6 RX- D2
3 RX+ D2 --------------------------- 1 TX+ D1
6 RX- D2 --------------------------- 2 TX- D1
<------
Tx D1
In the diagrams above, the PC (full duplex) is on the left and the Cisco Switch (half duplex) is on the right. Both sides transmit (Tx) simultaneously on pins 1 and 2, this pair of pins is called D1.
When the NIC on the switch receives the PC's frame on the D2 pair while the switch is simultaneously transmitting on the D1 pair, the switch registers a collision (answer reference). The collision is only registered on the switch, because it is in half-duplex mode.
Notes about GigabitEthernet:
- Half-duplex is called out in the standardNote 1; however, nobody actually uses half-duplex GigE. This means that GE won't use CSMA/CD
- GE uses all 8 pins in the RJ45 mod plug, and the specific TX / RX pins are allocated dynamically.
End Notes:
Note 1 Quoting IEEE 802.3-2012 4.1 (Italic emphasis mine):
4.1.2.1.2 Reception without contention
In half duplex mode, at an operating speed of 1000 Mb/s, frames may be extended by the transmitting station under the conditions described in 4.2.3.4. The extension is discarded by the MAC sublayer of the receiving station, as defined in the procedural model in 4.2.9.
MACA is broader term that covers any sort of wireless media access control. It encompasses CSMA/CA as well as a number of other protocols.
CSMA/CD and CSMA/CA are very similar. The primary difference between CSMA/CD and CSMA/CA is that CSMA/CD requires that a host be able to both transmit and receive on the medium at the same time.
CSMA/CD was originally used in 802.3 communication because all hosts could see traffic from all other hosts, however most modern 802.3 communication is full duplex and as such does not use CSMA/CD.
CSMA/CA is used in 802.11 communication because physics makes it very difficult or impossible for a device to both transmit and receive at the same time on the same frequency (even if you use a separate transmitter and receiver to attempt this, the proximity of the transmitter to the receiver will tend to "drown out" any other signal).
Neither CSMA/CD nor CSMA/CA make use of RTS/CTS as part of their protocol, they are three entirely separate protocols. However you can use RTS/CTS with either one, although it only really makes sense with CSMA/CA in certain circumstances.
RTS/CTS (or CTS-to-self) is an option in 802.11 for a few reasons. Primarily it is part of a protection mechanism to allow older 802.11 devices and newer 802.11 devices to communicate properly (specifically 802.11b or earlier devices with 802.11g or later devices - many DSSS devices wouldn't recognize OFDM traffic as another 802.11 device). It can also be used to resolve a number of different issues. However due to it's significant impact on 802.11 performance, it is not recommend to use if you can avoid it. CSMA/CA is always used for 802.11 traffic whether you use RTS/CTS or not.
Edit: As requested in the comment, however this will make the answer significantly longer, even keeping the explanation on the simplistic side.
RTS/CTS was originally implemented in old serial devices that used half-duplex communication to determine when data could be sent. When full-duplex serial communication was implemented, RTS/CTS was repurposed to allow serial communications to implement flow control. This RTS/CTS worked by sending a signal over separate conductors than those used to actually transmit the data.
Since 802.11 doesn't have different connectors, it's RTS/CTS is different in that one side sends a RTS frame and waits for a CTS response (which will include an amount of time being reserved). Other stations that hear the CTS are supposed to back off for that period of time to leave the air clear. The major drawback is that RTS/CTS frames, similar to other management frames, must be heard by all stations and are transmitted at the lowest common base data rate; this it typically significantly lower that the maximum data rate (i.e. often this is 1 Mbps when the max data rate today is often 300+ Mbps). This means that each RTS/CTS frame transmitted in the air can take as much time as 300+ data frames.
To reduce this performance impact, 802.11 devices can implement a CTS-to-self mechanism instead, reserving the air for themselves. However this should only be done when used for the purposes of providing legacy support (many 802.11b devices do not recognize 802.11g signalling as 802.11 traffic and this helps prevent them from creating collisions). If you are trying to alleviate hidden node problems (i.e. two or more stations that are able to associate to the same access point, but can't see each other and end up tranmitting at the same time), you need to use full RTS/CTS as you need the CTS to originate from the AP. In addition, both mechanisms (RTS/CTS and CTS-to-self) can introduce performance issues to any neighboring BSS that is exposed to the CTS frames as they will be required to back off as well.
CSMA/CD starts by a device listening to the medium to see if it is clear of other transmissions. If the medium is clear, it will start transmitting and if the medium isn't clear it will back off for a random amount of time and then listen again.
When the device is transmitting, if it receives a signal at the same time, it will trigger the CD part of the process. To resolve the collision, the device immediately stops sending it's data but continues to transmit a "jam signal" to allow all devices to detect the collision and back off for a random amount of time. The device that was transmitting when the collision occurred will also increment a retransmission counter and try the frame again unless it has reached it's maximum retries.
CSMA/CA starts the same as CSMA/CD; a device listens to the medium to see if it is clear. If it is then it will begin transmitting otherwise it will back off a random time and try again. However, as I mentioned earlier, it is not possible for a wireless device to transmit and receive at the same time, so it cannot detect a collision. Then how does a device know if it experienced a collision? It can't and doesn't, hence why it isn't CSMA/CD.
In CSMA/CA the receiving station will send an ACK for received data frames, if the sending station doesn't receive an ACK, it assumes the frame is lost (due to collision, interference, noise, or any other reason) and retransmit. In 802.11 there are often two retransmission counters, one that will cause the next retransmission to use a lower data rate (i.e. higher data rates require better signal quality, so perhaps a frame the fails to transmit at a higher data rate will succeed at a lower data rate) and one for the maximum number of retransmissions.
Well, that is a brief explanation of how they work. Hopefully this is enough to help you understand them a bit more.
Related Topic
- Switch – Clarification about CSMA/CD and Switch Ethernet
- Ethernet – Does Ethernet still use CSMA/CD
- Router – Is the MTU of Ethernet still 1500 Bytes
- Ethernet – Can / Is CSMA/CA used in wired network
- Ethernet – Why does Ethernet use EtherType field to determine what type of packet is in a frame instead of just looking at the packet header
Best Answer
What is your definition of "active"?
If you are talking about is it in common use, then no it isn't. Most modern networks and devices utilize interfaces that are capable of establishing a full-duplex connection. CSMA/CD is not used in full-duplex operation.
However, if by active you are asking if it is present, then the answer is yes. Up through 1000BASE-T, half-duplex operation is supported. CSMA/CD is used for any half-duplex link.