1. tcconfig

PyPI package version Supported Python versions Test CI status Build CI status

1.1. Summary

tcconfig is a tc command wrapper. Make it easy to set up traffic control of network bandwidth/latency/packet-loss/packet-corruption/etc. to a network-interface/Docker-container(veth).



1.2. Traffic control

1.2.1. Setup traffic shaping rules

Easy to apply traffic shaping rules to specific network:

  • Outgoing/Incoming packets

  • Source/Destination IP-address/network (IPv4/IPv6)

  • Source/Destination ports

1.2.2. Available parameters

The following parameters can be set to network interfaces:

  • Network bandwidth rate [G/M/K bps]

  • Network latency [microseconds/milliseconds/seconds/minutes]

  • Packet loss rate [%]

  • Packet corruption rate [%]

  • Packet duplicate rate [%]

  • Packet reordering rate [%]

1.2.3. Targets

  • Network interfaces: e.g. eth0

  • Docker container (veth corresponding with a container)

2. Installation

2.1. Installation: pip

tcconfig can be installed from PyPI via pip (Python package manager) command.

sudo pip install tcconfig

2.2. Installation: dpkg (Debian/Ubuntu)

curl -sSL https://raw.githubusercontent.com/thombashi/tcconfig/master/scripts/installer.sh | sudo bash

3. Dependencies

3.1. Linux packages

  • mandatory: required for tc command:
    • Ubuntu/Debian: iproute2

    • Fedora/RHEL: iproute-tc

  • optional: required to when you use --iptables option:
    • iptables

3.2. Linux kernel module

  • sch_netem

3.3. Optional Python packages