Re: [LARTC] RE: [LARTC] Load Balance simply doesn´t work...

2004-09-01 Thread Marc-Christian Petersen
On Tuesday 31 August 2004 17:32, Marc-Christian Petersen wrote:

> On Tuesday 31 August 2004 17:02, Marc-Christian Petersen wrote:
> > ip route add 212.71.142.210/29 dev eth1 src 212.71.142.210 table 10
> > RTNETLINK answers: Invalid argument
> blubber bleh silly me. I implemented ipcalc.pl in my brain now ;)

hmm, now what:

setting up that script gives me a default route to the 1st providers default 
gateway and all traffic is going through that gateway (1st provider) and the 
2nd isn't touched in any way. Any idea about it?

-- 
ciao, Marc
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] RE: [LARTC] Load Balance simply doesn´t work...

2004-08-31 Thread Marc-Christian Petersen
On Tuesday 31 August 2004 17:02, Marc-Christian Petersen wrote:


> ip route add 212.71.142.210/29 dev eth1 src 212.71.142.210 table 10
> RTNETLINK answers: Invalid argument

blubber bleh silly me. I implemented ipcalc.pl in my brain now ;)

-- 
ciao, Marc
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] RE: [LARTC] Load Balance simply doesn´t work...

2004-08-31 Thread Marc-Christian Petersen
On Thursday 26 August 2004 15:06, Marcos Schonfeld wrote:

Hi Marcos,

> ip route add $P1_NET dev $IF1 src $IP1 table 10
> ip route add default via $P1 table 10
> ip route add $P2_NET dev $IF2 src $IP2 table 20
> ip route add default via $P2 table 20
>
> ip route add $P1_NET dev $IF1 src $IP1  # This may be not necessary
> ip route add $P2_NET dev $IF2 src $IP2  # This may be not necessary
>
> ## ip route add default via $P1  ## You don't have to set this default
> gw, because you'll be routing accross this gateway instead of doing
> load-balance
>
> ip rule add from $IP1 table T1
> ip rule add from $IP2 table T2

shouldn't this be table 10 and table 20? :)

anyway, I have a problem settings this up. I get:


ip route add 212.71.142.210/29 dev eth1 src 212.71.142.210 table 10
RTNETLINK answers: Invalid argument

ip route add default via 212.71.142.209 table 10
ip route add 61.212.57.152/29 dev eth2 src 61.212.57.152 table 20
ip route add default via 61.212.57.153 table 20

ip route add 212.71.142.210/29 dev eth1 src 212.71.142.210
RTNETLINK answers: Invalid argument

ip route add 61.212.57.152/29 dev eth2 src 61.212.57.152
RTNETLINK answers: File exists

ip rule add from 212.71.142.210 table 10
ip rule add from 61.212.57.152 table 20

strace from 1st RTNETLINK invalid argument:


controllen=0, msg_flags=0}, 0) = 36
dup(2)  = 4
fcntl64(4, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat64(4, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 
0x4b3ed000
_llseek(4, 0, 0xb8526df0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(4, "RTNETLINK answers: Invalid argum"..., 36) = 36
close(4)= 0
munmap(0x4b3ed000, 4096)= 0
brk(0)

any idea what I am doing wrong?

Thanks alot.

-- 
ciao, Marc

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] Dual Internet Connection

2004-08-26 Thread Marc-Christian Petersen
On Thursday 26 August 2004 15:07, Marcos Schonfeld wrote:

Hi Marcos,

> Try http://lartc.org/howto/lartc.rpdb.multiple-links.html
> I think this is the solution.

perfect :-) Thank you.

-- 
ciao, Marc
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] Dual Internet Connection

2004-08-26 Thread Marc-Christian Petersen
Hi all,

I have two internet connections, both connected to eth0 and eth1, one is 
1mbit, the other one is 3mbit. Now I want to use _both_ at one time via round 
robin or such. Anyone have an idea/docu how to set that up?

Thanks in advance.
-- 
ciao, Marc
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] IMQ patch for 2.6.3 kernel

2004-03-05 Thread Marc-Christian Petersen
On Friday 05 March 2004 16:12, Andre Correa wrote:

Hi Andre,

