cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3145
Views
0
Helpful
27
Replies

BGP routes select issue

gbcbooksmj
Level 1
Level 1

please help me to explain why bgp choose 172.28.144.5 as the next jump for prefix 10.0.0.0/8

check my attachment

27 Replies 27

Hi

Actually most the prefixes are being learned through that next hop, is possible to share the bgp configuration and route-maps (if they are being applied), thanks. 

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Yes!! Please check if there is any filter applied on 172.31.2.33 "in" direction 

Hello,

Lets go over BGP best path selection to figure out why.

1-Weight, local preference and as-path are the same so next rules.

2- Both origins are IGP so next rules.

3- They have different MEDs but because routes are coming from different AS(9929,4809) , MED will not be compared unless you enter this command bgp always-compare-med.

4- Both routes are external so next rules.

5- IGP metric. If the next hops are directly connected then next rules.

6- BGP prefers the oldest route unless you have configured  bgp best path compare-routerid which in this case, BGP prefers the route coming from neighbor with lowest router ID.

Also pay attention to "r" next to the routes. It is sign of rib-failure. It means those routes are already in the routing table which should not be in good design.

Hope it helps,

Masoud

to @Julio Moisa [@sasha.shinde@gmail.com]  

yes , we have prefix-list on the out direction and route-map on the in direction of neighbor 172.32.2.33 ..   

the important configure is on the route-map i think ,  it set metric value to 10 of all bgp route from neighbor 172.32.2.33. 

to @Masoud Pourshabanian

for the 3 rule, we did not user "bgp always-compare-med.

for the 5 rule, yes, they are all directly connected 

for the 6 rule, i don't know how to check routes live time .  can you guide me ? 

for the "r" tag ,  we have a static route for the 10.0.0.0/8 . 

@ all

did you notice the last attchment , there are two next hob to 172.32.2.33, why ? 

and there is one more question 

how can i filter all bgp routes from internal ? 

like this ? 

sh ip bgp regexp ^/?$ 

Hi

If you can filter any traffic originated or passing through a specific BGP AS you can use AS-PATH filter + Regular expressions, there are many reasons to apply regular expressions, for example I want to receive prefixes originated from the AS 200 only.

ip as-path access-list 1 permit  _200$

route-map FILTER permit 5
match as-path 1

router bgp 500
neighbor 2.2.2.2 route-map FILTER in

Please visit these links:

http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13754-26.html

http://www.cisco.com/c/en/us/td/docs/ios/12_2/termserv/configuration/guide/ftersv_c/tcfaapre.html

https://networklessons.com/bgp/bgp-regular-expressions-examples/

Hope it is useful

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

thinks , but i don't mean to receive filter, i mean filter IBGP routes from all BGP routes that i had received .

BTW , i have a little confuse on bgp command , 

show ip bgp 

show bgp 

clear ip bgp x.x.x.x in

clear ip bgp x.x.x.x soft in

what 's their  different ? 

Hi

show bgp and show ip bgp
This command has the same purpose, show the current bgp peerings.

You can use: show ip bgp summary, in order to see the prefixes, path and connections.

http://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/command/iproute_bgp-xe-3se-3850-cr-book/iproute_bgp-xe-3se-3850-cr-book_chapter_0100.html#wp1583714062

clear ip bgp x.x.x.x in
This command is used as a hard refresh to update the inbound entries from a specific neighbor, it will clean the entire RIB for Inbound traffic, it will reset the neighborship.  

clear ip bgp x.x.x.x soft in
This command is used as a soft refresh for inbound traffic, it can be applied and it will not impact the communication.

This link could be useful:

https://learningnetwork.cisco.com/thread/44961




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

thanks guys 

and what about this pic ,  what is the difference with the red line

which present the total of bgp routes ?

in the previous post , i still have two question haven't get answer,

1.did you notice the last attchment , there are two next hob to 172.32.2.33, why ? 

2.how to check bgp route age ? 

Hi

As mentioned by Masoud if you have enabled inbound soft configuration under the BGP process, you wil have 2 copies, one of the will marked as received-only.

Try to verify the age using the routing table:

show ip route <prefix>




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

thanks 

i think

show ip route <prefix> 

will only show routes which has insert into route tables, but there might have more than one bgp routes received ,  how can we check these bgp routes age ? 

any reply  ?

Review Cisco Networking for a $25 gift card