* Re: [LARTC] Some question
2004-10-28 11:33 [LARTC] Some question Key
@ 2004-10-28 11:47 ` Eric Leblond
2004-10-28 11:52 ` Stef Coene
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Eric Leblond @ 2004-10-28 11:47 UTC (permalink / raw)
To: lartc
On Thu, 2004-10-28 at 18:33 +0700, Key wrote:
> Hi,
>
> I have some question about HTB :
>
> 1. I read that HTB priority is only 8 level, from 0 to 7. So if i want to
> give different priority
> to more than 8 class, what should i do?
It is a #define in htb source code in linux kernel tree. It can be
changed easily :
TC_HTB_NUMPRIO
in
include/linux/pkt_sched.h
BR,
--
Eric Leblond <eric@regit.org>
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [LARTC] Some question
2004-10-28 11:33 [LARTC] Some question Key
2004-10-28 11:47 ` Eric Leblond
@ 2004-10-28 11:52 ` Stef Coene
2004-10-28 12:00 ` Andreas Klauer
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Stef Coene @ 2004-10-28 11:52 UTC (permalink / raw)
To: lartc
On Thursday 28 October 2004 13:33, Key wrote:
> Hi,
>
> I have some question about HTB :
>
> 1. I read that HTB priority is only 8 level, from 0 to 7. So if i want to
> give different priority
> to more than 8 class, what should i do?
Nothing, except changing the source to support more :)
> 2. What happen if i have class eth0-2:10 with RULE\x192.168.1.0/28 and
> eth0-2:20 with RULE\x192.168.1.1.
> Ip address 192.168.1.1 will get both bandwidth from class id 2:20 and 2:10
> ? How about if i want ip address 192.168.1.1 only get bandwidth from class
> id 2:20 only?
Do you use?
First match will classify the packet and no other filter will be checked.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [LARTC] Some question
2004-10-28 11:33 [LARTC] Some question Key
2004-10-28 11:47 ` Eric Leblond
2004-10-28 11:52 ` Stef Coene
@ 2004-10-28 12:00 ` Andreas Klauer
2004-10-28 12:01 ` George Alexandru Dragoi
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Andreas Klauer @ 2004-10-28 12:00 UTC (permalink / raw)
To: lartc
Am Thursday 28 October 2004 13:33 schrieb Key:
> 1. I read that HTB priority is only 8 level, from 0 to 7. So if i want
> to give different priority to more than 8 class, what should i do?
8 levels is plenty. You must have a really, really unusual / complicated
setup to require HTB prio at all, let alone more than 8 levels.
> Ip address 192.168.1.1 will get both bandwidth from class id 2:20 and
> 2:10 ?
Highly unlikely.
> How about if i want ip address 192.168.1.1 only get bandwidth
> from class id 2:20 only?
Use filter prio to catch 192.168.1.1 before the 192.168.1.* rule.
HTH
Andreas
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [LARTC] Some question
2004-10-28 11:33 [LARTC] Some question Key
` (2 preceding siblings ...)
2004-10-28 12:00 ` Andreas Klauer
@ 2004-10-28 12:01 ` George Alexandru Dragoi
2004-10-28 12:05 ` Key
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: George Alexandru Dragoi @ 2004-10-28 12:01 UTC (permalink / raw)
To: lartc
On Thu, 28 Oct 2004 18:33:14 +0700, Key <kristiadi_himawan@dtp.net.id> wrote:
> Hi,
>
> I have some question about HTB :
>
> 1. I read that HTB priority is only 8 level, from 0 to 7. So if i want to
> give different priority
> to more than 8 class, what should i do?
>
> 2. What happen if i have class eth0-2:10 with RULE\x192.168.1.0/28 and
> eth0-2:20 with RULE\x192.168.1.1.
> Ip address 192.168.1.1 will get both bandwidth from class id 2:20 and 2:10 ?
> How about if i want ip address 192.168.1.1 only get bandwidth from class id
> 2:20 only?
For 2:20 put a smaller number on its filter, because the filter
distribute traffic to qdisc atached to htb leaf classes.
> Thanks for any help.
>
> _______________________________________________
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
>
--
Bla bla
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [LARTC] Some question
2004-10-28 11:33 [LARTC] Some question Key
` (3 preceding siblings ...)
2004-10-28 12:01 ` George Alexandru Dragoi
@ 2004-10-28 12:05 ` Key
2004-10-30 10:48 ` Stef Coene
2005-12-14 13:43 ` [LARTC] some question Kyungil Song
6 siblings, 0 replies; 8+ messages in thread
From: Key @ 2004-10-28 12:05 UTC (permalink / raw)
To: lartc
Sometimes i have to face situation like that,
so how about if ip address 192.168.1.1 should get
bandwidth only from 2:20 and become first time to check,
configuring the prio?
----- Original Message -----
From: "Stef Coene" <stef.coene@docum.org>
To: <lartc@mailman.ds9a.nl>
Sent: Thursday, October 28, 2004 6:52 PM
Subject: Re: [LARTC] Some question
On Thursday 28 October 2004 13:33, Key wrote:
> Hi,
>
> I have some question about HTB :
>
> 1. I read that HTB priority is only 8 level, from 0 to 7. So if i want to
> give different priority
> to more than 8 class, what should i do?
Nothing, except changing the source to support more :)
> 2. What happen if i have class eth0-2:10 with RULE\x192.168.1.0/28 and
> eth0-2:20 with RULE\x192.168.1.1.
> Ip address 192.168.1.1 will get both bandwidth from class id 2:20 and 2:10
> ? How about if i want ip address 192.168.1.1 only get bandwidth from class
> id 2:20 only?
Do you use?
First match will classify the packet and no other filter will be checked.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
_______________________________________________
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] 8+ messages in thread* Re: [LARTC] Some question
2004-10-28 11:33 [LARTC] Some question Key
` (4 preceding siblings ...)
2004-10-28 12:05 ` Key
@ 2004-10-30 10:48 ` Stef Coene
2005-12-14 13:43 ` [LARTC] some question Kyungil Song
6 siblings, 0 replies; 8+ messages in thread
From: Stef Coene @ 2004-10-30 10:48 UTC (permalink / raw)
To: lartc
On Thursday 28 October 2004 14:05, Key wrote:
> Sometimes i have to face situation like that,
> so how about if ip address 192.168.1.1 should get
> bandwidth only from 2:20 and become first time to check,
> configuring the prio?
You can use filters with different prio. The filters with the lowest prio
will be checked first.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 8+ messages in thread* [LARTC] some question
2004-10-28 11:33 [LARTC] Some question Key
` (5 preceding siblings ...)
2004-10-30 10:48 ` Stef Coene
@ 2005-12-14 13:43 ` Kyungil Song
6 siblings, 0 replies; 8+ messages in thread
From: Kyungil Song @ 2005-12-14 13:43 UTC (permalink / raw)
To: lartc
I have multihome network line.
I want to use multi gateway, but i have some trouble
+-----------------------+
| 30.1.1.1 (eth0) | <----> 10.1.1.1 ( eth1) < ---> internet
| |
| 10.1.1.2 (eth1) |
| | <----> 20.1.1.1 (eth2) < ---> internet
| 20.1.1.2 (eth2) |
+------------------------+
eth1 ip : 10.1.1.2
gw ip (eth1) : 10.1.1.1
eth2 ip : 20.1.1.2
gw ip (eth2) : 20.1.1.1
ip route add default dev 10.1.1.1 dev eth1 table 1
ip route add default dev 20.1.1.1 dev eth2 table 2
ip rule add fwmark 0x01 table 1 prio 200
ip rule add fwmark 0x02 table 2 prio 255
iptables -t mangle -A OUTPUT -i eth1 -d 192.168.0.0/24 -t mangle -p tcp --dport ftp -j MARK --set-mark 1
iptables -t mangle -A OUTPUT -i eth2 -d 192.168.2.0/24 -t mangle -p tcp --dport ftp -j MARK --set-mark 1
if i try to connecting to 192.168.0.1, machine use line 1 ( eth1)
if i try to connecting to 192.168.2.1, machine use line 2( eth2)
Although Machine use gw2, machine source ip address is eth1 ip address.
Can I use eth2 ip address when Machine use gw2 ?
I can not use "iptables SNAT" in OUTPUT Chain.
I want just like this command "iptables -t nat -A OUTPUT -o eth1 --to 10.1.1.2 -j SNAT"
but i can't use this command.
Thanks for reading my articles
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 8+ messages in thread