cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
11934
Views
6
Helpful
6
Replies

Both together route-map and prefix-list in BGP

wfqk
Level 5
Level 5

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

1 Accepted Solution

Accepted Solutions

Carlos Villagran
Cisco Employee
Cisco Employee

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:

  1. route-map

  2. filter-list

  3. prefix-list, distribute-list

For outbound updates the order of preference is:

  1. filter-list

  2. route-map | unsuppress-map

  3. advertise-map (conditional-advertisement)

  4. prefix-list|distribute-list

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

View solution in original post

6 Replies 6

Carlos Villagran
Cisco Employee
Cisco Employee

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:

  1. route-map

  2. filter-list

  3. prefix-list, distribute-list

For outbound updates the order of preference is:

  1. filter-list

  2. route-map | unsuppress-map

  3. advertise-map (conditional-advertisement)

  4. prefix-list|distribute-list

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

Thank you so much

Hello Carlos

My understanding of the attribute preferance 

Outbound:

Distribute-list  Or Prefix-list

Filter-List

Route-map

Inbound:

reverse from above

res

paul


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

@paul, how/where do you get that? The above link is correct, and I confirmed Carlos is correct by my lab.

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