> Sorry, but the patch is not broken. It compiles without errors. You just
> have to choose the right options in your config:
> CONFIG_IP_NF_TARGET_IMQ=y
> and
> CONFIG_IMQ=y
> and avoid using modules.

which is, in short words, broken :p

ciao, Marc
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] IMQ patch for 2.6.3 kernel

2004-03-05 Thread Marc-Christian Petersen
On Friday 05 March 2004 00:00, The Codrinus wrote:

Hi Codrin,

> I downloaded the latest imq patch for 2.6.x kernels from
> http://www.linuximq.net/patchs/linux-2.6.2-imq-4.diff
> I successfully applied the patch but when compiling IMQ I get the
> following error messages:
> What might be the problem ?
that patch is b0rked. Use attached one.

--
ciao, Marc
# 2.6.3-WOLK1.1

# Patch from: http://www.linuximq.net/

# Build fixes: me

diff -urN linux-2.6.orig/drivers/net/Kconfig linux-2.6.new/drivers/net/Kconfig
--- linux-2.6.orig/drivers/net/Kconfig	2004-01-21 19:33:36.0 +0100
+++ linux-2.6.new/drivers/net/Kconfig	2004-01-25 15:08:20.0 +0100
@@ -85,6 +85,20 @@
 	  To compile this driver as a module, choose M here: the module
 	  will be called eql.  If unsure, say N.
 
+config IMQ
+	tristate "IMQ (intermediate queueing device) support"
+	depends on NETDEVICES && NETFILTER
+	---help---
+	  The imq device(s) is used as placeholder for QoS queueing disciplines.
+	  Every packet entering/leaving the ip stack can be directed through
+	  the imq device where it's enqueued/dequeued to the attached qdisc.
+	  This allows you to treat network devices as classes and distribute
+	  bandwidth among them. Iptables is used to specify through which imq
+	  device, if any, packets travel.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called imq.  If unsure, say N.
+
 config TUN
 	tristate "Universal TUN/TAP device driver support"
 	depends on NETDEVICES
diff -urN linux-2.6.orig/drivers/net/Makefile linux-2.6.new/drivers/net/Makefile
--- linux-2.6.orig/drivers/net/Makefile	2004-01-21 19:33:36.0 +0100
+++ linux-2.6.new/drivers/net/Makefile	2004-01-25 15:08:20.0 +0100
@@ -110,6 +110,7 @@
 endif
 
 obj-$(CONFIG_DUMMY) += dummy.o
+obj-$(CONFIG_IMQ) += imq.o
 obj-$(CONFIG_DE600) += de600.o
 obj-$(CONFIG_DE620) += de620.o
 obj-$(CONFIG_AT1500) += lance.o
