Skip to content
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

The next hop of the route received by the switch is incorrect. #9887

Open
hmails opened this issue Feb 24, 2025 · 3 comments
Open

The next hop of the route received by the switch is incorrect. #9887

hmails opened this issue Feb 24, 2025 · 3 comments

Comments

@hmails
Copy link

hmails commented Feb 24, 2025

I created a test environment using Minikube. BGP neighbors have been established between Calico and the switch, and the route 10.2.3.0/24 has been advertised. The route received on the switch is 10.2.3.0/24, and the next hop is 192.168.249.2. 192.168.249.2 is the IP address of the Calico node. The next hop is incorrect. It should be the IP address of the Minikube host, which is 10.5.2.100. Is there a way to change the next hop to 10.5.2.100?

calico node(192.168.249.2,10.2.3.0/24)--snat--10.5.2.100--->switch(route 10.2.3.0/24 nexthop 192.168.249.2)

The creation command is: minikube start --kubernetes-version=v1.30.9 --force --driver='docker' --interactive=true --image-mirror-country='cn' --container-runtime=docker --cni calico

minikube version: v1.35.0
calico version: v3.29.1
kubernetes version: v1.30.9
system:Almalinux 9.4

@caseydavenport
Copy link
Member

@hmails I'm not sure I am following - calico/node should be running on the minikube host.

What does this command show?

kubectl get nodes -o yaml | grep projectcalico.org

^ I would expect this to show the IP address(es) that Calico is bound to (which are configurable)

@hmails hmails closed this as completed Mar 3, 2025
@hmails
Copy link
Author

hmails commented Mar 3, 2025

@hmails I'm not sure I am following - calico/node should be running on the minikube host.

What does this command show?

kubectl get nodes -o yaml | grep projectcalico.org

^ I would expect this to show the IP address(es) that Calico is bound to (which are configurable)

Thank you for replying to the problem I encountered. Below is the execution result of the command.

minikube kubectl -- get nodes -o yaml | grep projectcalico.org
projectcalico.org/IPv4Address: 192.168.49.2/24

@hmails hmails reopened this Mar 3, 2025
@coutinhop
Copy link
Member

@hmails I'm also not sure I fully follow, but could this be as simple as configuring IP autodetection in Calico (https://docs.tigera.io/calico/latest/networking/ipam/ip-autodetection) to the address you need? (either using interface or CIDR matching, for example)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants