Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Using Bandwidth Arbitrator, must i use a 2.4 kernel?
Syco54645
post Feb 13 2006, 02:40 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 17-January 06
Member No.: 5,976



i was reading the guide so that i could install Bandwidth Arbitrator and noticed that it said to use a 2.4 kernel. i really do not want to drop back from 2.6, so i was wondering if i do in fact have to use 2.4.

if 2.4 is manditory, what else could i use to limit my upload?

thanks

-Syco54645
Go to the top of the page
 
+Quote Post
Robert83
post Feb 13 2006, 05:25 AM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,439
Joined: 3-January 04
From: Germany
Member No.: 2,069



Hi,

you can use the 2.6 kernel, check their website , but the guide is written for 2.4 because it's painless to install it like that. And if it's inside the lan, there is no real reason to go for the latest greatest.

it works for me for a year now with 135 clients, and 2.4 kernel. Rh9.

Sincerely
Robert B


--------------------
Robert Becskei
robert83@linuxhelp.net
--------------------
May the source be with us!
--------------------
AMD X2-3800 @ 2400Mhz
2048MB DDR 400Mhz
DFI Lanparty UT4 NF4 ULTRA-D
GeForce 7800GT
250GB+250GB
Pioneer DVD-RW
17inch Samsung Syncmaster 757NF
WinXP Pro (SP2)/ CentOS 4.3
--------------------
Go to the top of the page
 
+Quote Post
Syco54645
post Feb 13 2006, 07:15 AM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 17-January 06
Member No.: 5,976



well i would want to have it on my machine (using ubuntu breezy) and that is why i want to use the newest (or a newer) kernel. if i could find another tool to just simply limit my total upload coming from my machine, then i would use it. if this will work for me then i will give it a go.

-Syco54645
Go to the top of the page
 
+Quote Post
Robert83
post Feb 13 2006, 07:29 AM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,439
Joined: 3-January 04
From: Germany
Member No.: 2,069



Hi,

If you only want to limit down upload traffic to a certain level, for all Clients, and don't wanna do real time bandwidth management over all clients, or if you only use one computer , then bandwidth arbitrator would be a overkill for your situation.

Then maybe you should use this instead

CBQ
CODE
#!/bin/bash

# The Ultimate Setup For Your Internet Connection
#
#
# Set the following values to somewhat less then your actual download
# and uplink speed. In kilobits
# Cable Downlink = 300kbits , Uplink 128kbits
DOWNLINK=290
UPLINK=110
DEV=eth1

# clean existing down- and uplink qdiscs, hide errors
tc qdisc del dev $DEV root      2> /dev/null > /dev/null
tc qdisc del dev $DEV ingress   2> /dev/null > /dev/null

###### Uplink

# install root CBQ

tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit

# shape everything at $UPLINK speed - this prevents huge queues in your
# DSL modem which destroys latency:
# main class

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

# high prio class 1:10:

tc class add dev $DEV parent 1:1 classid 1:10 cbq rate ${UPLINK}kbit
allot 1600 prio 1 avpkt 1000

# bulk and default class 1:20 - gets slightly less traffic,
# and a lower priority

tc class add dev $DEV parent 1:1 classid 1:20 cbq rate $[9*$UPLINK/10]kbit
allot 1600 prio 2 avpkt 1000

# both get Stochastic Fairness:
tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10

# start filters
# TOS Minimum Delay (ssh,NOT scp) in 1:10:
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32
match ip tos 0x10 0xff flowid 1:10

# ICMP (ip protocol 1) in the interactive class 1:10 so we
# can do measurements & impress our friends:
tc filter add dev $DEV parent 1:0 protocol ip prio 11 u32
match ip protocol 1 0xff flowid 1:10

# To speed up downloads while an upload is going on, put ACK packets in
# the interactive class:

tc filter add dev $DEV parent 1: protocol ip prio 12 u32
       match ip protocol 6 0xff
       match u8 0x05 0x0f at 0
       match u16 0x0000 0xffc0 at 2
       match u8 0x10 0xff at 33
       flowid 1:10

# rest is 'non-interactive' ie 'bulk' and ends up in 1:20

tc filter add dev $DEV parent 1: protocol ip prio 13 u32
       match ip dst 0.0.0.0/0 flowid 1:20

########### downlink #############
# slow downloads down to somewhat less than the real speed to prevent
# queuing at our ISP. Tune to see how high you can set it.
# ISPs tend to have *huge* queues to make sure big downloads are fast
#
# attach ingress policer :

