<code id='p93ft'><strong id='p93ft'></strong></code>
    1. <span id='p93ft'></span>

      <dl id='p93ft'></dl>

    2. <acronym id='p93ft'><em id='p93ft'></em><td id='p93ft'><div id='p93ft'></div></td></acronym><address id='p93ft'><big id='p93ft'><big id='p93ft'></big><legend id='p93ft'></legend></big></address>

      <fieldset id='p93ft'></fieldset><ins id='p93ft'></ins>
    3. <tr id='p93ft'><strong id='p93ft'></strong><small id='p93ft'></small><button id='p93ft'></button><li id='p93ft'><noscript id='p93ft'><big id='p93ft'></big><dt id='p93ft'></dt></noscript></li></tr><ol id='p93ft'><table id='p93ft'><blockquote id='p93ft'><tbody id='p93ft'></tbody></blockquote></table></ol><u id='p93ft'></u><kbd id='p93ft'><kbd id='p93ft'></kbd></kbd>
      1. <i id='p93ft'></i>
          <i id='p93ft'><div id='p93ft'><ins id='p93ft'></ins></div></i>

          Linux下简单限制网卡的带宽

          • 时间:
          • 浏览:10
          • 来源:124软件资讯网

            Linux下限制网卡的带宽  ,可用来模拟服务器带宽耗尽 ,从而测试服务器在此时的会见效果  。

              1、安装iproute

            yum -y install iproute
            2、限制eth0网卡的带宽为50kbit:

            /sbin/tc qdisc add dev eth0 root tbf rate 50kbit latency 50ms burst 1000


            3、限制带宽为50kbit后  ,在百兆局域网中wget下载一个大文件:

            [root@localhost ~]# wget http://192.168.1.7/test.zip
            --19:40:27-- http://192.168.1.7/test.zip
            Connecting to 192.168.1.7:80... connected.
            HTTP request sent, awaiting response... 200 OK
            Length: 23862312 (23M) [application/zip]
            Saving to: `test.zip'

            37% [=======> ] 8,994,816 457K/s eta 27s


            下载速率为457K/s  ,限制效果到达  。

              4、排除eth0网卡的带脱期制:

            /sbin/tc qdisc del dev eth0 root tbf


            5、对比:未作带脱期制情形下  ,在百兆局域网中wget下载一个大文件:

            [root@localhost ~]# wget http://192.168.1.7/test.zip
            --19:44:33-- http://192.168.1.7/test.zip
            Connecting to 192.168.1.7:80... connected.
            HTTP request sent, awaiting response... 200 OK
            Length: 23862312 (23M) [application/zip]
            Saving to: `test.zip'

            100%[==========>] 23,862,312 6.14M/s in 3.7s

            19:44:36 (6.16 MB/s) - `test.zip' saved [23862312/23862312]


            下载速率为6.16MB/s  。

            http://blog.s135.com/post/380.htma