Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jul 2018 18:37:20 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 229957] [epair] MAC addresses all the same, no randomness
Message-ID:  <bug-229957-7501-vHAtrcouAn@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-229957-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-229957-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229957

--- Comment #4 from O. Hartmann <ohartmann@walstatt.org> ---
(In reply to Eugene Grosbein from comment #1)

epair(4) interfaces are created in /etc/jail.conf within the "common" porti=
on
of the config file via

[...]
exec.prestart=3D          "";
exec.prestart+=3D         "ifconfig ${if_vnet} create";
exec.prestart+=3D         "ifconfig ${if_vnet}a ether ${epair_ether_base}:0=
a";
exec.prestart+=3D         "ifconfig ${if_vnet}b ether ${epair_ether_base}:0=
b";
exec.prestart+=3D         "ifconfig ${if_vnet}b up";
exec.prestart+=3D         "ifconfig ${if_home_bridge} addm ${if_vnet}b up";
[...]

Each jail definition has a set of variables comprising ${if_vnet} from lite=
rals
"epairXXX" and then in the prestart section a and b.=20

${epair_ether_base} is set to something "hand-randomised", means I try to g=
ive
each epair a distinguished MAC after I ran into these problems. So accordin=
g to
your question, epairs are created as walking through a for-loop, creating e=
ach
epair and put the a-part into the vnet jail and going on with the next. I f=
ind
this way much more convenient than creating all necessary epairs at once and
putting them afterwards into vnet.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-229957-7501-vHAtrcouAn>