I understand that Carrier Sense is essentially the NIC "listening" to the medium for any transmissions, Multiple Access means that multiple devices on the network can "listen" to the medium, and Collision Detection is the procedure it goes through if there is a Frame collision. My question is how does a NIC actually determine if there was a collision? is there a discrepancy in the voltages, or what?

  • 1
    The media matters... Should we assume Cat5e copper connections? – Mike Pennington Oct 23 '14 at 18:23
  • Oh yeah, I'm sorry. Yes UTP cabling. Does the category matter in this case if it's copper based cabling? – user3662222 Oct 23 '14 at 18:24
  • The category only matters in the sense that your cable must support at least 10Mbps Ethernet... that's Cat3 IIRC – Mike Pennington Oct 23 '14 at 18:49

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.


                   Tx                     Tx
  100/full       ----->                 <-----   100/half
  PC        -----------------------------------  Cisco Catalyst Switch


      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): 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 The extension is discarded by the MAC sublayer of the receiving station, as defined in the procedural model in 4.2.9.

  • That link is not "the standard". GigE does not support half-duplex operation. And finally, nobody makes hubs anymore. :-) – Ricky Oct 23 '14 at 19:31
  • 2
    1000BASE-T (802.3ab) does, indeed, support half or full duplex (see grouper.ieee.org/groups/802/3/tutorial/march98/mick_170398.pdf). Unlike 10 or 100 Mb ethernet, which default to half duplex, 1 Gb defaults to full duplex. With 10 Gb ethernet, they finally got rid of half duplex altogether. – Ron Maupin Oct 23 '14 at 20:11
  • 2
    Ricky, at this point your comments have nothing to do with improving my answer. It's time to refocus on what I said. – Mike Pennington Oct 23 '14 at 21:42
  • 1
    All current physical layers for 1000base-X (CX, SX, LX, ZX, and T) are fundamentally full-duplex. No one implements a half-duplex mode. CSMA/CD is, thus, simulated by the transmit and receive functions, where it's implemented at all. – Ricky Oct 23 '14 at 22:24
  • 2
    Simultaneously transmitting and receiving in half duplex is a collision. The tx and rx signals don't physically collide because they are on different pairs; this is a logical collision condition not a physical collision. – Mike Pennington Oct 24 '14 at 1:15

In the olden days (10base-2), a collision was detected by current sensing -- it takes more power (electrical current) when two transmitters step on each other. For the 10/100/1000-baseT specs, it's as simple as looking at the RX pair while transmitting on your TX pair. (or pairs in the case of 1000, but gig-e never does half-duplex.)

Modern (for 10base-X tech) transceivers use echo cancellation to subtract their signal from the wire to listen for other signals.


The MAC or repeater (hub) is is notified of a collision by the PHY

When a MAC is informed of a collision it goes through the collision detected procedure (random backoff).

When a repeater (hub) is informed of a collision it generates a "JAM signal" on all ports to ensure that the collision is detected by the MACs that sent the colliding frames and that other hosts correctly detect the line as busy.

How the phy detects the collision is media type specific. For coaxial ethernet it is based on the DC voltage on the coax https://books.google.co.uk/books?id=MRChaUQr0Q0C&pg=PA54&lpg=PA54&dq=coaxial+ethernet+collision+detection&source=bl&ots=oGaQGcNnkN&sig=OayChWr1zEIc8heoihW6Dm-p8JY&hl=en&sa=X&redir_esc=y#v=onepage&q=coaxial%20ethernet%20collision%20detection&f=false

The common variants of twisted pair and fiber ethernet are full duplex at an electricial level but for compatibility reasons and to allow operation in networks with repeaters (hubs) they needed to be able to operate in a half duplex mode. This is done by treating simultanious activity on the transmit and receive datapaths as a collision.

Note that links running in full duplex mode do not use CSMA/CD, collisions simply can't happen there. At 10Mbps CSMA/CD was the norm. In the early days of 100Mbps CSMA/CD was still used to support hubs (repeaters) but as switches (bridges) took over and autonegotiation matured full duplex became the norm. At 1Gbps half duplex mode exists in the standards but afaict noone ever sold a hub making it kinda pointless. At higher speeds half duplex is not supported at all.

CSMA/CD nowadays is a feature for compatbility with legacy equipment.

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.