Solved ether random

How to configure in /etc/rc.conf an interface with "ether random" so that the MAC address is not the same as the main interface?

For example when creating a VLAN I use something like:

Code:
cloned_interfaces="vlan0"
create_args_vlan0="vlan 4000 vlandev em0 mtu 1400 fib 1"
ifconfig_vlan0="ether random"

That works but when I need to define the IP, for example:
Code:
ifconfig_vlan0="inet 10.0.0.4/24"

How to also add ether random?
 
But this should go now...

ifconfig_vlan0="ether random inet 10.0.0.4/24"

I mean atleast it works for me if i put ether random at first before SYNCDHCP and stuff using an em interface.
 
Still not working, for me only works if I only use:

ifconfig_vlan0="ether random"

What I am doing now is in /etc/rc.conf:
ifconfig_vlan0="inet 10.0.0.4/24"

and in /etc/rc.local
ifconfig vlan0 ether random

But would like to find a way of doing it all within /etc/rc.conf and prevent /etc/rc.local
 
Back
Top