O'Reilly logo

Cisco IOS in a Nutshell, 2nd Edition by James Boney

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

match as-path — route-map

Synopsis

match as-path path-list-number
no match as-path path-list-number

Configures

BGP route filtering

Default

None

Description

This command allows you to require that any route in a route map pass an AS path access list. Routes that are permitted by the list undergo further processing. You might use this command to create a route map that modifies routing metrics or changes the routes in some way, depending on the routes’ AS path. These modifications are applied only to routes matching the AS path access list.

Example

The following code filters all routes to be sent to the neighboring router 10.10.1.1 through the AS path list 1. The AS path list is applied in the route map test-as-path, which adds our AS number (300) to all routes that match this list.

route-map test-as-path
  match as-path 1
  set as-path prepend 300
!
ip as-path access-list 1 permit .*
!
router bgp 300
  neighbor 10.10.1.1 route-map set-as-path out

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required