=====================交换机端口启闭========================
1、经查交换机命令手册,确认不支持批量启闭交换机端口,只能一个一个启闭
2、比如:
Telnet(需要输入Telnet密码)或者通过串口线登录交换机
输入:su,输入super密码
输入下列指令:
sy
int e1/0/5
shut ====关闭端口
quit
int e1/0/6
shut ====关闭端口
quit
int e1/0/7
undo shut ====开启端口
quit
quit
save
=============================================================
================带宽限速=============
====
声明:
当前路由器的带宽限速方式是Carl,限速列表,如果想方便的对单个IP进行限速,
需要先删除当前的限速配置,然后按照下列方法进行配置。
删除方法:
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
====
假设:
1、I区,II区,III区,IV区,V区每个区的上传带宽为1Mbps。
2、I区,II区,IV区每个区的下载带宽为2Mbps;III区,V区每个区的下载带宽为4Mbps
3、某组IP地址的下载带宽为4Mbps,这里以每个区的末位地址为8的IP地址为例
==========
路由器配置:
1、通过Telnet登录路由器,输入Telnet密码
2、输入 su,输入super密码
3、输入下列指令:
sy
#####################定义数据流分类#####################
#I区上传,除了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区上传,除了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区上传,除了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区上传,除了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区上传,除了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区下载,除了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区下载,除了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区下载,除了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区下载,除了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区下载,除了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 接内网,流进该端口的流量为上传方向
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 |
|