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 ?


-- 



 ...they said that we are thinking in bits , but ...

---
Send e-mail to '[EMAIL PROTECTED]' with 'unsubscribe rlug' to 
unsubscribe from this list.

Raspunde prin e-mail lui