default traffic distribution

Started by defaultuserfoo, November 06, 2022, 07:26:18 AM

Previous topic - Next topic
Hi,

is there some kind of default traffic distribution in place that works to the effect that when, for example, two clients on the LAN are downloading something over the WAN connection, each client receives an even share of the incoming bandwidth?  If so, how does that even work when OPNsense has no information about the maximum bandwidth of the WAN connection?

I'm asking because some ppl are saying that routers do that kind of traffic shaping, and I have difficulties believing that, at least when the router doesn't know what the maximum bandwidth is it can distribute between its clients.

Bandwidth is only throttled when there isn't enough. Routers and other network devices don't commonly use much in the way of out-of-band source quenching. They just start dropping packets which causes the source to follow protocol rules and reduce its sending rate.

Needles to say, Vint Cerf is a genius  :)

Bart...

Thanks!

Is there a particular reason that when I make a test by downloading some large test file from two clients on the LAN, each of them gets half the max bandwidth or does that somehow happen by chance, or is it simply TCP being in automatically adjusting the bandwidth?  Would I use UPD one client and TCP on the other one, would they still share the bandwidth evenly, and what if I used UPD on both?

I'm wondering that the bandwidth is being shared entirely evenly and if there is something else that might cause it other than TCP adjusting so well.

Run a packet trace through Wireshark and see for yourself  8)

Interfaces, Diagnostic, Packet Capture

For more science, run iperf3 sessions from LAN clients against public servers while capturing.
A list is here: https://iperf.fr/iperf-servers.php

Bart...

I don't actually know what the default is in OPN for allocating but I imagine first time, first served for connections.  Hence there is an option to use traffic shaping. Firewall > Shaper.
It's not that easy to tweak for every case but do a search on this forum for shaping or bufferbloat and you should get some hits for how people setup queues, rules and pipes to mitigate for bufferbloat but should give you ideas how to change to your needs if desired.

Quote from: defaultuserfoo on November 06, 2022, 07:26:18 AM
If so, how does that even work when OPNsense has no information about the maximum bandwidth of the WAN connection?
That's simply the magic of TCP at work. If there is no other bottleneck and no client tries to "cheat", the algorithms will automatically use 1/n of the entire capacity distributed to n clients/connections.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Quote from: pmhausen on November 14, 2022, 02:28:54 PM
Quote from: defaultuserfoo on November 06, 2022, 07:26:18 AM
If so, how does that even work when OPNsense has no information about the maximum bandwidth of the WAN connection?
That's simply the magic of TCP at work. If there is no other bottleneck and no client tries to "cheat", the algorithms will automatically use 1/n of the entire capacity distributed to n clients/connections.

Thanks!