On Sep 13, 2004, at 9:01 AM, Eric Rz wrote:
So at what level in the tcp/ip stack does a collision
get detected?
From
what I understand, if there is a collision on a network segment each
end
will backoff for a randomly chosen time and then retransmit. Is this at
the ethernet, IP, or TCP level?
If you're designing the interface between Layer-2 (Ethernet,
Wi-Fi, what have you ...) and IP, as a rule, the right thing to
do is to pass through packet loss rates in the 1-2% range
to the IP layer. If the Layer-2 sees loss rates significantly
above that on a regular basis, IP applications are known
to not cope well, and so the right thing to do is to make
the Layer-2 appear to have a 1-2% packet loss rate, by
using techniques like retransmission or FEC.
Modern Ethernet (what you buy new from Linksys or Netgear
or Cisco in 2004) is switched, not shared. It achieves 1-2% loss
rates extremely easily. So, stacks usually pass through
the tiny loss rates of switched Ethernet up to the IP layer.
This means that yes, occasionally you will see lost packets
if you a UDP application (UDP is a thin layer on top of IP,
one IP packet to the OS == one UDP packet to an app)
on a local switched Ethernet. I've seen it with real hardware.
Usually, the network is having a burst of traffic, and
something -- probably the receiving network stack --
gives up and throws away a packet. But, its very
rare -- 0.1% or less, if I had to put a number on it.
But if that 0.1% was a NoteOff sent to an Hammond
organ patch, you care :-). Thus, the recovery journal
technology in RTP MIDI.
Shared media wired Ethernet technology got us through the
80's. Which was a good thing :-). But it really is a technology
for the history books now ... its really good history, its good
to know about it because it was such a classic design, but
its not what people mean anymore when they say "wired
Ethernet". All that is left from that era is the bit-field -- the
pattern of bits in the packet -- and the semantics of the bits.
Modern wired Ethernet is switched Ethernet.
---
John Lazzaro
http://www.cs.berkeley.edu/~lazzaro
lazzaro [at] cs [dot] berkeley [dot] edu
---