From owner-freebsd-net@freebsd.org Wed Feb 8 20:18:16 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 20300CD6F3B for ; Wed, 8 Feb 2017 20:18:16 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-qk0-x232.google.com (mail-qk0-x232.google.com [IPv6:2607:f8b0:400d:c09::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0C7B2C9; Wed, 8 Feb 2017 20:18:15 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: by mail-qk0-x232.google.com with SMTP id s186so134979818qkb.1; Wed, 08 Feb 2017 12:18:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=L9vYm2jBmdeFHhJmuIxvs6A2PoQE+uk1EPN0rLM+Whg=; b=XGI7z9AlAJ9p4OROq0JYMwK6Na7PUJt0FzBecBke1yvOLoxG36SoAu5YRrrAdDlgsp 4yjdgGkN/cVfsgFupueJCr1DQbiFy2APgvlI6mioH1jteMIQcJwtcMnwxne4urVxfnEw SXmntIjg/1UsYckMNrfN5f3JYcFKL/HbgdqW3VncUhged2kAau6F5ttZAH6/Sns5K+/C djMf5PLuH6S+5u+9q/wvT+/fM2ReLcZ7tQklCYI94D6osQUd459/i8Y72qvkjYe7X1uE BJ8jgEplXS2V3XQLmkAi84RHJU8JMdoqiYhitWqNQbeapY+12mBgsZ/7poi0ijhaxtJr MI4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=L9vYm2jBmdeFHhJmuIxvs6A2PoQE+uk1EPN0rLM+Whg=; b=HJNElgKRmos6ZkJkeATWjekymZmundS3t8Lljh8xikz+HMvG07qBmFH8HaD8KQFUIe MIj6ws7NcxXKpNIJLamswwG292uvSY1QggVohOe6B+yLowvbXco64d0jkpi8/34fVnK9 yYZ+Efh8AvXy2Tsw8xP1rkdcXIw77Lv+Vd1K32fRZnyKEV/IkfzIU2drBnQDLXaNa84L GpRrWMekJ3ECQiB/q3gmhXYvoGshLKyAEYzzy6QSKZIHQtxmr6UulDmEDVzzpM95kB8O Hi1jAGAYEbNVH6rCjx6DRIs/wNBY2izdkv+Z1p4L88dfRiMx27pA3k74syyVgj9Qm9YZ x9Dw== X-Gm-Message-State: AMke39lzN/c4AkORtYZMCS3O3moreBc8Pzb87jkR4aluxlOze1tQNAQR4kbk8NWvx+/L5iNCN350FJVxrgbfUA== X-Received: by 10.55.17.223 with SMTP id 92mr21360204qkr.30.1486585094709; Wed, 08 Feb 2017 12:18:14 -0800 (PST) MIME-Version: 1.0 Received: by 10.140.28.202 with HTTP; Wed, 8 Feb 2017 12:18:14 -0800 (PST) In-Reply-To: <3e403eb2-b113-12d5-17c4-096ff32239e8@FreeBSD.org> References: <3e403eb2-b113-12d5-17c4-096ff32239e8@FreeBSD.org> From: Freddie Cash Date: Wed, 8 Feb 2017 12:18:14 -0800 Message-ID: Subject: Re: Multiple MAC addresses on a single interface To: Alex Dupre Cc: freebsd-net Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Feb 2017 20:18:16 -0000 On Wed, Feb 8, 2017 at 10:06 AM, Alex Dupre wrote: > Hi, > I need to establish two PPPoE sessions on the same LAN using the same > ethernet interface. The sessions are on different VLANs, but they are > handled by the same AC that doesn't allow that both sessions are initiate= d > by the same MAC address. Is there a way to associate two MAC addresses to= a > single physical interface (even by creating a virtual interface linked to > the physical one) and so have VLANs on different mac addresses, without > forcing the use of a secondary physical interface? =E2=80=8BI have not tried to pass traffic over these interfaces, but it app= ears you can assign MAC addresses to vlan pseudo-devices:=E2=80=8B =E2=80=8Bifconfig vlanX create ifconfig vlanX vlan X vlandev bge0 ifconfig vlanX inet 1.2.3.4/24 ifconfig vlanX ether aa:bb:cc:dd:ee:ff =E2=80=8Bifconfig vlanA create ifconfig vlanA vlan A vlandev bge0 ifconfig vlanA inet 1.2.3.4/24 ifconfig vlanA ether aa:bb:cc:dd:ee:00 Here's how it looks on a live system (although without a cable plugged into igb0). Note the different MAC addresses for each interface. igb0: flags=3D8843 metric 0 mtu 150= 0 options=3D407bb ether 00:25:90:ab:20:04 nd6 options=3D29 media: Ethernet autoselect status: no carrier vlan20: flags=3D8843 metric 0 mtu 1= 500 options=3D303 ether 00:25:90:ab:20:14 inet 10.3.4.5 netmask 0xffffff00 broadcast 10.3.4.255 nd6 options=3D29 media: Ethernet autoselect status: no carrier vlan: 20 parent interface: igb0 vlan30: flags=3D8843 metric 0 mtu 1= 500 options=3D303 ether 00:25:90:ab:20:22 inet 10.3.5.6 netmask 0xffffff00 broadcast 10.3.5.255 nd6 options=3D29 media: Ethernet autoselect status: no carrier vlan: 30 parent interface: igb0 =E2=80=8BWhether or not that actually works would require someone to run so= me tcpdumps/wireshark on the vlanX and vlanY interfaces to see what the Ethernet frames actually look like. :) --=20 Freddie Cash fjwcash@gmail.com