Bug #3281
8.2.6QoS测试-步骤17设定两个QoS的权重分别为20, 8后两者的上传速率之接近2:9;
0%
Description
步骤:
1.Telnet登陆网关;
2.启用QoS功能
dbus-send --system --type=method_call --print-reply --dest=com.ctc.igd1 /com/ctc/igd1/Network/QoS com.ctc.igd1.Properties.Set string:"com.ctc.igd1.QoS" string:"Enable" variant:boolean:true
3.设定QoS机制为承诺速率
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoS "{'Plan':<'car'>,'Mode':<'OTHER'>}"
4.使能优先级1
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/PriorityQueue/1 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSPriorityQueue "{'Enable':<true>,'Priority':<uint32 1>,'Weight':<uint32 0>,'Car':<int32 1000>}"
5.添加分类规则
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification -m com.ctc.igd1.ObjectManager.AddObject
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification/1 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSClassification "{'ClassQueue':<uint32 1>}"
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification -m com.ctc.igd1.ObjectManager.AddObject
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification/2 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSClassification "{'ClassQueue':<uint32 1>}"
6.添加类型规则,Max,Min为协议端口, 开启对80及443端口设置承诺速率.
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification/1/Type -m com.ctc.igd1.ObjectManager.AddObject
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification/1/Type/1 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSClassificationType "{'Type':<'DPORT'>,'Max':<'80'>,'Min':<'80'>,'ProtocolList':<'TCP'>}"
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification/2/Type -m com.ctc.igd1.ObjectManager.AddObject
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification/2/Type/1 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSClassificationType "{'Type':<'DPORT'>,'Max':<'443'>,'Min':<'443'>,'ProtocolList':<'TCP'>}"
7.使能Qos规则
dbus-send --system --type=method_call --print-reply --dest=com.ctc.igd1 /com/ctc/igd1/Network/QoS com.ctc.igd1.Properties.Set string:"com.ctc.igd1.QoS" string:"Enable" variant:boolean:true
8.PC上传大文件到天翼云盘或者百度盘,查看上传速率
9.PC 做ftp上传,检查云盘上传速率,确保云盘上传速率不会因ftp影响降低到承诺速率.
10.修改分类规则,DSCPMark设置为EF
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification/2 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSClassification "{'DSCPMarkValue':<uint32 46>}"
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoS "{'EnableDSCPMark':<true>}"
11.修改类型规则,Max/Min设置为LAN端PC的IP
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification/2/Type/1 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSClassificationType "{'Type':<'SIP'>,'Max':<'192.168.1.2'>,'Min':<'192.168.1.2'>,'ProtocolList':<'ICMP'>}"
12.使能Qos规则
dbus-send --system --type=method_call --print-reply --dest=com.ctc.igd1 /com/ctc/igd1/Network/QoS com.ctc.igd1.Properties.Set string:"com.ctc.igd1.QoS" string:"Enable" variant:boolean:true
13.开启抓包,LAN端PC命令行执行ping www.qq.com
14.设定QoS机制为权重
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoS "{'Plan':<'weight'>}"
15.设定每个队列的权重
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/PriorityQueue/1 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSPriorityQueue "{'Weight':<uint32 30>,'Enable':<true>}"
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/PriorityQueue/2 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSPriorityQueue "{'Weight':<uint32 30>,'Enable':<true>}"
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/PriorityQueue/3 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSPriorityQueue "{'Weight':<uint32 30>,'Enable':<true>}"
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/PriorityQueue/4 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSPriorityQueue "{'Weight':<uint32 30>,'Enable':<true>}"
16.清除队列3的权重
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/PriorityQueue/3 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSPriorityQueue "{'Weight':<uint32 0>,'Enable':<true>}"
17.设定两个QoS的权重分别为20, 80
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/PriorityQueue/1 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSPriorityQueue "{'Weight':<uint32 20>,'Enable':<true>}"
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/PriorityQueue/2 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSPriorityQueue "{'Weight':<uint32 80>,'Enable':<true>}"
18.设定2台下挂设备分别对应两个QoS 队列
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification -m com.ctc.igd1.ObjectManager.AddObject
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification/1 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSClassification "{'ClassQueue':<uint32 1>}"
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification/2 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSClassification "{'ClassQueue':<uint32 2>}"
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification/1/Type/1 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSClassificationType "{'Type':<'SIP'>,'Max':<'192.168.1.2'>,'Min':<'192.168.1.2'>,'ProtocolList':<'TCP'>}"
gdbus call -y -d com.ctc.igd1 -o /com/ctc/igd1/Network/QoS/Classification/2/Type/1 -m com.ctc.igd1.Properties.SetMulti com.ctc.igd1.QoSClassificationType "{'Type':<'SIP'>,'Max':<'192.168.1.3'>,'Min':<'192.168.1.3'>,'ProtocolList':<'TCP'>}"
19.使能Qos规则
dbus-send --system --type=method_call --print-reply --dest=com.ctc.igd1 /com/ctc/igd1/Network/QoS com.ctc.igd1.Properties.Set string:"com.ctc.igd1.QoS" string:"Enable" variant:boolean:true
20.通过DBUS命令配置网关的上行带宽限制(这里配置为10M上行带宽,此值应小于BRAS,OLT以及http上传服务器的实际带宽)
dbus-send --system --type=method_call --print-reply --dest=com.ctc.igd1 /com/ctc/igd1/Network/QoS com.ctc.igd1.Properties.Set string:com.ctc.igd1.QoS string:Bandwidth variant:uint32:10000
21.两台下挂的PC都执行http文件上传,观察两台PC的上传速率。
实际结果:
两者的上传速率之接近2:9
预期结果:
步骤21中, 对应Queue1的PC上传速率应该是最低的, 对应Queue2的PC最大,两者的上传速率之比应该应接近2:8;