18

I am searching for this answer for quite some time now. Why there is CSMA/CD in LAN but CSMA/CA in WLAN?

The best explanation I could find is "due to extreme ratio in transmitting and receiving power, it is very impractical to transmit data on the same channel. Hence collision avoidance is used". Couldn't get the meaning. Even if you're using two separate channels for transmit and receive, CSMA is used to decide which node will use channel, so no point in dropping CD in place of CA. So this explanation somehow doesn't seem fit.

The only reason I could think of is that if number of nodes are low, hence chances of collision is low, we should use CD, if chances of collision are high, we should use CA. But there isn't a difference of number of users between LAN and WLAN.
If someone could please explain.

19

In a wired CSMA/CD Ethernet environment, it is possible to detect a collision because there are separate TX and RX pairs (using the example of 10BaseT). If a half-duplex 10BaseT NIC sends a frame on the TX pair, but sees that frame is corrupted on the RX pair, the NIC detected a collision.

However, with an 802.11 wireless device, there are no "conductors," just antennas which do not simultaneously transmit and receive. When an 802.11 device is transmitting it cannot in practical terms listen for another signal transmitting at the same time on the same frequency. The reason for this is that RF signal strength drops off very quickly when transmitting.

Even if we built an imaginary WiFi device that could simultaneously receive and transmit, it will only be able to hear a downstream collision if the other device is using a much higher output power (either raw power or through passive/active gain of some sort). Normally its own TX signal will be too strong and "drown" out any other received signal.

So another process was required, resulting in the need for CSMA/CA.

  • 1
    10base-2 and 10base-5 (from the early days of ethernet) do not have TX and RX pairs. Even with 10/100base-T, the hub connecting more than two endpoints would have to add more than one TX for the RX of all the ports. The simple truth is wireless cannot reliably detect collisions because all radios cannot reliably hear each other. – Ricky Beam Sep 1 '14 at 0:02
  • My original post did not mention TX and RX pairs because of bus networks, I simply left it as TX and RX conductors. Bus networks exist by basically allowing all devices to reside on a single circuit. The simple truth is that wireless cannot detect collisions because it can't do so. – YLearn Sep 1 '14 at 3:13
18

Avoidance is used for the very simple fact that every radio ("client") is not necessarily in range of each other. Thus, without the AP coordinating who can talk, distant radios may step on each other because they cannot know the other is transmitting.

  • 4
    THis is the correct answer. For a wireless client to be able to communicate, it only needs to see the AP, not necessarily any other clients. So, if two clients who are out of reach from each other start talking, they would be jamming each others signals at the AP. They would never know about it though, since they can't hear each other. Basically, CSMA/CD works in a broadcast domain. In wireless, the broadcast domain doesn't fully overlap with the physical devices. (Think of it as a venn diagram, any overlap will interfere with the entire other domain.) – JelmerS Aug 31 '14 at 10:12
  • 1
    @JelmerS, sorry, this is a secondary answer. While true, it is not always applicable. The real reason is that even if a wireless device is designed to RX while it is TX, it will not be able to detect a collision because it's TX would be FAR stronger than any other signal it could hear (based on the same EIRP) and "mask" it's ability RX that other signal. In practical terms, a wireless device cannot both TX and RX at the same time. – YLearn Aug 31 '14 at 14:07
  • No, that's just a different way of saying it. While a radio can (and does) receive while transmitting, it would only work for that sender. (by subtracting TX from RX. something every analog modem has done for 20+ years.) Everyone else will hear garbage, or the more powerful, more local, transmitter. – Ricky Beam Aug 31 '14 at 23:56
  • 1
    @RickyBeam, comparing wireless to a wired technology is a fallacy. Most RF is half-duplex. It is designed as half-duplex because it is cheaper/simpler to do so and being full-duplex on the same frequency is not practical. Cell phones work by using frequency pairs, one for TX and one for RX. Most other RF is half-duplex; citizen band, shortwave, FM, AM, many police/fire radios, many military applications, etc. – YLearn Sep 1 '14 at 3:29
  • Upon re-reading, I should also note that CSMA/CA is implemented independently of any mechanism the AP uses to manage "who can talk." This is why problems such as the hidden node problem can also require the implementation of RTS/CTS in addition to CSMA/CA. – YLearn Sep 3 '14 at 3:25
4

EDIT(Based on Ricky's correction):

Below is a excerpt from http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Linux.Wireless.mac.html

CSMA/CA is derived from CSMA/CD (Collision Detection), which is the base of Ethernet. The main difference is the collision avoidance: on a wire, the transceiver has the ability to listen while transmitting and so to detect collisions (with a wire all transmissions have approximately the same strength). But, even if a radio node could listen on the channel while transmitting, the strength of its own transmissions would mask all other signals on the air. So, the protocol can't directly detect collisions like with Ethernet and only tries to avoid them.

The link below is good read on CSMA/CA and also explains how CSMA/CA works:

http://www2.cs.uidaho.edu/~oman/SC&CI/CSMA-CA-collisions_Bonaventure.pdf

  • 1
    Negative. CSMA/CD does not require simultaneous tx/rx. It was designed LONG before full-duplex ethernet ever existed. – Ricky Beam Aug 31 '14 at 9:13
  • Thank you for the catch @RickyBeam. Could you also please then explain how would station back off from transmission if it can't sense the station at the same time of transmission? – vish213 Aug 31 '14 at 12:36
  • I often agree with Ricky, but CSMA/CD being able to both monitor RX and while in the process of TX has nothing to do with full-duplex operation. It is based on having separate TX and RX conductors and a collision is detected when a device is sending a signal on TX while also receiving a signal on RX. While a radio "could" in theory TX and RX at the same time, this is not practically possible...which is why in basic terms it is not possible for a wireless device to TX and RX at the same time. – YLearn Aug 31 '14 at 14:03
  • @YLearn, that's not what he said. And you're reading everything as if twisted pair (or optical) were the only media. CSMA/CD was designed in an era of 10base-2 -- coax cabling. Collisions were detected by current monitoring in early hardware; later (more advanced) hardware subtracts TX from the line to listen for other signals, but that's still not "transmit and receive data at the same time" – Ricky Beam Aug 31 '14 at 23:47
  • @RickyBeam a bus network is basically a network where all devices take part in a single circuit. Same principles apply. As to your comment on current, yes in early hardware if there was current, there was a signal. I never said it could actually use the signal on RX, rather that when such a signal was received while TX this allowed the detection of a collision. – YLearn Sep 1 '14 at 3:08
0

On a wired bus signal losses are fairly small and so it is fairly easy to detect collisions. IIRC coax ethernet does it by looking at the DC level on the line but it would be equally possible to do it by comparing the signal on the bus to the signal you are trying to transmit.

That just doesn't work for radio. Signal loss between transmitter and receiver is massive, tens of DB at least. In the face of the strong outgoing signal it is impractical to detect the incoming signal which is operating in the same frequency spectrum and is massively weaker. This basically rules out collision detection as an approach for wireless systems.

P.S. Twisted pair and fiber Ethenet uses seperate data channels for each direction, so there are no collisions on the wire. A "collision" is detected simply by detecting activity on both channels at once.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.