免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: qtdszws
打印 上一主题 下一主题

我自己分析内核tc的一点心得 [复制链接]

论坛徽章:
0
31 [报告]
发表于 2010-10-07 16:57 |只看该作者
There is no use for analysis.
Analysis is one thing, coding is another thing.

论坛徽章:
0
32 [报告]
发表于 2011-05-27 11:26 |只看该作者
回复 1# qtdszws


    谢谢楼主,辛苦了,赞一个

论坛徽章:
0
33 [报告]
发表于 2012-11-19 09:54 |只看该作者
请问一个问题  怎么使用tc配置根据dscp或者802.1p标签给报文分配队列

论坛徽章:
0
34 [报告]
发表于 2012-11-28 10:19 |只看该作者
TC的工作原理
TC有三个基本要素:filter, queue disc, class
filter用来对packet进行match,根据预设规则将制定packet filter到class。
class用来标识queue disc,所以根据class就找到了queue disc。
queue disc就是队列调度,不同的调度算法就有不同的调度队列,比如wrr,prio,htb。

论坛徽章:
0
35 [报告]
发表于 2013-04-01 10:02 |只看该作者
看了之后,帮助很大,不过可能我基础有点差,还有好多没有弄明白

论坛徽章:
0
36 [报告]
发表于 2013-05-13 11:43 |只看该作者
brunodl 发表于 2013-04-01 10:02
看了之后,帮助很大,不过可能我基础有点差,还有好多没有弄明白


同上...
学习中

论坛徽章:
0
37 [报告]
发表于 2013-07-29 15:11 |只看该作者
good jod!! thank you very much!

论坛徽章:
0
38 [报告]
发表于 2013-08-16 16:32 |只看该作者
mark                     

论坛徽章:
0
39 [报告]
发表于 2013-09-15 16:02 |只看该作者
回复 19# qtdszws

tc Howto上也说ingress police有两种方式,基于流量估计,和基于tbf。
但是采用哪种方式,是有配置决定的,还是内核自己决定的?
怎样才能知道到底生效的时哪种方式呢?
   

论坛徽章:
0
40 [报告]
发表于 2014-09-26 14:18 |只看该作者
tc qdisc add dev br-lan root handle 1: cbq bandwidth 2Mbit avpkt 1000 cell 8 mpu 6

tc class add dev br-lan parent 1:0 classid 1:1 cbq bandwidth 2Mbit rate 2Mbit maxburst 20 allot 1514 prio 8 avpkt 1000 cell 8 weight 1Mbit
tc class add dev br-lan parent 1:1 classid 1:2 cbq bandwidth 2Mbit rate 100Kbit maxburst 20 allot 1514 prio 5 avpkt 1000 cell 8 split 1:0 bounded
tc class add dev br-lan parent 1:1 classid 1:3 cbq bandwidth 2Mbit rate 1.9Mbit maxburst 20 allot 1514 prio 5 avpkt 1000 cell 8 weight 500Kbit split 1:0
tc class add dev br-lan parent 1:1 classid 1:4 cbq bandwidth 2Mbit rate 900Kbit maxburst 20 allot 1514 prio 5 avpkt 1000 cell 8 split 1:0 bounded

tc qdisc add dev br-lan parent 1:1 handle 2: sfq perturb 10#报错,提示没有文件或目录
tc qdisc add dev br-lan parent 1:1 handle 3: sfq perturb 10#报错,提示没有文件或目录
tc qdisc add dev br-lan parent 1:1 handle 4: sfq perturb 10#报错,提示没有文件或目录


tc filter add dev br-lan parent 1:1 protocol ip prio 1 handle 2 fw flowid 1:2#报错,提示没有文件或目录
tc filter add dev br-lan parent 1:1 protocol ip prio 1 handle 3 fw flowid 1:3#报错,提示没有文件或目录
tc filter add dev br-lan parent 1:1 protocol ip prio 1 handle 4 fw flowid 1:4#报错,提示没有文件或目录


iptables -t mangle -A POSTROUTING -s !192.168.99.223 -j MARK --set-mark 2#这个地方不会写,应该怎么写
iptables -t mangle -A POSTROUTING -s !192.168.99.144 -j MARK --set-mark 2#这个地方不会写,应该怎么写
iptables -t mangle -A POSTROUTING -d !192.168.99.223 -j MARK --set-mark 2#这个地方不会写,应该怎么写
iptables -t mangle -A POSTROUTING -d !192.168.99.144 -j MARK --set-mark 2#这个地方不会写,应该怎么写

iptables -t mangle -A POSTROUTING -s 192.168.99.223 -j MARK --set-mark 3
iptables -t mangle -A POSTROUTING -d 192.168.99.223 -j MARK --set-mark 3
iptables -t mangle -A POSTROUTING -s 192.168.99.144 -j MARK --set-mark 4
iptables -t mangle -A POSTROUTING -d 192.168.99.144 -j MARK --set-mark 4
求帮助
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP