Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

BGP routes (preffered and alternate path too)

Hi

What is Cisco command to display all the BGP routes  not only the routes in current routing table but also other available route and less preferred for a network.

In my case i have configured static routes for a network (172.20.236.0/22) on a router (hostname router22) but with administrative distance as 150. This static route is also redistributed in to BGP.

The reason why 150 is that  another router (hostname router21) which is behind the router22 is receiving this redistributed static route via BGP and also learning the same routes thorough OSPF. OSPF route must be the preferred route path.

Since the cost of OSPF is 110 both the routers (router 22 and router 21) prefer this path and puts it in routing table.

I need to make sure the second preferred path i.e BGP path is available or not using BGP show command.

I will be removing the OSPF configuration before doing that i want to make sure the BGP routes are available to avoid outage.

 

REgards

Logesh

 

7 REPLIES
Hall of Fame Super Blue

LogeshYou can do a "sh ip bgp

Logesh

You can do a "sh ip bgp" to see which routes are in the BGP table.

However be aware that if the static route you configured is not in the IP routing table then it will not be redistributed into BGP.

So if the router you configured the static on has the same route learnt from OSPF and the OSPF route is the one in the IP routing table then until you remove that OSPF route the static route won't be redistributed into BGP.

Jon

New Member

HiWhen i checked the route

Hi

When i checked the route table i can see only the route learnt from OSPF.

My understaing is since i have configured the static route as "ip route 172.23.x.x 255.255.240.0 10.x.x.4 150 tag 300" the OSPF Cost is 110 and hence its preferring OSPF route over the static route which is configured with a cost of 150.

Thanks for your reply

regards

Logesh

yes this is correct, since

yes this is correct, since you are redistributing static to bgp, bgp will only advertise out what is valid (i.e. in the routing table). The static route is not in the routing table therefor will not be redistributed since OSPF route is there - the better route.

However, you could redistribute both ospf and static, but control which prefix's are advertised and only advertise out 172.23.x.x 255.255.240.0 via prefix-list and route-map.

Please rate useful posts & remember to mark any solved questions as answered. Thank you.

Hello Logesh, Use the "show

Hello Logesh,

 

Use the "show ip bgp" command to see the bgp routing table. If you have configured correctly (static route being redistributed is valid) the prefix should be there listed.

 

Hope this helps

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
Hall of Fame Super Blue

BilalIt will only be there if

Bilal

It will only be there if the static route is actually in the IP routing table. If the OSPF route for the same prefix is in the IP routing table then the static will not be redistributed into BGP.

Which route is actually in the IP routing table at the moment is not entirely clear.

Jon

Jon, that's what I said didn

Jon, that's what I said didn't I...?

Please rate useful posts & remember to mark any solved questions as answered. Thank you.
Hall of Fame Super Blue

BilalSorry, i may just have

Bilal

Sorry, i may just have misread your post.

I was reading your answer as if you configure the static route and redistribute then it will automatically work which it may not do because the static route may not be in the IP routing table.

Which on reading your post again seems to be what you are saying as well.

My mistake.

Jon

 

143
Views
0
Helpful
7
Replies
CreatePlease login to create content