This is actually “advanced networking” as we will be talking about LACP and vlans.
Edit /etc/rc.conf and modify as follows. be sure to remove any other network stanzas
ifconfig_bce0="up" ifconfig_bce1="up" cloned_interfaces="lagg0" ifconfig_lagg0="laggproto failover laggport bce0 laggport bce1 10.0.0.15/24"
The mode (laggproto) is one of:
Best thing would be to use lacp if you can set up the switch, otherwise use either failover (preferred) or fec
In /etc/rc.conf, add one line, vlans_em0=“list of vlans”, then create an ifconfig line for each vlan defined, ie
vlans_bce0="10 20 30 40 50" ifconfig_bce0_10="inet 192.168.20.20/24" ifconfig_bce0_20="up" ifconfig_bce0_30="SYNCDHCP" ifconfig_bce0_40="up" ifconfig_bce0_50="inet 10.0.0.15/24"
NOTE: notice the use of SYNCDHCP above.
In the following configuration, we are setting up two separate LAPC bonds, using two pair of interfaces, then adding appropriate vlans to them.
bce0 and bce1 will be paired into lagg0, and work on vlans 10, 20, 30 and 40.
em0 and em1 will be paired into lagg1, and work only with vlan 50.
when you are done, ifconfig should show you all the interfaces, properly sorted.
ifconfig_bce0="up" ifconfig_bce1="up" cloned_interfaces="lagg0 lagg1" ifconfig_lagg0="laggproto failover laggport bce0 laggport bce1" vlans_lagg0="10 20 30 40" ifconfig_lagg0_10="inet 192.168.20.21/32" ifconfig_lagg0_20="up" ifconfig_lagg0_30="dhcp" ifconfig_lagg0_40="up" # iscsi interface ifconfig_em0="up" ifconfig_em1="up" ifconfig_lagg1="laggproto failover laggport em0 laggport em1" vlans_lagg1="50" ifconfig_lagg1_50="inet 10.0.0.15/24"