Bandwidth limiting

  • Follow


I have a netork made by a router and two pcs connected to it, one via
ethernet (running linux gentoo 2.6.11) and the other via wireless (running
mac os 9.2).
Since the linux box is always connected and the other in't, i'd like to make
it "slow down" downloads when the other one (with mac os) accesses the
internet. Is this possible?
0
Reply erixal1 (32) 4/24/2005 12:51:59 PM

In comp.os.linux.misc Erix <erixal@n0sp4m.gmail.com>:
> I have a netork made by a router and two pcs connected to it, one via
> ethernet (running linux gentoo 2.6.11) and the other via wireless (running
> mac os 9.2).
> Since the linux box is always connected and the other in't, i'd like to make
> it "slow down" downloads when the other one (with mac os) accesses the
> internet. Is this possible?

What kind of downloads? With p2p you can reasonable use tc to
shape outgoing to your needs, preventing the system from hogging
your whole bandwidth. If those are http/ftp downloads, you could
use squid (http://www.squid-cache.org/) and look into it's delay
classes feature. 

-- 
Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94)
mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/'
#bofh excuse 39: terrorist activities
0
Reply USENET22 (5462) 4/24/2005 4:24:39 PM


> What kind of downloads? With p2p you can reasonable use tc to
> shape outgoing to your needs, preventing the system from hogging
> your whole bandwidth. If those are http/ftp downloads, you could
> use squid (http://www.squid-cache.org/) and look into it's delay
> classes feature.

Yes it's p2p, but the point is to activate the limitations only when
the other computer is active

0
Reply erixal (8) 4/24/2005 10:26:56 PM

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On mandag 25. april 2005, 00:26 Andrea  Lodi tried to express an opinion:

> the point is to activate the limitations only when
> the other computer is active

Sounds like you are looking for something called
"Quality of Service" (QoS)

Sorry, I do not have a link :-\

- -- 
Solbu - http://www.solbu.net
Remove 'ugyldig' for email
PGP key ID: 0xFA687324
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFCbFTFT1rWTfpocyQRAvTiAKCjNsm1VZ7t16fXMBazBrYAJPyk7gCguask
BfRQ26hxVOv3gIx9kXMFr2k=
=KbwE
-----END PGP SIGNATURE-----
0
Reply solbu (103) 4/25/2005 2:24:02 AM

> Sounds like you are looking for something called
> "Quality of Service" (QoS)
>
> Sorry, I do not have a link :-\

Ok i'll search documentation about QoS, thanks.

0
Reply erixal (8) 4/25/2005 9:02:27 AM

Erix wrote:
>>Sounds like you are looking for something called
>>"Quality of Service" (QoS)
>>
>>Sorry, I do not have a link :-\
> 
> 
> Ok i'll search documentation about QoS, thanks.

Check: http://lartc.org
It's the LARTC Howto, explains almost everything about
QoS and Linux.

Regards.

-- 

Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
jkerouac@bgsec.com
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPA�A

The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
                -- Jack Kerouac, "On the Road"
0
Reply jkerouac (1264) 4/25/2005 12:51:07 PM

> Check: http://lartc.org
> It's the LARTC Howto, explains almost everything about
> QoS and Linux.

I've read almost all of it but it doesn't seem to solve the problem. I
can limit the bandwidth on my linux box (which is *not*  the router of
the network!), but i have to do it *only* when the other (mac) computer
accesses the internet.
I think that two possible solutions could be:
a) tell the router to redirect all the traffic to/from the mac computer
to the linux box, then configure the linux box so that the packets
to/from the mac are treated with some priority using queing
disciplines.
b) write something that when executed on the mac computer sends to the
linux box a signal, and configure the linux box to throttle down
bandwidth upon receipt of that signal. this should be simpler if only i
knew anything about coding under mac os :\

any other suggestion?

0
Reply erixal (8) 4/25/2005 10:45:11 PM

Erix wrote:
> a) tell the router to redirect all the traffic to/from the mac computer
> to the linux box, then configure the linux box so that the packets
> to/from the mac are treated with some priority using queing
> disciplines.

This is a good option, but you need the Linux box always on to
act as a router and bandwidth limiter. The good thing is you
can use it as a firewall, proxy, etc.

> b) write something that when executed on the mac computer sends to the
> linux box a signal, and configure the linux box to throttle down
> bandwidth upon receipt of that signal. this should be simpler if only i
> knew anything about coding under mac os :\

I've never used a Mac, so I can't help you there, but I think it
can be done. If you are using MacOS X there should be a way to know
if the machine is connected, and using an expect script from the Linux
machine you could check if the connection is up. But as I said I've
never used a Mac.

Regards.

-- 

Jose Maria Lopez Hernandez
Director Tecnico de bgSEC
jkerouac@bgsec.com
bgSEC Seguridad y Consultoria de Sistemas Informaticos
http://www.bgsec.com
ESPA�A

The only people for me are the mad ones -- the ones who are mad to live,
mad to talk, mad to be saved, desirous of everything at the same time,
the ones who never yawn or say a commonplace thing, but burn, burn, burn
like fabulous yellow Roman candles.
                -- Jack Kerouac, "On the Road"
0
Reply jkerouac (1264) 4/26/2005 9:06:51 AM

> Erix wrote:
> > a) tell the router to redirect all the traffic to/from the mac
computer
> > to the linux box, then configure the linux box so that the packets
> > to/from the mac are treated with some priority using queing
> > disciplines.
>
>
> This is a good option, but you need the Linux box always on to
> act as a router and bandwidth limiter. The good thing is you
> can use it as a firewall, proxy, etc.

Yeah it should work fine (i hope) but i think it's pretty stupid to
redirect the traffic from the router to the linux box and from the
linux box again to the router (even though it can be functional)

> > b) write something that when executed on the mac computer sends to
the
> > linux box a signal, and configure the linux box to throttle down
> > bandwidth upon receipt of that signal. this should be simpler if
only i
> > knew anything about coding under mac os :\
>
>
> I've never used a Mac, so I can't help you there, but I think it
> can be done. If you are using MacOS X there should be a way to know
> if the machine is connected, and using an expect script from the
Linux
> machine you could check if the connection is up. But as I said I've
> never used a Mac.

Unfortunately it's mac os 9.2 :\ however i could do a ping every n
minutes from the linux box to the mac, which would be a lot simpler but
less accurate, or as i said write a little program to manually inform
the linux box of the mac connection.
I'll manage to solve the problem however, thanks for the help :-)

0
Reply erixal (8) 4/26/2005 10:39:29 AM

8 Replies
46 Views

(page loaded in 0.13 seconds)


Reply: