Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
UDP packets on dual-homed iperf3 server go out the wrong interface #637
Server replies with the first IPv4, while should with the one requested
Server has IPs 192.168.93.141 and 192.168.112.61
Client is running
A possible way is to configure route to client (10.78.243.11) on server preferred source ip 192.168.93.141.
I had to draw myself a picture to see what's going on. But it appears the problem is that outbound UDP traffic from the server isn't going out through the same interface that it came in.
The OP didn't say anything about how routing is set up, but something along the lines of what @dezenxi suggested might be helpful as a workaround.
I'd like to understand why UDP packets went out a different interface. I haven't looked at the code yet, but this does seem wrong or at least non-intuitive. I'm going to say this is a real bug, at least for now.
@afpd: TCP tests work for you, correct? Can you show me the output if
@bmah888 I actually tested it on my setup just a few minutes ago on versions 3.1.3 and the latest 3.3. It is an issue in my setup as well. My setup is simple. I have multiple addresses configured on my server's NIC. I second that it only happens with UDP. TCP works fine here as well.
I'm seeing this issue, as well.
Server hangs until I Ctrl-C
Client hangs until I Ctrl-C
Server's NIC Info
Server's routing table
The initial connection comes in through the
For what it's worth, TCP does work. Both sides are behind a firewall with NAT, and I own the network on both sides, so I can do some tweaking as needed.
Let me know if I can test anything out for you, @bmah888. I'm happy to help get this resolved.
After writing my above comment, I realized that I was accidentally sending the iperf requests to the
It doesn't necessarily fix the issue; however, it does seem to suggest that the OS is prioritizing NICs and could be impacting iperf UDP testing since the UDP test actually receives a request to the server, and then starts a new UDP stream to the client.
Somewhat similar to how Active mode FTP opens up a new data channel after the control channel is established.
Hopefully this sheds some light, but, regardless, let me know if I can test anything out for you.