Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Strony: 1
witam, dawno już tutaj nie zaglądałem ;) mam problem z filtrami mieszającymi - mianowicie mam coś takiego:
/sbin/tc qdisc add dev eth1 root handle 1: hfsc default 2 /sbin/tc class add dev eth1 parent 1: classid 1:1 hfsc ls m2 24000kbit ul m2 24000kbit /sbin/tc class add dev eth1 parent 1: classid 1:2 hfsc ls m2 128kbit ul m2 256kbit /sbin/tc filter add dev eth1 protocol ip prio 1 parent 1: handle 8: u32 divisor 256 /sbin/tc filter add dev eth1 protocol ip prio 1 parent 1: u32 ht 800: match ip dst 192.168.50.0/24 hashkey mask 0x000000ff at 16 link 8: /sbin/tc class add dev eth1 parent 1:1 classid 1:5 hfsc ls m2 128kbit /sbin/tc filter add dev eth1 protocol ip parent 1: u32 ht 8:0xa match ip dst 192.168.50.10 flowid 1:5 /sbin/tc class add dev eth1 parent 1:5 classid 1:640 hfsc sc d 30ms m2 15kbit ul m2 25kbit /sbin/tc filter add dev eth1 protocol ip prio 1 parent 1: u32 ht 8:0xa match ip protocol 1 0xff flowid 1:640 /sbin/tc class add dev eth1 parent 1:5 classid 1:641 hfsc sc d 20ms m2 15kbit ul m2 100kbit /sbin/tc filter add dev eth1 protocol ip prio 2 parent 1: u32 ht 8:0xa match ip protocol 6 0xff match u8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowid 1:641 /sbin/tc class add dev eth1 parent 1:5 classid 1:642 hfsc ls m2 10kbit ul m1 1500kbit d 5000ms m2 500kbit /sbin/tc filter add dev eth1 protocol ip prio 3 parent 1: u32 ht 8:0xa match ip sport 80 0xffff flowid 1:642 /sbin/tc class add dev eth1 parent 1:5 classid 1:643 hfsc ls m2 10kbit ul m2 400kbit /sbin/tc filter add dev eth1 protocol ip prio 4 parent 1: u32 ht 8:0xa match ip dst 0.0.0.0/0 flowid 1:643 /sbin/tc class add dev eth1 parent 1:1 classid 1:6 hfsc ls m2 128kbit /sbin/tc filter add dev eth1 protocol ip parent 1: u32 ht 8:0xb match ip dst 192.168.50.11 flowid 1:6 /sbin/tc class add dev eth1 parent 1:6 classid 1:644 hfsc sc d 30ms m2 15kbit ul m2 25kbit /sbin/tc filter add dev eth1 protocol ip prio 1 parent 1: u32 ht 8:0xb match ip protocol 1 0xff flowid 1:644 /sbin/tc class add dev eth1 parent 1:6 classid 1:645 hfsc sc d 20ms m2 15kbit ul m2 100kbit /sbin/tc filter add dev eth1 protocol ip prio 2 parent 1: u32 ht 8:0xb match ip protocol 6 0xff match u8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowid 1:645 /sbin/tc class add dev eth1 parent 1:6 classid 1:646 hfsc ls m2 10kbit ul m1 1500kbit d 5000ms m2 500kbit /sbin/tc filter add dev eth1 protocol ip prio 3 parent 1: u32 ht 8:0xb match ip sport 80 0xffff flowid 1:646 /sbin/tc class add dev eth1 parent 1:6 classid 1:647 hfsc ls m2 10kbit ul m2 400kbit /sbin/tc filter add dev eth1 protocol ip prio 4 parent 1: u32 ht 8:0xb match ip dst 0.0.0.0/0 flowid 1:647
może mi ktoś powiedzieć dlaczego jestem wrzucany w domyślną kolejkę?
Offline
dobra sprawa już ogarnięta, ostatecznie wygląda to tak:
#!/bin/bash /sbin/tc qdisc del root dev eth1 /sbin/tc qdisc add dev eth1 root handle 1: hfsc default 2 /sbin/tc filter add dev eth1 parent 1: protocol ip u32 /sbin/tc class add dev eth1 parent 1: classid 1:1 hfsc ls m2 24000kbit ul m2 24000kbit /sbin/tc class add dev eth1 parent 1: classid 1:2 hfsc ls m2 128kbit ul m2 256kbit /sbin/tc filter add dev eth1 parent 1: prio 1 handle 8: protocol ip u32 divisor 256 /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 ht 800:: match ip dst 192.168.50.0/24 hashkey mask 0x000000ff at 16 link 8: /sbin/tc class add dev eth1 parent 1:1 classid 1:5 hfsc ls m2 128kbit /sbin/tc class add dev eth1 parent 1:5 classid 1:640 hfsc sc d 30ms m2 20kbit ul m2 25kbit /sbin/tc filter add dev eth1 protocol ip prio 1 parent 1: u32 ht 8:0xa: match ip protocol 1 0xff flowid 1:640 /sbin/tc class add dev eth1 parent 1:5 classid 1:641 hfsc sc d 20ms m2 15kbit ul m2 100kbit /sbin/tc filter add dev eth1 protocol ip prio 2 parent 1: u32 ht 8:0xa: match ip protocol 6 0xff match u8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowid 1:641 /sbin/tc class add dev eth1 parent 1:5 classid 1:642 hfsc ls m2 20kbit ul m2 10000kbit /sbin/tc filter add dev eth1 protocol ip prio 3 parent 1: u32 ht 8:0xa: match ip sport 80 0xffff flowid 1:642 /sbin/tc class add dev eth1 parent 1:5 classid 1:643 hfsc ls m2 10kbit ul m2 4000kbit /sbin/tc filter add dev eth1 protocol ip prio 4 parent 1: u32 ht 8:0xa: match ip dst 0.0.0.0/0 flowid 1:643 /sbin/tc class add dev eth1 parent 1:1 classid 1:6 hfsc ls m2 128kbit /sbin/tc class add dev eth1 parent 1:6 classid 1:644 hfsc sc d 30ms m2 20kbit ul m2 25kbit /sbin/tc filter add dev eth1 protocol ip prio 1 parent 1: u32 ht 8:0xb: match ip protocol 1 0xff flowid 1:644 /sbin/tc class add dev eth1 parent 1:6 classid 1:645 hfsc sc d 20ms m2 15kbit ul m2 100kbit /sbin/tc filter add dev eth1 protocol ip prio 2 parent 1: u32 ht 8:0xb: match ip protocol 6 0xff match u8 0x05 0x0f at 0 match u16 0x0000 0xffc0 at 2 match u8 0x10 0xff at 33 flowid 1:645 /sbin/tc class add dev eth1 parent 1:6 classid 1:646 hfsc ls m2 20kbit ul m2 10000kbit /sbin/tc filter add dev eth1 protocol ip prio 3 parent 1: u32 ht 8:0xb: match ip sport 80 0xffff flowid 1:646 /sbin/tc class add dev eth1 parent 1:6 classid 1:647 hfsc ls m2 10kbit ul m2 4000kbit /sbin/tc filter add dev eth1 protocol ip prio 4 parent 1: u32 ht 8:0xb: match ip dst 0.0.0.0/0 flowid 1:647
Offline
pytanie bo nie mogę tego nigdzie w opisach znaleźć.
jaka jest różnica między "sc" a "ls"?
rt - jasne, real-time, ul - czyli ile max może pożyczyć od innych, ls - czyli minimum, ale co daje nam "sc"?
--edited
za bardzo się pośpieszyłem. sc = "rt + ls"
Ostatnio edytowany przez Nicram (2014-01-14 22:18:06)
Offline
Strony: 1