OpenBSD manual page server

Manual Page Search Parameters

TRUNK(4)                  OpenBSD Programmer's Manual                 TRUNK(4)

     trunk - link aggregation and link failover interface

     pseudo-device trunk [count]

     The trunk interface allows aggregation of multiple network interfaces as
     one virtual trunk interface.

     A trunk interface can be created using the ifconfig trunkN create com-
     mand.  It can use different link aggregation protocols specified using
     the trunkproto proto option.  Child interfaces can be added using the
     trunkport child-iface option and removed using the -trunkport child-iface

     The driver currently supports the trunk protocols roundrobin (the de-
     fault), failover, and none.  The roundrobin protocol distributes outgoing
     traffic using a round-robin scheduler through all active ports; the
     failover protocol sends outgoing traffic only through the master or the
     next active port.  Both protocols receive traffic from all attached
     ports.  The interface link state is used to validate if the port is ac-
     tive or not.  The none protocol is intended to do nothing: it disables
     any traffic without disabling the trunk interface itself.

     The configuration can be done at runtime or by setting up a
     hostname.if(5) configuration file for netstart(8).

     Create a simple round robin trunk with two bge(4) Gigabit Ethernet inter-

           # ifconfig bge0 up
           # ifconfig bge1 up
           # ifconfig trunk0 trunkport bge0 trunkport bge1 \

     The following example uses an active failover trunk to set up roaming be-
     tween wired and wireless networks using two network devices.  Whenever
     the wired master interface is unplugged, the wireless failover device
     will be used:

           # ifconfig em0 up
           # ifconfig ath0 netmask nwid my_net
           # ifconfig trunk0 trunkproto failover trunkport em0 trunkport ath0 \

     inet(4), hostname.if(5), ifconfig(8), netstart(8)

     The trunk device appeared in OpenBSD 3.8.

     The trunk driver was written by Reyk Floeter <>.

OpenBSD 3.9                       May 5, 2005                                1