上網(wǎng)行為管理器,功能很強大,限速只是很簡單的入門功能而已,最重要的是,能審計用戶的上網(wǎng)行為,甚至能監(jiān)測員工的聊天記錄,并且方便地存儲到內(nèi)置硬盤,或者網(wǎng)絡(luò)中的其他服務(wù)器。 今天我們要說的可不是上網(wǎng)行為管理器,要實現(xiàn)對上網(wǎng)用戶的限速,根本不用上網(wǎng)行為管理器,正如殺雞不用牛刀一樣。 今天的任務(wù)是,利用交換機的ACL,限制VLAN的上網(wǎng)速率,且只限制工作時間的網(wǎng)速,簡易拓?fù)鋱D如下所示: 上圖中,AR1表示路由器,借用LoopBack0來模擬一下互聯(lián)網(wǎng)。 一、接入交換機LSW2的配置:vlan batch 11 to 12 # interface Ethernet0/0/1 port link-type access port default vlan 11 # interface Ethernet0/0/2 port link-type access port default vlan 12 # interface Ethernet0/0/3 port link-type trunk port trunk allow-pass vlan all 二、路由器AR1的配置:配置子接口終結(jié)VLAN interface GigabitEthernet0/0/0.1 dot1q termination vid 11 ip address 192.168.11.2 255.255.255.0 arp broadcast enable # interface GigabitEthernet0/0/0.2 dot1q termination vid 12 ip address 192.168.12.2 255.255.255.0 arp broadcast enable # 配置LoopBack0的IP地址,模擬互聯(lián)網(wǎng) interface LoopBack0 ip address 1.1.1.1 255.255.255.255 # 配置OSPF ospf 1 area 0.0.0.0 network 1.1.1.1 0.0.0.0 network 192.168.11.2 0.0.0.0 network 192.168.12.2 0.0.0.0 三、本文的關(guān)鍵在于核心交換機LSW1的配置:vlan batch 11 to 12 # dhcp enable # interface Vlanif11 ip address 192.168.11.1 255.255.255.0 dhcp select global # interface Vlanif12 ip address 192.168.12.1 255.255.255.0 dhcp select global # interface GigabitEthernet0/0/1 port link-type trunk port trunk allow-pass vlan all # interface GigabitEthernet0/0/2 port link-type trunk port trunk allow-pass vlan all # ip pool vlan11 gateway-list 192.168.11.1 network 192.168.11.0 mask 255.255.255.0 excluded-ip-address 192.168.11.2 192.168.11.20 dns-list 114.114.114.114 # ip pool vlan12 gateway-list 192.168.12.1 network 192.168.12.0 mask 255.255.255.0 excluded-ip-address 192.168.12.2 192.168.12.20 dns-list 114.114.114.114 # 配置OSPF,與路由器互聯(lián) ospf 1 area 0.0.0.0 network 192.168.11.1 0.0.0.0 network 192.168.12.1 0.0.0.0 # 創(chuàng)建周期時間段work-time,時間范圍為工作日的9:00~17:00 time-range work-time 09:00 to 17:00 working-day # 配置ACL 2001,明確VLAN的工作時間 acl number 2001 rule 5 permit source 192.168.0.0 0.0.255.255 time-range work-time # 配置流分類,匹配ACL 2001 traffic classifier c1 if-match acl 2001 # 配置流行為,限制上網(wǎng)速度不超過100Mbps(兩個VLAN的上網(wǎng)總速率不超過100Mbps) traffic behavior b1 car cir 102400 statistic enable # traffic policy p1 classifier c1 behavior b1 # interface g 0/0/1 traffic-policy p1 inbound # 華為的網(wǎng)絡(luò)設(shè)備,越來越順手了,而且品質(zhì)有保障,技術(shù)支持到位,值得推薦。 |
|