[Bug 229957] [epair] MAC addresses all the same, no randomness

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Jul 22 18:37:22 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229957

--- Comment #4 from O. Hartmann <ohartmann at 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.


More information about the freebsd-net mailing list