【锐捷网络】基于时间的访问控制列表实验

【锐捷网络】基于时间的访问控制列表实验
实验名称

基于时间的访问控制列表

 

实验目的

       掌握基于时间段进行控制的IP访问列表配置。

 

背景描述

    某公司经理最近发现,有些员工在上班时间经常上网浏览与工作无关的网站,影响了工作,因此他通知网络管理员,在网络上进行设置,在上班时间只允许浏览与工作相关的几个网站,禁止访问其它网站。
    本实验以1S2126G交换机和1R2624路由器为例。PC机的IP地址和缺省网关分别为172.16.1.1/24172.16.1.2/24 ,服务器(Server)IP地址和缺省网关分别为160.16.1.1/24160.16.1.2/24 ,路由器的接口F0F1IP地址分别为 172.16.1.2/24160.16.1.2/24

 

实现功能

       基于时间对网络访问进行控制,提高网络的使用效率和安全性。

 

实验拓扑
 
实验设备

    S2126G1台)、R2624(1)

 

实验步骤

 

第一步:在路由器上定义基于时间的访问控制列表
Router(config)#access-list 100 permit ip any host 160.16.1.1      !定义扩展访问列表,允许访问主机160.16.1.1
Router(config)#access-list 100 permit ip any any time-range t1  ! 关联time-range接口t1,允许在规定时间段访问任何网络

 

Router(config)#time-range t1     !定义time-range接口t1 ,即定义时间段
Router(config- time-range)#absolute start 8:00 1 oct 2004 end 18:00 30 dec 2020     !定义绝对时间
Router(config- time-range)#periodic daily 0:00 to 8:00    ! 定义周期性时间段(非上班时间)
Router(config- time-range)#periodic daily 17:00 to 23:59

 

验证测试:验证访问列表和time-range接口配置
Router# show access-lists          !显示所有访问列表配置
Extended IP access list 100
    permit ip any host 160.16.1.1
    permit ip any any

 

Router#show time-range      ! 显示time-range接口配置
time-range entry:t1
   absolute start 08:00 1 October 2004 end 18:00 30 December 2020
   periodic daily 00:00 to 08:00
   periodic daily 17:00 to 23:59

 

第二步:在接口上应用访问列表
Router(config)# interface fastethernet 1     ! 进入接口F1配置模式
Router(config-if)# ip access-group 100 out    ! 在接口F1的出方向上应用访问列表100

 

验证测试:验证接口上应用的访问列表
Router#show ip interface fastEthernet 1
FastEthernet1 is up, line protocol is up
  Internet address is 160.16.1.2/24
  Broadcast address is 255.255.255.255
  Address determined by setup command
  MTU is 1500 bytes
  Helper address is not set
  Directed broadcast forwarding is disabled
  Outgoing access list is 100          !显示在出口上应用了访问列表100
  Inbound  access list is not set
  Proxy ARP is enabled
  Security level is default
  Split horizon is enabled
  ICMP redirects are always sent
  ICMP unreachables are always sent
  ICMP mask replies are never sent
  IP fast switching is enabled
  IP fast switching on the same interface is disabled
  IP multicast fast switching is enabled
  Router Discovery is disabled
  IP output packet accounting is disabled
  IP access violation accounting is disabled
  TCP/IP header compression is disabled
  Policy routing is disabled
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章