diff -urN linux-2.6.orig/drivers/net/imq.c linux-2.6.new/drivers/net/imq.c
--- linux-2.6.orig/drivers/net/imq.c	1970-01-01 01:00:00.0 +0100
+++ linux-2.6.new/drivers/net/imq.c	2004-01-25 15:08:51.0 +0100
@@ -0,0 +1,323 @@
+/*
+ * Pseudo-driver for the intermediate queue device.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version
+ * 2 of the License, or (at your option) any later version.
+ *
+ * Authors:Patrick McHardy, <[EMAIL PROTECTED]>
+ *
+ * 	   The first version was written by Martin Devera, <[EMAIL PROTECTED]>
+ *
+ * Credits:Jan Rafaj <[EMAIL PROTECTED]>
+ *  - Update patch to 2.4.21
+ * Sebastian Strollo <[EMAIL PROTECTED]>
+ *  - Fix "Dead-loop on netdevice imq"-issue
+ * Marcel Sebek <[EMAIL PROTECTED]>
+ *  - Update to 2.6.2-rc1
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
+#include 
+#endif
+#include 
+#include 
+
+static nf_hookfn imq_nf_hook;
+
+static struct nf_hook_ops imq_ingress_ipv4 = {
+	.hook		= imq_nf_hook,
+	.owner		= THIS_MODULE,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_PRE_ROUTING,
+	.priority	= NF_IP_PRI_MANGLE + 1
+};
+
+static struct nf_hook_ops imq_egress_ipv4 = {
+	.hook		= imq_nf_hook,
+	.owner		= THIS_MODULE,
+	.pf		= PF_INET,
+	.hooknum	= NF_IP_POST_ROUTING,
+	.priority	= NF_IP_PRI_LAST
+};
+
+#if defined(CONFIG_IPV6) || defined (CONFIG_IPV6_MODULE)
+static struct nf_hook_ops imq_ingress_ipv6 = {
+	.hook		= imq_nf_hook,
+	.owner		= THIS_MODULE,
+	.pf		= PF_INET6,
+	.hooknum	= NF_IP6_PRE_ROUTING,
+	.priority	= NF_IP6_PRI_MANGLE + 1
+};
+
+static struct nf_hook_ops imq_egress_ipv6 = {
+	.hook		= imq_nf_hook,
+	.owner		= THIS_MODULE,
+	.pf		= PF_INET6,
+	.hooknum	= NF_IP6_POST_ROUTING,
+	.priority	= NF_IP6_PRI_LAST
+};
+#endif
+
+static unsigned int numdevs = 2;
+
+module_param(numdevs, int, 0);
+
+static struct net_device *imq_devs;
+
+
+static struct net_device_stats *imq_get_stats(struct net_device *dev)
+{
+	return (struct net_device_stats *)dev->priv;
+}
+
+/* called for packets kfree'd in qdiscs at places other than enqueue */
+static void imq_skb_destructor(struct sk_buff *skb)
+{
+	struct nf_info *info = skb->nf_info;
+
+	if (info) {
+		if (info->indev)
+			dev_put(info->indev);
+		if (info->outdev)
+			dev_put(info->outdev);
+		kfree(info);
+	}
+}
+
+static int imq_dev_xmit(struct sk_buff *skb, struct net_device *dev)
+{
+	struct net_device_stats *stats = (struct net_device_stats*) dev->priv;
+
+	stats->tx_bytes += skb->len;
+	stats->tx_packets++;
+
+	skb->imq_flags = 0;
+	skb->destructor = NULL;
+
+	dev->trans_start = jiffies;
+	nf_reinject(skb, skb->nf_info, NF_ACCEPT);
+	return 0;
+}
+
+static int imq_nf_queue(struct sk_buff *skb, struct nf_info *info,
+			vo

Re: [LARTC] Kernel config for HTB

2002-11-22 Thread Marc-Christian Petersen
On Friday 22 November 2002 18:00, Benjamin Goedeke wrote:

Hi Benjamin,

> tc qdisc add dev ppp0 root handle 1:0 htb default 5
> all I get is
> HTB init, kernel part version 3.7
> HTB: need tc/htb version 3 (minor is 7), you have 10
> "RTNETLINK answers: Invalid argument"
wrong tc version :)

> Can anyone please point me to the relevant section in menuconfig to
> enable the CONFIG_*NETLINK options
CONFIG_NETLINK does not exist anylonger on any 2.4 kernel. 2.2 have this 
config option.

Download this: http://luxik.cdi.cz/~devik/qos/htb/v3/htb3.6-020525.tgz

extract it, you'll see a "tc" binary. Do a "mv ./tc /sbin" and try the above 
again and you'll see that it works :) ... That binary has the needed patches 
for tc already applied to use HTB.

have fun :)


-- 
Kind regards
Marc-Christian Petersen

http://sourceforge.net/projects/wolk

PGP/GnuPG Key: 1024D/569DE2E3DB441A16
Fingerprint: 3469 0CF8 CA7E 0042 7824 080A 569D E2E3 DB44 1A16
Key available at www.keyserver.net. Encrypted e-mail preferred.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] HTB on 2.4.20pre10 kernel

2002-10-12 Thread Marc-Christian Petersen
On Sunday 13 October 2002 02:13, Ethy H. Brito wrote:

Hi Ethy,

> (tchtb is the tc program I downloaded from HTB home page - I renamed it so
> I can have both tc's - currently I use iproute2-2.4.7-now-ss020116-try -
> don't know if it already supports HTB)
wrong.

Download: http://luxik.cdi.cz/~devik/qos/htb/v3/htb3.6-020525.tgz

and use the tc binary in it.

-- 
Kind regards
    Marc-Christian Petersen

http://sourceforge.net/projects/wolk

PGP/GnuPG Key: 1024D/569DE2E3DB441A16
Fingerprint: 3469 0CF8 CA7E 0042 7824 080A 569D E2E3 DB44 1A16
Key available at www.keyserver.net. Encrypted e-mail preferred.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] HTB

