02-18-2025 02:19 PM
Hi
I have a BGP route on my Nexus switch for 179.217.249.0/24 . Now I want to write a static route for 179.217.249.32/27 but the BGP route is always chosen . Can you guide me how to write correctly this route So that the static route is always selected for the subnet 179.217.249.32/27?
02-18-2025 02:26 PM
static route should be prefered over BGP as it has lower administrative distance.
Are you sure the static route is correct configured?
02-18-2025 02:28 PM
hi But don't forget that the router always chooses the longest match route to forward traffic so if you have a longer BGP prefix it will win over the static route
i find this
02-18-2025 02:29 PM
Both are different prefix so NX-OS must add both into rib' do you see both prefix??
MHM
02-18-2025 02:30 PM
no only see 179.217.249.0/24
02-18-2025 02:33 PM
show ip route 179.217.249.62
via 172.19.32.93, [20/0], 21w6d, bgp-13135, external, tag 43754
02-18-2025 02:36 PM
Then nexus not add static at all.
Can I see how you add static route
MHM
02-18-2025 02:38 PM - edited 02-18-2025 02:40 PM
ip route 179.217.249.32/27 172.16.12.2
02-18-2025 02:35 PM
hi , Where should I look?
02-18-2025 02:41 PM
How yoh add it ?
Under vlan or under vrf or in global ?
If under vlan are yoh sure vlan is UP and add to DB?
MHM
02-18-2025 02:43 PM - edited 02-18-2025 02:48 PM
in global mode also we use default vrf only
02-19-2025 01:41 AM
let me check how we can trouble static in NSK
MHM
02-19-2025 07:46 AM
thank you all
route is working now
ip route clear*
02-19-2025 07:48 AM
you are welcome bro
MHM
02-19-2025 03:41 AM
Hello
Even though the static route will be added to the rtr/sw it will NOT be entered into the route table unless that static route has a valid next-hop address and that next hop address is reachable ( directly or recursively)
So what you are stating suggests the above is the possible route cause of that static route not working
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide