=====================交換機(jī)端口啟閉========================
1、經(jīng)查交換機(jī)命令手冊,確認(rèn)不支持批量啟閉交換機(jī)端口,只能一個(gè)一個(gè)啟閉
2、比如:
Telnet(需要輸入Telnet密碼)或者通過串口線登錄交換機(jī)
輸入:su,輸入super密碼
輸入下列指令:
sy
int e1/0/5
shut ====關(guān)閉端口
quit
int e1/0/6
shut ====關(guān)閉端口
quit
int e1/0/7
undo shut ====開啟端口
quit
quit
save
=============================================================
================帶寬限速=============
====
聲明:
當(dāng)前路由器的帶寬限速方式是Carl,限速列表,如果想方便的對單個(gè)IP進(jìn)行限速,
需要先刪除當(dāng)前的限速配置,然后按照下列方法進(jìn)行配置。
刪除方法:
sy
int g0/0
undo qos car inbound carl 110
undo qos car inbound carl 120
undo qos car inbound carl 130
undo qos car inbound carl 140
undo qos car inbound carl 150
quit
int g0/1
undo qos car inbound carl 111
undo qos car inbound carl 121
undo qos car inbound carl 131
undo qos car inbound carl 141
undo qos car inbound carl 151
quit
undo qos carl 110
undo qos carl 120
undo qos carl 130
undo qos carl 140
undo qos carl 150
undo qos carl 111
undo qos carl 121
undo qos carl 131
undo qos carl 141
undo qos carl 151
quit
save
====
假設(shè):
1、I區(qū),II區(qū),III區(qū),IV區(qū),V區(qū)每個(gè)區(qū)的上傳帶寬為1Mbps。
2、I區(qū),II區(qū),IV區(qū)每個(gè)區(qū)的下載帶寬為2Mbps;III區(qū),V區(qū)每個(gè)區(qū)的下載帶寬為4Mbps
3、某組IP地址的下載帶寬為4Mbps,這里以每個(gè)區(qū)的末位地址為8的IP地址為例
==========
路由器配置:
1、通過Telnet登錄路由器,輸入Telnet密碼
2、輸入 su,輸入super密碼
3、輸入下列指令:
sy
#####################定義數(shù)據(jù)流分類#####################
#I區(qū)上傳,除了172.16.110.8,其他IP共享帶寬
acl number 3110
rule 5 deny ip source 172.16.110.8 0
rule 100 permit ip source 172.16.110.0 0.0.0.255
#II區(qū)上傳,除了172.16.120.8,其他IP共享帶寬
acl number 3120
rule 5 deny ip source 172.16.120.8 0
rule 100 permit ip source 172.16.120.0 0.0.0.255
#III區(qū)上傳,除了172.16.130.8,其他IP共享帶寬
acl number 3130
rule 5 deny ip source 172.16.130.8 0
rule 100 permit ip source 172.16.130.0 0.0.0.255
#IV區(qū)上傳,除了172.16.140.8,其他IP共享帶寬
acl number 3140
rule 5 deny ip source 172.16.140.8 0
rule 100 permit ip source 172.16.140.0 0.0.0.255
#V區(qū)上傳,除了172.16.150.8,其他IP共享帶寬
acl number 3150
rule 5 deny ip source 172.16.150.8 0
rule 100 permit ip source 172.16.150.0 0.0.0.255
#特殊限制組上傳,共享帶寬
acl number 3200
rule 10 permit ip source 172.16.110.8 0
rule 20 permit ip source 172.16.120.8 0
rule 30 permit ip source 172.16.130.8 0
rule 40 permit ip source 172.16.140.8 0
rule 50 permit ip source 172.16.150.8 0
#I區(qū)下載,除了172.16.110.8,其他IP共享帶寬
acl number 3111
rule 5 deny ip destination 172.16.110.8 0
rule 100 permit ip destination 172.16.110.0 0.0.0.255
#II區(qū)下載,除了172.16.120.8,其他IP共享帶寬
acl number 3121
rule 5 deny ip destination 172.16.120.8 0
rule 100 permit ip destination 172.16.120.0 0.0.0.255
#III區(qū)下載,除了172.16.130.8,其他IP共享帶寬
acl number 3131
rule 5 deny ip destination 172.16.130.8 0
rule 100 permit ip destination 172.16.130.0 0.0.0.255
#IV區(qū)下載,除了172.16.140.8,其他IP共享帶寬
acl number 3141
rule 5 deny ip destination 172.16.140.8 0
rule 100 permit ip destination 172.16.140.0 0.0.0.255
#V區(qū)下載,除了172.16.150.8,其他IP共享帶寬
acl number 3151
rule 5 deny ip destination 172.16.150.8 0
rule 100 permit ip destination 172.16.150.0 0.0.0.255
#特殊限制組下載,共享帶寬
acl number 3201
rule 10 permit ip destination 172.16.110.8 0
rule 20 permit ip destination 172.16.120.8 0
rule 30 permit ip destination 172.16.130.8 0
rule 40 permit ip destination 172.16.140.8 0
rule 50 permit ip destination 172.16.150.8 0
#################流分類帶寬分配策略###############
#端口G0/0 接內(nèi)網(wǎng),流進(jìn)該端口的流量為上傳方向
int g0/0
qos car inbound acl 3110 cir 1000 cbs 6250 ebs 0 green pass red discard
qos car inbound acl 3120 cir 1000 cbs 6250 ebs 0 green pass red discard
qos car inbound acl 3130 cir 1000 cbs 6250 ebs 0 green pass red discard
qos car inbound acl 3140 cir 1000 cbs 6250 ebs 0 green pass red discard
qos car inbound acl 3150 cir 1000 cbs 6250 ebs 0 green pass red discard |
|