Cisco – Traffic preferring iBGP route over static route

bgpcisco

I have a cisco core switch that is connected directly to our mpls router. It learns about the 172.16.0.0/12 network via iBGP from the mpls router.

We have a lab subnet 172.16.100.0/22 behind a firewall which directly connects to the core switch.

I configured a static route on the core switch for the 172.16.100.0/22 network with the next hop of the firewall.

I cannot ping anything on the 172.16.100.0/22 network from the core switch. The firewall is open so this is not the reason.

However, a traceroute to 172.16.100.253 shows the route being taken via the mpls router.

Is there any reason why the core switch would prefer the iBGP route to 172.16.0.0/12 over the static route to 172.16.100.0/22 ???

Many thanks,

Paul

Best Answer

Based on the limited information you provided, I'd bet that the next hop in your static route isn't reachable (isn't in the routing table). Is the static route to the lab subnet seen in a "show ip route static"?

Would need at least partial configs to troubleshoot more.