H3C路由器限制IP上下行流量

更新时间:2023-05-07 08:56:11 阅读: 评论:0

1、时段限制
①建立一个时间段。名为work。时间定义为工作时间8:00~18:00
[MSR2021] time-range work 08:00 to 18:00 working-day
②静止上班时间所有IP访问优酷网(202.102.81.119)
[MSR20_21]acl number 3001 //高级ACL
[MSR20_21-acl-adv-3001]rule 10 deny ip source any destination 202.102.81.119 0.0.0.0 time-range work
2、限速配置
①对整个网段限速
[MSR20_21] qos carl 10 destination-ip-address subnet 192.168.1.1 24
②对整个网段中的每个IP限速
[MSR20_21] qos carl 10 destination-ip-address subnet 192.168.1.1 24 per-address
③对某一段IP限速
[MSR20_21]qos carl 10 destination-ip-address range 192.168.1.2 to 192.168.1.100
④对某一段内的每个IP
[MSR20_21]qos carl 10 destination-ip-address range 192.168.1.2 to 192.168.1.100 per-address

实例
每个网段对应路由器(MSR2021)接口以及ADSL端口(每条ADSL均为3M)情况如下:(限制为下行80K,上行30K
interface Ethernet0/0 ----- dial-bundle-number 1 192.168.2.0
interface Ethernet1/0 ----- dial-bundle-number 2 192.168.1.0/192.168.3.0
interface Ethernet0/2 ----- dial-bundle-number 3 192.168.5.0
配置如下:
<MSR20_21>sys
[MSR20_21]qos carl 10 destination-ip-address range 192.168.1.2 to 192.168.1.100 per-address
qos carl 11 destination-ip-address range 192.168.1.125 to 192.168.1.200 per-address
qos carl 12 destination-ip-address range 192.168.1.206 to 192.168.1.253 per-address
qos carl 20 destination-ip-address range 192.168.2.2 to 192.168.2.253 per-address
qos carl 30 destination-ip-address range 192.168.3.2 to 192.168.3.253 per-address
//对所选网段内的每个IP地址限速
[MSR20_21]interface Ethernet 1/0
qos car inbound carl 10 cir 640 cbs 6400 ebs 0 green pass red discard
qos car inbound carl 11 cir 640 cbs 6400 ebs 0 green pass red discard
qos car inbound carl 12 cir 640 cbs 6400 ebs 0 green pass red discard
qos car inbound carl 30 cir 640 cbs 6400 ebs 0 green pass red discard
//访问外网流量最大80K
[MSR20_21-Ethernet1/0]interface dialer2
qos car inbound carl 10 cir 640 cbs 6400 ebs 0 green pass red discard
qos car inbound carl 11 cir 640 cbs 6400 ebs 0 green pass red discard
qos car inbound carl 12 cir 640 cbs 6400 ebs 0 green pass red discard
qos car inbound carl 30 cir 640 cbs 6400 ebs 0 green pass red discard
quit
//在对应端口应用
[MSR20_21]interface Ethernet 0/0
qos car inbound carl 20 cir 640 cbs 6400 ebs 0 green pass red discard
[MSR20_21-Ethernet0/0]interface dialer1
qos car inbound carl 20 cir 640 cbs 6400 ebs 0 green pass red discard
quit

//上传限制在30K
qos carl 15 source-ip-address range 192.168.1.2 to 192.168.1.100 per-address
interface Ethernet 1/0
qos car outbound carl 15 cir 240 cbs 2400 ebs 0 green pass red discard
quit
定义192.168.0.2 to 192.168.0.200内每台主机上传的流量
Quidway qos carl 1 source-ip-address range 192.168.0.2 to 192.168.0.200 per-address
定义192.168.0.2 to 192.168.0.200内每台主机下载的流量
Quidway qos carl 2 destination-ip-address range 192.168.0.2 to 192.168.0.200 per-address
Quidway interface ethernet 1/0
-------限制上行速率
Qudiway-Ethernet1/0 qos car inbound carl 1 cir 200000 cbs 200000 ebs 200000 green pass red discard
------限制下行速率
Qudiway-Ethernet1/0 qos car outbound carl 2 cir 300000 cbs 300000 ebs 300000 gr
een pass red discard

本文发布于:2023-05-07 08:56:11,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/90/99061.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:限制   网段   时间   访问   对应   流量   限速   速率
相关文章
留言与评论(共有 0 条评论)
   
验证码:
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图