学员提问:
三台路由器,R1的s1/0连接R2的s1/1;R2的s1/0连接R3的s1/1.三台路由器的基本配置是这样子的,
R1:s1/0 148.1.1.1/24
L0 1.1.1.1
R2: s1/1 148.1.12/24
L0 2.2.2.2
s1/0 192.168.1.1/24
R3:S1/1 192.168.1.2/24
L0 3.3.3.3
分别在三台路由上起RIP。
R1:
router rip
version 2
network 1.0.0.0
network 148.1.0.0
neighbor 148.1.1.2
no auto-summary
R2:
router rip
version 2
network 2.0.0.0
network 148.1.0.0
network 192.168.1.0
neighbor 192.168.1.2
neighbor 148.1.1.1
no auto-summary
R3:
router rip
version 2
network 3.0.0.0
network 192.168.1.0
neighbor 192.168.1.1
no auto-summary
要在R3上做路由过滤:过滤掉148.1.0.0/24网段,我在R3这样做:
R3(config)#router rip
R3(config-router)#distribute-list 1 in s1/1
R3(config)#access-list 1 deny 148.1.0.0
R3(config)#access-list 1 permit any
按道理在R3的路由表上就没有148的路由了,但是我现在的情况是还有,请问是怎么回事呢?
R3#show ip route
148.1.0.0/24 is subnetted, 1 subnets
R 148.1.1.0 [120/1] via 192.168.1.1, 00:00:24, Serial1/1
捷盈讲师及学员解答:
R3(config)#access-list 1 deny 148.1.0.0
改成
R3(config)#access-list 1 deny 148.1.0.0 0.0.255.255
再试试。

