Question

Why when I use OpenVPN with sample config file and want to measure performance with netperf UDP_STREAM, I get this error:

$ netperf -H 10.8.0.1 -t UDP_STREAM

MIGRATED UDP STREAM TEST from 0.0.0.0 () port 0 AF_INET to 10.8.0.1 () port 0 AF_INET

send_data: data send error: errno 101

netperf: send_omni: send_data failed: Network is unreachable
Était-ce utile?

La solution 2

It seems that this problem is related to the versions of netperf on server side and on the client side. If in both sides, we use the same version of netperf, this problem can be solved.

Autres conseils

The error in the original question seems to be caused by the interaction between an undocumented 'feature' in netperf and the default interface setup in the openvpn sample config. I'm not sure why the OP was able to solve the problem by changing versions of netperf unless the 'feature' wasn't present in the one they changed to. Nevertheless, here's my explanation of the problem and my solution.

According to this message in the netperf mailing list, the developers of netperf took the liberty of disabling IP routing when running the UDP_STREAM test. What this means is that if you run the UDP_STREAM test between two hosts on the same subnet it will work. But as soon as you try to run it between two hosts on different networks it will fail with the message that the OP reported. This is doubly confusing because this 'feature' is not documented anywhere that I can find, and because all other tests work like normal.

In a default OpenVPN config the adapter is a later 3 tun adapter. Your remote host will be on a different network than your local host. Thus this netperf behavior is triggered and you get errors rather than results.

Fortunately netperf has a command line switch to turn routing back on for the UDP_STREAM test. Add -R 1 on as a test specific option and everything starts to work. For example,

netperf -H 10.8.0.1 -t UDP_STREAM -- -R 1

I haven't tested this with OpenVPN specifically, but I have tested it with routed networks and it fixes the error message for UDP_STREAM tests.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top