Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Route-map and prefix-list

Hi Gurus,

Will route-map and prefix-list command work together on bgp ? i tried using filter-list and route-map, they work properly. This is on outgoing.

tia.

1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Silver

Re: Route-map and prefix-list

Hello Jefferson,

Harold has provided the order in which the different filters are combined.

For outgoing the first filter used in your case is the prefix-list, the output of this filter becomes the input of the route-map filter.

The output of the second filter are the prefixes actually advertised to the neighbor.

Hope to help

Giuseppe

7 REPLIES

Re: Route-map and prefix-list

yes it will work

eg..

ip prefix-list default seq 10 permit 0.0.0.0/0

route-map ISP1 permit 10

match ip address prefix-list default

set local-preference 200

router bgp 1

neighbor x.x.x.x remote-as 2

neighbor x.x.x.x route-map ISP1 in

Narayan

New Member

Re: Route-map and prefix-list

Hi Naraya,

what i mean is in the same line.

neighbor x.x.x.x route-map ISP1 out

neighbor x.x.x.x prefix-list SAMPLE out

how bout this?

tnx.

Re: Route-map and prefix-list

yes can be done

Narayan

Cisco Employee

Re: Route-map and prefix-list

Jefferson,

Yes, a route-map and prefix-list can be used in conjunction. Here what the order of operation will be for both inbound and outbound:

Inbound:

route-map

filter-list

prefix-list

distribute-list

Outbound:

distribute-list

prefix-list

filter-list

route-map

Regards

Harold Ritter
Sr. Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México 
Paseo de la Reforma 222 Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México
Hall of Fame Super Silver

Re: Route-map and prefix-list

Hello Jefferson,

Harold has provided the order in which the different filters are combined.

For outgoing the first filter used in your case is the prefix-list, the output of this filter becomes the input of the route-map filter.

The output of the second filter are the prefixes actually advertised to the neighbor.

Hope to help

Giuseppe

Re: Route-map and prefix-list

Hello Harold,

What you mentioned is also mentioned in the BGP FAQ (Q. What is the order of preference of attributes when some or all are applied to one neighbor in BGP?):

http://www.ciscosystems.com/en/US/tech/tk365/technologies_q_and_a_item09186a00800949e8.shtml#one

It also says there that a prefix-list and a distribute-list are mutually exclusive.

I just wanted to take the opportunity to report that in another part of the same BGP FAQ (Q. How can I filter all IP routes advertised to a BGP neighbor except the default route 0.0.0.0/0?):

http://www.ciscosystems.com/en/US/tech/tk365/technologies_q_and_a_item09186a00800949e8.shtml#fil

a different order is specified for inbound.

I think that the order of precedence of filters has changed at some point and not all relevant documentation has been updated.

Kind Regards,

M.

New Member

Re: Route-map and prefix-list

Guys,

Thanks a lot, i've tested it and works well.

Here's my testing.

Outgoing:

prefix-list and route-map

filter-list and route-map

tnx again.

678
Views
20
Helpful
7
Replies