手机版
你好,游客 登录 注册
背景:
阅读新闻

使用 Linux 下的 TC 流量控制测试

[日期:2014-03-20] 来源:Linux社区  作者:鸟哥のlinux [字体:大 中 小]

测试:
开启流量控制TC:

# ./tc_last.sh start

有限制的IP:192.168.138.131

# ifconfig eth0

eth0 Link encap:Ethernet HWaddr 00:0C:29:DA:56:1C

          inet addr:192.168.138.131 Bcast:192.168.138.255 Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

          RX packets:1811422 errors:0 dropped:0 overruns:0 frame:0

          TX packets:1083449 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:943250761 (899.5 MiB) TX bytes:87045802 (83.0 MiB)

 

# wget http://ftp13.enet.com.cn:88/pub/multimedia/video/uvs9_trial_e_rtm.rar

--2013-08-08 17:44:01-- http://ftp13.enet.com.cn:88/pub/multimedia/video/uvs9_trial_e_rtm.rar

Resolving ftp13.enet.com.cn... 122.224.6.16

Connecting to ftp13.enet.com.cn|122.224.6.16|:88... connected.

HTTP request sent, awaiting response... 200 OK

Length: 180175741 (172M) [application/octet-stream]

Saving to: `uvs9_trial_e_rtm.rar.17

 

无限制IP:192.168.138.99

 

# ifconfig eth0

eth0 Link encap:Ethernet HWaddr 00:0C:29:88:EC:85

          inet addr:192.168.138.99 Bcast:192.168.138.255 Mask:255.255.255.0

          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

          RX packets:88578 errors:0 dropped:0 overruns:0 frame:0

          TX packets:43771 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:19401052 (18.5 MiB) TX bytes:6876868 (6.5 MiB)

 

# wget http://ftp13.enet.com.cn:88/pub/multimedia/video/uvs9_trial_e_rtm.rar

--2013-07-16 22:57:10-- http://ftp13.enet.com.cn:88/pub/multimedia/video/uvs9_trial_e_rtm.rar

Resolving ftp13.enet.com.cn... 122.224.6.16

Connecting to ftp13.enet.com.cn|122.224.6.16|:88... connected.

HTTP request sent, awaiting response... 200 OK

Length: 180175741 (172M) [application/octet-stream]

Saving to: `uvs9_trial_e_rtm.rar.2

 

效果还是很显著的,就是和设置的流量范围有偏差,有待继续研究!

linux
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款