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.
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"
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
This command adds fair queuing policy on incoming traffic and must be executed after function tc_ingress.
./wan_emulation.sh add_sfq_ingress
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
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
This scripts have been used to emulate the WAN bottleneck link in the paper:
- G. Carlucci, L. De Cicco, S. Holmer, and S. Mascolo Analysis and Design of the Google Congestion Control for Web Real-time Communication (WebRTC) in Proc. og ACM Mmsys 2016, Klagenfurt, Austria, May 2016