dual in-kernel pppoe links

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

dual in-kernel pppoe links

Marcos Marconcini
Hello

 

I am doing Load balancing with two adsl using pf pools, everything is
perfect, my problems appears when I try to config a second kernel pppoe
link. ( now I am using one with in-kernel ans the other with userland pppoe
)

I have to do something special?? Or it's not posible to have two in kernel
pppoe at the same time?

 

This is my hostanme.pppoe0

 

pppoedev rl1

!/sbin/ifconfig rl1 up

!/usr/sbin/spppcontrol \$if myauthproto=pap myauthname=xxxxx myauthkey=xxxxx

!/sbin/ifconfig \$if inet 0.0.0.0 0.0.0.1 netmask 0xffffffff

!/sbin/route add default 0.0.0.1

Up

 

And this my second pppoe2 hostname

 

pppoedev rl2

!/sbin/ifconfig rl2 up

!/usr/sbin/spppcontrol \$if myauthproto=pap myauthname=xxxxx myauthkey=xxxxx

!/sbin/ifconfig \$if inet 0.0.0.0 0.0.0.2 netmask 0xffffffff

!/sbin/route add default 0.0.0.2

Up

 

 

May be I am misunderstanding something, What is wrong here?

 

Thank you very much.

 

Marcos

Reply | Threaded
Open this post in threaded view
|

Re: dual in-kernel pppoe links

Takashi-4
Hi,

At Fri, 3 Feb 2006 00:42:54 -0300,
Marcos Marconcini wrote:
> I am doing Load balancing with two adsl using pf pools, everything is
> perfect, my problems appears when I try to config a second kernel pppoe
> link. ( now I am using one with in-kernel ans the other with userland pppoe
> )
>
> I have to do something special?? Or it's not posible to have two in kernel
> pppoe at the same time?

I've had same problem.
This patch makes 0.0.0.2 usable as remote peer wildcard address
as well as 0.0.0.1. now, you can setup route to second interface.

Index: ./sys/net/if_spppsubr.c
===================================================================
RCS file: /pub/cvs/openbsd/src/sys/net/if_spppsubr.c,v
retrieving revision 1.1.1.4
diff -u -r1.1.1.4 if_spppsubr.c
--- ./sys/net/if_spppsubr.c6 Jan 2006 08:58:35 -00001.1.1.4
+++ ./sys/net/if_spppsubr.c17 Jan 2006 14:17:48 -0000
@@ -2713,7 +2713,8 @@
 desiredaddr = p[2] << 24 | p[3] << 16 |
 p[4] << 8 | p[5];
 if (desiredaddr == hisaddr ||
-    (hisaddr == 1 && desiredaddr != 0)) {
+    (hisaddr == 1 && desiredaddr != 0) ||
+    (hisaddr == 2 && desiredaddr != 0)) {
 /*
  * Peer's address is same as our value,
  * or we have set it to 0.0.0.1 to

The followings are my configuration.

hostname.pppoe0:
pppoedev xl0
!/sbin/ifconfig xl0 up
!/usr/sbin/spppcontrol \$if myauthproto=pap \
myauthname=XXX myauthkey=YYY
!/sbin/ifconfig \$if inet 0.0.0.0 0.0.0.1 netmask 0xffffffff mtu 1454
!/sbin/route add default 0.0.0.1
up

hostname.pppoe1:
pppoedev xl0
!/sbin/ifconfig xl0 up
!/usr/sbin/spppcontrol \$if myauthproto=chap \
myauthname=XXX myauthsecret=YYY
!/sbin/ifconfig \$if inet 0.0.0.0 0.0.0.2 netmask 0xffffffff mtu 1454
!route add XXX.XXX.XXX.XXX -netmask 255.255.255.128 0.0.0.2
!route add YYY.YYY.YYY.YYY -netmask 255.255.255.192 0.0.0.2
up

--
KUDO Takashi