实验11 (ACL)访问控制列表及配置

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

实验报告

实验名称实验11访问控制列表及配置

实验拓扑图如下所示:

PC1PC2

F0/0F0/0

10.1.1.2172.16.1.22960

192.168.100.2192.168.100.1

一、对设备连线并进行子网规划和基本配置

(1)R2:

R2(config)#no ip domain lookup

R2(config)#line console 0

R2(config-line)#logging synchronous

R2(config-line)#exec-timeout 0 0

R2(config)#int s0/0/1

R2(config-if)#ip add 192.168.100.1 255.255.255.0

R2(config-if)#no shut

R2(config-if)#int f0/0

R2(config-if)#ip add 10.1.1.1 255.0.0.0

R2(config-if)#no shut

配置RIP 协议

R2(config)#router rip

R2(config-router)#network 192.168.100.0

R2(config-router)#network 10.0.0.0

(2)R3:

R3(config)#int s0/2/1

R3(config-if)#ip add 192.168.100.2 255.255.255.0

R3(config-if)#no shut

R3(config-if)#exit

R3(config)#int f0/0

R3(config-if)#ip add 172.16.1.1 255.255.0.0

R3(config-if)#no shut

配置RIP协议

R2(config)#router rip

R2(config-router)#network 192.168.100.0

R2(config-router)#network 10.0.0.0

PC1 ping PC2

R2#ping 172.16.1.2

Success rate is 100 percent (5/5), round-trip min/avg/max = 12/15/16

PC2 ping PC1

R3#ping 10.1.1.2

Success rate is 100 percent (5/5), round-trip min/avg/max = 12/15/16 ms

二、根据拓扑图,设计标准ACL,首先使得PC1所在的网络不能通过路由器R1访问PC2所在的网络,然后使得PC2所在的网络不能通过路由器R2访问PC1所在的网络。

(1)在R3 上配置标准ACL

R3(config)#access-list 2 deny 10.0.0.0 0.255.255.255

R3(config)#access-list 2 permit any

R3(config)#int f0/0

R3(config-if)#ip access-group 2 out

PC1所在网络不能访问PC2所在网络(不可达)

C:\Documents and Settings\Administrator>ping 172.16.1.2

Pinging 172.16.1.2 with 32 bytes of data:

Reply from 192.168.100.2: Destination net unreachable.

Reply from 192.168.100.2: Destination net unreachable.

Reply from 192.168.100.2: Destination net unreachable.

Reply from 192.168.100.2: Destination net unreachable.

Ping statistics for 172.16.1.2:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 0ms, Average = 0ms

PC2 所在网络不能访问PC1 所在网络(超时)

C:\Documents and Settings\Administrator>ping 10.1.1.2

Pinging 10.1.1.2 with 32 bytes of data:

Request timed out.

Request timed out.

Request timed out.

Request timed out.

Ping statistics for 10.1.1.2:

Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

三、根据拓扑图,设计扩展ACL,在R1路由器上禁止PC2所在网络的http请求和所有的telnet 请求,但仍能互相ping通。

(1)R3关闭ACl

R3(config-if)#no ip access-group 2 out

R3(config-if)#

(2)R3上配置扩展ACL

R3(config)#ip http server

R3(config)#$tcp 172.16.0.0 0.0.255.255 10.0.0.0 0.255.255.255 eq www

R3(config)#access-list 101 deny tcp any anyeq 23

R3(config)#access-list 101 permit ip any any

R3(config)#int f0/0

R3(config-if)#ip access-group 101 in

配置完成后ping一下,应该都是通的。

相关文档
最新文档