Re: [LARTC] load balancing over multiple ISP links

2004-12-29 Thread Jason Boxman
ro0ot said:
> Hi,
>
> Can someone explain in technicality on how the load balancing over
> multiple ISP links?

You might try Christoph Simon's howto for using multiple independent
Internet connections[1].

[1] http://www.ssi.bg/~ja/nano.txt



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


[LARTC] HTB - ethloop - overlimits?

2004-12-29 Thread Oswin Budiman
Hi all,

I'm trying to setup htb on a box with the following class configuration:

class htb 1:2 root rate 4Mbit ceil 4Mbit burst 2099b/8 mpu 0b overhead
0b cburst 2099b/8 mpu 0b overhead 0b level 7
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0 requeues 0) 
 lended: 0 borrowed: 0 giants: 0
 tokens: 4300 ctokens: 4300

class htb 1:4 parent 1:2 leaf 4: prio 7 quantum 1000 rate 1Kbit ceil
1Kbit burst 1599b/8 mpu 0b overhead 0b cburst 1599b/8 mpu 0b overhead
0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0 requeues 0) 
 lended: 0 borrowed: 0 giants: 0
 tokens: 13107200 ctokens: 13107200

class htb 1:6 parent 1:2 leaf 6: prio 0 quantum 12500 rate 1Mbit ceil
1Mbit burst 1724b/8 mpu 0b overhead 0b cburst 1724b/8 mpu 0b overhead
0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0 requeues 0) 
 lended: 0 borrowed: 0 giants: 0
 tokens: 14131 ctokens: 14131

class htb 1:7 parent 1:2 leaf 7: prio 0 quantum 37500 rate 3Mbit ceil
3Mbit burst 1974b/8 mpu 0b overhead 0b cburst 1974b/8 mpu 0b overhead
0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0 requeues 0) 
 lended: 0 borrowed: 0 giants: 0
 tokens: 5392 ctokens: 5392

and then I try to simulate the traffic using ethloop to see it it's work.
I use the following script to generate the packet on ethloop. I'm
using loopback interface.

# Set interface
0   i   0   lo
0   i   1   lo
# Set packet size
0   S   0   1k
0   S   1   1k
# Determine flow id
0   P   0   0x10006
0   P   1   0x10007
# Start flow...
0   R   0   4000k
0   R   1   4000k
# Finish it. 
1   X   0   0  

Foxtrot ethloop # ethloop < input > output

When it finish, I got weird output. When I see the tc stat, the flow
enters the right class but the rate is terribly wrong... I wonder what
happen to it? Here's the output file and tc stat.

Foxtrot ethloop # cat output

0.5 173183 98004 443 0 55401 57802 3 0
1.0 136001 118161 734 0 13147 13717 3 0
1.5 128969 124736 735 0 3120 3255 3 0
2.0 125141 124136 735 0 740 772 3 0
2.5 125825 125586 735 0 176 183 3 0
3.0 124266 129381 735 0 42 44 3 0
3.5 125977 12 736 0 10 10 3 0
4.0 129326 127894 735 0 2 3 3 0
4.5 125209 124869 737 0 1 1 3 0
5.0 124410 129449 128 0 0 0 3 0
5.5 125842 125418 417 0 0 0 3 0
6.0 128815 128714 706 0 0 0 3 0
6.5 125021 124997 736 0 0 0 3 0
7.0 127941 127936 735 0 0 0 3 0
7.5 124749 124748 736 0 0 0 3 0
8.0 128248 127326 735 0 1113 1113 2 0
8.5 125319 125100 735 0 264 264 2 0
9.0 127961 126230 735 0 63 63 2 0
9.5 124722 124311 735 0 15 15 2 0
10.0 127203 127105 736 0 4 4 2 0

Foxtrot ethloop # qd lo

qdisc htb 1: r2q 10 default 4 direct_packets_stat 0 ver 3.17
 Sent 2728960 bytes 2665 pkts (dropped 0, overlimits 3996 requeues 0) 
qdisc sfq 4: parent 1:4 limit 128p quantum 16450b flows 128/1024 perturb 10sec 
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0 requeues 0) 
qdisc sfq 6: parent 1:6 limit 128p quantum 16450b flows 128/1024 perturb 10sec 
 Sent 2297856 bytes 2244 pkts (dropped 0, overlimits 0 requeues 0) 
qdisc sfq 7: parent 1:7 limit 128p quantum 16450b flows 128/1024 perturb 10sec 
 Sent 431104 bytes 421 pkts (dropped 0, overlimits 0 requeues 0)
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] 2 internet connections for 2 different purposes

2004-12-29 Thread Chris Bennett
When you say you are so close but can't get your head around the final 
part... what do you mean?  Exactly what is working and what is not?  How far 
have you gotten?

- Original Message - 
From: "brooke" <[EMAIL PROTECTED]>
To: 
Sent: Wednesday, December 29, 2004 4:56 PM
Subject: [LARTC] 2 internet connections for 2 different purposes


I've got a linux machine (fedora core 3) with 4 network cards.
I looked at the howto and the only example that is close to what I need to 
do is section 4.2 on multiple uplink providers. I feel like I'm so close 
but just can't get my head around the final part.

Here is what I have
eth2 and eth4 connect to 2 different isps.
I want all connections the come from my dmz on eth3 to go out of my 
connection on eth4
I want all connections from my local network on eth0 to go out of my 
connection on eth2

