Networking Forums

Networking Forums > Computer Networking > Linux Networking > throtteling bandwidth to gateway IP

Reply
Thread Tools Display Modes

throtteling bandwidth to gateway IP

 
 
Benjamin Hirsch
Guest
Posts: n/a

 
      02-11-2004, 10:59 AM
Hi there,

I am trying to get my file server to talk to my router with the bandwidth
that the internet connection can do, mainly because I use the file server
to do p2p, and at the moment my router is swamped with packages, which
makes my internet experience (especially SSH) behave somewhat sluggish.

Is there an easy way to restrict bandwidth to a certain IP (either
gateway, or ALL IP's other than my internal network)?
I looked at LARC, but I have to admit that I have trouble understanding it
well enough to write my own filters.

Any help/ suggestion is appreciated.

Benjamin Hirsch
 
Reply With Quote
 
 
 
 
Cameron Kerr
Guest
Posts: n/a

 
      02-12-2004, 07:46 AM
Benjamin Hirsch <(E-Mail Removed)> wrote:

> Is there an easy way to restrict bandwidth to a certain IP (either
> gateway, or ALL IP's other than my internal network)?


WonderShaper

I should think you would have found this if you had groups.google'd for
it.

--
Cameron Kerr
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
Benjamin Hirsch
Guest
Posts: n/a

 
      02-12-2004, 12:33 PM
Dear Cameron,

I did have a longer look at wondershaper indeed. However, the script
provided assumes that the Linux machine is doing NAT, and therefore uses a
very simple global restriction on bandwidth on the outgoing eth device,
which is not usable for me.

I did have a look at HTB traffic shaping, but somehow I cannot make my
filters work as expected.

This is what I thought that would work:
../tc qdisc add dev eth0 root handle 1: htb default 12
../tc class add dev eth0 parent 1: classid 1:1 htb rate 100000kbps
../tc class add dev eth0 parent 1:1 classid 1:10 htb rate 100000kbps
../tc class add dev eth0 parent 1:1 classid 1:11 htb rate 500kbps
../tc class add dev eth0 parent 1:1 classid 1:12 htb rate 200kbps


# ./tc filter add dev eth0 protocol ip prio 2 u32 match ip sport 4669
0xfff flowid 1:11
# ./tc filter add dev eth0 protocol ip prio 2 u32 match ip dport 4669
0xfff flowid 1:12
./tc filter add dev eth0 protocol ip prio 2 u32 match ip src
192.168.1.1/32 flowid 1:11
./tc filter add dev eth0 protocol ip prio 2 u32 match ip dst
192.168.1.1/32 flowid 1:11
./tc filter add dev eth0 protocol ip prio 2 u32 match ip dst
192.168.1.11/32 flowid 1:1
./tc filter add dev eth0 protocol ip prio 2 u32 match ip src
192.168.1.11/32 flowid 1:1

# ./tc filter add dev eth0 protocol ip prio 2 u32 match ip src
192.168.1/24 flowid 1:10
# ./tc filter add dev eth0 protocol ip prio 2 u32 match ip dst
192.168.1/24 flowid 1:10


Basically, I thought I can *either* just restict traffic from/to my
gateway, *or* restrict the incoming and outgoing ports, *or* restrict all
traffic EXCEPT the one doing from/to my local machines.

The above script shows my various attempts...

can you help? anybody?





On 12 Feb 2004 21:46:45 +1300, Cameron Kerr <(E-Mail Removed)>
wrote:

> Benjamin Hirsch <(E-Mail Removed)> wrote:
>
>> Is there an easy way to restrict bandwidth to a certain IP (either
>> gateway, or ALL IP's other than my internal network)?

>
> WonderShaper
>
> I should think you would have found this if you had groups.google'd for
> it.
>




--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Controlling bandwidth per port on a gateway/router Sandmaneo Windows Networking 2 09-05-2006 05:32 PM
gateway to gateway vpn clients can connect Nick Windows Networking 4 11-11-2004 10:01 PM
Bandwidth Low brummie Wireless Internet 4 10-06-2004 07:21 AM
How to cap bandwidth? zeebop Broadband 0 01-15-2004 07:18 PM
Windows98 Gateway will not accept static gateway Steve Windows Networking 2 09-21-2003 05:45 AM



1 2 3 4 5 6 7 8 9 10 11