Re: lug-bg: Re: HTB:message in my log
- Subject: Re: lug-bg: Re: HTB:message in my log
- From: svetla@email.domain.hidden (svetla)
- Date: Wed, 19 Mar 2003 22:31:57 +0200
vremenno opravih problema s htb-to kato:
#!/bin/sh
TC="/sbin/tc"
#This function takes three params: ip, peering trafic, internat. traffic
limit_user() {
#trafic we send to the users
/usr/local/bin/usleep 100000
${TC} class add dev eth0 parent 1: classid 1:$1 htb \
rate ${2}kbps ceil ${2}kbps
/usr/local/bin/usleep 100000
${TC} class add dev eth0 parent 1: classid 1:$((256 + $1)) htb \
rate ${3}kbps ceil ${3}kbps
<p> ${TC} filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match \
ip dst 212.36.6.$1 match ip tos 0x40 0xff flowid 1:$((256 + $1))
${TC} filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match \
ip dst 212.36.6.$1 match ip tos 0x80 0xff flowid 1:$((256 + $1))
${TC} filter add dev eth0 protocol ip parent 1:0 prio 1 u32 match \
ip dst 212.36.6.$1 flowid 1:$1
#traffic we send to internet
# /usr/local/bin/usleep 100000
# ${TC} class add dev eth1 parent 1: classid 1:$1 htb \
# rate ${2}kbps ceil ${2}kbps
# ${TC} filter add dev eth1 protocol ip parent 1:0 prio 1 u32 \
# match ip src 212.36.6.$1 flowid 1:$1
}
tart() {
echo "Starting shaper"
${TC} qdisc add dev eth0 root handle 1: htb r2q 1 default 255
${TC} class add dev eth0 parent 1: classid 1:255 htb rate 100Mbit ceil
100Mbit
/usr/local/bin/usleep 100000
${TC} qdisc add dev eth1 root handle 1: htb default 255
${TC} class add dev eth1 parent 1: classid 1:255 htb rate 4Mbit ceil
4Mbit
/usr/local/bin/usleep 100000
for ((i=3; i<63; i++))
do
case $i in
2|7|55)
limit_user $i 256 256
;;
3)
limit_user $i 32 32
;;
54)
limit_user $i 4 2
;;
56)
limit_user $i 6 3
;;
*)
limit_user $i 70 70
;;
esac
done
}
top () {
echo "Stoping shaper ..."
${TC} qdisc del dev eth0 root handle 1: htb default 255
${TC} qdisc del dev eth1 root handle 1: htb default 255
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
sleep 1
start
;;
*)
echo $"Usage: $0 {start|stop|restart}"
esac
<p>unsleep -a! Dano da izdurji..
makar che iznamerih edin pach..purvo shte probvam taka, da vidia kolko shte
izdurji
<p>Pozdravi
SVetla
George Danchev writes:
<em class="quotelev1">> On 18 03 2003 21:40, Nickola Kolev wrote:
<em class="quotelev2">>> On Tue, 18 Mar 2003 21:14:32 +0200
<em class="quotelev2">>> George Danchev <danchev_at_spnet.net> wrote:
<em class="quotelev2">>>
<em class="quotelev2">>> [ cut ]
<em class="quotelev2">>>
<em class="quotelev4">>> > > Íå, òîâà íÿìà ñúâñåì, àìà ñúâñåì íèùî îáùî. Ïúðâî, òîçè ñàéò å ïîñâåòåí
<em class="quotelev4">>> > > íà íåèçâåñòåí äîñåãà çà ìåí ïðîåêò, îñíîâàí ÂÚÐÕÓ htb (è ìàé cbq)
<em class="quotelev4">>> > > ïîääðúæêàòà â ÿäðîòî. Âòîðî, êàòåãîðè÷íî òâúðäÿ, ÷å ñúîáùåíèÿòà â
<em class="quotelev4">>> > > ëîãîâåòå îò òîçè âèä íå ñà ðåçóëòàò îò áúã â ÿäðîòî. Äà íå ãîâîðèì, ÷å
<em class="quotelev4">>> > > ñòàâà âúïðîñ çà îïðàâåí áúã â shaperd, à íå â êîäà íà sch_htb. Ïðî÷åòè
<em class="quotelev4">>> > > ïî-ïðåäíèÿ ìè ïîñò.
<em class="quotelev3">>> >
<em class="quotelev3">>> >
<em class="quotelev3">>> > Íèêîëà, HTB âñå îùå íå å ÷àñò îò stock 2.4 kernel-a. Ñúäåéêè ïî òîâà
<em class="quotelev3">>> > êîåòî êàçâà è Àíòîí Òîäîðîâ çà âêëþ÷åíèÿ äåáúã è ìÿòàíåòî íà íÿêàêâè
<em class="quotelev3">>> > âúòðåøíè ñúñòîÿíèÿ íà ÿäòîðî â ëîã-à ñè ìèñëÿ ÷å áúäåùèÿ
<em class="quotelev3">>> > net/sched/sch_htb.c êîéòî òðåáå äà âëèçà â stock å îùå åêñïåðèìåíòàëåí è
<em class="quotelev3">>> > çà òîâà ñåäè îòâúí êàòî ïà÷.
<em class="quotelev2">>>
<em class="quotelev2">>> [ cut ]
<em class="quotelev2">>>
<em class="quotelev2">>> Ãåîðãè, íå èñêàì äà çàõâàùàìå ïîðåäíèÿ flame war, çàùîòî ìè å îìðúçíàëî îò
<em class="quotelev2">>> íåäîîáÿñíåíè ìèñëè è íåäîîáìèñëåíè îáÿñíåíèÿ. :)
<em class="quotelev1">>
<em class="quotelev1">> àç ïîíå íå âèæäàì íèêàêâè ïðåòåíöèè çà çàõâàùàíå íà flamewar... ìàé ïðîñòî íå
<em class="quotelev1">> òðÿáâà äà ñå ïðèêàçà çà ÿäðà çà äà íÿìà íåäîðàçóìåíèÿ ;-) Ê ;-)
<em class="quotelev1">>
<em class="quotelev2">>>  íèêàêúâ ñëó÷àé íå èñêàì äà èçðàçÿâàì íåñúãëàñèå ñ òåá. Ïðîñòî ñå îïèòàõ
<em class="quotelev2">>> äà ïîìîãíà ñ íÿêîëêî äîêóìåíòà, ñëåä ïðî÷èòàíåòî íà êîèòî ìîæå äà ñòàíå
<em class="quotelev2">>> ÿñíî êàê äà áúäå ðåøåí ïðîáëåìà ïîíå îòíîñíî ñúîáùåíèÿòà â ñèñòåìíèÿ
<em class="quotelev2">>> æóðíàë çà ãîëåìèíàòà íà quantum ñòîéíîñòòà â htb. Èìà ñè ãëîáàëíà (çà âñÿêî
<em class="quotelev2">>> åäíî ìðåæîâî óñòðîéñòâî, íà êîåòî å çàêà÷åíî htb) ïðîìåíëèâà, íàðå÷åíà r2q.
<em class="quotelev2">>> Êîéòî ãî èíòåðåñóâà, äà õîäè äà ÷åòå. :)
<em class="quotelev1">>
<em class="quotelev1">> ÎÊ, ñúãëàñèõ ñå.
<em class="quotelev1">>
<em class="quotelev2">>> Çà sch_htb ñïîìåíàõ ìåæäó äðóãîòî, è êàêòî âèæäàø, íå ñúì íàâëèçàë â
<em class="quotelev2">>> ïîäðîáíîñòè, òúé êàòî íå ñúì kernel õàêåð. :) À ñïîìåíàõ çà íåãî, çàùîòî
<em class="quotelev1">>
<em class="quotelev1">> àç ñúùî íå ñúì, íî òîâàíå ïðà÷è äà ñå áðàóçâà íàòàì íàñàì ...
<em class="quotelev1">>
<em class="quotelev2">>> Âèêòîð Âàñèëåâ äàäå àäðåñ, íà êîéòî áåøå îïèñàíî íåùî, íÿìàùî íèùî
<em class="quotelev2">>> îáùî ñ ïðîáëåìà, ïîñòíàò îò Ñâåòëà.
<em class="quotelev1">>
<em class="quotelev1">> å ãîâîðåõìå çà htb â ÿäðîòî ... ìèñëÿ ÷å ñå ðàçáðàõìå ;-) ïðîñòî èñêàõ äà
<em class="quotelev1">> ïîä÷åðòàÿ ÷å àêî ðàáîòè çà åäíè â äàäåíè óñëîâèÿ è ñèòóàöèÿ òî òîâà íå å
<em class="quotelev1">> çàäúëæèòåëíî äà ðàáîòè çà äðóãè ... ñòðóâà ìè ñå ÷å ñ tc ñå øàøêà kernel's
<em class="quotelev1">> htb, íå ñúì ñèãóðåí, íî ñå äàäîõà reports îò 2-3 ìàøèíè (íå âÿðâàì âñè÷êè äà
<em class="quotelev1">> ñà ñ bad ram, ìîæå è òîâà äà å) ñ åâåíòóàëíî ðåøåíèå sleep seconds ìåæäó tc
<em class="quotelev1">> èíæåêöèéòå ... ñúãëàñíè ñìå ÷å user space util íå ìîæå (ïî-òî÷íîíå áèâà) äà
<em class="quotelev1">> ïðèòåñíÿâà ÿäðîòî ïî íèêàêâè íà÷èíè
<em class="quotelev1">>
<em class="quotelev2">>> À, è ìåæäó äðóãîòî, htb å ÷àñò îò îôèöèàëíîòî Linus'êî ÿäðî îò âåðñèÿ
<em class="quotelev2">>> 2.4.20. Îò òîâà ïî-stock, çäðàâå ìó êàæè. :)))
<em class="quotelev1">>
<em class="quotelev1">> ïðàâ ñè ... ãëåäàë ñúì 2.4.19 sources... poor me. Âñå îùå ñè ìèñëÿ ÷å HTB
<em class="quotelev1">> ìàêàð è ïî-ïðîñò êàòî èìïëåìàíòàèÿ èìàäà ãîíè ïî robustness CBQ íà Êóçíåöîâ.
<em class="quotelev1">> (èçâèíÿâàì ñå, ÷å ñïîìåíàâàì ïàê ÷àñòè îò ÿäðîòî ;-)
<em class="quotelev1">>
<em class="quotelev1">> --
<em class="quotelev1">> printk("Greets, fr33zb1\n");
<em class="quotelev1">>
<em class="quotelev1">> ============================================================================
<em class="quotelev1">> A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
<em class="quotelev1">> http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
<em class="quotelev1">> To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
<em class="quotelev1">> ============================================================================
<p>Svetlana Pesheva
System Administrator
"VMT Design"
contact: 098/254246
#48332919
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================
|