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!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2013-12-05 19:27:59

  siarka2107 - Użyszkodnik DUG

siarka2107
Użyszkodnik DUG
Skąd: Warszawa
Zarejestrowany: 2006-04-05

tc filtry mieszające - dlaczego wpadam w domyślną kolejkę

witam, dawno już tutaj nie zaglądałem ;) mam problem z filtrami mieszającymi - mianowicie mam coś takiego:

Kod:

/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

 

#2  2013-12-07 15:41:16

  siarka2107 - Użyszkodnik DUG

siarka2107
Użyszkodnik DUG
Skąd: Warszawa
Zarejestrowany: 2006-04-05

Re: tc filtry mieszające - dlaczego wpadam w domyślną kolejkę

dobra sprawa już ogarnięta, ostatecznie wygląda to tak:

Kod:

#!/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

 

#3  2014-01-14 22:05:26

  Nicram - Użytkownik

Nicram
Użytkownik
Zarejestrowany: 2006-03-28

Re: tc filtry mieszające - dlaczego wpadam w domyślną kolejkę

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

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
Możesz wyłączyć AdBlock — tu nie ma reklam ;-)

[ Generated in 0.008 seconds, 9 queries executed ]

Informacje debugowania

Time (s) Query
0.00012 SET CHARSET latin2
0.00004 SET NAMES latin2
0.00100 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.142.201.93' WHERE u.id=1
0.00076 REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '3.142.201.93', 1732422259)
0.00065 SELECT * FROM punbb_online WHERE logged<1732421959
0.00078 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=24760 AND t.moved_to IS NULL
0.00009 SELECT search_for, replace_with FROM punbb_censoring
0.00193 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=24760 ORDER BY p.id LIMIT 0,25
0.00080 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=24760
Total query time: 0.00617 s