TOS 기반 트래픽 조절에 다음 규칙을 적용하고 싶습니다. 모든 규칙은 유효하지만 IP 헤더를 차단하는 최종 규칙이 표시됩니다.불법적인 '일치'실수
sudo tc qdisc del dev tun0 root handle 1: htb default 10
sudo tc qdisc add dev tun0 root handle 1: htb default 10
sudo tc filter add dev tun0 parent 1: prio 99 handle 1: u32 divisor 16
alias tclass='sudo tc class add dev tun0 parent 1:1'
tclass classid 1:16 htb rate 50kbit ceil 50kbit prio 1
tclass classid 1:10 htb rate 90mbit ceil 95mbit prio 2
tclass classid 1:12 htb rate 1mbit ceil 1mbit prio 3
sudo tc qdisc add dev tun0 parent 1:16 sfq perturb 60
sudo tc qdisc add dev tun0 parent 1:10 sfq perturb 60
sudo tc qdisc add dev tun0 parent 1:12 sfq perturb 60
alias tcfilter='sudo tc filter add dev tun0 parent 1: prio 99'
tcfilter u32 match u8 0 0 ht 1:0: classid 1:16
tcfilter u32 match u8 0 0 ht 1:1: classid 1:16
tcfilter u32 match u8 0 0 ht 1:2: classid 1:16
tcfilter u32 match u8 0 0 ht 1:3: classid 1:16
tcfilter u32 match u8 0 0 ht 1:4: classid 1:12
tcfilter u32 match u8 0 0 ht 1:5: classid 1:12
tcfilter u32 match u8 0 0 ht 1:6: classid 1:12
tcfilter u32 match u8 0 0 ht 1:7: classid 1:12
tcfilter u32 match u8 0 0 ht 1:8: classid 1:16
tcfilter u32 match u8 0 0 ht 1:9: classid 1:16
tcfilter u32 match u8 0 0 ht 1:a: classid 1:16
tcfilter u32 match u8 0 0 ht 1:b: classid 1:16
tcfilter u32 match u8 0 0 ht 1:c: classid 1:10
tcfilter u32 match u8 0 0 ht 1:d: classid 1:10
tcfilter u32 match u8 0 0 ht 1:e: classid 1:10
tcfilter u32 match u8 0 0 ht 1:f: classid 1:10
# up to this all commands work. But following command doesn't works
sudo tc filter add dev tun0 parent 1: prio 1 protocol ip u32 \
link 1: hashkey mask 0x001e0000 match u8 0 0
Illegal "match"
고쳐 쓰다 모든 지침을 한 줄에 입력하여 문제를 해결했습니다.
sudo tc filter add dev tun0 parent 1: prio 1 protocol ip u32 link 1: hashkey mask 0x001e0000 match u8 0 0