實驗目的:
禁止人事部在每天的8:00 to 180 訪問web服務器
禁止財務部星期一到星期五的8:00 to 00:00 訪問FTP服務器
IT部不受限制
大致拓撲圖,如下:
以下均爲第一步操作——實現全網通信
lsw1
sys
vlan batch 10 20 30 100
int e0/0/1
port link-type access
port default vlan 10
int e0/0/2
port link-type access
port default vlan 20
int e0/0/3
port link-type access
port default vlan 30
int g0/0/2
port link-type access
port default vlan 100
int vlan 10
ip add 192.168.1.254 24
int vlan 20
ip add 192.168.2.254 24
int vlan 30
ip add 192.168.3.254 24
int vlan 100
ip add 10.10.10.1 30
ip route-static 0.0.0.0 0.0.0.0 10.10.10.2
AR3
sys
int g0/0/0
ip add 10.10.10.2 30
int g0/0/1
ip add 10.10.10.5 30
ip route-static 192.168.0.0 255.255.252.0 10.10.10.1
ip route-static 99.99.99.9 255.255.255.0 10.10.10.6
圖中顯示爲AR1,我這裏在很久不能夠打開該路由器之後,刪除設備重新進行了連接和配置。
AR2
sys
int g0/0/1
ip add 10.10.10.6 30
int g0/0/2
ip add 99.99.99.254 24
ip route-static 0.0.0.0 0.0.0.0 10.10.10.5
進行通信測試
能夠通信,沒有大問題,然後進行第二步操作——
AR3中
time-range HR_time 8:00 to 18:00 daily
time-range FD-time 8:00 to 19:00 working-day
acl 3000
rule deny tcp source 192.168.1.0 0.0.0.255 destination 99.99.99.10 0 destination-port eq www time-range HR-time
rule deny tcp source 192.168.2.0 0.0.0.255 destination 99.99.99.20 0 destination-port eq www time-range FD-time
rule 12 deny icmp source 192.168.1.0 0.0.0.255 destination 99.99.99.10 0
rule permit ip source any
int g0/0/0
traffic-filter inbound acl 3000
int g0/0/1
traffic-filter outbound acl 3000
最後的過程有點不太清楚,但結果沒有大問題。