标准ACL配置
【实验目的】
掌握标准ACL的配置。
验证配置。
【实验拓扑】
实验拓扑如图1所示。

图1 实验拓扑
设备参数如表所示。
表1 设备参数表
| 设备 | 接口 | IP地址 | 子网掩码 | 默认网关 | 
| R1 | S0/3/0 | 192.168.1.1 | 255.255.255.252 | N/A | 
| Gi0/0/0 | 192.168.2.1 | 255.255.255.0 | N/A | |
| R2 | S0/3/0 | 192.168.1.2 | 255.255.255.252 | N/A | 
| Gi0/0 | 192.168.3.1 | 255.255.255.0 | N/A | |
| PC1 | N/A | 192.168.2.2 | 255.255.255.0 | 192.168.2.1 | 
| PC2 | N/A | 192.168.3.2 | 255.255.255.0 | 192.168.3.1 | 
【实验内容】
1.配置路由协议
(1)R1的基本配置
R1(config)#interface GigabitEthernet0/0
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-if)#no shutdown
R1(config)#interface Serial0/3/0
R1(config-if)#ip address 192.168.1.1 255.255.255.252
R1(config-if)#no shutdown
R1(config)#ip route 192.168.3.0 255.255.255.0 serial 0/3/0
//配置静态路由协议
(2)R2的基本配置
R2(config)#interface GigabitEthernet0/0
R2(config-if)#ip address 192.168.3.1 255.255.255.0
R2(config-if)#no shutdown
R2(config)#interface Serial0/3/0
R2(config-if)#ip address 192.168.1.2 255.255.255.252
R2(config-if)#no shutdown
R2(config)tip route 192.168.2.0 255.255.255.0 serial 0/3/0
静态路由协议具体格式如下:
Router (config-router) #ip route network-address wildcard-mask next-hop
2.验证连通性

3.配置标准ACL
R2的配置如下:
R2(config)#ip access-list standard 50
//启用标准ACL,ACL编号为50
R2(config-std-nacI)#deny 192.168.2.0 0.0.0.255
#禁止192.168.2.0/24访问
R2(config-std-nacl)#permit any
//允许其他任何网段访问
R2(config)#interface serial 0/3/0 R2(config-if)#ip access-group 50 in
//在Se0/3/0接口入方向应用ACL
4.验证连通性
 //配置标准ACL后,PC1无法访问PC2
//配置标准ACL后,PC1无法访问PC2



















