[LARTC] bandwidth shaping problem...

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
This is a simple and straight configuration,
but iam not able to acheive what i wanted to test.

Please help with the script.



|--------|     |---------|    |--------|     |-------|
| src    |-----| router1 |----|router2 |-----|dest   |
|--------|     |---------|    |--------|     |-------|

Test i wanted to do:

Send(using traffic generator) 
TCP traffic 5mb
UDP traffic 3mb.

At the destination
To get
TCP traffic 3mb.
UDP traffic 1mb.



Iam trying to apply the traffic shaping at the eth1 of
the router 2.

I wanted to create two classes and of rate=3mb for tcp
1mb for udp.I am trying to use the filter with fw
options.

**************** script start*****************

tc qdisc add dev eth1 root 10: cbq bandwidth 100mb 
avpkt 1000
tc class add parent 10: classid 10:1 cbq bandwidth
100mb rate 8mb bounded.
tc qdisc add dev eth1 parent 10:1 handle 20: cbq
bandwidth 8mb avpkt 1000

tc class add dev eth1 parent20: classid 20:1 cbq
bandwidth 8mb rate 5mb prio 3
tc class add dev eth1 parent20: classid 20:2 cbq
bandwidth 8mb rate 3mb prio 5


tc filter add parent 20:protocol ip prio 3 handle 1 fw
classid 20:1
tc filter add parent 20:protocol ip prio 3 handle 2 fw
classid 20:2


ipchains -N acc_0
ipchains -N acc_1
ipchains -A output -j acc_0 -p tcp -m 1
ipchains -A output -j acc_1 -p tcp -m 1

********************end script **************




I guess there something wrong with the filtering and
ipchains section...

Can anyone please suggest me to fix the problem

Thanks
RR


__________________________________________________
Do You Yahoo!?
Yahoo! Sports - sign up for Fantasy Baseball
http://sports.yahoo.com


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux