(三) Prefix-list
功能:
过滤特定路由协议分发的Routes,主要用与BGP.
特性:
与ACL相比,具有相对较强的灵活性。在掩码匹配上,也比较容易理解。
Case Study: Standard Syntax
ip prefix-list {list-name | list-number} [seq number] {deny network/length | permit network/length} [ge ge-length] [le le-length]
no ip prefix-list {list-name | list-number} [seq number] {deny network/length | permit network/length} [ge ge-length] [le le-length]
注:
<1> ip prefix-list使用最长匹配规则。
<2> 如果不指定seq number,则默认为5,且每增加一个条目自动增加5.
即如果你指定第一条目seq number为2,则下一个不指定seq number的条目的seq number自动变为7.
<3>自动增加seq number功能可以用命令:no ip prefix-list sequence-number取消。
<4> length < ge-length < le-length <= 32
<5> ip prefix-list不能与Route Maps的match ip next-hop语句联用;只以与match ip address语句联用。
Case Study: ip prefix-list description
Syntax:
ip prefix-list list-name description text
Case Study: Configuration Example
router bgp 3
no synchronization
neighbor 172.16.1.2 remote-as 3
neighbor 172.16.20.1 remote-as 1
neighbor 172.16.29.1 prefix-list 1 out
no auto-summary
!
ip prefix-list 1 seq 5 deny 192.68.10.0/24
ip prefix-list 1 seq 10 permit 0.0.0.0/32 |