Last active
May 16, 2020 15:06
-
-
Save joneskoo/babff7ee0181e1a369c6defd8ff5123e to your computer and use it in GitHub Desktop.
interfaces.d for CAKE traffic shaping on cable modem (1G/100M)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
auto wan0 | |
iface wan0 inet dhcp | |
bridge_ports enp9s0 enp4s0f1 | |
#bridge_hw 00:11:22:33:44:55 | |
nameserver 127.0.0.1 | |
# CAKE / Uplink shaping | |
post-up tc qdisc add dev enp9s0 root cake bandwidth 80Mbit docsis nat ack-filter | |
pre-down tc qdisc del dev enp9s0 root | |
# CAKE / Downlink shaping | |
post-up ip link add name ifb4uplink type ifb | |
post-up tc qdisc add dev enp9s0 handle ffff: ingress | |
post-up tc qdisc add dev ifb4uplink root cake bandwidth 950Mbit besteffort wash nat docsis | |
post-up ip link set ifb4uplink up | |
post-up tc filter add dev enp9s0 parent ffff: protocol all prio 10 u32 match u32 0 0 flowid 1:1 action mirred egress redirect dev ifb4uplink | |
pre-down tc filter del dev enp9s0 parent ffff: | |
pre-down tc qdisc del dev enp9s0 ingress | |
pre-down ip link del ifb4uplink | |
iface wan0 inet6 dhcp | |
request_prefix 1 | |
# Accept SLAAC even if forwarding is enabled (router) | |
accept_ra 2 | |
#dhcp 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment