A simple command-line tool to configure network latency and bandwidth limits on the local loopback interface for testing and development purposes.
- Add configurable latency to the loopback interface
- Set bandwidth limits (optional)
- View current network configuration status
- Easily disable all network modifications
- Simple command-line interface
- Linux/Unix-like operating system
sudoprivileges (for modifying network settings)tc(traffic control) command-line tool
The tool provides three main commands:
./net-config.sh statusThis will show the current queue discipline and class settings on the loopback interface.
./net-config.sh on <latency_ms> [max_mbps]latency_ms: Required. The latency to add in millisecondsmax_mbps: Optional. Maximum bandwidth limit in Mbps
Examples:
# Add 100ms latency
./net-config.sh on 100
# Add 1ms latency and limit bandwidth to 1 Gbps
./net-config.sh on 1 1000
# Add 50ms latency and limit bandwidth to 10 Gbps
./net-config.sh on 50 10000./net-config.sh offThis will remove all network modifications and restore the default settings.
This project is licensed under the MIT License - see the LICENSE file for details.