背景/场景
高级网络管理员指派您创建标准命名 ACL,用于阻止对文件服务器的访问。 应该拒绝来自一个网络的所有客户端和来自另一个网络的一台特定工作站访问该服务器。
第 1 部分: 配置和应用命名的标准 ACL
步骤 1: 在配置并应用 ACL 之前验证连接。
所有三个工作站都应该能够 ping 到 Web 服务器和文件服务器。
步骤 2: 配置命名的标准 ACL。
在 R1 上配置以下命名的 ACL。
R1>en
R1#config
Configuring from terminal, memory, or network [terminal]?
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)# ip access-list standard File_Server_Restrictions
R1(config-std-nacl)# permit host 192.168.20.4
R1(config-std-nacl)# deny any
注:在评分时,ACL 名称区分大小写。
步骤 3: 应用命名的 ACL。
a. 将 ACL 应用于接口 Fast Ethernet 0/1 上的出站流量。
R1(config-std-nacl)#exit
R1(config)#interface F0/1
R1(config-if)#ip access-group File_Server_Restrictions out
b. 保存配置。
R1(config-if)#do copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
第 2 部分: 验证 ACL 实施
步骤 1: 验证 ACL 配置以及在接口上的应用。
使用 show access-lists 命令验证 ACL 配置。 使用 show run 或 show ip interface fastethernet 0/1 命令验证 ACL 是否已正确应用于接口。
R1#show access-list
Standard IP access list File_Server_Restrictions
10 permit host 192.168.20.4
20 deny any
R1#show run
Building configuration...
Current configuration : 890 bytes
!
version 12.3
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
--More--
步骤 2: 验证 ACL 是否正常工作。
所有三个工作站应通过 ping 到 Web 服务器,但是只有 PC1 应该能够 ping 到文件服务器。