[Asterisk-Users] Bandwidth control on a home office network

steve at daviesfam.org steve at daviesfam.org
Sat Oct 16 14:20:19 MST 2004



On Sat, 16 Oct 2004, Rich Adamson wrote:

> There are some rather expensive devices that you can install that will
> rate limit both upload and download traffic. Those devices artifically
> control the download traffic by withholding TCP acknowledgment packets,
> etc. Not sure how effective they are though.

Well - you can use your handy Linux box for some rough and ready control 
of inbound traffic.

I just do the following to limit TCP traffic to 200k; that leaves 300 or 
so for UDP

# Adjusted by SLD for tcp only.  Brute force way to not disturb VOIP
tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 \
   match ip src 0.0.0.0/0 \
   match ip protocol 0x6 0xff \
   police rate 200kbit burst 10k drop flowid :1

The tc rule just causes packets to be dropped if the rate gets too high.  
TCP sees that as congestion and slows up.

Steve




More information about the asterisk-users mailing list