EqLlyHJ5w6,694hQRgLWm

华三实验大全之BGP过滤控制---Filter-policy

来源:济南磐龙笔记本交换机维修作者:济南磐龙华三路由器维修网址:http://www.pldtwx.com


华三实验大全之BGP过滤控制---Filter-policy


实验名称:BGP过滤控制---filter-policy

实验目的:

R1把R3上的3.3.3.3过滤掉

实验拓扑:






[R1-bgp]display bgp routing-table


Total Number of Routes: 4


BGP Local router ID is 1.1.1.1

Status codes: * - valid, > - best, d - damped,

              h - history,  i - internal, s - suppressed, S - Stale

              Origin : i - IGP, e - EGP, ? - incomplete

    Network            NextHop         MED        LocPrf     PrefVal Path/Ogn


*>  1.1.1.1/32         0.0.0.0         0                     0       i

*>  2.2.2.2/32         192.168.1.2     0                     0       200i

*>  3.3.3.3/32         192.168.1.2                           0       200i

*>  172.16.1.1/32      192.168.1.2                           0       200i




[R1]bgp 100

[R1-bgp]filter-policy ip-prefix 1 import

[R1]ip ip-prefix 1 index 10 deny 3.3.3.3 32

[R1]ip ip-prefix 1 此处还要一个命令,相当与允许所有。下面有!!



[R1]display bgp routing-table              


Total Number of Routes: 1


BGP Local router ID is 1.1.1.1

Status codes: * - valid, > - best, d - damped,

              h - history,  i - internal, s - suppressed, S - Stale

              Origin : i - IGP, e - EGP, ? - incomplete

    Network            NextHop         MED        LocPrf     PrefVal Path/Ogn


*> 1.1.1.1/32         0.0.0.0         0                     0       i


为什么只拒绝了3.3.3.3的,2.2.2.2和172.16.1.1的也被拒绝了呢?




下面两个命令是一样的!我用的上面的命令!

[R1]ip ip-prefix 1 permit 0.0.0.0 0 greater-equal 0 less-equal 32

[R1]ip ip-prefix 1 index 20 permit 0.0.0.0 0 greater-equal 0 less-equal 32





EqLlyHJ5w6