All of lore.kernel.org
 help / color / mirror / Atom feed
* Egress bandwidth limiting not working?
@ 2013-05-07 10:53 Sebastian Arcus
  2013-05-08  6:10 ` Andrew Beverley
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Sebastian Arcus @ 2013-05-07 10:53 UTC (permalink / raw)
  To: lartc

I am trying to limit the bandwidth used by the egress leg as per the 
lartc cookbook here: 
http://www.lartc.org/howto/lartc.cookbook.ultimate-tc.html

The ingress works fine (well, it is a bit wobbly - but it limits the 
rate at roughly the expected level). However, the egress doesn't appear 
to be working. With no tc active, I get about 300mbs both ways (I'm 
testing in VMs). When it is on, the ingress is down to roughly 500kbs, 
but the egress is down to only about *150mbs*.

Interfaces on both sides use 1500 for MTU. Kernels on both sides are 
3.8.4. Has the syntax changed recently - or is the example at the link 
above incomplete? I appreciate any hints as to what I might be doing wrong.

For the purpose of testing, for egress, I've simplified everything down 
to one root qdisc, one class (to set the rate) and one filter (to catch 
everything):


##############################################
#  egress

# root cbq
tc qdisc add dev eth0 root handle 1: cbq avpkt 1000 \
     bandwidth 1000Mbit

# shape everything at $UPLINK speed - this prevents huge queues in your
# DSL modem which destroy latency:
tc class add dev eth0 parent 1: classid 1:1 cbq rate 500kbit \
     allot 1500 prio 5 bounded isolated

# include everything in the filter
tc filter add dev eth0 protocol ip parent 1:1 prio 3 u32 match \
     ip dst 0.0.0.0/32 flowid 1:1


##############################################
#  ingress

tc qdisc add dev eth0 handle ffff: ingress

tc filter add dev eth0 parent ffff: protocol ip prio 50 u32 \
     match ip src 0.0.0.0/0 police rate 500kbps burst 10k drop flowid :1

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-05-14 19:38 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-07 10:53 Egress bandwidth limiting not working? Sebastian Arcus
2013-05-08  6:10 ` Andrew Beverley
2013-05-08  7:03 ` Sebastian Arcus
2013-05-08 17:24 ` Andrew Beverley
2013-05-08 18:29 ` Sebastian Arcus
2013-05-14 19:38 ` Andrew Beverley

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.