tc qdisc add dev $DEV handle ffff: ingress

# filter *everything* to it (0.0.0.0/0), drop everything that's
# coming in too fast:

tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src
  0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1


or HTB
CODE
#!/bin/bash

# The Ultimate Setup For Your Internet Connection At Home
#
#
# Set the following values to somewhat less than your actual download
# and uplink speed. In kilobits
DOWNLINK=240
UPLINK=110
DEV=eth1

# clean existing down- and uplink qdiscs, hide errors
tc qdisc del dev $DEV root    2> /dev/null > /dev/null
tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null

###### uplink

# install root HTB, point default traffic to 1:20:

tc qdisc add dev $DEV root handle 1: htb default 20

# shape everything at $UPLINK speed - this prevents huge queues in your
# DSL modem which destroy latency:

tc class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}kbit burst 6k

# high prio class 1:10:

tc class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit
  burst 6k prio 1

# bulk & default class 1:20 - gets slightly less traffic,
# and a lower priority:

tc class add dev $DEV parent 1:1 classid 1:20 htb rate $[9*$UPLINK/10]kbit
  burst 6k prio 2

# both get Stochastic Fairness:
tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10
tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10

# TOS Minimum Delay (ssh, NOT scp) in 1:10:
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32
     match ip tos 0x10 0xff  flowid 1:10

# ICMP (ip protocol 1) in the interactive class 1:10 so we
# can do measurements & impress our friends:
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32
       match ip protocol 1 0xff flowid 1:10

# To speed up downloads while an upload is going on, put ACK packets in
# the interactive class:

tc filter add dev $DEV parent 1: protocol ip prio 10 u32
  match ip protocol 6 0xff
  match u8 0x05 0x0f at 0
  match u16 0x0000 0xffc0 at 2
  match u8 0x10 0xff at 33
  flowid 1:10

# rest is 'non-interactive' ie 'bulk' and ends up in 1:20


########## downlink #############
# slow downloads down to somewhat less than the real speed  to prevent
# queuing at our ISP. Tune to see how high you can set it.
# ISPs tend to have *huge* queues to make sure big downloads are fast
#
# attach ingress policer:

tc qdisc add dev $DEV handle ffff: ingress

# filter *everything* to it (0.0.0.0/0), drop everything that's
# coming in too fast:

tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src
   0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1


Sincerely
Robert B


--------------------
Robert Becskei
robert83@linuxhelp.net
--------------------
May the source be with us!
--------------------
AMD X2-3800 @ 2400Mhz
2048MB DDR 400Mhz
DFI Lanparty UT4 NF4 ULTRA-D
GeForce 7800GT
250GB+250GB
Pioneer DVD-RW
17inch Samsung Syncmaster 757NF
WinXP Pro (SP2)/ CentOS 4.3
--------------------
Go to the top of the page
 
+Quote Post
Syco54645
post Feb 13 2006, 09:05 AM
Post #5


Whats this Lie-nix Thing?
*

Group: Members
Posts: 7
Joined: 17-January 06
Member No.: 5,976



so either of these two scripts will work fine (provided i have cbq or htb). will it do anything other than limit the upload / download speed? all that i am really concerned with is my uplink as when that gets maxed, it kills my connection for the rest of the people in the apartment (and since u upload alot to my server, this causes some problems).

when i get back tonight, i will definatley look into using one of thse if they will do nothing more than limit the speeds of the entire eth0 interface, but i would rather not have to add shaping rules for different protocols and what have you.

thanks

-Syco54645
Go to the top of the page
 
+Quote Post
Robert83
post Feb 13 2006, 12:02 PM
Post #6


Its GNU/Linuxhelp.net
*******

Group: Support Specialist
Posts: 1,439
Joined: 3-January 04
From: Germany
Member No.: 2,069



Hi,

check this out, so I don't have to write again what is already written smile.gif

http://www.ibiblio.org/pub/Linux/docs/HOWT...OOK.ULTIMATE-TC

Sincerely
Robert B


--------------------
Robert Becskei
robert83@linuxhelp.net
--------------------
May the source be with us!
--------------------
AMD X2-3800 @ 2400Mhz
2048MB DDR 400Mhz
DFI Lanparty UT4 NF4 ULTRA-D
GeForce 7800GT
250GB+250GB
Pioneer DVD-RW
17inch Samsung Syncmaster 757NF
WinXP Pro (SP2)/ CentOS 4.3
--------------------
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 17th October 2017 - 01:01 AM