Route-map and prefix-list

Answered Question
Nov 24th, 2008

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.

I have this problem too.
0 votes
Correct Answer by Giuseppe Larosa about 8 years 1 month ago

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

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (5 ratings)
Loading.
royalblues Mon, 11/24/2008 - 01:51

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

jeffersoncbriones Mon, 11/24/2008 - 01:58

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.

Harold Ritter Mon, 11/24/2008 - 05:52

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

Correct Answer
Giuseppe Larosa Mon, 11/24/2008 - 06:10

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

marikakis Mon, 11/24/2008 - 06:13

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.

jeffersoncbriones Mon, 11/24/2008 - 17:07

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.

Actions

This Discussion