LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-18-2005, 10:50 PM   #1
mrweirdo
LQ Newbie
 
Registered: Feb 2004
Posts: 21

Rep: Reputation: 15
ip bandwidth limiter script problems


Hello after some research I was able to come up with a traffic shaping bandwidth limiter script that makes use of tc comands. For some reason I am unable to get it to work however. I'm trying to limit the upload links from my Ubuntu box to the ip 192.168.10 on the same LAN as the Ubuntu box. Basicaly I want the box assigned the IP to only be able to download files off the ubuntu box at 512kpbs.

here is the script:
shaper.sh
Code:
# change these values to suit your needs
DEV=eth0
UPLINK=512
IP=192.168.0.10

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

tc class add dev $DEV parent 1: classid 1:1 cbq rate ${UPLINK}kbit allot 1500 prio 5 bounded isolated 

tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip dst ${IP} flowid 1:1
The when I go to run i get the following:
Code:
mrweirdo@ubuntu:~$ sudo sh /etc/shaper/shaper-script.sh
"?at is "
Usage: ... cbq bandwidth BPS avpkt BYTES [ mpu BYTES ]
               [ cell BYTES ] [ ewma LOG ]
Illegal "rate"
Illegal "match"
mrweirdo@ubuntu:~$
Hopefully someone out there has some ideas as I'm currently stuck. Anyways thanks for taking the time to look at my thread
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bandwith limiter Derrick3 Linux - Newbie 4 09-17-2005 12:24 PM
bandwidth limiter Lleb_KCir Linux - Software 1 04-19-2005 10:07 PM
Bandwidth Allocation Script error.. joirnange Linux - Networking 17 01-10-2005 08:15 PM
network limiter body00 Linux - Networking 6 05-10-2004 04:53 AM
How do you limit bandwidth on your webserver account with a script??? timmy_laf Programming 1 01-08-2004 03:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration