All of lore.kernel.org
 help / color / mirror / Atom feed
* [LARTC] Help with prioritizing internet Cafe Terminals
@ 2004-11-17 10:41 Craig Main
  2004-11-17 14:29 ` Andreas Klauer
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Craig Main @ 2004-11-17 10:41 UTC (permalink / raw)
  To: lartc

Hi All,

I am new to tc so please forgive me. I have read as much documentation
as I can get my hands on, but I still have problems with getting the
rules right. Here is my scenario:

Internet Cafe/Office

4 Internet Cafe Terminals
3 Office Terminals

Leased Line connectivity at 64Kbps.

What I would like to have:

All Cafe terminals have priority to the internet over the office
machines. Each cafe terminal must not be able to have all the
bandwidth if other cafe terminals are online. If all cafe terminals
are online at once, the bandwidth must be shared evenly amongst them.
All Office Terminals must have the lease priority.

I hope this makes sense.

I anyone in a position to help me here?

TIA

Craig
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LARTC] Help with prioritizing internet Cafe Terminals
  2004-11-17 10:41 [LARTC] Help with prioritizing internet Cafe Terminals Craig Main
@ 2004-11-17 14:29 ` Andreas Klauer
  2004-11-19 12:59 ` Craig Main
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Andreas Klauer @ 2004-11-17 14:29 UTC (permalink / raw)
  To: lartc

On Wednesday 17 November 2004 11:41, Craig Main wrote:
> All Cafe terminals have priority to the internet over the office
> machines. Each cafe terminal must not be able to have all the
> bandwidth if other cafe terminals are online. If all cafe terminals
> are online at once, the bandwidth must be shared evenly amongst them.
> All Office Terminals must have the lease priority.
>
> I hope this makes sense.
>
> I anyone in a position to help me here?

My Fair NAT script [1] comes very close to that. It can share available 
bandwidth evenly among your machines; however, it can't give your cafe a 
higher priority than your office. A workaround for that might be to put 
all office machines together in a group, so all of them together would get 
the same priority and bandwidth as a single cafe terminal.

If the script isn't suitable for your network, it may serve as an example. 
At least the documentation or the class graphics should give you some idea 
how to create your own shaping setup.

HTH
Andreas

[1] http://www.metamorpher.de/fairnat/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LARTC] Help with prioritizing internet Cafe Terminals
  2004-11-17 10:41 [LARTC] Help with prioritizing internet Cafe Terminals Craig Main
  2004-11-17 14:29 ` Andreas Klauer
@ 2004-11-19 12:59 ` Craig Main
  2004-11-19 17:36 ` Jason Boxman
  2004-11-20  7:10 ` Craig Main
  3 siblings, 0 replies; 5+ messages in thread
From: Craig Main @ 2004-11-19 12:59 UTC (permalink / raw)
  To: lartc

I have out together the following script, can those in the know please
comment on what I have done and whether it will achieve what I am
looking for. Many thanks.


#!/bin/bash

tc qdisc del dev eth1 root

tc qdisc add dev eth1 root handle 1: htb default 12

tc class add dev eth1 parent 1: classid 1:1 htb rate 64kbit ceil
64kbit burst 20k

tc class add dev eth1 parent 1: classid 1:2 htb rate 15kbit ceil
64kbit prio 0 burst 20k
tc class add dev eth1 parent 1: classid 1:3 htb rate 15kbit ceil
64kbit prio 0 burst 20k
tc class add dev eth1 parent 1: classid 1:4 htb rate 15kbit ceil
64kbit prio 0 burst 20k
tc class add dev eth1 parent 1: classid 1:5 htb rate 15kbit ceil
64kbit prio 0 burst 20k

tc class add dev eth1 parent 1: classid 1:12 htb rate 4kbit ceil 64kbit prio 1

tc filter add dev eth1 protocol ip parent 1: prio 1 handle 1 fw classid 1:2
tc filter add dev eth1 protocol ip parent 1: prio 1 handle 2 fw classid 1:3
tc filter add dev eth1 protocol ip parent 1: prio 1 handle 3 fw classid 1:4
tc filter add dev eth1 protocol ip parent 1: prio 1 handle 4 fw classid 1:5

iptables -F PREROUTING -t mangle

iptables -A PREROUTING -t mangle -i eth0 -p tcp -s 192.168.0.1 -j MARK
--set-mark 1
iptables -A PREROUTING -t mangle -i eth0 -p tcp -s 192.168.0.2 -j MARK
--set-mark 1
iptables -A PREROUTING -t mangle -i eth0 -p tcp -s 192.168.0.3 -j MARK
--set-mark 1
iptables -A PREROUTING -t mangle -i eth0 -p tcp -s 192.168.0.4 -j MARK
--set-mark 1
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LARTC] Help with prioritizing internet Cafe Terminals
  2004-11-17 10:41 [LARTC] Help with prioritizing internet Cafe Terminals Craig Main
  2004-11-17 14:29 ` Andreas Klauer
  2004-11-19 12:59 ` Craig Main
@ 2004-11-19 17:36 ` Jason Boxman
  2004-11-20  7:10 ` Craig Main
  3 siblings, 0 replies; 5+ messages in thread
From: Jason Boxman @ 2004-11-19 17:36 UTC (permalink / raw)
  To: lartc

On Friday 19 November 2004 07:59, Craig Main wrote:
> I have out together the following script, can those in the know please
> comment on what I have done and whether it will achieve what I am
> looking for. Many thanks.
>
>
<snip>
> iptables -F PREROUTING -t mangle
>
> iptables -A PREROUTING -t mangle -i eth0 -p tcp -s 192.168.0.1 -j MARK
> --set-mark 1
> iptables -A PREROUTING -t mangle -i eth0 -p tcp -s 192.168.0.2 -j MARK
> --set-mark 1

You are giving all your addresses the same MARK?  I don't think that's what 
you want.

> iptables -A PREROUTING -t mangle -i eth0 -p tcp -s 192.168.0.3 -j MARK
> --set-mark 1
> iptables -A PREROUTING -t mangle -i eth0 -p tcp -s 192.168.0.4 -j MARK
> --set-mark 1

-- 

Jason Boxman
Perl Programmer / *NIX Systems Administrator
Shimberg Center for Affordable Housing | University of Florida
http://edseek.com/ - Linux and FOSS stuff

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [LARTC] Help with prioritizing internet Cafe Terminals
  2004-11-17 10:41 [LARTC] Help with prioritizing internet Cafe Terminals Craig Main
                   ` (2 preceding siblings ...)
  2004-11-19 17:36 ` Jason Boxman
@ 2004-11-20  7:10 ` Craig Main
  3 siblings, 0 replies; 5+ messages in thread
From: Craig Main @ 2004-11-20  7:10 UTC (permalink / raw)
  To: lartc

That was a typo on my part...I am more interested in the actual tc
commands and setups. Will they do what I want?

Thanks
C


On Fri, 19 Nov 2004 12:36:20 -0500, Jason Boxman <jasonb@edseek.com> wrote:
> On Friday 19 November 2004 07:59, Craig Main wrote:
> > I have out together the following script, can those in the know please
> > comment on what I have done and whether it will achieve what I am
> > looking for. Many thanks.
> >
> >
> <snip>
> > iptables -F PREROUTING -t mangle
> >
> > iptables -A PREROUTING -t mangle -i eth0 -p tcp -s 192.168.0.1 -j MARK
> > --set-mark 1
> > iptables -A PREROUTING -t mangle -i eth0 -p tcp -s 192.168.0.2 -j MARK
> > --set-mark 1
> 
> You are giving all your addresses the same MARK?  I don't think that's what
> you want.
> 
> > iptables -A PREROUTING -t mangle -i eth0 -p tcp -s 192.168.0.3 -j MARK
> > --set-mark 1
> > iptables -A PREROUTING -t mangle -i eth0 -p tcp -s 192.168.0.4 -j MARK
> > --set-mark 1
> 
> --
> 
> Jason Boxman
> Perl Programmer / *NIX Systems Administrator
> Shimberg Center for Affordable Housing | University of Florida
> http://edseek.com/ - Linux and FOSS stuff
> 
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2004-11-20  7:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-17 10:41 [LARTC] Help with prioritizing internet Cafe Terminals Craig Main
2004-11-17 14:29 ` Andreas Klauer
2004-11-19 12:59 ` Craig Main
2004-11-19 17:36 ` Jason Boxman
2004-11-20  7:10 ` Craig Main

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.