Skip to content

data-capsule/Wan-Emulation-TC-and-Netem

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 

Repository files navigation

Build Status

Wan Emulation with TC and NetEm

Introduction

This tool allows to emulate a WAN link through the iproute2 package and the NetEm Linux module. With tc “traffic control” is possible to set the queuing discipline, limit the link capacity and much more. The NetEm linux module can be employed to set the propagation delay.

Examples

Disabling the NIC optimizations

That NIC optimization parameters may interfere with the experiment. It is RECOMMENDED to disable these optimization.
INPUT PARAMETERS

  • Device interface that receives the traffic: example eth0
sudo apt-get install ethtool
./wan_emulation.sh disabe_nic_opt "eth0"

Set capacity constraint on incoming traffic

This command introduces link capacity constraints on incoming traffic that comes from a specified IP.
INPUT PARAMETERS

  • IP address of the sender machine: example 192.168.0.10
  • Bottleneck buffer size in KB (1000 byte): example 30 (30KB)
  • Device interface that receives the traffic: example eth0
  • Capacity contraint: example 125 KBps (equivalent to 1Mbps)
./wan_emulation.sh tc_ingress 192.168.0.10 30 eth0 125

Set sfq policy on the incoming traffic

This command adds fair queuing policy on incoming traffic and must be executed after function tc_ingress.

./wan_emulation.sh add_sfq_ingress

Set propagation delay

This command sets propagation delay on the traffic over the specified interface.
NB.: This command cannot be executed on the same machine that sets the capacity constraint
INPUT PARAMETERS

  • Device interface that introduces the delay on the traffic: example eth0
  • Delay we want to set in ms: example 50 ms
./wan_emulation.sh tc_delay eth0 50

Remove propagation delay

This command removes the propagation delay on the traffic over the specified interface.
INPUT PARAMETERS

  • Device interface that introduces the delay on the traffic: example eth0
./wan_emulation.sh tc_del_delay eth0 

Note

This scripts have been used to emulate the WAN bottleneck link in the paper:

References

Emulating wide area network delays

About

Wide Area Network Link Emulation with TC and NetEm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%