can anyone help me out with this?
thanks in advance
Brooke
___
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/


[LARTC] unsubscribe the list

2004-12-29 Thread HWJ

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


Re: [LARTC] Weighted packet shaping?

2004-12-29 Thread Andy Furniss
Mark Williams (MWP) wrote:
I also know the graph is correct as the estimated rates from TC are the same as
shown on the graph.
So this is becoming an unknown problem?
There must be something :-)
One thing I thought of, if you are getting any congestion/packet loss on 
the ftp upload, then you would expect results more like you see.

I would take a closer look at what is happening to the upload connection.
You could get an idea of whether you are dropping by doing some netstat 
-s | grep retrans on the box running the upload.

You could also do a tcpdump to look at what window the server is letting 
you use / see drops.

Looking at backlogs with tc -s class ... should show the FTP class as 
backloged all the time - if it's empty(not there) sometimes then that's 
another sign that something else is limiting it.

Andy.

Thanks.
 Mark Williams.

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


[LARTC] 2 internet connections for 2 different purposes

2004-12-29 Thread brooke
I've got a linux machine (fedora core 3) with 4 network cards.
I looked at the howto and the only example that is close to what I need 
to do is section 4.2 on multiple uplink providers. I feel like I'm so 
close but just can't get my head around the final part.

Here is what I have
eth2 and eth4 connect to 2 different isps.
I want all connections the come from my dmz on eth3 to go out of my 
connection on eth4
I want all connections from my local network on eth0 to go out of my 
connection on eth2

can anyone help me out with this?
thanks in advance
Brooke
___
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Weighted packet shaping?

2004-12-29 Thread Francisco Pereira
Mensaje citado por "Mark Williams (MWP)" <[EMAIL PROTECTED]>:
> > I suppose you should also use tc from new iproute2 that matches your
> kernel.
> 
> Ok, where is the correct place to get it from?
> I havnt been able to find the official "release site" for iproute2.
> 

http://developer.osdl.org/dev/iproute2/

Regards,
Francisco.

-
La Tienda del Portal esta de fiesta!
http://tienda.montevideo.com.uy
-

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


[LARTC] shaping on tcp ports

2004-12-29 Thread Paras pradhan
hi all:

the following scipt is wokring perfectly with limiting ...on limimitng per
ip basis..



eth0=public static ip
eth2= private ip ( 192.168.2.1)
--
iptables -t mangle -A POSTROUTING -s ! 192.168.0.0/32 -d 192.168.2.101/32
-j MARK --set-mark 21012

tc class add dev eth2 parent 1:1 classid 1:2101 htb rate 32kbit ceil 64kbit

tc filter add dev eth2 parent 1:0 protocol ip prio 2 handle 21012 fw
classid 1:2101

tc qdisc add dev eth2 parent 1:2101 handle 2101: sfq perturb 10

-

Now what i am trying to do is... limiting 192.168.2.101 75% for httpd and
25% to rest..

what i have to do? i am confused on iptables marking as well..

Thanks
Paras.


Paras pradhan
Systems Dept.
Bajranet PVT LTD
Kathmandu
Nepal.


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


Re: [LARTC] Simple case here!

2004-12-29 Thread Amit Vyas
I tried This for the following setup but it doesn't seems to be working
Please suggest.
//making a root cbq
tc qdisc add dev eth0 root handle 1:0  cbq  bandwidth 100Mbit allot 1514 
cell 8 avpkt 1000 mpu 64

//making one class under root  with limiting 64kbps
tc class add dev eth0  parent 1:0  classid 1:1 cbq bandwidth 1Mbit rate 
64Kbit allot 1514 cell 8 avpkt 1000 mpu 64 isolated

//Making other class which can take all the packets for the LAN and 
procced with them at spped available.
tc class add dev eth0  parent 1:0  classid 1:2 cbq bandwidth 99Mbit rate 
100kbit weight 9kbit allot 1514 cell 8

//filtering the packets so that they can be classified for class 1:2
tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dst 
192.168.3.0/32 classid 1:2
tc filter add dev eth0 parent 1:0 protocol ip u32 match ip dst 
192.168.2.0/32 classid 1:2



Amit Vyas wrote:
Hi All,
I want to setup a machine to connect to internet at a limited rate of 
64 kbps.
That machine is connected to a switch. so my LAN and Internet both 
comes from the same eth0.
How can I limit only the internet access from this machine to 64kbps 
and still using 100mbps for LAN

I am trying to implement this Please guide me If i am wrong.
I mark all the packets going out to LAN.
Then I can setup a root qdisc to classify packets based on that mark. 
If match  then I can setup a class to accept those setup a fifo for 
those packets. but if the packets are not for the LAN then i can pass 
them to other class which is tbf shaping at rate 64kbps.

Am i right on these lines.
This is the setup
++   eth0+---+   internet
| machine   |---|   Switch  |-
++  +---+
trying to get some thing like this
root qdisc  (CBQ or something)
   / \
 / \
   / \
 / \
   class  class
Internal LAN PcaketsAny other unclassified Packets
 |  |
 |  |
  FIFO TBF (rate 64kbps)
Please Help me out with marking the packets and to classify them.
Just started off with Traffic Shaping.  gigles.. : )
It is alos possible to alternatively to mark internet traffic as it 
would be less in comparison to LAN and thus processor friendly.

Amit Vyas


___
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/