Differences between revisions 1 and 2
Revision 1 as of 2011-05-30 17:40:20
Size: 1030
Editor: PieterSmit
Comment: Create from page http://www.linuxfoundation.org/collaborate/workgroups/networking/netem
Revision 2 as of 2011-05-30 18:12:40
Size: 1156
Editor: PieterSmit
Comment:
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:

 * To check status
 {{{
 tc -s qdisc
 }}}

 * To remove the delay from eth0
 {{{
 tc qdisc del dev eth0 root
 }}}

Network Simulation

  • Linux Network emulator linuxfoundation

  • Delay all packets out eth0
    •    # tc qdisc add dev eth0 root netem delay 100ms
  • Delay + 10ms variation, each 25% correlated to previous value.
    •    # tc qdisc change dev eth0 root netem delay 100ms 10ms 25%
  • Other options
    • loss 0.3% 25% (% loss and correlation)
    • duplicate 1%
    • corrupt 0.1% << corrupts single bit

Rate control

  • There is no rate control built-in to the netem discipline, use Token Bucket Filter (TBF) to limit output.
     # tc qdisc add dev eth0 root handle 1:0 netem delay 100ms
     # tc qdisc add dev eth0 parent 1:1 handle 10: tbf rate 256kbit buffer 1600 limit 3000
     # tc -s qdisc ls dev eth0
     qdisc netem 1: limit 1000 delay 100.0ms
       Sent 0 bytes 0 pkts (dropped 0, overlimits 0 )
     qdisc tbf 10: rate 256Kbit burst 1599b lat 26.6ms
       Sent 0 bytes 0 pkts (dropped 0, overlimits 0 )
  • To check status
     tc -s qdisc
  • To remove the delay from eth0
     tc qdisc del dev eth0 root

linux/NetworkSimulation (last edited 2011-06-01 15:18:13 by PieterSmit)