cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
492
Views
2
Helpful
14
Replies

STATIC ROUTING AND BGP

shaahin13631363
Level 1
Level 1

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?

14 Replies 14

@shaahin13631363 

  static route should be prefered over BGP as it has lower administrative distance. 

Are you sure the static route is correct configured?  

shaahin13631363
Level 1
Level 1

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 

Both are different prefix so NX-OS must add both into rib' do you see both prefix??

MHM

no only see 179.217.249.0/24

show ip route 179.217.249.62 

via 172.19.32.93, [20/0], 21w6d, bgp-13135, external, tag 43754

Then nexus not add static at all.

Can I see how you add static route

MHM

ip route 179.217.249.32/27 172.16.12.2

hi , Where should I look?

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

in global mode also we use default vrf only

let me check how we can trouble static in NSK 

MHM

thank you all

route is working now

ip route clear*

you are welcome bro 

MHM

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


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul