Traffic Shaping not working with CBQ
Quoted 4 lines · Raghuveer K
Hi Stef/Martin,
Iam resending this mail for the third time, I request you to please respond ASAP.
You mail ended twice in my "to read" folder.
Quoted 22 lines
Iam stucked as my traffic control is not working, I just tried first with incoming traffic shaping, below is the test setup and rules applied. Your valuable suggestion will surely help me and make it right.
Traffic Control is not taking place after applying the below rules. Here follows the test setup:-
1. The linux m/c 'seth0(100Mbits, WAN)is connected to 128 Kbits ADSL and eth1 to the LAN.2. I tried doing traffic control for incoming(at eth1). 3. In LAN, I connected 3 m/c's(all linux). 4. The ISP rate taken is 97% of 128Kbits. 5. Bandwidth Monitoring is done by using IPTraf on each LAN m/c's.Here are the rules Iam applying to control incoming traffic at LAN interface(eth1) for LAN users.
Here actual Isp rate = 128Kbit, rate taken = 97% of 128Kbit, eth1 ip is 192.168.5.1/* root qdisc */
tc qdisc add dev eth1 root handle 1: cbq bandwidth 100Mbit avpkt 1000 cell 8
Quoted 8 lines
/* Parent Class */
tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate 124Kbit weight 12Kbit prio 3 allot 1514 cell 8 maxburst 10 avpkt 1000 bounded
/* Whether should I place the below filter for Parent class..??? tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip src 0/0 match ip dst 0/0 classid 1:1
*/
You can also add the other filters to the root qdisc 1:0.
Quoted 26 lines
/* Child Classes */
/* 1st LAN user<192.168.5.2> = 37Kbit */
tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 100Mbit rate 37Kbit weight 3Kbit prio 3 allot 1514 cell 8 maxburst 10 avpkt 1000 tc filter add dev eth1 parent 1:1 protocol ip prio 3 u32 match ip src 0/0 match ip dst 192.168.5.2 classid 1:2/* 2nd LAN user<192.168.5.3> = 24Kbit */
tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth 100Mbit rate 24Kbit weight 2Kbit prio 3 allot 1514 cell 8 maxburst 10 avpkt 1000 tc filter add dev eth1 parent 1:1 protocol ip prio 3 u32 match ip src 0/0 match ip dst 192.168.5.3 classid 1:3/* 3rd LAN user<192.168.5.4> = 12Kbit */
tc class add dev eth1 parent 1:1 classid 1:4 cbq bandwidth 100Mbit rate 12Kbit weight 1Kbit prio 3 allot 1514 cell 8 maxburst 10 avpkt 1000 tc filter add dev eth1 parent 1:1 protocol ip prio 3 u32 match ip src 0/0 match ip dst 192.168.5.4 classid 1:4/* Default : Rest/Other traffic = 51Kbit*/
tc class add dev eth1 parent 1:1 classid 1:5 cbq bandwidth 100Mbit rate 51Kbit weight 5Kbit prio 3 allot 1514 cell 8 maxburst 10 avpkt 1000 tc filter add dev eth1 parent 1:1 protocol ip prio 3 u32 match ip src 0/0 match ip dst 0/0 classid 1:5
Quoted 5 lines
I have few observations and queries, as follows:--
1.In my test setup the ISP rate is fluctuating in the range of 21Kbits to 131 Kbits for 128Kbits ADSL.
2. I have not added any filter for the parent class. Is it required...? What happens if I add...?
Add all your filters to the root qdisc and put the traffic in the destination class. Like :
tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip src 0/0 match ip dst 0/0 classid 1:5
Quoted 2 lines
3. Is "iptraf " tool OK for monitoring the distribution of bandwidth on each LAN m/c.
Yes.
Quoted 5 lines
4. In case, if I shape outgoing traffic on eth0 interface, whether shall I take outgoing and incoming ISP rate's in 30:70 ratio, i.e 30% if 128Kbits for
outgoing Qdisc(eth0) and 70% for incoming Qdisc(eth1). As 128 Kbits
rate being asyncronous(ADSL).
What's the speed of your connection? 128kbits for download, but how much for uploads?
Quoted 2 lines
Can you pls guide me where am I going wrong..? Do I continue using CBQ or try instead HTB rules.
If you can, go for htb. Much less confusing options.
Als, check out with tc -s -d class show dev eth1 if the filters are working and each class is processing packets.
Stef
Signature · 8 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/
Thanks Stef, Let me incorporate and test with your valuable suggestions. I will get back to you soon.
Regards
-Raghu
Quoted 121 lines · Stef Coene
Quoted 6 lines · Raghuveer K
Hi Stef/Martin,
Iam resending this mail for the third time, I request you to please respond ASAP.
You mail ended twice in my "to read" folder.
Quoted 22 lines
Iam stucked as my traffic control is not working, I just tried first with incoming traffic shaping, below is the test setup and rules applied. Your valuable suggestion will surely help me and make it right.
Traffic Control is not taking place after applying the below rules. Here follows the test setup:-
1. The linux m/c 'seth0(100Mbits, WAN)is connected to 128 Kbits ADSL and eth1 to the LAN.2. I tried doing traffic control for incoming(at eth1). 3. In LAN, I connected 3 m/c's(all linux). 4. The ISP rate taken is 97% of 128Kbits. 5. Bandwidth Monitoring is done by using IPTraf on each LAN m/c's.Here are the rules Iam applying to control incoming traffic at LAN interface(eth1) for LAN users.
Here actual Isp rate = 128Kbit, rate taken = 97% of 128Kbit, eth1 ip is 192.168.5.1/* root qdisc */
tc qdisc add dev eth1 root handle 1: cbq bandwidth 100Mbit avpkt 1000 cell 8Quoted 10 lines
/* Parent Class */
tc class add dev eth1 parent 1:0 classid 1:1 cbq bandwidth 100Mbit rate 124Kbit weight 12Kbit prio 3 allot 1514 cell 8 maxburst 10 avpkt 1000 bounded
/* Whether should I place the below filter for Parent class..??? tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip src 0/0 match ip dst 0/0 classid 1:1
*/You can also add the other filters to the root qdisc 1:0.
Quoted 26 lines
/* Child Classes */
/* 1st LAN user<192.168.5.2> = 37Kbit */
tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 100Mbit rate 37Kbit weight 3Kbit prio 3 allot 1514 cell 8 maxburst 10 avpkt 1000 tc filter add dev eth1 parent 1:1 protocol ip prio 3 u32 match ip src 0/0 match ip dst 192.168.5.2 classid 1:2/* 2nd LAN user<192.168.5.3> = 24Kbit */
tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth 100Mbit rate 24Kbit weight 2Kbit prio 3 allot 1514 cell 8 maxburst 10 avpkt 1000 tc filter add dev eth1 parent 1:1 protocol ip prio 3 u32 match ip src 0/0 match ip dst 192.168.5.3 classid 1:3/* 3rd LAN user<192.168.5.4> = 12Kbit */
tc class add dev eth1 parent 1:1 classid 1:4 cbq bandwidth 100Mbit rate 12Kbit weight 1Kbit prio 3 allot 1514 cell 8 maxburst 10 avpkt 1000 tc filter add dev eth1 parent 1:1 protocol ip prio 3 u32 match ip src 0/0 match ip dst 192.168.5.4 classid 1:4/* Default : Rest/Other traffic = 51Kbit*/
tc class add dev eth1 parent 1:1 classid 1:5 cbq bandwidth 100Mbit rate 51Kbit weight 5Kbit prio 3 allot 1514 cell 8 maxburst 10 avpkt 1000 tc filter add dev eth1 parent 1:1 protocol ip prio 3 u32 match ip src 0/0 match ip dst 0/0 classid 1:5Quoted 7 lines
I have few observations and queries, as follows:--
1.In my test setup the ISP rate is fluctuating in the range of 21Kbits to 131 Kbits for 128Kbits ADSL.
2. I have not added any filter for the parent class. Is it required...? What happens if I add...?Add all your filters to the root qdisc and put the traffic in the destination class. Like :
tc filter add dev eth1 parent 1:0 protocol ip prio 3 u32 match ip src 0/0 match ip dst 0/0 classid 1:5Quoted 4 lines
3. Is "iptraf " tool OK for monitoring the distribution of bandwidth on each LAN m/c.
Yes.
Quoted 7 lines
4. In case, if I shape outgoing traffic on eth0 interface, whether shall I take outgoing and incoming ISP rate's in 30:70 ratio, i.e 30% if 128Kbits for
outgoing Qdisc(eth0) and 70% for incoming Qdisc(eth1). As 128 Kbits
rate being asyncronous(ADSL).What's the speed of your connection? 128kbits for download, but how much for uploads?
Quoted 4 lines
Can you pls guide me where am I going wrong..? Do I continue using CBQ or try instead HTB rules.
If you can, go for htb. Much less confusing options.
Als, check out with tc -s -d class show dev eth1 if the filters are working and each class is processing packets.Stef
Signature · 12 lines
****** This email is confidential and is intended for the original recipient(s) only. If you have erroneously received this mail, please delete it immediately and notify the sender. Unauthorized copying, disclosure or distribution of the material in this mail is prohibited. Views expressed in this mail are those of the individual sender and do not bind Gsec1 Limited. or its subsidiary, unless the sender has done so expressly with due authority of Gsec1.****** _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/