cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1530
Views
0
Helpful
7
Replies

BGP routes (preffered and alternate path too)

lmanavalan
Level 1
Level 1

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 7

Jon Marshall
Hall of Fame
Hall of Fame

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

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 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.

Bilal Nawaz
VIP Alumni
VIP Alumni

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.

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't I...?

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

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

 

Review Cisco Networking products for a $25 gift card