tc qdisc add dev eth0 root handle 1: htb default 2 przykład 4 tc class
Transkrypt
tc qdisc add dev eth0 root handle 1: htb default 2 przykład 4 tc class
tc qdisc add dev eth0 root handle 1: htb default 2 tc class add dev eth0 parent 1: classid 1:1 htb rate 10kbit tc class add dev eth0 parent 1: classid 1:2 htb rate 100kbit --------filtrowanie iptables -t mangle -A OUTPUT -d 212.87.224.206 -j MARK --set-mark 10 tc filter add dev eth0 protocol ip prio 1 parent 1: handle 10 fw flowid 1:1 lub iptables -t mangle -A OUTPUT -d 212.87.224.206 -j CLASSIFY --set-class 1:1 przykład 4 tc qdisc add dev eth0 root handle 1: htb przykład 5 tc class add dev eth0 parent 1: classid 1:1 htb rate 2mbit tc class add tc class add tc class add tc class add tc class add tc class add ... --------filtrowanie dev dev dev dev dev dev eth0 eth0 eth0 eth0 eth0 eth0 parent parent parent parent parent parent tc filter tc filter tc filter tc filter tc filter tc filter ... lub dev dev dev dev dev dev eth0 eth0 eth0 eth0 eth0 eth0 protocol protocol protocol protocol protocol protocol add add add add add add tc filter add dev eth0 tc filter add dev eth0 u32 tc filter add dev eth0 tc filter add dev eth0 tc filter add dev eth0 tc filter add dev eth0 tc filter add dev eth0 tc filter add dev eth0 ... 1:1 1:1 1:1 1:1 1:1 1:1 ip ip ip ip ip ip classid classid classid classid classid classid 1:1001 1:1002 1:1003 1:1004 1:1005 1:1006 prio prio prio prio prio prio parent parent parent parent parent parent 1 1 1 1 1 1 htb htb htb htb htb htb 1: 1: 1: 1: 1: 1: rate rate rate rate rate rate u32 u32 u32 u32 u32 u32 20kbit 20kbit 20kbit 20kbit 20kbit 20kbit match match match match match match ip ip ip ip ip ip ceil ceil ceil ceil ceil ceil 256kbit 256kbit 256kbit 256kbit 256kbit 256kbit dst dst dst dst dst dst 192.168.0.1 192.168.0.2 192.168.0.3 192.168.0.4 192.168.0.5 192.168.0.6 flowid flowid flowid flowid flowid flowid 1:1001 1:1002 1:1003 1:1004 1:1005 1:1006 protocol ip prio 1 parent 1: handle 2: u32 divisor 256 protocol ip prio 1 parent 1: \ ht 800: match ip dst 192.168.0.0/24 hashkey mask 0x000000ff at 16 link 2: protocol ip prio 1 parent 1: u32 ht 2:1 match ip dst 192.168.0.1 flowid 1:1001 protocol ip prio 1 parent 1: u32 ht 2:2 match ip dst 192.168.0.2 flowid 1:1002 protocol ip prio 1 parent 1: u32 ht 2:3 match ip dst 192.168.0.3 flowid 1:1003 protocol ip prio 1 parent 1: u32 ht 2:4 match ip dst 192.168.0.4 flowid 1:1004 protocol ip prio 1 parent 1: u32 ht 2:5 match ip dst 192.168.0.5 flowid 1:1005 protocol ip prio 1 parent 1: u32 ht 2:6 match ip dst 192.168.0.6 flowid 1:1006