[LARTC] How to manage relatively internet bandwidth while don't know specific input internet bandwidth ?

2005-01-03 Thread ngo giang

Hello,
 
My organization has a LAN network and the LAN is connected to internet by a Cisco router. 
 
internet ---| Cisco router |-- LAN
 
(The cisco router can not be replaced by a linux router, I think, because the LAN has more 
 
than 1000 computers.)
 
LAN network is divided into some sub networks. I have to relatively manage internet
 
bandwidth (between applications and between computers ) at these sub-networks using linux 
 
router .
 
   internet
  |    > bandwidth here is known.
    cisco router
 /      |      \  
 
   /    |    \  > I don't know internet bandwidth of each sub network
 linux   linux    ..
    router  router    
 / |
   sub      sub .
   network    network   .
 
My problem is  I don't know the internet bandwidth of each sub network. 
 
Can you give me some suggestion about schemes I can use in  a linux router  (what qdisc, ... ).
 
Thank in advance,
 
nhgiang  
		Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses.

Re: [LARTC] Scheduler Mechnisms!

2005-01-03 Thread Jonathan Day
It depends on what you mean by "more". More for Linux?
Certainly. HTB3 seems to be a popular mechanism, and
you can use IMQ to set up an intermediate device to
allow shaping of both inbound and outbound traffic,
using one (or more!) scheduling mechanisms in series.

(In fact, there are several versions of IMQ out there.
I've given links to both the projects that seem to be
alive, but there may be more.)

There's also ESFQ, but there doesn't seem to be much
active work on that. There are forward ports to recent
Linux kernels, though. QLinux has a version of H-SFQ
for Linux, but again it seems to be getting long in
the tooth. Unfortunately, I can't find any forward
ports of that.

http://luxik.cdi.cz/~devik/qos/htb/
http://www.linuximq.net/
http://pupa.da.ru/imq/

http://www.digriz.org.uk/jdg-qos-script/#qos-2.6
http://kem.p.lodz.pl/~peter/qnet/
http://lass.cs.umass.edu/software/qlinux/

There are a great many systems that I can't find a
Linux version of. Cisco routers support something
called "Class-Based Weighted Fair Queueing" (CBWFQ)
which seems to be a hybrid of classful and classless
scheduling. Cisco also has two versions of ECN, for
forwards and backwards propogation.

I've listed below a number of papers detailing various
QoS schemes. Some of these have been implemented in
other OS' (the BSDs tend to get a lot of this stuff
implemented quickly for them as part of ALTQ) and some
I've never seen an implementation at all. However, the
papers should all give enough information to write a
version for Linux.

Note: ALTQ can be found at:
http://www.csl.sony.co.jp/person/kjc/kjc/software.html

Please note that this list is not exhaustive. Rather,
I got exhausted after trying to find what was out
there and what state it was currently in. QoS is a big
field, if the number of papers is anything to go by.
Linux only touches the fringes of it. If anyone feels
particularly bored, or in need of a good ego boost, it
would be cool to see if a reasonable selection of
these could be introduced into Linux over the 2.7
cycle.

EDF (Earliest Deadline First)
http://citeseer.ist.psu.edu/13919.html

BLUE (an alternative to RED)
http://citeseer.ist.psu.edu/feng99blue.html

AF PHB (Assured Forwarding Per-Hop Behaviour)
http://citeseer.ist.psu.edu/552302.html

SFB (Stochastic Fair Blue)
http://citeseer.ist.psu.edu/551253.html

GREEN (a pro-active variant on the theme of RED)
http://citeseer.ist.psu.edu/feng02green.html

SMART (Scalable Multipath Aggregated RouTing)
http://citeseer.ist.psu.edu/vutukury00smart.html

CSFQ (Core Stateless Fair Queueing)
http://citeseer.ist.psu.edu/391.html

StFQ (Start-Time Fair Queueing)
http://citeseer.ist.psu.edu/goyal96starttime.html

RFQ (Rainbow Fair Queueing)
http://citeseer.ist.psu.edu/cao00rainbow.html

PrFQ (Probabalistic Fair Queueing)
http://citeseer.ist.psu.edu/anker00prfq.html

ERR (Elastic Round Robin)
http://citeseer.ist.psu.edu/kanhere02fair.html

GFQ (Greedy Fair Queueing)
http://citeseer.ist.psu.edu/690207.html

PERR (Prioritized Elastic Round Robin)
http://citeseer.ist.psu.edu/681127.html

