Hà Nội: NTT03, Line 1, Thống Nhất Complex, 82 Nguyễn Tuân, Thanh Xuân, Hà Nội. ● HCM: Số 31B, Đường 1, Phường An Phú, Quận 2 (Thủ Đức), TP HCM. ===> Đơn Vị Hàng Đầu Trong Lĩnh Vực Cung Cấp Thiết Bị Security - Network - Wifi - CCTV - Conference - Máy chủ Server - Lưu trữ Storge.
Danh mục sản phẩm

Configure AS-PATH List

Configuration Condition

None

Configure an AS-PATH List

An AS-PATH list is a tool for filtration based on AS numbers. It is used for BGP route filtration. The AS path property of a BGP route records all ASs that the route passes. When BGP advertises a route to a network outside the local AS, it adds the local AS number to the AS path property to record the AS paths that the route passes.

An AS-PATH list contains multiple entries, and the entries are in the OR relation. When a route tries to match an AS-PATH list, it checks the entries following the sequence of configuration. Once the route matches an entry, it passes the filtration of the AS-PATH list.

Table 15-3 Configure an AS-PATH list

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Configure an AS-PATH list.

ip as-path access-list path-list-number { permit | deny } regular-expression

Mandatory.

By default, no AS-PATH list is configured.

An AS-PATH list uses a regular expression to specify a collection of AS properties that meet the requirement. A regular expression consists of some common characters and some metacharacters. Common characters include upper- and lower-case characters and numbers while metacharacters have special meanings, as shown in the following table.

Table 15-4 Meanings of metacharacters in a regular expression

Symbol

Meaning

.

Matches any single character.

*

Matches a sequence which consists of 0 or more bits in the mode.

+

Matches a sequence which consists of 1 or more bits in the mode.

?

Matches a sequence which consists of 0 or 1 bit in the mode.

^

Matches the start of the inputted character string.

$

Matches the end of the inputted character string.

_

Matches commas, brackets, start and end of the inputted character string, and blank spaces.

[]

Matches single characters in a certain range.

-

Separates the end point of a range.