Solved

rate limit / bandwidth throttling / shaping

Posted on 2007-12-01
1
767 Views
Last Modified: 2008-02-01
I have been trying to use TC example from this thread but it does not seem to be working. The inbound and the outbound are the same and it give an error trying to add the outbound(already exist). It also looks like this was design for a router and I am trying to use this in a public server and limit all traffic to 512kb. I tried the to replace the private address with our public but still can't get it to work in any direction.

I am using RH ES4

http://www.experts-exchange.com/Networking/Linux_Networking/Q_20819743.html
0
Comment
Question by:redbaran28
1 Comment
 
LVL 43

Accepted Solution

by:
ravenpl earned 500 total points
ID: 20390438
In the previous thread there's nothing about inbound limiting.
http://lartc.org/howto/lartc.imq.html # needs kernel pathing, but really works
http://tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.adv-qdisc.ingress.html # it's really unusable, but...

For full examples refer
http://lartc.org/howto/lartc.cookbook.ultimate-tc.html
http://www.faqs.org/docs/Linux-HOWTO/Traffic-Control-tcng-HTB-HOWTO.html
use htb. If You need just limit outbound traffic to 512k

TC=/sbin/tc
DEV="dev eth0"
#flush qdisc
$TC qdisc del $DEV root 2>&1>/dev/null

#exit if $0 stop
[ _$1 = _stop ] && exit 0

#init qdisc, set default class for traffic
$TC qdisc add $DEV root handle 1:0 htb default 2
#root class with full NIC speed
$TC class add $DEV parent 1:0 classid 1:1 htb rate 100mbit ceil 100mbit burst 64k

#default class, general porpouse
$TC class add $DEV parent 1:1 classid 1:2 htb rate 512kbit ceil 512kbit burst 32k

#optionally attach SFQ to default class
$TC qdisc add dev eth2 parent 1:2 handle 20: sfq perturb 15
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
2 Gateways (bandwidth) - One domain 7 75
Fortigate Question 5 22
VPN tunnel between Watchguard and OpenVPN? 1 38
Network Vs Redistribute Connected Commands 3 12
How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question