LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 01-26-2004, 11:14 AM   #1
gabios
LQ Newbie
 
Registered: Jan 2004
Location: Romania
Posts: 2

Rep: Reputation: 0
htb for gurus [diferentiate on ip]


I have a LAN in my block of flat.
Our isp give us 1024 Kbit/sec when we make traffic in .ro and 256 Kbit/sec when we make traffic in .com.

We are 7 computers in LAN.
We want to make a bandwidth shaping in order to achieve the following:
if 2 guys are going in .ro and 3 in .com their bandwidth should be distributed like this:
256/3=85 Kbit/sec each guy who goes in .com
and (1024-256)/2=384 Kbit/sec each guy who goes in .ro.

If 1 guy is online and goes in .com he should have 256, and if he goes in .ro he should have 1024.

I have all the ips that are in .ro.

i do htb on the internal interface eth1.
the root class has rate 1024 with ceil 1024
I tried to create 2 htb classes in the root class, one for .com with ceil 256
and one for .ro with ceil 1024.
here the filters are with handle [iptables mangle mark by src_ip - where the packet comes from].

each subclass has 10 subclasses equally shared among all 7 internal ips.
[rate 36 Kbit/sec - ceil 256] where parent is .com subclass
[rate 146 Kbit/sec - ceil 1024] where parent is .com subclass

that's it

It doesn't do what I want, I mean if all 7 are online, someone downloads with full speed and the rest are watching the screens.

I need an working example if someone has it, or some concrete guidance.

Thank you in advance

Gabi
 
Old 05-02-2004, 02:09 PM   #2
frostschutz
Member
 
Registered: Apr 2004
Distribution: Gentoo
Posts: 95

Rep: Reputation: 28
It's really hard to do shaping like that. Best solution would be to divide IPs, e.g. have a rule that matches on ALL .ro IPs. This gives you two groups: ro and not ro. But I have no idea if this can actually be done. Maybe ask your ISP which rules he uses to determine wether you're currently communicatin in .ro or not?

As for sharing bandwidth fairly for multiple users in the LAN in general, without that special .ro/.com stuff, you could have a look at my own script here: http://www.metamorpher.de/ipshape/

It works quite well with 5 Users. Maybe fair sharing in general is already sufficient? - you should try simple solutions first before doing the overcomplicated stuff.
 
  


Reply



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
QoS with HTB diaskimo Linux - Networking 3 08-08-2005 12:57 AM
htb interface roopunix Linux - Networking 7 07-29-2005 08:32 AM
HTB as a child of another HTB - doesn't work ddaas Linux - Networking 5 07-25-2005 03:21 AM
How To HTB linuxcolor Fedora 1 02-15-2005 07:46 AM
htb.init Ipolit Slackware 2 05-02-2004 01:23 PM

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

All times are GMT -5. The time now is 01:00 PM.

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