AOQ (Anchored Opportunity Queueing)
http://citeseer.ist.psu.edu/701742.html

BSFQ (Bin Sort Fair Queueing)
http://citeseer.ist.psu.edu/622188.html


As for the final question on what happens between
enqueue and dequeue, there are various diagrams out
there which show different aspects of how packets
traverse the system. I've included a few links to
those I could find:

http://open-source.arkoon.net/kernel/kernel_net.png
http://ebtables.sourceforge.net/br_fw_ia/PacketFlow.png
http://ebtables.sourceforge.net/br_fw_ia/br_fw_ia.html
http://www.docum.org/docum.org/kptd/

The last of these is the infamous Kernel Packet
Travelling Diagram. Most links to this that I've been
able to find are broken. It should be noted that the
diagrams all refer to the Linux 2.4 kernel. Linux 2.6
has quite a few QoS changes to it, but I'm unclear as
to whether they significantly alter any of the flows.

I hope this is of some use. Or, at the very least, is
an effective remedy to insomnia. :)

Jonathan

--- Zhenyu Wu <[EMAIL PROTECTED]> wrote:

> Hello,
> 
> Normally, in addition to such qdisc scheduler
> mechanisms as FIFO, PQ, WRR, WFQ,
> are there any more? Then, there is a confusion on
> scheduler in Linux enviroment:
> Assume there is a qdisc, such as RED as a leaf qdisc
> in a router, we know, if
> there is packet which want to enqueue the packet,
> the Function red_enqueue is
> called, but when the packet leave the queue(when the
> Function red_dequeue is
> called)? I think it is meaningless when the pack
> leaves the queue just it enterred
> it. Is there anything need to be done betweent the
> packet's enqueue and dequeue?
> 
> Best,
> 
> 
> ___
> LARTC mailing list / LARTC@mailman.ds9a.nl
> http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO:
> http://lartc.org/
> 




__ 
Do you Yahoo!? 
Jazz up your holiday email with

Re: [LARTC] load balancing and DNAT

2005-01-03 Thread Brad Barnett
On Tue, 4 Jan 2005 11:33:59 +0800
"Ming-Ching Tiew" <[EMAIL PROTECTED]> wrote:

> 
> From: "Brad Barnett" <[EMAIL PROTECTED]>
> > 
> > It does, but before we go too much further, does anyone have an answer
> > to my original question?  I'm bogged for time (aren't well all? ;),
> > and I'd prefer to just find out if my problems with DNAT are indeed
> > from what I think...
> > 
> 
> But I am getting at the point that you can't really do a proper NAT load
> balancing without Julian's patches. You have to get it to compiled.
> Period.
> 

Well, you can do load balancing, but yes.. it is much improved (to say the
least) with his patches.  However, I misspoke.  I was referring to simple
routing for multiple providers.  That is, just routing back out on the
interface that traffic originates on.

Unfortunately, since I can't apply Julian's patches, any benefits I might
gain are not even worth consideration. :(  Since I tried to apply his
patches, and am unable to, please stop rubbing my nose in it. ;)  I am
aware that I am missing something, please don't make my loss seem ever
more painful ;P



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


Re: [LARTC] load balancing and DNAT

2005-01-03 Thread Ming-Ching Tiew

From: "Brad Barnett" <[EMAIL PROTECTED]>
> 
> It does, but before we go too much further, does anyone have an answer to
> my original question?  I'm bogged for time (aren't well all? ;), and I'd
> prefer to just find out if my problems with DNAT are indeed from what I
> think...
> 

But I am getting at the point that you can't really do a proper NAT load 
balancing without Julian's patches. You have to get it to compiled. Period.

Cheers.




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


Re: [LARTC] load balancing and DNAT

2005-01-03 Thread Brad Barnett
On Tue, 4 Jan 2005 11:11:10 +0800
"Ming-Ching Tiew" <[EMAIL PROTECTED]> wrote:

> 
> From: "Brad Barnett" <[EMAIL PROTECTED]>
> > > >
> > > 
> > > PPTP server or client ? I supposed you mean MPPE patches ?
> > > I compiled it together with Julian Anastasov's patches on 2.4.27. 
> > > I am not sure if they work together, but it compiles at least !
> > 
> > MPPE patches.
> > 
> > I have a feeling that you don't have some of the same .config options
> > that I do. 
> 
> Really ? I am more thinking we are not having the exact same patches. 
> The PPTP stuff has a lot of ***OLD*** information floating around.
> 

