From owner-freebsd-net@FreeBSD.ORG Fri Jul 28 04:17:11 2006 Return-Path: X-Original-To: net@freebsd.org Delivered-To: freebsd-net@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7F84D16A4DE for ; Fri, 28 Jul 2006 04:17:11 +0000 (UTC) (envelope-from fooler@skyinet.net) Received: from smtp2.skyinet.net (smtp2.skyinet.net [202.78.97.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F66043D45 for ; Fri, 28 Jul 2006 04:17:10 +0000 (GMT) (envelope-from fooler@skyinet.net) Received: from fooler (fooler.ilo.skyinet.net [202.78.118.66]) by smtp2.skyinet.net (Postfix) with SMTP id 5BCAD5BA52; Fri, 28 Jul 2006 12:17:02 +0800 (PHT) Message-ID: <06a801c6b1fc$bcc83470$42764eca@ilo.skyinet.net> From: "fooler" To: "Luigi Rizzo" , References: <20060726071232.A96367@xorpc.icir.org> Date: Fri, 28 Jul 2006 12:17:22 +0800 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869 Cc: Subject: Re: multiple DSL modems and pppoe sessions on the same ethernet ? X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jul 2006 04:17:11 -0000 ----- Original Message ----- From: "Luigi Rizzo" To: Sent: Wednesday, July 26, 2006 10:12 PM Subject: multiple DSL modems and pppoe sessions on the same ethernet ? > hi, > i am trying to run, on a single FreeBSD box, multiple (3 in my case) > pppoe instances talking to as many DSL modems on the same ethernet cable > > ------+--------------+--------------+--------------+----- > | | | | > +-[modem1] +-[modem2] +-[modem3] +-[FreeBSD/ppp] > DSL#1 DSL#2 DSL#3 > > Ideally, in /etc/ppp/ppp.conf i can write something like > > modem1: > set device PPPoE:rl0:dsl1 > ... > > modem2: > set device PPPoE:rl0:dsl2 > ... > > modem3: > set device PPPoE:rl0:dsl3 > ... > > and the PPPoE spec (RFC2516) says this should work as long as each > DSL line has a different 'service name' (tag 0x101 in the packet). > > The problem is, my provider does not provide specific service names, > but it will accept anything i supply. So when i run the three ppp > instances, > they will all match, and the code in ng_pppoe.c will happily take the > first reply as good. > > The only approach left is then implement some form of MAC filtering, > e.g. overloading the 'service name' to specify the mac address of the > modem i am interested in. > There is a couple of ways to implement this, one is patching the > receive path (ng_pppoe_rcvdata(), case PADO_CODE) to filter replies > based on the source mac address, and the other one is to patch > the code transmitting the PADI packet to replace the broadcast > dst address with the unicast MAC taken from the "service name". > > Any better ideas ? hello luigi, have you considered pado's ac-name tag return? according to rfc2516 section 5.2... the pado packet MUST contain one ac-name tag containing the access concentrator's name... fooler.