Linux Analog Control Network delay

Source: Internet
Author: User

Previously thought can use the Linux comes with the tool to simulate the control network delay, so the internet found some information. Later found that the data found at present only support on a network card to simulate the delay of sending messages, and can not set a differential network delay, or when the time to simulate to send a delay to the B to be simulated to send a delay inconsistent, the TC function of Linux is powerless. Record the useful information found on the Internet:

    1. TC Bandwidth Management rules typesetting the best links: Http://www.tuicool.com/articles/7zYzey
    2. Man Handbook for TC commands: http://wenku.baidu.com/link?url=o0CPVzuBDLJMt0_ 7qph1t7ttdfozu7o-apipvawbiymz8zwqbnegqi8lgtldqpukhbuoz-excguonvj9rutqn1juv6xc0b-okqu7b7ro-ow
    3. TC Detailed description and application example: http://wenku.baidu.com/view/f02078db50e2524de5187e45.html
    4. TC Control Network delay: http://blog.csdn.net/blade2001/article/details/7163316


------------------------------------------------------------
After careful review of the data, found that the TC control network delay of the Netem keyword is not in the Man manual, and then found that the control network delay is not the original TC function, but the TC called the Netem module. On Netem official website http://www.linuxfoundation.org/collaborate/workgroups/networking/netem#Delaying_only_some_traffic A shell command that controls the network latency of an IP is found, and the pro-test is available.

------------------------------------------------------------


Configured on the 10.10.10.133,10.10.10.134,10.10.10.135:

TC Qdisc Add dev ib0 root handle 1:prio
TC Qdisc Add dev ib0 parent 1:3 handle 30:TBF rate 1000mbit burst 100mbit Latency 1000ms MTU 100kbit
TC Qdisc Add dev ib0 parent 30:1 handle 31:netem delay 9.4MS
TC Filter Add dev IB0 protocol IP parent 1:0 prio 3 u32 match IP DST 10.10.10.136/32 flowid 1:3
TC Filter Add dev IB0 protocol IP parent 1:0 prio 3 u32 match IP DST 10.10.10.137/32 flowid 1:3
TC Filter Add dev IB0 protocol IP parent 1:0 prio 3 u32 match IP DST 10.10.10.138/32 flowid 1:3


Configured on the 10.10.10.136,10.10.10.137,10.10.10.138:

TC Qdisc Add dev ib0 root handle 1:prio
TC Qdisc Add dev ib0 parent 1:3 handle 30:TBF rate 1000mbit burst 100mbit Latency 1000ms MTU 100kbit
TC Qdisc Add dev ib0 parent 30:1 handle 31:netem delay 9.4MS
TC Filter Add dev IB0 protocol IP parent 1:0 prio 3 u32 match IP DST 10.10.10.133/32 flowid 1:3
TC Filter Add dev IB0 protocol IP parent 1:0 prio 3 u32 match IP DST 10.10.10.134/32 flowid 1:3
TC Filter Add dev IB0 protocol IP parent 1:0 prio 3 u32 match IP DST 10.10.10.135/32 flowid 1:3


View:
Tc-s qdisc ls Dev ib0

Delete:
TC Qdisc del Dev ib0 root handle 1:prio

Linux Analog Control Network delay

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.