From owner-freebsd-questions@FreeBSD.ORG Mon Jan 9 21:14:58 2012 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 7C7AB106567A for ; Mon, 9 Jan 2012 21:14:58 +0000 (UTC) (envelope-from nvass@gmx.com) Received: from mailout-eu.gmx.com (mailout-eu.gmx.com [213.165.64.42]) by mx1.freebsd.org (Postfix) with SMTP id E01E58FC1C for ; Mon, 9 Jan 2012 21:14:57 +0000 (UTC) Received: (qmail invoked by alias); 09 Jan 2012 21:14:45 -0000 Received: from adsl-67.46.190.30.tellas.gr (EHLO [192.168.73.192]) [46.190.30.67] by mail.gmx.com (mp-eu002) with SMTP; 09 Jan 2012 22:14:45 +0100 X-Authenticated: #46156728 X-Provags-ID: V01U2FsdGVkX19rU/YjKJdrt20svF12pU0HJd+jHL/DK7+4vg/5+9 KQ5Bur8jG8zsuf Message-ID: <4F0B58BA.4010405@gmx.com> Date: Mon, 09 Jan 2012 23:14:34 +0200 From: Nikos Vassiliadis User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Christoph Egger References: <87obuciq68.fsf@hepworth.siccegge.de> In-Reply-To: <87obuciq68.fsf@hepworth.siccegge.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 Cc: freebsd-questions@freebsd.org Subject: Re: 2 distinct DSL lines with same endpoint (8-STABLE) 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: Mon, 09 Jan 2012 21:14:58 -0000 On 1/9/2012 10:20 PM, Christoph Egger wrote: > Hi all! > > I'm having a FreeBSD 8 gateway that is supposed to do NAT/firewall > stuff with internet coming through 2 distinct DSL modems from the same > carrier. Unfortunately I can only run ppp on one of these lines as the > endpoint address for both lines are the same so bringing up the second > line fails in > > | PPp ON elephant> Warning: tun1: AIFADDR X.X.X.X -> Y.Y.Y.Y returns -1 > | Warning: iface add: ioctl(SIOCAIFADDR, X.X.X.X -> Y.Y.Y.Y): File exists > | Error: ipcp_InterfaceUp: unable to set ip address > > Where Y.Y.Y.Y is already also used for the other ppp connection. > > This seems to be a known Problem with FreeBSD ppp (google turns up > some results) but I haven't found any usefull workarounds. Can anyone > suggest some way to get this kind of setup working? > You need equal cost multipath routing support to do this. The *correct* way is to build a kernel with option RADIX_MPATH and then add more than one routing entries to the same destination, in your case: a.b.c.d -> e.f.g.h i.j.k.l -> e.f.g.h 0.0.0.0/0 via tun0 0.0.0.0/0 via tun1 There is also a hackish way to achieve the same thing by: changing the peer's address to something else arbitrary and using a firewall to forward there packets. The first ppp on tun0 will be: a.b.c.d -> e.f.g.h You'll change it to a.b.c.d -> 192.168.90.1 The second ppp on tun1 will be: i.j.k.l -> e.f.g.h Then you'll use your favorite firewall to send packets to 192.168.90.1 and e.f.g.h. HTH, Nikos