On Wed, Feb 8, 2017 at 10:06 AM, Alex Dupre <a...@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 initiated > 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? I have not tried to pass traffic over these interfaces, but it appears you can assign MAC addresses to vlan pseudo-devices: ifconfig 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 ifconfig 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=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=407bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO> ether 00:25:90:ab:20:04 nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet autoselect status: no carrier vlan20: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=303<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=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet autoselect status: no carrier vlan: 20 parent interface: igb0 vlan30: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 options=303<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=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL> media: Ethernet autoselect status: no carrier vlan: 30 parent interface: igb0 Whether or not that actually works would require someone to run some tcpdumps/wireshark on the vlanX and vlanY interfaces to see what the Ethernet frames actually look like. :) -- Freddie Cash fjwc...@gmail.com _______________________________________________ freebsd-net@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"