From owner-freebsd-questions@FreeBSD.ORG Thu May 7 13:13:17 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27F621065672 for ; Thu, 7 May 2009 13:13:17 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: from mail.gmx.com (unknown [213.165.64.42]) by mx1.freebsd.org (Postfix) with SMTP id 7D3328FC22 for ; Thu, 7 May 2009 13:13:16 +0000 (UTC) (envelope-from nvass9573@gmx.com) Received: (qmail invoked by alias); 07 May 2009 13:13:14 -0000 Received: from ipa60.8.107.79.tellas.gr (EHLO [192.168.254.1]) [79.107.8.60] by mail.gmx.com (mp-eu004) with SMTP; 07 May 2009 15:13:14 +0200 X-Authenticated: #46156728 X-Provags-ID: V01U2FsdGVkX18jpJ8v0UAjsKQ287kuaITkopOrpBggmbKRTv4xjc WpobNGXxboBq3Z Message-ID: <4A02DE54.7070309@gmx.com> Date: Thu, 07 May 2009 16:12:52 +0300 From: Nikos Vassiliadis User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: Jeff Croft References: <0E40EC5D-8DC1-4DD9-9047-01212E98BE1A@visionarytechnical.com> In-Reply-To: <0E40EC5D-8DC1-4DD9-9047-01212E98BE1A@visionarytechnical.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.54 Cc: freebsd-questions@freebsd.org Subject: Re: multiple PPPoE connections on one machine (DSL load balancing) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2009 13:13:17 -0000 Jeff Croft wrote: > Hello -- > > I'm configuring FreeBSD 7.1 as a router/load-balancer and I just got > stuck. I know this sounds like a newbie question, but hear me out. > > I have three DSL line (AT&T in SF Bay Area, business class) connected > via ethernet to the box, and one more ethernet connected to an internal > network. The idea is to do some clever kind of load-balancing and/or > logging of DSL connections using pf. > > All three DSL lines are configured to use PPPoE. I can successfully > bring any one of them up individually, but when I try to bring more than > one up, using either ppp or mpd5, I get an error that looks like this > (example from ppp): > > ppp : tun0: Warning: iface add: ioctl(SIOCAIFADDR, X.X.X.X -> D.D.D.D > ): File exists > > and then the 2nd link goes down. mpd5 says the same thing, but the error > is slightly different. For all three point-to-point links the remote > side of the point to point (D.D.D.D) is always the same IP address, so > naturally it doesn't want to add multiple routing table entries which > point to the same destination. > > The vendor claims to be unable to change the value of D.D.D.D because > "everyone in your region has the same remote address." They also don't > support mlppp, so multilink is out. Did you try multilink PPP? they might not support, but it may work anyway... > Also, I would like easy, real-time, programmatic access to the IP > address of each individual DSL line. > > So far, I've thought of the following workarounds: > > 1. Use cheap linksys boxen to hang off each DSL line so the FreeBSD > network stack doesn't have to do the PPPoE. I'm concerned that they'll > be able to handle the volume of individual connections I'm planning on, > even with the firmware replaced with something decent. Plus it's three > extra devices on my network! > 2. Use network virtualization such as this. I don't have any experience > with it, but I'm guessing it would do everything I want. > http://imunes.tel.fer.hr/virtnet/ > > Does anyone have any ideas how to solve this problem more elegantly? Not elegantly, but you can change the remote peer address to something else. That is: 1) Bring up tun0, you get from IPCP 1.1.1.1 -> 2.2.2.2 ifconfig tun0 1.1.1.1 3.3.3.3 2) Bring up tun1, you get 1.1.1.2 -> 2.2.2.2 ifconfig tun1 1.1.1.2 4.4.4.4 3) Bring up tun2, you get 1.1.1.3 -> 2.2.2.2 The result will be: tun0 1.1.1.1 3.3.3.3 tun1 1.1.1.2 4.4.4.4 tun2 1.1.1.3 2.2.2.2 You'll need to write a custom script, to modify the addresses, I think both ppp and mpd can do that. Are you going to use pf's route-to to forward packets to all three interfaces? Since, the above hack doesn't "solve" the next hop problem. You can only have one next hop for each destination. On -CURRENT there is support for ECMP, which may be a complete and correct solution for this problem. HTH, Nikos