Remix.run Logo
gerdesj 4 hours ago

I think you are confusing network layers and their functionality.

"CSMA is no longer necessary on Ethernet today because all modern connections are point-to-point with only two "hosts" per channel."

Ethernet really isn't ptp. You will have a switch at home (perhaps in your router) with more than two ports on it. At layer 1 or 2 how do you mediate your traffic, without CSMA? Take a single switch with n ports on it, where n>2. How do you mediate ethernet traffic without CSMA - its how the actual electrical signals are mediated?

"Ethernet connections have both ends both transmitting and receiving AT THE SAME TIME ON THE SAME WIRES."

That's full duplex as opposed to half duplex.

Nagle's algo has nothing to do with all that messy layer 1/2 stuff but is at the TCP layer and is an attempt to batch small packets into fewer larger ones for a small gain in efficiency. It is one of many optimisations at the TCP layer, such as Jumbo Frames and mini Jumbo Frames and much more.

anonymousiam 3 hours ago | parent | next [-]

It's P2P as far as the physical layer (L1) is concerned.

Usually, full duplex requires two separate channels. The introduction of a hybrid on each end allows the use of the same channel at the same time.

Some progress has been made in doing the same thing with radio links, but it's harder.

Nagle's algorithm is somewhat intertwined with the backoff timer in the sense that it prevents transmitting a packet until some condition is met. IIRC, setting the TCP_NODELAY flag will also disable the backoff timer, at least this is true in the case of TCP/IP over AX25.

AnthonyMouse 2 hours ago | parent | next [-]

> It's P2P as far as the physical layer (L1) is concerned.

Only in the sense that the L1 "peer" is the switch. As soon as the switch goes to forward the packet, if ports 2 and 3 are both sending to port 1 at 1Gbps and port 1 is a 1Gbps port, 2Gbps won't fit and something's got to give.

mikepurvis an hour ago | parent [-]

Right but the switch has internal buffers and ability to queue those packets or apply backpressure. Resolving at that level is a very different matter from an electrical collision at L1.

AnthonyMouse an hour ago | parent [-]

Not as far as TCP is concerned it isn't. You sent the network a packet and it had to throw it away because something else sent packets at the same time. It doesn't care whether the reason was an electrical collision or not. A buffer is just a funny looking wire.

gerdesj 3 hours ago | parent | prev [-]

Sorry?

Ethernet has had the concept of full duplex for several decades and I have no idea what you mean by: "hybrid on each end allows the use of the same channel at the same time."

The physical electrical connections between a series of ethernet network ports (switch or end point - it doesn't matter) are mediated by CSMA.

No idea why you are mentioning radios. That's another medium.

switchbak 3 hours ago | parent | next [-]

My understanding is that no one used hubs anymore, so your collision domain goes from a number of machines on a hub to a dedicated channel between the switch and the machine. There obviously won’t be collisions if you’re the only one talking and you’re able to do full duplex communications without issue.

Dylan16807 3 hours ago | parent | prev [-]

> Ethernet has had the concept of full duplex for several decades and I have no idea what you mean by: "hybrid on each end allows the use of the same channel at the same time."

Gigabit (and faster) is able to do full duplex without needing separate wires in each direction. That's the distinction they're making.

> The physical electrical connections between a series of ethernet network ports (switch or end point - it doesn't matter) are mediated by CSMA.

Not in a modern network, where there's no such thing as a wired collision.

> Take a single switch with n ports on it, where n>2. How do you mediate ethernet traffic without CSMA - its how the actual electrical signals are mediated?

Switches are not hubs. Switches have a separate receiver for each port, and each receiver is attached to one sender.

saltcured 2 hours ago | parent | prev [-]

In modern ethernet, there is also flow-control via the PAUSE frame. This is not for collisions at the media level, but you might think of it as preventing collisions at the buffer level. It allows the receiver to inform the sender to slow down, rather than just dropping frames when its buffers are full.

toast0 35 minutes ago | parent [-]

At least in networks I've used, it's better for buffers to overflow than to use PAUSE.

Too many switches will get a PAUSE frame from port X and send it to all the ports that send packets destined for port X. Then those ports stop sending all traffic for a while.

About the only useful thing is if you can see PAUSE counters from your switch, you can tell a host is unhealthy from the switch whereas inbound packet overflows on the host might not be monitored... or whatever is making the host slow to handle packets might also delay monitoring.