一、
1、搭建拓扑图
2、基本配置
AR1:
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 10.1.1.1/24 up up
GigabitEthernet0/0/1 10.1.2.1/24 up up
GigabitEthernet0/0/2 202.100.1.1/24 up up
NULL0 unassigned up up(s)
AR2:
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 11.1.1.1/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 202.100.1.2/24 up up
NULL0 unassigned up up(s)
SW1: sys [Huawei]sys SW1
SW2: sys [Huawei]sys SW2
SW3: sys [Huawei]sys SW3
3、配置静态路由
[AR1]ip route-static 0.0.0.0 0.0.0.0 202.100.1.2
[AR2]ip route-static 0.0.0.0 0.0.0.0 202.100.1.1
4、在R1上配置基本ACL
[AR1]display acl all
Total quantity of nonempty ACL number is 1
Basic ACL 2000, 3 rules
Acl's step is 5
rule 5 deny source 10.1.1.0 0.0.0.255 time-range WORK(Inactive)
rule 10 deny source 10.1.2.100 0
rule 15 permit source 10.1.2.0 0.0.0.255
[AR1-GigabitEthernet0/0/2]traffic-filter outbound acl 2000
测试:10.1.1.0/24 网段内的主机访问 11.1.1.0/24
能,因为作此文档是不在此时间区间
将时间换成17;00会发现ping不通
5、
在 R1 上配置高级 ACL,实现如下需求:
10.1.1.0 网络内的主机不能 ping 10.1.2.0 网络内的 FTP 服务器(Server2:10.1.2.200) 10.1.1.0 网络内的主机只能通过 HTTP 访问公网
AR1:
Acl's step is 5
rule 5 deny icmp source 10.1.1.0 0.0.0.255 destination 10.1.2.200 0 (5 matches)
rule 10 permit ip source 10.1.1.0 0.0.0.255 destination 10.1.2.0 0.0.0.255 (5 m
atches)
rule 15 permit tcp source 10.1.1.0 0.0.0.255 destination-port eq www
rule 20 deny ip (70 matches)
[AR1-GigabitEthernet0/0/0] traffic-filter inbound acl 3000
Ping 10.1.2.200: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
Request timeout!
Request timeout!
Request timeout!
--- 10.1.2.200 ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
PC>ping 10.1.2.14
Ping 10.1.2.14: 32 data bytes, Press Ctrl_C to break
Request timeout!
From 10.1.2.14: bytes=32 seq=2 ttl=127 time=79 ms
From 10.1.2.14: bytes=32 seq=3 ttl=127 time=46 ms
From 10.1.2.14: bytes=32 seq=4 ttl=127 time=63 ms
From 10.1.2.14: bytes=32 seq=5 ttl=127 time=46 ms
--- 10.1.2.14 ping statistics ---
5 packet(s) transmitted
4 packet(s) received
20.00% packet loss
round-trip min/avg/max = 0/58/79 ms
10.1.1.0 网络内的主机能访问 Server2 的 FTP 服务,前提:打开 Server2 的 FTP 服务,创建根目录。
测试: 10.1.1.0 网络内的主机只能通过 HTTP 访问公网。首先要开 Server3 的 WEB 服务,创建 html 文 档。
10.1.1.0 网络内的主机不能通过 FTP 访问公网,也不能 ping 公网。
PC3:
PC>ping 11.1.1.100
Ping 11.1.1.100: 32 data bytes, Press Ctrl_C to break
Request timeout!
Request timeout!
Request timeout!
Request timeout!
Request timeout!
--- 11.1.1.100 ping statistics ---
5 packet(s) transmitted
0 packet(s) received
100.00% packet loss
实验总结:
此次访问控制的拓扑实验,让我明白了它是用来控制文件、文件夹、数据库、网络服务、系统对象等被授权对象的访问权限的一种机制。也让我知道了它可以实现的的功能。分别是:访问控制、用户水平管理、隔离和保护资源。Acl可以提高操作系统、网络环境以及应用程序的安全性和可靠性。