It does, but before we go too much further, does anyone have an answer to
my original question?  I'm bogged for time (aren't well all? ;), and I'd
prefer to just find out if my problems with DNAT are indeed from what I
think...

Other than that.. I'm using the 'linux-2.4.25-mppe-20040216.patch' MPPE
patches
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] load balancing and DNAT

2005-01-03 Thread Ming-Ching Tiew

From: "Brad Barnett" <[EMAIL PROTECTED]>
> > >
> > 
> > PPTP server or client ? I supposed you mean MPPE patches ?
> > I compiled it together with Julian Anastasov's patches on 2.4.27. 
> > I am not sure if they work together, but it compiles at least !
> 
> MPPE patches.
> 
> I have a feeling that you don't have some of the same .config options that
> I do. 

Really ? I am more thinking we are not having the exact same patches. 
The PPTP stuff has a lot of ***OLD*** information floating around.

Cheers.




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


Re: [LARTC] load balancing and DNAT

2005-01-03 Thread Brad Barnett
On Tue, 4 Jan 2005 10:27:17 +0800
"Ming-Ching Tiew" <[EMAIL PROTECTED]> wrote:

> 
> From: "Brad Barnett" <[EMAIL PROTECTED]>
> > 
> > Personal experience.  I can't get any recent 2.4.x kernel to compile
> > with PPTP and the Julian Anastasov's patches.  It's been over a month
> > now, but I tried several versions, I believe back to 2.4.25...
> >
> 
> PPTP server or client ? I supposed you mean MPPE patches ?
> I compiled it together with Julian Anastasov's patches on 2.4.27. 
> I am not sure if they work together, but it compiles at least !

MPPE patches.

I have a feeling that you don't have some of the same .config options that
I do. 
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] load balancing and DNAT

2005-01-03 Thread Ming-Ching Tiew

From: "Brad Barnett" <[EMAIL PROTECTED]>
> 
> Personal experience.  I can't get any recent 2.4.x kernel to compile with
> PPTP and the Julian Anastasov's patches.  It's been over a month now, but
> I tried several versions, I believe back to 2.4.25...
>

PPTP server or client ? I supposed you mean MPPE patches ?
I compiled it together with Julian Anastasov's patches on 2.4.27. 
I am not sure if they work together, but it compiles at least !

Cheers




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


[LARTC] Scheduler Mechnisms!

2005-01-03 Thread Zhenyu Wu
Hello,

Normally, in addition to such qdisc scheduler mechanisms as FIFO, PQ, WRR, WFQ,
are there any more? Then, there is a confusion on scheduler in Linux enviroment:
Assume there is a qdisc, such as RED as a leaf qdisc in a router, we know, if
there is packet which want to enqueue the packet, the Function red_enqueue is
called, but when the packet leave the queue(when the Function red_dequeue is
called)? I think it is meaningless when the pack leaves the queue just it 
enterred
it. Is there anything need to be done betweent the packet's enqueue and dequeue?

Best,


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


Re: [LARTC] load balancing and DNAT

2005-01-03 Thread Brad Barnett
On Tue, 4 Jan 2005 09:36:59 +0800
"Ming-Ching Tiew" <[EMAIL PROTECTED]> wrote:

> 
> From: "Brad Barnett" <[EMAIL PROTECTED]>
> > 
> > I can't apply Julian Anastasov's patches, because they don't work with
> > PPTP patches. :/
> > 
> 
> I must have missed something. May I know where you learned that 
> Julian Anastasov's patches won't work with PPTP patches ? Any URL ?
> 

Personal experience.  I can't get any recent 2.4.x kernel to compile with
PPTP and the Julian Anastasov's patches.  It's been over a month now, but
I tried several versions, I believe back to 2.4.25...
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] load balancing and DNAT

2005-01-03 Thread Ming-Ching Tiew

From: "Brad Barnett" <[EMAIL PROTECTED]>
> 
> I can't apply Julian Anastasov's patches, because they don't work with
> PPTP patches. :/
> 

I must have missed something. May I know where you learned that 
Julian Anastasov's patches won't work with PPTP patches ? Any URL ?

Cheers






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


Re: [LARTC] htb bridge problem, please chceck my config

