Electronics > Beginners

RS485 vs Ethernet

<< < (6/6)

ve7xen:

--- Quote from: paulca on November 09, 2019, 03:32:47 pm ---
--- Quote from: borjam on November 08, 2019, 09:11:10 am ---However, once switches (which are multi port bridges instead of repeaters) became popular they made full duplex Ethernet possible. And collisions do not exist on full duplex Ethernet.

--- End quote ---

You can still get collisions as switches cannot always handle receiving more than one frame for a single destination on multiple ports.  If you consider a dozen hosts responding to a discovery or broadcast ping.  It comes down to the switch, how many internal channels it has and whether it even has frame buffer space to store any of these packets.  I'm don't believe they emit the collision jamming signal on the receiving ports, I expect they simply drop the unswitchable packets.

Of course it's fairly  easy to fix this with a router that can queue to put the packets into sequence, in the network somewhere, but the circumstances are limited to specific use cases.

--- End quote ---

What you're describing isn't a collision, and CSMA/CD won't / wouldn't detect it anyway. In full-duplex Ethernet there is only one transmitter capable of transmitting on each pair by physical design (or there is echo cancellation in GigE+). This situation can result in a transmit buffer overflow, and will show up in your switch statistics as an output drop. Most switches use a store-and-forward architecture, so every port needs a receive buffer of some sort, and most designs are non-blocking on the backplane, so input drops are basically impossible. Any practical design also requires an output queue length of > 1 to handle the situation where the output port is occupied when a packet arrives for it (very common) and avoid resulting in massive packet loss. These queues don't have to be that large, but many modern switches have multiple MB per port; all modern switches have at least a few MB of (sometimes shared) transmit buffer spread across their ports.

Flow control is a sort of signalling mechanism to tell a transmitter to slow down, but it's not that useful, because of the multipoint nature of Ethernet and that the usual place for buffers to fill is at the output port, so it's non trivial to reflect this back to the input port and not cause delays for other frames destined elsewhere. Likewise a switch will never (and can't, anyway, since it doesn't transmit on its receive lines) create a collision on purpose.

paulca:
I wasn't aware that modern switches had such large buffers.  I do remember on a Cisco course that they used something like write through switching so they didn't "store and forward" persay which would create a frames worth of latency, but started writing to the output port as soon as the input port started receiving (and the destination was determined).

Still a large buffer can result in latency which might be fine on very fast links and non-timing critical protocols, but on slower links and more time sensitive stream based packets it would be better to simply drop packets.  I believe packet switching portions of telephone networks work this way, when never is better than late as users will barely reprieve a packet dropped, but will notice an out of order late one as a chirp.  If the "other end" is likely to drop the packet as it's late, switches can choose to "early drop" as soon as they detect the packet is behind schedule so as to not create bottle necks further along sending out of date packets.

But I studied all this back in like 2002 so it's a bit foggy and things have most certainly moved on.

ve7xen:

--- Quote from: paulca on November 13, 2019, 08:59:33 pm ---I wasn't aware that modern switches had such large buffers.  I do remember on a Cisco course that they used something like write through switching so they didn't "store and forward" persay which would create a frames worth of latency, but started writing to the output port as soon as the input port started receiving (and the destination was determined).
--- End quote ---

Some switches optionally do cut-through switching, where the switch starts forwarding as soon as it's received the destination MAC address, assuming the destination port is known, available, and operating at the same bit rate. This has some issues (for example the switch can't verify the FCS before forwarding, so will propagate errors) and usually isn't enabled by default, but can be useful when minimum latency is the goal. As the bit rates increase, though, the latency advantage decreases too (as frame size stays more or less constant). And since you need to degrade to store-and-forward in any situation you can't use cut-through, it's the lowest common denominator.


--- Quote from: paulca on November 13, 2019, 08:59:33 pm ---Still a large buffer can result in latency which might be fine on very fast links and non-timing critical protocols, but on slower links and more time sensitive stream based packets it would be better to simply drop packets.  I believe packet switching portions of telephone networks work this way, when never is better than late as users will barely reprieve a packet dropped, but will notice an out of order late one as a chirp.  If the "other end" is likely to drop the packet as it's late, switches can choose to "early drop" as soon as they detect the packet is behind schedule so as to not create bottle necks further along sending out of date packets.
--- End quote ---

Yes, this is the so-called 'bufferbloat' problem. The length of buffer is usually configurable for this reason, often based on individual QoS queues, so your realtime traffic will drop very quickly, while bulk traffic can queue as long as you have buffer space, or whatever else is appropriate for your application. Modern Ethernet switches are incredibly flexible, it's pretty amazing what the ASICs are capable of.

This is getting to be very off topic though so I'll leave it at that :).

Navigation

[0] Message Index

[*] Previous page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod