Trunk interface automatically connects to one of multiple Ethernet or wifi devices.
Trunks are virtual interfaces consisting of one or more network interfaces. In this section, our example will be a laptop with a wired bge0 interface and a wireless iwn0 interface. We will build a trunk(4) interface using both of them. The wired and wireless interfaces must be connected to the same layer two network.
The listed devices are
/etc/hostname.em0 to contain only
/etc/hostname.iwm0 add WiFi networks. One per each line separated by a space
join $SSID wpakey $PASSWORD and add
up on the last line. In the photo below passwords are deleted but they come after wpakey.
Create a new file for the trunk device.
Add the following lines to it. Change the names of interfaces as needed to match your own.
trunkproto failover trunkport em0 trunkport iwm0 inet autoconf
Should connect to WiFi, if not