Date: Wed, 8 Feb 2017 12:18:14 -0800 From: Freddie Cash <fjwcash@gmail.com> To: Alex Dupre <ale@freebsd.org> Cc: freebsd-net <freebsd-net@freebsd.org> Subject: Re: Multiple MAC addresses on a single interface Message-ID: <CAOjFWZ4jjhqEYQY9WgGVAvx-qRKSdyeiFKN6=oa2HC0HVJFyaA@mail.gmail.com> In-Reply-To: <3e403eb2-b113-12d5-17c4-096ff32239e8@FreeBSD.org> References: <3e403eb2-b113-12d5-17c4-096ff32239e8@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 8, 2017 at 10:06 AM, Alex Dupre <ale@freebsd.org> 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<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 150= 0 options=3D407bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM= ,TSO4,TSO6,LRO,VLAN_HWTSO> ether 00:25:90:ab:20:04 nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet autoselect status: no carrier vlan20: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1= 500 options=3D303<RXCSUM,TXCSUM,TSO4,TSO6> ether 00:25:90:ab:20:14 inet 10.3.4.5 netmask 0xffffff00 broadcast 10.3.4.255 nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet autoselect status: no carrier vlan: 20 parent interface: igb0 vlan30: flags=3D8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1= 500 options=3D303<RXCSUM,TXCSUM,TSO4,TSO6> ether 00:25:90:ab:20:22 inet 10.3.5.6 netmask 0xffffff00 broadcast 10.3.5.255 nd6 options=3D29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOjFWZ4jjhqEYQY9WgGVAvx-qRKSdyeiFKN6=oa2HC0HVJFyaA>