Skip to contentSkip to conversation

traffic shaping on single ip...

LARTC Cristiano Soares 2 participants 2 messages Apr 8, 2004 – Apr 9, 2004

lore
Share & tools
lore
#0 lore raw

Hi all. Im using the following CQB shaper to shape IP addresses:

DEV=eth1 (internal eth)

tc qdisc del dev $DEV root
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit

tc class add dev $DEV parent 1: classid 1:1 cbq rate 256kbit allot 1500 prio 5 bounded isolated tc class add dev $DEV parent 1: classid 1:2 cbq rate 512kbit allot 1500 prio 5 bounded isolated

tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst 192.168.2.230 flowid 1:2 tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip src 192.168.2.230 flowid 1:2

tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst 192.168.2.188 flowid 1:1 tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip src 192.168.2.188 flowid 1:1

tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst 192.168.2.172 flowid 1:1 tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip src 192.168.2.172 flowid 1:1

The thing is, i want to be able to shape inbound different from outbound traffic. I use an ADSL line so, i need to shape up significantly lower than down. Thanks a lot. And also, is there a better way to shape traffic like this? Thanks a lot.

Cristiano

#1 lore raw

You cant control input traffic that way at all.

you need to use imq for inbound traffic control, or at least policers.

also cbq is very old and should be replaced with htb

----- Original Message -----
From: Cristiano Soares
To: [email protected]
Sent: Thursday, April 08, 2004 7:54 PM
Subject: [LARTC] traffic shaping on single ip...

Hi all. Im using the following CQB shaper to shape IP addresses:

DEV=eth1 (internal eth)

tc qdisc del dev $DEV root
tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 100mbit

tc class add dev $DEV parent 1: classid 1:1 cbq rate 256kbit allot 1500 prio 5 bounded isolated tc class add dev $DEV parent 1: classid 1:2 cbq rate 512kbit allot 1500 prio 5 bounded isolated

tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst 192.168.2.230 flowid 1:2 tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip src 192.168.2.230 flowid 1:2

tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst 192.168.2.188 flowid 1:1 tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip src 192.168.2.188 flowid 1:1

tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst 192.168.2.172 flowid 1:1 tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip src 192.168.2.172 flowid 1:1

The thing is, i want to be able to shape inbound different from outbound traffic. I use an ADSL line so, i need to shape up significantly lower than down. Thanks a lot. And also, is there a better way to shape traffic like this? Thanks a lot.

Cristiano