Overview

Simple WAN Simulator (simWANsim) is a SIMPLE WAN simulator that configures specific network intefaces in order to simulate high-latency networks typical in WAN setups.

Features

simWANsim can control various aspects of network traffic like bandwidth, burst rate, latency, latency variation, packet loss, duplication and corruption.

  • Uses the htb shaping algorithm for the queuing discipline
  • Can be configured to work on any network interface
  • Makes minimal changes to network environment
  • Runs in-vivo and does not require live environment
  • Does not require restarting the network or rebooting the host
  • Does not require two interfaces to function
  • Must be executed as root or sudo
  • Single standalone shell script

Assumptions

simWANsim makes several assumptions during its run:

  • It does not change default traffic configuration used in your setup, e.g. TSO on/off; your network admin will have to determine best settings as they depend on many other factors in addition to traffic shaping
  • It does not check network interface capabilities, use ethtool for that
  • It does not control iptables or firewall rules, use iptables for that
  • It does not configure routing setup, use route for that
  • It does not load modules into kernel, use modprobe/insmod for that
  • It does not configure network interfaces, use ifconfig for that
  • It does not check for negative values (e.g. -5%); don't be silly

Simulation results

WAN simulation results will depend on many factors including:

  • Selected shaping algorithm and values
  • Network card speed and settings
  • Switching/routing equipment used
  • Total throughput of network devices
  • Other software running and utilizing network

Sample run

Notice: Improper use may cause users to be locked out of their machine or lead to disruption or loss of availability. Use with caution and do not commit to production environment without thorough testing.

Use -h flag to see full list of available options.
Show (-s) and uninstall (-u) options are exclusive.

Normal LAN ping (~1 ms):

[root@fedora-test ~]# ping -c4 10.184.39.34
PING 10.184.39.34 (10.184.39.34) 56(84) bytes of data.
64 bytes from 10.184.39.34: icmp_req=1 ttl=60 time=0.761 ms
64 bytes from 10.184.39.34: icmp_req=2 ttl=60 time=0.962 ms
64 bytes from 10.184.39.34: icmp_req=3 ttl=60 time=0.738 ms
64 bytes from 10.184.39.34: icmp_req=4 ttl=60 time=0.976 ms



simWANsim is activated against the p2p1 network interface with latency set to 20ms:

[root@fedora-test ~]# ./simWANsim.sh -e p2p1 -l 20ms



The ping command now returns 20ms values:

[root@fedora-test ~]# ping -c4 10.184.39.34
PING 10.184.39.34 (10.184.39.34) 56(84) bytes of data.
64 bytes from 10.184.39.34: icmp_req=1 ttl=60 time=20.6 ms
64 bytes from 10.184.39.34: icmp_req=2 ttl=60 time=20.8 ms
64 bytes from 10.184.39.34: icmp_req=3 ttl=60 time=21.3 ms
64 bytes from 10.184.39.34: icmp_req=4 ttl=60 time=20.7 ms