2005-01-03 Thread Stef Coene
On Saturday 01 January 2005 10:45, [EMAIL PROTECTED] wrote:
> hello. i have following setup:
>
> a machine (winChip 200mhz cpu, 32mb ram, linux 2.4.28) acting like a bridge
> with
> 2 interfaces (eth0 - to our ISP, eth1 - to our network)
> machine does not have any IP
>
> there is a 802.1q vlan eth0.2
> eth0.2 and eth1 are bridged in br0
>
> i have one 4mbit link which i share with my friend, i have 3mbit and he has
> 1mbit
>
> all our IP addresses are public and we have the following setup
>
> /sbin/tc qdisc add dev eth1 root handle 1: htb default 2
> /sbin/tc class add dev eth1 parent 1: classid 1:1 htb rate 4mbit ceil 4mbit
> /sbin/tc class add dev eth1 parent 1:1 classid 1:2 htb rate 3mbit ceil
> 3mbit /sbin/tc class add dev eth1 parent 1:1 classid 1:3 htb rate 1mbit
> ceil 1mbit /sbin/tc filter add dev eth1 protocol ip parent 1:0 pref 1 u32
> match ip src FRIEDNS_IP flowid 1:3
> /sbin/tc filter add dev eth1 protocol ip parent 1:0 pref 1 u32 match ip src
> MY_IP flowid 1:2
>
>
> /sbin/tc qdisc add dev eth0.2 root handle 1: htb default 2
> /sbin/tc class add dev eth0.2 parent 1: classid 1:1 htb rate 4mbit ceil
> 4mbit /sbin/tc class add dev eth0.2 parent 1:1 classid 1:2 htb rate 3mbit
> ceil 3mbit /sbin/tc class add dev eth0.2 parent 1:1 classid 1:3 htb rate
> 1mbit ceil 1mbit /sbin/tc filter add dev eth0.2 protocol ip parent 1:0 pref
> 1 u32 match ip dst FRIENDS_IP flowid 1:3
> /sbin/tc filter add dev eth0.2 protocol ip parent 1:0 pref 1 u32 match ip
> dst MY_IP flowid 1:3
>
>
> but it doesnt work well, my ISP link is stable, but i hardly ever get from
> my shaped link more 2mbit. where am i making mistake?
Some stuff to check out:
- are the tc stats changing?
- try ceil 3.5mbit so _you_ are the bottleneck
- I'm not sure if you can shape on a vlan

Oh, your filters are ok.

Stef

-- 
[EMAIL PROTECTED]
 "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] load balancing and DNAT

2005-01-03 Thread Brad Barnett


Does anyone know if load balancing and DNAT work well together?  I know
that load balancing and NAT do not, but what about a simple port forward?

I can't apply Julian Anastasov's patches, because they don't work with
PPTP patches. :/

Anyhow, a simple:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport xxx -j DNAT --to
yyy:xxx 
iptables -I FORWARD -i eth0 -d yyy -p tcp --dport xxx -o eth1 -j
ACCEPT

does not seem to work.
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Weighted packet shaping?

2005-01-03 Thread marco ghidinelli
On Tue, Dec 28, 2004 at 07:53:43PM +1030, Mark Williams (MWP) wrote:
> 
> Ok...
> Using your script gave the following (from 17:30 onwards):
> 
> http://www.overclockers.com.au/~mwp/temp/tc-1hour-yours.png
> 
> Purple is class 23; all other traffic, in this case bittorrent.
> Blue is class 21; a windows box, in this case an FTP transfer.
> 
> Shouldnt class 23 still be dropping off further than that?
> It seems HTB is wanting to share traffic equally among on the classes rather 
> than by priority.
> 
> You script is pretty much having the same effect as mine :(

ok, maybe i'm wrong, but i try to run the same script, and i think that
the script have problem setting prio 0 on filters:

running:

$TC filter add dev $IFNAME parent 1:0 prio 0 protocol ip handle 22 fw
flowid 1:20
$TC filter add dev $IFNAME parent 1:0 prio 2 protocol ip handle 21 fw
flowid 1:21

gave me:

# tc filter list dev eth0
filter parent 1: protocol ip pref 2 fw 
filter parent 1: protocol ip pref 2 fw handle 0x15 classid 1:21 
filter parent 1: protocol ip pref 49152 fw 
filter parent 1: protocol ip pref 49152 fw handle 0x16 classid 1:20 

--^

don't blame me if this is obvious/wrong/stupid. :)

2.6.10, with lastest iproute2

-- 
BOFH excuse #212:

Of course it doesn't work. We've performed a software upgrade.
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/