0

Scott here.

I was thinking about how packet-based protocols, like TCP, avoid conflicting packets. It must've worked somehow because in the early networking days before switches we had hubs, which are comparable to ethernet cables with multiple endpoints. I started thinking about how the TCP protocol would avoid multiple hosts accidentally talking over each other and writing their packets to the wire at the same time. I recently realized I actually don't have a clue how this would work, and I was hoping one of the many networking geniuses of the interwebz would be able to enlighten me. That is unless there is no justice at all and those old solutions were riddled with parity errors and RST commands? I've been looking for a while and can't find anything in the Google machine that helps.

inzig0
  • 1
  • 1
  • 1
  • My name also isn't Scott – inzig0 Sep 29 '22 at 01:16
  • 3
    Collision detection happens at the physical layer, but the transport layer (TCP is a transport protocol) has no idea about collisions. – Ron Maupin Sep 29 '22 at 01:32
  • Quite simply, what you are looking for is the 802.3 Ethernet protocol standard. And the mechanism that handles this is carrier sense multiple access with collision detection. – Appleoddity Sep 29 '22 at 01:57
  • 2
    Read about OSI model layers an protocols on these layers like L1,L2 - ethernet, L3 - ip, L4 - tcp – gapsf Sep 29 '22 at 05:02

1 Answers1

0

Turns out I'm just a little dumb and forgot my OSI model. For anyone else wondering, collision detection is handled by CSMA/CD, part of the L2 stack.

inzig0
  • 1
  • 1
  • 1
  • Actually, it is the hardware (layer-1) that handles CSMA/CD, not in the software (layer-2) part of the network stack. Ethernet is a series of layer-1/-2 protocols, and modern ethernet is switched so there are no collisions. Today, Wi-Fi can have collisions and uses CSMA/CA to try to avoid them, but they are detected and handled in hardware at layer-1. – Ron Maupin Sep 30 '22 at 19:00