2002-09-24 Thread Marc-Christian Petersen

On Tuesday 24 September 2002 16:55, Rimas wrote:

Hi Rimas,

> I tried the "patch -p1 --dry-run ./htb3.6_2.4.17.diff" but nothing
> happened, no error message, nothing.
err, you forget < !

Look carefully to what I've posted :)

root@codeman:[/usr/src/linux-2.4.18-vanilla] # patch -p1 --dry-run < 
htb2_2.4.17.diff 
patching file net/sched/Config.in
patching file net/sched/Makefile
patching file net/sched/sch_htb.c
patching file include/linux/pkt_sched.h
patching file net/sched/sch_api.c

-- 
Kind regards
Marc-Christian Petersen

http://sourceforge.net/projects/wolk

PGP/GnuPG Key: 1024D/569DE2E3DB441A16
Fingerprint: 3469 0CF8 CA7E 0042 7824 080A 569D E2E3 DB44 1A16
Key available at www.keyserver.net. Encrypted e-mail preferred.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] HTB

2002-09-24 Thread Marc-Christian Petersen

On Tuesday 24 September 2002 16:12, Rimas wrote:

Hi Rimas,

> How to put HTB in to 2.4 kernel?
patching? :)

If you wanna try 3.6 code, download the tgz, untargzip it (tar xzpf) and 
you'll see a diff/patch. Just "patch -p1 --dry-run < patchname" and see if it 
succeed, if, leave out --dry-run, if not, fix the errors. If you have 
questions when errors occur, don't hesitate to ask.

for HTB2 code, just download the patch and follow the same as above (patch -p1 
...)

http://luxik.cdi.cz/~devik/qos/htb/

-- 
Kind regards
    Marc-Christian Petersen

http://sourceforge.net/projects/wolk

PGP/GnuPG Key: 1024D/569DE2E3DB441A16
Fingerprint: 3469 0CF8 CA7E 0042 7824 080A 569D E2E3 DB44 1A16
Key available at www.keyserver.net. Encrypted e-mail preferred.


___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] [htb3] patch errors on 2.4.19mdk

2002-09-17 Thread Marc-Christian Petersen

On Tuesday 17 September 2002 21:52, raptor wrote:

Hi Raptor,

> When I apply HTB3 paches to 2.4.19 (mandrake kernel) I get this :
> (NO to all questions)
> ---
>- [root@qos test]# patch -p1 -b  patching file net/sched/Config.in
> Reversed (or previously applied) patch detected!  Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to file net/sched/Config.in.rej
> patching file net/sched/Makefile
> Reversed (or previously applied) patch detected!  Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to file net/sched/Makefile.rej
> patching file net/sched/sch_htb.c
> patching file include/linux/pkt_sched.h
> Reversed (or previously applied) patch detected!  Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to file
> include/linux/pkt_sched.h.rej patching file net/sched/sch_api.c
> Hunk #1 FAILED at 1117.
> Hunk #2 succeeded at 1205 with fuzz 2.
> 1 out of 2 hunks FAILED -- saving rejects to file net/sched/sch_api.c.rej
> patching file lib/Makefile
> Reversed (or previously applied) patch detected!  Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to file lib/Makefile.rej
> patching file lib/rbtree.c
> Reversed (or previously applied) patch detected!  Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 3 out of 3 hunks ignored -- saving rejects to file lib/rbtree.c.rej
> patching file include/net/pkt_sched.h
> Reversed (or previously applied) patch detected!  Assume -R? [n]
> Apply anyway? [n]
> Skipping patch.
> 1 out of 1 hunk ignored -- saving rejects to file
> include/net/pkt_sched.h.rej
> ---
hmm, maybe htb is already in the mdk kernel?

anyway, you should patch with "patch -p1 --dry-run < patchname" FIRST, before 
applying and see if it succeed.


-- 
Kind regards
Marc-Christian Petersen

http://sourceforge.net/projects/wolk

PGP/GnuPG Key: 1024D/569DE2E3DB441A16
Fingerprint: 3469 0CF8 CA7E 0042 7824 080A 569D E2E3 DB44 1A16
Key available at www.keyserver.net. Encrypted e-mail preferred.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/