cisco路由器綜合實驗之二 訪問控制列表的應用(ACL)

 

 

各個設備上的ip地址配置,步驟略
=======================================================================================================
配置路由
R1:
 (config)#ip  route  0.0.0.0 0.0.0.0  192.168.1.254
 ------------------------------------------------------------------------------------------------------
R2:
 (config)#ip  route  0.0.0.0 0.0.0.0  192.168.20.254
=======================================================================================================
配置ACL
SW1:
 創建 vlan 10 和 vlan 20
 將接口 f0/10 加入 vlan 10
   接口 f0/15 加入 vlan 20
 步驟略
 ------------------------------------------------------------------------------------------------------
            (config)#time-range  worktime
 (config-time-range)#periodic  weekdays  8:30  to  17:30
 (config-time-range)#exit

 (config)#access-list 100 permit tcp host 192.168.10.1 host 192.168.20.1 eq 80 time-range worktime
 (config)#access-list 1 permit  host  192.168.1.1

 (config)#int  vlan  10
  (-vlan)#ip  access-group  100  in

      (config)#line  vty  0 4
 (config-line)#password  test
 (config-line)#login
 (config-line)#access-class 1
 ------------------------------------------------------------------------------------------------------
R2:
 (config)#access-list 100 permit tcp host 192.168.10.1 host 192.168.20.1 eq 80
 (config)#access-list 100 permit icmp host 192.168.1.1 host 192.168.20.1 echo
 (config)#int  f0/0
 (config-if)#ip  access-group  100  in
=======================================================================================================
在三層交換機上設置時間,用以驗證時間ACL的作用
SW1:
 #clock  set  9:00:00  1  may  2011  將時間設置爲 2011-5-1 9:00
 
 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章