03-19-2017 12:57 AM - edited 03-05-2019 08:12 AM
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
03-19-2017 05:30 AM
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.
:-)
03-19-2017 08:41 AM
Yes!! Please check if there is any filter applied on 172.31.2.33 "in" direction
03-19-2017 05:32 PM
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
03-19-2017 08:08 PM
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 ?
03-19-2017 08:11 PM
and there is one more question
how can i filter all bgp routes from internal ?
like this ?
sh ip bgp regexp ^/?$
03-19-2017 08:45 PM
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
:-)
03-19-2017 08:50 PM
thinks , but i don't mean to receive filter, i mean filter IBGP routes from all BGP routes that i had received .
03-19-2017 09:03 PM
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 ?
03-19-2017 09:22 PM
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
03-19-2017 10:37 PM
03-19-2017 10:46 PM
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 ?
03-20-2017 05:51 AM
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>
03-20-2017 07:17 PM
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 ?
03-22-2017 04:38 AM
any reply ?
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