Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 6 Feb 2017 19:53:48 +0100
From:      Giulio Ferro <auryn@zirakzigil.org>
To:        "freebsd-net@freebsd.org" <freebsd-net@freebsd.org>, freebsd-hackers@freebsd.org
Subject:   Duplicate MAC addresses in VNET epair interaces
Message-ID:  <472069af-0f9d-d830-064b-2d984a5774ae@zirakzigil.org>

next in thread | raw e-mail | index | archive | help
Hi all,


Setup:

11.0-STABLE FreeBSD 11.0-STABLE #0 r312338: Tue Jan 17 12:29:38 UTC 2017


I've set up two freebsd hosts, each of which has  a single VNET jail.

On each host I've created 2 epair interfaces.

Host A

- epair0a, epair1a on the host

- epair0b, epair1b on the jail


Host B

- epair0a, epair10a on the host

- epair0b, epair10b on the jail


What I noticed is that on both hosts, each epair interface has the same 
MAC address:


Host A:

root@xxx:~ # ifconfig epair0a
epair0a: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 
1500
     options=8<VLAN_MTU>
     ether 02:ff:e0:00:03:0a
     inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
     nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
     media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
     status: active
     groups: epair
root@xxx:~ # ifconfig epair1a
epair1a: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> 
metric 0 mtu 1500
     options=8<VLAN_MTU>
     ether 02:ff:e0:00:05:0a
     nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
     media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
     status: active
     groups: epair


Host B:

root@yyy:~ # ifconfig epair0a
epair0a: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 
1500
     options=8<VLAN_MTU>
     ether 02:ff:e0:00:03:0a
     inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
     nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
     media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
     status: active
     groups: epair
root@yyy:~ # ifconfig epair10a
epair10a: 
flags=28943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST,PPROMISC> 
metric 0 mtu 1500
     options=8<VLAN_MTU>
     ether 02:ff:e0:00:05:0a
     nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
     media: Ethernet 10Gbase-T (10Gbase-T <full-duplex>)
     status: active
     groups: epair


(same behavior on the epair interfaces on the jail side)


As you can see, the mac addresses seems to depend on the order of the 
creation of the epair, not on the name or address


This is a potentially bad behavior, because if I want to bridge say 
epair1a on A with epair10a on B with a VPN or

a physical connection giving 192.168.1.1 to epair1b and 192.168.1.2 to 
epair10b, I won't be able to make them

talk to each other since they have the same MAC address.


My question is: is this a bug or something I'm doing wrong? If there any 
workaround I can use?


Thanks

Giulio




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?472069af-0f9d-d830-064b-2d984a5774ae>