资源描述:
《ACL和Route-Map中permit-deny对路由过滤的动作.docx》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、ACL和Route-Map中permit,deny对路由过滤的动作此实验讨论route-map中aclpermit和any动作对路由过滤影响。拓扑如图:验证一.R2access-list10permit192.168.4.00.0.0.255access-list10permit192.168.6.00.0.0.255!route-mapkkpermit10matchipaddress10!routereigrp90redistributeospf110metric1000010025511500route-m
2、apkknetwork23.1.1.20.0.0.0noauto-summaryeigrprouter-id1.1.1.1R3R3#shiprouteGatewayoflastresortisnotset 23.0.0.0/24issubnetted,1subnetsC 23.1.1.0isdirectlyconnected,FastEthernet0/1 192.168.4.0/32issubnetted,1subnetsDEX 192.168.4.1[170/307200]via23.1.1.2,
3、01:24:13,FastEthernet0/1 192.168.6.0/32issubnetted,1subnetsDEX 192.168.6.1[170/307200]via23.1.1.2,01:23:50,FastEthernet0/1从R3的路由表可知,Route-map仅仅重分发了192.168.4.0/24和192.168.6.0/24的路由,过滤了其他的路由。Route-map末尾有一条隐含的denyany子句,这个子句拒绝了其他的路由,并不是acl的隐含denyany拒绝掉的。验证二.R2
4、access-list10deny 192.168.4.00.0.0.255access-list10permitany!route-mapkkpermit10matchipaddress10!routereigrp90redistributeospf110metric1000010025511500route-mapkknetwork23.1.1.20.0.0.0noauto-summaryeigrprouter-id1.1.1.1R3R3#shiprouteGatewayoflastresortisnots
5、et 23.0.0.0/24issubnetted,1subnetsC 23.1.1.0isdirectlyconnected,FastEthernet0/1 192.168.5.0/32issubnetted,1subnetsDEX 192.168.5.1[170/307200]via23.1.1.2,00:00:03,FastEthernet0/1 192.168.6.0/32issubnetted,1subnetsDEX 192.168.6.1[170/307200]via23.1.1.2,
6、00:00:03,FastEthernet0/1 192.168.7.0/32issubnetted,1subnetsDEX 192.168.7.1[170/307200]via23.1.1.2,00:00:03,FastEthernet0/1 12.0.0.0/24issubnetted,1subnetsDEX 12.1.1.0[170/307200]via23.1.1.2,00:00:05,FastEthernet0/1从R3的路由表可知,R2的acl由两条语句构成,实际上是由permit子句匹配了
7、192.168.5.0/24和192.168.6.0/24,192.168.7.0/24,12.1.1.0/24四条路由。所以仅仅重分发aclpermit所匹配的路由。验证三R2access-list10deny 192.168.4.00.0.0.255!route-mapkkpermit10
8、route-mapkkdeny10 结果一样matchipaddress10!route-mapkkpermit15!routereigrp90redistributeospf110metric1000010025511
9、500route-mapkknetwork23.1.1.20.0.0.0noauto-summaryeigrprouter-id1.1.1.1R3R3#shiprouteGatewayoflastresortisnotset 23.0.0.0/24issubnetted,1subnetsC 23.1.1.0isdirectlyconnected,FastEthernet0/1