实验8 filter-policy过滤路由

  1. 建立物理连接
    1399347-20190707215158905-1985435557.png

  2. RTA,RTB,RTC使能全部接口,转为ripv2,取消自动聚合。
    [RTA-rip-1]display this

    rip 1
    undo summary
    version 2
    network 10.0.0.0
    network 192.168.1.0

    return
    [RTB-rip-1]display this

    rip 1
    undo summary
    version 2
    network 192.168.1.0
    network 192.168.2.0

[RTC-rip-1]display this

rip 1
undo summary
version 2
network 192.168.2.0
network 192.168.3.0

return
[RTA-Serial1/0]rip summary-address 10.0.0.0 23

  1. 配置路由过滤
    [RTB]ip prefix-list abc index 10 deny 10.0.0.0 23
    [RTB]ip prefix-list abc index 20 permit 10.0.0.0 0 less-equal 32

[RTB-rip-1]display ip routing-table

Destinations : 19 Routes : 19

Destination/Mask Proto Pre Cost NextHop Interface
0.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/8 Direct 0 0 127.0.0.1 InLoop0
127.0.0.0/32 Direct 0 0 127.0.0.1 InLoop0
127.0.0.1/32 Direct 0 0 127.0.0.1 InLoop0
127.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0
192.168.1.0/30 Direct 0 0 192.168.1.2 Ser1/0
192.168.1.0/32 Direct 0 0 192.168.1.2 Ser1/0
192.168.1.1/32 Direct 0 0 192.168.1.1 Ser1/0
192.168.1.2/32 Direct 0 0 127.0.0.1 InLoop0
192.168.1.3/32 Direct 0 0 192.168.1.2 Ser1/0
192.168.2.0/30 Direct 0 0 192.168.2.1 Ser2/0
192.168.2.0/32 Direct 0 0 192.168.2.1 Ser2/0
192.168.2.1/32 Direct 0 0 127.0.0.1 InLoop0
192.168.2.2/32 Direct 0 0 192.168.2.2 Ser2/0
192.168.2.3/32 Direct 0 0 192.168.2.1 Ser2/0
192.168.3.0/24 RIP 100 1 192.168.2.2 Ser2/0
224.0.0.0/4 Direct 0 0 0.0.0.0 NULL0
224.0.0.0/24 Direct 0 0 0.0.0.0 NULL0
255.255.255.255/32 Direct 0 0 127.0.0.1 InLoop0

//过滤后,RTB和RTC没有RTA的聚合后的路由

[RTB]display ip prefix-list name abc
Prefix-list: abc
Permitted 7
Denied 7
index: 10 Deny 10.0.0.0/23
index: 20 Permit 0.0.0.0/0 le 32

//RTA周期性发送聚合路由10.0.0.0/23和192.168.1.0/24,所以拒绝和允许是一样的。

转载于:https://www.cnblogs.com/akiz/p/11148063.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值