TC-Config
Advanced Traffic Control Configuration for Xanmod Kernel
This script optimizes your network traffic using sophisticated techniques to enhance performance and control.
tc
(traffic control) with HTB
(Hierarchical Token Bucket) to establish a sophisticated QoS system. This configuration enables precise control over traffic flow, ensuring efficient bandwidth distribution and prioritization of critical network traffic.CAKE
, FQ_Codel
, and FQ_PIE
. These algorithms dynamically manage traffic queues to minimize latency and bufferbloat, delivering an optimized network experience.iptables
rules for sophisticated packet filtering, redirection, and modification, enhancing both security and performance. The script intelligently adjusts TCP MSS values and applies custom ToS flags to optimize data flow.iproute2
, iptable
To run this script directly using wget or curl, follow the instructions below:
bash <(curl -s https://raw.githubusercontent.com/FReak4L/Tc-Config/main/tc.sh) -s
bash <(wget -qO- https://raw.githubusercontent.com/FReak4L/Tc-Config/main/tc.sh) -s
To execute the script, simply run:
bash tc.sh -s
This will start the script and you'll be prompted to select your network interface and specify your uplink and downlink bandwidth. You can use the defaults or input your own values.
bash tc.sh -h
Delete All TC configuration :
bash tc.sh -d
Here's what the script does, step-by-step:
The script begins by ensuring the Xanmod kernel is active. This kernel is tailored for high-performance networking and system responsiveness, making it a critical component for the script's advanced traffic management features. If the correct kernel is not detected, the script provides immediate feedback, allowing you to take corrective action.
Next, the script performs a comprehensive system update, ensuring all software is current. It then installs essential networking packages such as iproute2
and iptables
. These tools are fundamental for the script's operation, providing the necessary functionality for traffic control and quality of service management.
The script then sets up tc
with HTB
, creating a multi-tiered traffic control structure. This setup allows for hierarchical bandwidth allocation, ensuring that critical traffic is prioritized while maintaining overall network efficiency. The use of HTB ensures that bandwidth is distributed according to predefined rules, optimizing network performance under varying loads.
To further enhance network performance, the script implements advanced traffic shaping techniques using algorithms like FQ_Codel
, FQ_PIE
, and CAKE
. These algorithms are designed to intelligently manage queue lengths and reduce network latency. By minimizing bufferbloat, they ensure a more responsive internet experience, particularly under conditions of heavy network usage.
The script then configures a complex queue discipline structure, tailoring it to various types of traffic such as video streaming, gaming, or bulk downloads. This customization allows each type of traffic to be handled according to its specific needs, optimizing both performance and user experience. The script's use of advanced algorithms like CAKE
and FQ_PIE
enables it to adapt dynamically to changing network conditions, ensuring consistent performance.
The script provides a user-friendly menu where you can select your network interface and set your desired uplink and downlink speeds:
eth0
(default), ens3
, or custom.5gbit
(default), 1gbit
, or custom.5gbit
(default), 1gbit
, or custom.
All actions performed by the script are logged to /var/log/tc-freak.log
. This log can be very useful for troubleshooting or simply reviewing the changes made by the script.
DM
This project is licensed under the GNU General Public License v3.0.
Note: Use this script at your own risk. It is provided "as is" without any warranty.