Open rrajendran17 opened 1 week ago
To resolve the issue of ping not working between VMs in different subnets via a VPC in Kube-OVN, you should ensure that the logical router ports are correctly configured to enable inter-subnet communication. Here are some steps and checks you can perform:
Router Port Configuration: Verify that the logical router ports are correctly set up to connect the subnets. The router-port
configuration is crucial for enabling communication between different subnets by creating logical router ports that connect logical routers. Ensure that the router ports are correctly defined and linked as peers between the subnets [1].
Routing Table Entries: Check the routing table entries for the VPC to ensure that static and policy routes are correctly configured. The handleAddOrUpdateVpc
function manages these routes, and any discrepancies could lead to connectivity issues [2].
Firewall and Security Group Settings: Although not explicitly mentioned in the provided information, ensure that there are no firewall or security group settings that could be blocking inter-subnet traffic.
Logs and Debugging Tools: Use the available logs and debugging tools to diagnose the issue. Commands like kubectl ko nbctl show
, kubectl ko sbctl show
, and kubectl ko trace
can help identify where the connectivity is failing [3].
Single Host Consideration: Since all VMs are on a single host, ensure that the host's network configuration allows for proper routing between the subnets. Sometimes, host-level network settings can interfere with the expected behavior of the overlay network.
By following these steps, you should be able to identify and resolve the issue preventing inter-subnet communication.
To continue talking to Dosu, mention @dosu.
Please provide more details in a readable format, including the VM pod yamls.
@zhangzujian I have changed the format.And attached a yaml file for one of the vms in attachnet.Please let me know if its fine and need more info, vm1-attachnet.tar.gz
Please provide the Pod yamls instead of the VM yaml.
Also, you can execute ip route get <PING_TARGET_IP>
in the VMs to see which route is selected.
@zhangzujian currently my setup in not installed with kubeovn and reprodcued state, I will get back to you with the requested outputs in a couple of days, Thanks
Kube-OVN Version
v1.12.28
Kubernetes Version
v1.29.9
Operation-system/Kernel Version
suse/sle-micro/base-5.5:2.0.4-5.8.105
Description
Install kubeovn using install.sh provided
Check the pods running
2.create vpc
3.create nad attachnet
4.create another nad attachnet2
5.create subnet using attachnet nad and attaching to commonvpc vpc
6.create subnet using attachnet2 nad and attaching to commonvpc vpc
7.kubectl get subnets
8.kubectl ko nbctl show attachnet
9.kubectl ko nbctl show attachnet2
10.Login to ovs container to check bridge interfaces
1.create a vm and attach to attachnet nad.(172.20.0.18/16) 2.create a vm and attach to attachnet nad.(172.20.0.19/16) 3.create a vm and attach to attachnet2 nad(172.30.0.13/16) 4.Ping between 172.20.0.18 to 172.20.0.19 works (same subnet - L2 works) 5.Ping between 172.20.0.18 to 172.30.0.13 fails (different subnet - L3 fails)
Though nbctl shows correct entries for both vm interface and router interface, the ping fails. Is anymore additional config required to achieve this.
Note:This is a single host and all vms are created on the same host.
Steps To Reproduce
1.create a vm and attach to attachnet nad.(172.20.0.18/16) 2.create a vm and attach to attachnet nad.(172.20.0.19/16) 3.create a vm and attach to attachnet2 nad(172.30.0.13/16) 4.Ping between 172.20.0.18 to 172.20.0.19 works (same subnet - L2 works) 5.Ping between 172.20.0.18 to 172.30.0.13 fails (different subnet - L3 fails)
Current Behavior
Ping fails between interfaces of VMs in different subnet via vpc
Expected Behavior
Ping should work between interfaces of VMs in different subnet via vpc.