-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iperf3 tests need control over bind address to support tests with NAT'd hosts #1476
Comments
Add support for the bind_address parameter to be read from the iperf3.conf file and use it to override bind address interpretation from the test spec. This enables pscheduler throughput tests against hosts that are deployed in NAT environments where their public IP used by clients is different from their local network address. The config provides the local knowledge to use the correct bind address. Proposed fix for perfsonar#1476
Thanks for creating this issue and for the PR. I'm experiencing the same issue, so would also be interested in a resolution for this issue. |
The better way to deal with this is:
|
Thanks @mfeit-internet2 , that's indeed a valid workaround that works. What also works is to add the options However I'd still be interested in a more permanent solution going forward that doesn't require further manual adjustments. |
Thanks Mark. This /etc/hosts based work around looks promising. I'll give
it a try.
One issue with some of our ps builds is that they don't have registered
host names. Fixable but has caused us to favor IP addresses initially for
these cases.
…On Thu, Oct 10, 2024, 10:46 AM Mark Feit ***@***.***> wrote:
The better way to deal with this is:
- Put an entry in the NATted host's /etc/hosts that points the outside
host's name at the inside address (e.g., 10.9.8.7
outside.cloud.example.org).
- Make sure the resolver is configured to query hosts before dns.
- Always refer to the host by its FQDN and never by its outside IP
when configuring tests.
—
Reply to this email directly, view it on GitHub
<#1476 (comment)>,
or unsubscribe
<https:/notifications/unsubscribe-auth/AABO6MNLFOJKTDHWB5FDO3TZ22OOJAVCNFSM6AAAAABPLXX36GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBVGQ3TQMRSGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hi again, perhaps this should go on a separate issue (let me know if you'd like me to open a new one) but since it's very related I'll post here first: There's the same issue affecting owampd, where it will try to bind to the address specified as the destination. Unfortunately in this case the workaround of using /etc/hosts does not seem to work. With that /etc/hosts edit, iperf3 works just fine, and Is this expected? If there isn't and changing the code is required, would you accept a patch that works similarly to the one in this PR, where it's possible to optionally override the listen address for UDP tests? I could look into writing it if you'd like to see a patch. (Having a config option in this sense I think would make sense, but let me know if you have a specific opinion on how this should be done) Thanks! |
Using pscheduler to test throughput against servers running in NAT'd environments, like cloud hosting, requires the test to use the public IP of the instance from the external test participant but use the instance internal (often private) IP from the NAT'd server.
The pscheduler task subcommand and throughput test have some support for specify bind addresses, but these do not get translated to the correct bind behavior when running iperf3.
An easy option is to avoid specifying an iperf3 bind parameter "-B" for command invocations. This causes iperf3 to bind on any interface and allows the test to proceed. Unfortunately, the only why to cause iperf3 to be called in this way is to submit pscheduler thoughput tasks with only a destination host parameter, e.g.
pscheduler task throughput -d <destination>
. These test specifications work to test throughput to and from a NAT'd host but require that the test is submitted from a shell on source host (so that the source address is implied).This works because the code is written to not use the -B bind parameter to iperf3 if there is no source host provided in the test specification, in run_client() and run_server().
This doesn't work with throughput tests specify both a source and destination host. In those cases, the -B parameter is passed to the server and the client iperf3 invocations and will default to the public IP of the NAT'd host. This causes the iperf3 bind to fail and kills the command. The pscheduler task result then reports a timeout and the test fails. Specifying the various bind parameters of the
task
subcommand orthroughput
test doesn't work either because these do not make it through to the iperf3 command construction in a way that makes sense for the NAT'd use-case.Since scheduled tests and third-party tests specify both source and destination hosts in the test specification the existing code prevents these tests from working with hosts that are using NAT. This prevents regular test for hosts in cloud environments.
The text was updated successfully, but these errors were encountered: