访问控制列表acl

  • 格式:doc
  • 大小:481.50 KB
  • 文档页数:4
int vl 10
ip ad 192.168.10.254 255.255.255.0
no sh
int vl 20
ip ad 192.168.20.254 255.255.255.0
no sh
exi
username benet password 123
line vty 0 15
login local
no ip routing
end
3)sw1配置
en
vl da
vl 10
vl 20
exi
conf t
hos sw1
int fa0/10
sw ac vl 10
no sh
int fa0/15
sw ac vl 20
no sh
int vl 1
ip ad 192.168.1.254 255.255.255.0
no sh
access-class1 in
exi
5)分析
5.1配置允许192.168.10.0/24网段只能在在周一至周五的8:30~17:30能够访问R2,将SW1的系统时间设置为周六即不能访问R2。
只有R1能够可以登录SW2,其它PC不能登录。
6)验证
任务二:配置ACL控制服务
实验拓扑图:
1)R1配置
en
access-l 10 deny any
int fa0/1 out
4)分析
在验证FTP时将上面语句应用到接口后无法访问FTP服务器,取消接口应用后可以正常访问FTP。未验证出结果……
5)验证
FTP未验证出结果。
出现的问题及解决方法:
问题1:
解决:
验证总结:
int fa0/1
ip access-g 100 out
ftp未验证出结果:
access-l 101 permit tcp host 192.168.0.1 host 192.168.1.2 eq 21
eccess-l 101 permit tcp host 192.168.0.1 host 192.168.1.2.eq 20
exi
4)sw1 ACL配置
time-range shadow
periodic weekdays 8:30 to 17:30
exi
ip access-l extended test-1
permit tcp 192.168.10.00.0.0.255 host 192.168.20.1 eq www time-range shadow
2、只允许路由器R1可以ping路由器R2,禁止其他所有主机ping路由器R2
3、为SW添加用户名和密码,用户:benet,密码:123,要求只有路由器R1可以登录。
实验拓扑图:
1)r1配置
en
conf t
hos r1
int fa0/0
ip ad 192.168.1.1 255.255.255.0
no sh
exi
ip default-gateway 192.168.1.254
exi
no ip routing
end
2)r2配置
en
conf t
hos r2
int fa0/0
ip ad 192.168.20.1 255.255.255.0
no sh
exi
ip default-gateway 192.168.20.254
permit icmp host 192.168.1.1 host 192.168.20.1 echo
permit host 192.168.1.1
exi
int vlan 20
ip access-g test-1 out
access-l 1 host 192.168.1.1
line vty o 15
实验名称:第六章配置ACL实现公司需求、配置ACL控制服务
实验要求的环境:
硬件环境:cisco交换机4台,pc 4台
软件环境:
需要的软件工具、软件安装包:小凡
实验目的:
1)掌握ACL工作原理
2)掌握配置标准访问控制列表
3)掌握配置扩展访问控制表
实验步骤:
任务一:配置ACL实现公司需求
要求描述:
1、要求VLAN 10中所有主机都可以在工作时间(周一到周五的每天8:30到17:30可以通过IE访问路由器R2,
conf t
int fa0/0
ip ad 192.168.0.1 255.255.255.0
no sh
int fa1/0
ip ad 192.168.1.1 255.255.255.0
no sh
acl访问控制:
access-l 100 permit tcp host 192.168.0.1 host 192.168.1.2 eq www