tohojo / flent

The FLExible Network Tester.
https://flent.org
Other
431 stars 77 forks source link

How to create two simultaneous tests with different bandwidth in both hosts? #217

Open lealog opened 3 years ago

lealog commented 3 years ago

Hi,

I'm trying to test a scenario where I have two PCs connected to the router on LAN side. 1 PC will create congestion and another PC simulating a Gaming console. I would like to know if flent was any way to create two simultaneous streams with different bandwidths.

Example: PC Congestion will use test rrul_be to try force the Bufferbloat issue. PC Gaming will have a TCP stream with 15Mbps Download and 1Mbps Upload and measuring the latency and jitter.

Any possibility to execute this scenario?

Thanks.

tohojo commented 3 years ago

lealog notifications@github.com writes:

Hi,

I'm trying to test a scenario where I have two PCs connected to the router on LAN side. 1 PC will create congestion and another PC simulating a Gaming console. I would like to know if flent was any way to create two simultaneous streams with different bandwidths.

Example: PC Congestion will use test rrul_be to try force the Bufferbloat issue. PC Gaming will have a TCP stream with 15Mbps Download and 1Mbps Upload and measuring the latency and jitter.

Any possibility to execute this scenario?

There's not really any 'fixed bandwidth' tests like you're describing available in Flent, no. You could perhaps simulate it by putting a shaper on the network interface of the gaming PC enforcing the bandwidth, and then just running a TCP test. The traffic won't look like gaming traffic, but you can get the bandwidth you want, and you can still measure the impact on cross-traffic on that traffic...

lealog commented 3 years ago

The goal is to evaluate and compare different Routers and QOS policies. Any plans to have Flent supporting this type of use cases? Also, could be interesting to have Flent managing different hosts and orchestrate them using a common GUI or CLI.

Unfortunately, I'm not a developer and I'm not able to provide code for some of these features.

tohojo commented 3 years ago

lealog notifications@github.com writes:

The goal is to evaluate and compare different Routers and QOS policies. Any plans to have Flent supporting this type of use cases? Also, could be interesting to have Flent managing different hosts and orchestrate them using a common GUI or CLI.

Well, it would require an underlying test tool that could produce this sort of traffic. I wouldn't be opposed to adding support for such a tool if it materialised, but I am not aware of any either.

Unfortunately, I'm not a developer and I'm not able to provide code for some of these features.

Some orchestration is possible already by a combination of tests with multiple remote endpoints, and remote test runners. It requires a bit of fiddling with the CLI and/or batch files to set up, but it's doable. Extending support for running tests through the GUI would be neat, but unless someone dedicates resources to this I don't think it's likely to happen anytime soon, unfortunately...

lealog commented 3 years ago

Well, it would require an underlying test tool that could produce this sort of traffic. I wouldn't be opposed to adding support for such a tool if it materialised, but I am not aware of any either.

I would say that we can do this using iperf3. Iperf3 can specify the DS and US bandwidth using the option "-b". Does this make sense for you?

Some orchestration is possible already by a combination of tests with multiple remote endpoints, and remote test runners. It requires a bit of fiddling with the CLI and/or batch files to set up, but it's doable. Extending support for running tests through the GUI would be neat, but unless someone dedicates resources to this I don't think it's likely to happen anytime soon, unfortunately...

I would say that supporting this on GUI is a "nice to have" :) Regarding the CLI, how can we do this? Can you share your idea?

tohojo commented 3 years ago

lealog notifications@github.com writes:

Well, it would require an underlying test tool that could produce this sort of traffic. I wouldn't be opposed to adding support for such a tool if it materialised, but I am not aware of any either.

I would say that we can do this using iperf3. Iperf3 can specify the DS and US bandwidth using the option "-b". Does this make sense for you?

The trouble with the iperf UDP tests it that they just send off packets and don't provide any feedback on how much makes it through. You may or may not get a result at the end from the other side at the end of the test, but that can also easily get lost. So while it can generate a base load, this kind of test is not really suitable for graphing data about those flows during the test.

Some orchestration is possible already by a combination of tests with multiple remote endpoints, and remote test runners. It requires a bit of fiddling with the CLI and/or batch files to set up, but it's doable. Extending support for running tests through the GUI would be neat, but unless someone dedicates resources to this I don't think it's likely to happen anytime soon, unfortunately...

I would say that supporting this on GUI is a "nice to have" :) Regarding the CLI, how can we do this? Can you share your idea?

Well, there are two options: Reverse the setup and run the Flent test from the "other side" with different flows going to each of your two test hosts. Or run Flent on one of the two "local" hosts, and use the --remote-host option to execute some of the test runners on the other host (preferably using a dedicated control connection between the two). I've been using the former setup for WiFi tests, but which one is easiest to do really depends on the details of your test network...

flent-users commented 3 years ago

On Thu, Dec 17, 2020 at 3:40 PM Toke Høiland-Jørgensen < notifications@github.com> wrote:

The trouble with the iperf UDP tests it that they just send off packets and don't provide any feedback on how much makes it through. You may or may not get a result at the end from the other side at the end of the test, but that can also easily get lost. So while it can generate a base load, this kind of test is not really suitable for graphing data about those flows during the test.

Iperf3 supports the option --get-server-output which (at least on tcp) provides you the server side view of the stream. I use it to compare sent and received tcp bandwidth on radio links with buffering issues such as 4G networks. Seems quite reliable. Make sure you start the server with the json formatting option. If I remember correctly it provides more details about the test session. But as you say Toke, it does not provide feedback during the test.

If you need feedback on a udp stream while it is running, I would suggest looking into nuttcp. The tcp control session reports back throughput, packet loss, one way delay at each interval (typically every second).

-Erik