nixos-config/machines/shinobu/services/router/common.nix
Simon Bruder afc9013506
shinobu/router: Implement QoS using HTB
This is an initial implementation and probably still needs tuning.
2023-10-07 22:49:26 +02:00

66 lines
1.1 KiB
Nix
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
domain = "home.sbruder.de";
tc = {
interface = "enp1s0";
# 4160kbit is slightly smaller than the average upload
rate = "4160kbit";
major = 1;
default = 2;
classes = [
# default
{
minor = 2;
rate = "1000kbit";
prio = 50;
}
# DNS, small packets (e.g., TCP ACK)
{
minor = 3;
rate = "250kbit";
prio = 0;
qdiscArgs = [ "pfifo_fast" ];
}
# interactive SSH
{
minor = 4;
rate = "128kbit";
prio = 2;
}
# torrent
{
minor = 5;
rate = "250kbit";
ceil = "3000kbit";
prio = 100;
}
# HTTP
{
minor = 6;
rate = "1500kbit";
prio = 25;
}
# wg-home
{
minor = 7;
rate = "250kbit";
prio = 10;
}
# VoIP
{
minor = 8;
rate = "256kbit";
ceil = "384kbit";
prio = 3;
qdiscArgs = [ "pfifo_fast" ];
}
# Backup
{
minor = 9;
rate = "350kbit";
ceil = "3000kbit";
prio = 90;
}
];
};
}