k8snetworkplumbingwg / ovs-cni

Open vSwitch CNI plugin
Apache License 2.0
220 stars 70 forks source link

Can ping but iperf fails #264

Closed niloysh closed 1 year ago

niloysh commented 1 year ago

Setup everything following demo.md. Ping is working fine, but iperf gives 0 Mbps. Also mentioned in #145 but no solution given

phoracek commented 1 year ago

Hello @niloysh, that's surprising. Is iperf workink for you when you run it over a different CNI? For example the default pod network. I'd like to see if this issue is caused by the CNI or other environmental issues.

niloysh commented 1 year ago

Hello @phoracek

Pods have another interface with flannel as the CNI (default pod network). Iperf3 works fine with this interface.

OVS bridges on the nodes are connected using VXLAN overlay as mentioned in demo.md

If pods are in two different nodes - iperf3 fails. However, ping does work. If pods are on the same node, iperf3 works!

There does not seem to be any issue with the VXLAN overlay, as I created separate interfaces on them (not using containers) and iperf3 tests worked fine.

Update: Iperf3 works fine when using we connect OVS bridges using dedicated L2.

niloysh commented 1 year ago

Turns out it was an issue with the MSS in iperf3. Reducing the MSS (using the -M flag in iperf3) fixes the issue. Perhaps someone can shed some light on the the MSS calculation, but the maximum working MSS appears to be 1414.

Screenshot 2023-03-16 at 11 55 10 PM

Update: Specifying MTU parameter equal to 1450 in NetworkAttachmentDefinition object fixes the issue. Create PR #265 to address this.