On Mon, 28 May 2001, SUBREDU Manuel wrote:
>
>
>
> Se da un router cu 3 interfete:
>
> - eth0 -retea A
> - eth1 -retea B
> - eth2 -legatura cu ISP
>
> si un script care se vrea sa dea 1Mbit la retea A si 9Mbit la retea B
> (limita maxima la download). Reteaua A are adresele 193.231.30.254/26 iar
> reteaua B are adresele 193.231.30.192/27. Script-ul este urmatorul:
>
> #!/bin/bash
> tc qdisc del dev eth2 root
> tc qdisc add dev eth2 root handle 10: cbq bandwidth 10Mbit avpkt 1000
>
> tc class add dev eth2 parent 10:0 classid 10:1 cbq bandwidth 10Mbit rate \
> 10Mbit allot 1514 weight 1Mbit prio 8 maxburst 20 avpkt 1000
>
> tc class add dev eth2 parent 10:1 classid 10:100 cbq bandwidth 10Mbit rate \
> 1Mbit allot 1514 weight 100Kbit prio 5 maxburst 20 avpkt 1000 \
> isolated
>
> tc class add dev eth2 parent 10:1 classid 10:200 cbq bandwidth 10Mbit rate \
> 9Mbit allot 1514 weight 900Kbit prio 5 maxburst 20 avpkt 1000 \
> isolated
>
> tc qdisc add dev eth2 parent 10:100 sfq quantum 1514b perturb 15
> tc qdisc add dev eth2 parent 10:200 sfq quantum 1514b perturb 15
>
> tc filter add dev eth2 parent 10:0 protocol ip prio 100 u32 match ip dst \
> 193.231.30.254/26 flowid 10:200
>
> tc filter add dev eth2 parent 10:0 protocol ip prio 25 u32 match ip dst \
> 193.231.30.192/27 flowid 10:100
>
>
> Aveti vre-o idee ?
>
:)))
man tu limitezi upload-ul nu download-ul in scriptul ala...
gandeste-te ca cbq-ul limiteaza ceea ce PLEACA de pe o interfata deci daca
il pui pe eth2 (ISP) limitezi upload-ul spre isp si nu download-ul
----------------------------
Mihai RUSU
RoEduNet Network Engineer
"... and what if this is as good as it gets ?"
---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to
unsubscribe from this list.