ACL关于时间的配置

来源:百度知道 编辑:UC知道 时间:2024/06/07 17:25:59
比如我要在2811的路由上做个扩展ACL
只允许在早8点-12点 下午14-19点可以访问FTP啊HTTP啊什么的 (端口号忘了)
大家会意吧。一会我用小凡试一试。可以的话追加50分。
在线等!

1.先校正路由器的时钟
clock set hh:mm:ss date month year or clock set hh:mm:ss date month date year 设置系统时钟
clock update-calendar 依据当前系统时钟设置更新路由器实时时钟
2.再设定时间范围命令
time-range time-tange-name
3.定义周期,重复使用的时间范围
periodic days-of-the week hh:mm to hh:mm
要是每天的8点到12点就用
periodic daily 8:00 to 12:00
4.与ACL绑定
access-list 101 deny tcp 源地址 通配符 目的地址 通配符 eq ftp time-range 时间范围名字
不用记端口号,直接在eq 后面写协议名称
5.加入访问列表
ip access-group 101 in

我是菜鸟,翻了下资料,顺便学习了下.呵呵
我用的packet tracer 5.0 模拟器 ,没有时间范围的功能,小凡可以吗?

time-range employee-time
periodic weekdays 8:00 to 12:00
periodic weekdays 14:00 to 19:00
exit
access-list 100 permit tcp 192.168.1.0 0.0.0.255(允许访问ftp的网段) host 202.21.20.1 eq ftp (ftp可以改输入端口号)time-range em-ployee-time
access-list 100 deny ip any any
interface s 0/0
ip access-group101 out

int f0
ip access-group 101 in
time-range block
periodic weekend 8:00 to 12:00周末