Information Technology Reference
In-Depth Information
Matching a Portion of 172.16.1.0 255.255.255.0
Example 4-8
ip prefix-list range-3 permit 172.16.1.0/24 ge 25 le 31
!
access-list 100 permit ip 172.16.1.0 0.0.0.255 255.255.255.128 0.0.0.126
Note that 172.16.1.0/24 is not in the range, nor are all the /32s. The matched ranges include
all the following prefixes:
Two /25s —172.16.1.0/25, 172.16.1.128/25
Four /26s —172.16.1.0/26, 172.16.1.64/26, ..., 172.16.1.192/26
Eight /27s —172.16.1.0/27, 172.16.1.32/27, ..., 172.16.1.224/27
16 /28s —172.16.1.0/28, 172.16.1.16/28, ..., 172.16.1.240/28
32 /29s —172.16.1.0/29, 172.16.1.8/29, ..., 172.16.1.248/29
64 /30s —172.16.1.0/30, 172.16.1.4/30, ..., 172.16.1.252/30
128 /31s —172.16.1.0/31, 172.16.1.2/31, ..., 172.16.1.254/31
Table 4-8 shows more examples of prefix lists.
Table 4-8 Additional Examples of Prefix Lists
Prefix List
What It Matches
0.0.0.0/0
Default network
0.0.0.0/0 le 32
Any address that has a length between 0 and 32 bits, inclusive
AS Path Lists
AS path filters are used to filter the BGP AS_PATH attribute. The attribute pattern is defined
by a regular expression string, either permitted or denied per the list's action. With regular
expressions and AS path filters, you can build complex BGP policies.
The AS path list is defined by the ip as-path access-list command. The access-list-number
is an integer from 1 to 500 that represents the list in the global configuration:
ip as-path access-list access-list-number {permit | deny} as-regular-expression
The filter can be applied in a BGP neighbor command using a filter list or in a route map
(discussed in the later section “Route Maps”). Example 4-9 shows the use of an AS path
filter to allow incoming routes from peer 192.168.1.1 that are only originated in AS 100.
Example 4-9
Path Filter to Permit Only Routes Originated from AS 100
neighbor 192.168.1.1 filter-list 1 in
!
ip as-path access-list 1 permit _100$
Search WWH ::




Custom Search