03-31-2016 10:40 AM - edited 03-08-2019 05:10 AM
Hi We put two commands together 1 and 2 under one BGP. What is final effect? Is it useful? Thank you
neighbor 122.102.10.6 prefix-list Aggregate out -------- 1
neighbor 122.102.10.6 route-map routerD-out out -------- 2
ip prefix-list Aggregate permit 121.10.0.0/19
!
ip route 121.10.0.0 255.255.224.0 null0
!
route-map routerD-out permit 10
match ip address prefix-list Aggregate
set metric 10
route-map routerD-out permit 20
Solved! Go to Solution.
03-31-2016 11:08 AM
Hi!
It will advertise route 121.10.0.0/19 with metric of 10 and every other route with it respective metric, prefix-list in the BGP configuration will be ignored since the order of preference will favor route-maps.
Refer to this cisco link:
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/5816-bgpfaq-5816.html#one
Hope it helps, best regards!
JC
Q. What is the order of preference of attributes when some or all are applied to one neighbor in BGP?
A. The order of preference varies based on whether the attributes are applied for inbound updates or outbound updates.
For inbound updates the order of preference is:
route-map
filter-list
prefix-list, distribute-list
For outbound updates the order of preference is:
filter-list
route-map | unsuppress-map
advertise-map (conditional-advertisement)
prefix-list|distribute-list
ORF prefix-list (a prefix-list the neighbor sends us)
Note: The attributes prefix-list and distribute-list are mutually exclusive, and only one command (neighbor prefix-list or neighbor distribute-list) can be applied to each inbound or outbound direction for a particular neighbor.
03-31-2016 11:08 AM
Hi!
It will advertise route 121.10.0.0/19 with metric of 10 and every other route with it respective metric, prefix-list in the BGP configuration will be ignored since the order of preference will favor route-maps.
Refer to this cisco link:
http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/5816-bgpfaq-5816.html#one
Hope it helps, best regards!
JC
Q. What is the order of preference of attributes when some or all are applied to one neighbor in BGP?
A. The order of preference varies based on whether the attributes are applied for inbound updates or outbound updates.
For inbound updates the order of preference is:
route-map
filter-list
prefix-list, distribute-list
For outbound updates the order of preference is:
filter-list
route-map | unsuppress-map
advertise-map (conditional-advertisement)
prefix-list|distribute-list
ORF prefix-list (a prefix-list the neighbor sends us)
Note: The attributes prefix-list and distribute-list are mutually exclusive, and only one command (neighbor prefix-list or neighbor distribute-list) can be applied to each inbound or outbound direction for a particular neighbor.
03-31-2016 01:01 PM
Thank you so much
03-31-2016 03:24 PM
Hello Carlos
My understanding of the attribute preferance
Outbound:
Distribute-list Or Prefix-list
Filter-List
Route-map
Inbound:
reverse from above
res
paul
03-31-2016 04:05 PM
@paul, how/where do you get that? The above link is correct, and I confirmed Carlos is correct by my lab.
12-14-2018 12:36 PM
Hi,
The processing order seems different for IOS XE:
Peter
12-04-2020 05:48 AM
i tested this and order of preference not worked when same prefix-list used
router bgp 65001
bgp log-neighbor-changes
network 172.16.0.0 mask 255.255.255.0
network 172.16.1.10 mask 255.255.255.255
network 172.16.10.0 mask 255.255.255.0
neighbor 10.20.20.1 remote-as 23923
neighbor 10.20.20.1 send-community
neighbor 10.20.20.1 prefix-list CE-OUT out
neighbor 10.20.20.1 route-map CE-OUT out
!
ip prefix-list CE-OUT seq 10 permit 172.16.0.0/24
ip prefix-list CE-OUT seq 20 permit 172.16.10.0/24
!
ip prefix-list CEOUT seq 20 permit 172.16.1.10/32
!
route-map CE-OUT permit 10
match ip address prefix-list CEOUT
set community 65001:65001
!
route-map CE-OUT permit 20
match ip address prefix-list CE-OUT
CE1#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*> 10.20.20.4/30 10.20.20.1 0 23923 ?
*> 10.20.20.8/30 10.20.20.1 0 23923 i
*> 172.16.0.0/24 0.0.0.0 0 32768 i
*> 172.16.1.0/24 10.20.20.1 0 23923 23923 i
*> 172.16.1.10/32 0.0.0.0 0 32768 i
*> 172.16.3.0/24 10.20.20.1 0 23923 23923 i
*> 172.16.10.0/24 0.0.0.0 0 32768 i
CE1#show ip bgp neighbors 10.20.20.1 advertised-routes
Network Next Hop Metric LocPrf Weight Path
*> 172.16.0.0/24 0.0.0.0 0 32768 i
*> 172.16.10.0/24 0.0.0.0 0 32768 i
as per my current understanding 172.16.1.10/32 this prefix should advertise but its not advertising, when removed neighbor 10.20.20.1 prefix-list CE-OUT then its working as expected.
there maybe one logic about this situation, anyone help me to understand this issue
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