Skip to contentSkip to conversation

help :)

LARTC Waters 2 participants 2 messages Apr 28, 2002

lore
Share & tools
lore

Waters

author
#0 lore raw

Hello lartc,

I have about 400Kbit/s link, and I need to divide it into 2 parts (for 2 computers). What I have done wrong? Correct please!

tc qdisc add dev eth0 root handle 10: cbq bandwidth 400Kbit avpkt 1000

tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 400Kbit rate \
400Kbit allot 1514 weight 40Kbit prio 8 maxburst 20 avpkt 1000

tc class add dev eth0 parent 10:1 classid 10:100 cbq bandwidth 400Kbit rate \
100Kbit allot 1514 weight 10Kbit prio 5 maxburst 20 avpkt 1000 bounded

tc class add dev eth0 parent 10:1 classid 10:200 cbq bandwidth 400Kbit rate \
300Kbit allot 1514 weight 30Kbit prio 5 maxburst 20 avpkt 1000 \
bounded

tc qdisc add dev eth0 parent 10:100 sfq quantum 1514b perturb 15 tc qdisc add dev eth0 parent 10:200 sfq quantum 1514b perturb 15

tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip dst \
10.0.0.2 flowid 10:200

tc filter add dev eth0 parent 10:0 protocol ip prio 25 u32 match ip dst \
10.0.0.3 flowid 10:100

Signature · 6 lines
Best regards,
 Waters                          mailto:[email protected]

_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
#1 lore raw
Quoted 4 lines · Waters

Hello lartc,

I have about 400Kbit/s link, and I need to divide it into 2 parts (for 2 computers). What I have done wrong? Correct please!

Bandwidth = NIC bandwidth = 10 or 100 mbit.
The rest of the commands are ok. But you will have to remove the bounded option for class 10:100 and 10:200 if you want to them to be able to borrow unused bandwidth from each other.

Stef

Quoted 21 lines

tc qdisc add dev eth0 root handle 10: cbq bandwidth 400Kbit avpkt 1000

tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 400Kbit rate \
400Kbit allot 1514 weight 40Kbit prio 8 maxburst 20 avpkt 1000

tc class add dev eth0 parent 10:1 classid 10:100 cbq bandwidth 400Kbit rate \ 100Kbit allot 1514 weight 10Kbit prio 5 maxburst 20 avpkt 1000 bounded

tc class add dev eth0 parent 10:1 classid 10:200 cbq bandwidth 400Kbit rate \ 300Kbit allot 1514 weight 30Kbit prio 5 maxburst 20 avpkt 1000 \
bounded

tc qdisc add dev eth0 parent 10:100 sfq quantum 1514b perturb 15 tc qdisc add dev eth0 parent 10:200 sfq quantum 1514b perturb 15

tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip dst \
10.0.0.2 flowid 10:200

tc filter add dev eth0 parent 10:0 protocol ip prio 25 u32 match ip dst \
10.0.0.3 flowid 10:100

Signature · 7 lines
[email protected]
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.openprojects.net
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/