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:
- TC Bandwidth Management rules typesetting the best links: Http://www.tuicool.com/articles/7zYzey
- Man Handbook for TC commands: http://wenku.baidu.com/link?url=o0CPVzuBDLJMt0_ 7qph1t7ttdfozu7o-apipvawbiymz8zwqbnegqi8lgtldqpukhbuoz-excguonvj9rutqn1juv6xc0b-okqu7b7ro-ow
- TC Detailed description and application example: http://wenku.baidu.com/view/f02078db50e2524de5187e45.html
- 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