我是靠谱客的博主 标致冰棍,最近开发中收集的这篇文章主要介绍Trafic control 大框图(HTB ),觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

10.1. General diagram

Below is a general diagram of the relationships of the components of a classful queuing discipline (HTB pictured). A larger version of the diagram is available.

 

Example 11. An example HTB tcng configuration

/*
 *
 *  possible mock up of diagram shown at
 *  http://linux-ip.net/traffic-control/htb-class.png
 *
 */

$m_web = trTCM (
                 cir 512  kbps,  /* commited information rate */
                 cbs 10   kB,    /* burst for CIR */
                 pir 1024 kbps,  /* peak information rate */
                 pbs 10   kB     /* burst for PIR */
               ) ;

dev eth0 {
    egress {

        class ( <$web> )  if tcp_dport == PORT_HTTP &&  __trTCM_green( $m_web );
        class ( <$bulk> ) if tcp_dport == PORT_HTTP && __trTCM_yellow( $m_web );
        drop              if                              __trTCM_red( $m_web );
        class ( <$bulk> ) if tcp_dport == PORT_SSH ;

        htb () {  /* root qdisc */

            class ( rate 1544kbps, ceil 1544kbps ) {  /* root class */

                $web  = class ( rate 512kbps, ceil  512kbps ) { sfq ; } ;
                $bulk = class ( rate 512kbps, ceil 1544kbps ) { sfq ; } ;

            }
        }
    }
}
      
 

 

http://tldp.org/HOWTO/Traffic-Control-HOWTO/

shaping 整形(限制)只适用于向外的流量。

 

REF:

流量整形:

http://baike.haosou.com/doc/3476309-3657453.html

令牌桶在端口限速的原理

http://www.cnblogs.com/kekukele/p/4119913.html

概念

http://www.chinadmd.com/file/zirwxtpprztxwi3ivtrupvat_11.html

 

为什么需要bursts . 因为它可以很容易的提高向应速度在一个很拥挤的链路上. 比如WWW 流量是突发的. 你访问主页. 突发的获得并阅读. 在空闲的时间burst将再"charge"一次.

http://www.njliaohua.com/lhd_4bmw956o8q3fmdy9vdg2_2.html

 

转载于:https://www.cnblogs.com/shaohef/p/4884575.html

最后

以上就是标致冰棍为你收集整理的Trafic control 大框图(HTB )的全部内容,希望文章能够帮你解决Trafic control 大框图(HTB )所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(61)

评论列表共有 0 条评论

立即
投稿
返回
顶部