IP AS-Path Access List
NX-OSIP AS-path access lists define ordered permit/deny rules that match the AS_PATH attribute of BGP routes using regular expressions. Each entry carries a sequence number, an action, and a regular expression, and the list is evaluated in sequence order. AS-path access lists are referenced from route map match clauses (match as-path and match as-number as-path-list) to implement AS-path based routing policies such as filtering routes originated by or transiting a specific autonomous system.
Diagram
Section titled “Diagram”Classes
Section titled “Classes”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| devices | List | devices | No | |
| device_groups | List | device_groups | No | |
| global | Class | global | No | |
| templates | List | templates | No |
devices (nxos)
Section titled “devices (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
device_groups (nxos)
Section titled “device_groups (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
global (nxos)
Section titled “global (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
templates (nxos)
Section titled “templates (nxos)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| configuration | Class | configuration | No |
configuration (nxos.devices)
Section titled “configuration (nxos.devices)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| ip_ | List | ip_ | No |
ip_as_path_access_lists (nxos.devices.configuration)
Section titled “ip_as_path_access_lists (nxos.devices.configuration)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| name | String | Yes | ||
| entries | List | entries | No |
entries (nxos.devices.configuration.ip_as_path_access_lists)
Section titled “entries (nxos.devices.configuration.ip_as_path_access_lists)”| Name | Type | Constraint | Mandatory | Default Value |
|---|---|---|---|---|
| seq | Integer | min: 1, max: 4294967294 | Yes | |
| action | Choice | permit, deny | No | |
| regex | String | No |
Examples
Section titled “Examples”Example 1: AS-path access list denying routes that traverse a specific AS
nxos: devices: - name: BORDER-LEAF1 configuration: ip_as_path_access_lists: - name: ASPATH-DENY-65110 entries: - seq: 10 action: deny regex: "_65110_" - seq: 20 action: permit regex: ".*"Example 2: AS-path access lists referenced from a route map
nxos: devices: - name: BORDER-LEAF1 configuration: ip_as_path_access_lists: - name: ASPATH-LOCAL entries: - seq: 10 action: permit regex: "^$" - name: ASPATH-PEER-65200 entries: - seq: 10 action: permit regex: "^65200_" route_maps: - name: RM-EXPORT entries: - order: 10 action: permit match_as_path: - ASPATH-LOCAL - ASPATH-PEER-65200