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=229957

--- 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" portion
of the config file via

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

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

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

-- 
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>