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

ip as-path access-list — global

Synopsis

ip as-path access-list access-list {permit | deny} as-regex
no ip as-path access-list access-list {permit | deny} as-regex

Configures

A BGP access list

Default

None

Description

This command allows you to build an access list for BGP autonomous system (AS) paths. These lists can be applied to a neighbor with the filter-list option to the neighbor command. access-list is a number that identifies the list; as-regex is a regular expression that matches AS paths. For more information on valid regular expressions for BGP, see Chapter 10.

Example

The following commands create an AS-path access list that denies (blocks) routes that include AS 111. This access list is then applied to routes that are sent to the BGP neighbor 11.1.1.1.

ip as-path access-list 1 deny _111_

router bgp 120
  network 10.1.0.0
  neighbor 11.1.1.1 remote-as 200
  neighbor 11.1.1.1 filter-list 1 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