User's Manual

463
ip aspath-list test2 permit _200$
ip aspath-list test2 permit ^100$
ip aspath-list test3 deny _690$
ip aspath-list test3 permit .*
61.5.4 Examples of BGP Route Filtration based on the Interface
The following is the example of the configuration of route filtration based on the interface. It filters the routes
from interface e1/0 through access list “ac1”:
router bgp 122
filter e1/0 in access-list acl
The following example uses access list “filter-network” to filter the network numbers of the routes, and
meanwhile, uses access list “filter-gateway” to filter gateway address of the routes from interface s1/0.
router bgp 100
filter s1/0 in access-list filter-network gateway filter-gateway
The following example: uses prefix list “filter-prefix” to filter the network numbers of the routes, and meanwhile,
use accessing list “filter-gateway” to filter gateway address of routes from all interfaces.
router bgp 100
filter * in prefix-list filter-prefix gateway filter-gateway
61.5.5 Examples of Using Prefix List to Configure Route Filtration
In the following example default route 0.0.0.0/0 is denied.
ip prefix-list abc deny 0.0.0.0/0
The following example: permits routes matching prefix 35.0.0.0/8:
ip prefix-list abc permit 35.0.0.0/8
In the following example, BGP process only accepts prefix with length ranges from /8 to /24:
router bgp
network 101.20.20.0
filter * in prefix max24
!
ip prefix-list max24 seq 5 permit 0.0.0.0/0 ge 8 le 24
!
In the following configuration, the router filters routes from all interfaces, it only accepts routes with prefix from
8 to 24:
router bgp 12
filter * in prefix-list max24
ip prefix-list max24 seq 5 permit 0.0.0.0/0 ge 8 le 24
Here are some other examples of configuration of prefix lists
The following example: permits routes with prefix length no more than 24 in network 192/8:
ip prefix-list abc permit 192.0.0.0/8 le 24
The following example: denies routes with prefix length of more than 25 in network 192/8:
ip prefix-list abc deny 192.0.0.0/8 ge 25
The following example: permits routes with prefix length of more than 8 yet less than 24 in all address space:
ip prefix-list abc permit 0.0.0.0/0 ge 8 le 24
The following example: denies all routes with prefix length of more than 25 in all address space: