Bringing VLANs created with rc.conf vlans_<interface> 'up' on boot?
Peter Kieser
peter at kieser.ca
Mon May 17 17:08:37 UTC 2010
Hello,
I am experimenting with FreeBSD vlan's using the vlans<interface> option
in rc.conf, my configuration is as follows:
ifconfig_em1="up"
vlans_em1="100 101 102 103 104 105 106 107 108 109 110"
autobridge_interfaces="bridge0"
autobridge_bridge0="em0 em1.*"
ifconfig_bridge0="up"
rc script create em1.100 - em1.110 but doesn't bring the interfaces up
on boot, I have to issue 'ifconfig em1.100 up', etc. to bring them
online. I also cannot use 'ifconfig_em1.100="up"' because the rc scripts
don't support periods in the variable names. Is there a way to
accomplish this? In the mean time, I have had to resort to the following
which is very messy (and error prone):
ifconfig_em1="up"
cloned_interfaces="bridge0 vlan100 vlan101 vlan102 vlan103 vlan104
vlan105 vlan106 vlan107 vlan108 vlan109 vlan110"
ifconfig_vlan100="up vlan 100 vlandev em1"
ifconfig_vlan101="up vlan 101 vlandev em1"
ifconfig_vlan102="up vlan 102 vlandev em1"
ifconfig_vlan103="up vlan 103 vlandev em1"
ifconfig_vlan104="up vlan 104 vlandev em1"
ifconfig_vlan105="up vlan 105 vlandev em1"
ifconfig_vlan106="up vlan 106 vlandev em1"
ifconfig_vlan107="up vlan 107 vlandev em1"
ifconfig_vlan108="up vlan 108 vlandev em1"
ifconfig_vlan109="up vlan 109 vlandev em1"
ifconfig_vlan110="up vlan 110 vlandev em1"
ifconfig_bridge0="up addm em0 addm vlan100 addm vlan101 addm vlan102
addm vlan103 addm vlan104 addm vlan105 addm vlan106 addm vlan107 addm
vlan108 addm vlan109 addm vlan110"
Any hints? Suggestions? I was trying to avoid using the method listed
directly above as it is very messy and error prone.
Thanks,
-Peter
More information about the freebsd-net
mailing list