Simulation delay and packet loss TC Qdisc under Linux

Source: Internet
Author: User

TC Qdisc Linux flow control under the

Modify Ping delay of the test

Add rule:  

# TC Qdisc Add dev eth0 root

To delete a rule:  

# TC Qdisc Add dev eth0 root

To Modify a rule:  

# TC Qdisc Change dev eth0 root

To view the rules:

# TC Qdisc List

OR # TC Qdisc Show

 use fromETH0InterfacePingthe delay is +Ms  Up and down fluctuation forTenMs

tc Qdisc Add dev eth0 root netem delay 1000ms 10ms  

[Email protected] ~]# Tcqdisc Show

Qdisc netem 8003:dev eth0 root refcnt 2 limit delay 1.0s 80.0ms

Modify Configuration

[[email protected] ~]# Tcqdisc Chang Dev eth0 root netem delay 10ms 5ms

[Email protected] ~]# Tcqdisc Show

Qdisc netem 8003:dev eth0 root refcnt 2 limit delay 10.0ms 5.0ms

Delete Configuration

tc  Span lang= "ZH-CN" xml:lang= "ZH-CN" >qdisc  del  dev  eth0  root  netem  delay   100ms   10ms

Modify Drop Packets

Tcqdisc Add dev eth0 root netem c11> loss 10%

Randomly generated duplicate packets

[email protected]~]# tc Qdisc Change Dev eth0root netem duplicate 1%

[Email protected] ~]# tcqdisc show Dev eth0

Qdisc netem 8004:root refcnt 2 limit + duplicate 1%

Randomly generating damaged packages

[[email protected] ~]# Tcqdisc Chang Dev eth0 root netem corrupt 0.1%

[Email protected] ~]# Tcqdisc Show

Qdisc netem 8004:dev eth0 root refcnt 2 limit corrupt 0.1%

The above can be superimposed, that is, an interface can be simulated loss of packets, but also to simulate the delay ...


This article is from the "LIHONGWEIBJ" blog, make sure to keep this source http://lihongweibj.blog.51cto.com/6235038/1659637

Simulation delay and packet loss TC Qdisc under Linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.