1 .\" $OpenBSD: trunk.4,v 1.18 2006/06/09 13:53:34 jmc Exp $
3 .\" Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org>
5 .\" Permission to use, copy, modify, and distribute this software for any
6 .\" purpose with or without fee is hereby granted, provided that the above
7 .\" copyright notice and this permission notice appear in all copies.
9 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 .\" $FreeBSD: head/share/man/man4/lagg.4 243091 2012-11-15 16:54:14Z joel $
24 .Nd link aggregation and link failover interface
26 To compile this driver into the kernel,
27 place the following line in your
28 kernel configuration file:
29 .Bd -ragged -offset indent
33 Alternatively, to load the driver as a
34 module at boot time, place the following line in
36 .Bd -literal -offset indent
42 interface allows aggregation of multiple network interfaces as one virtual
44 interface for the purpose of providing fault-tolerance and high-speed links.
48 interface can be created using the
49 .Ic ifconfig lagg Ns Ar N Ic create
51 It can use different link aggregation protocols specified
53 .Ic laggproto Ar proto
55 Child interfaces can be added using the
56 .Ic laggport Ar child-iface
57 option and removed using the
58 .Ic -laggport Ar child-iface
61 The driver currently supports the aggregation protocols
70 The protocols determine which ports are used for outgoing traffic
71 and whether a specific port accepts incoming traffic.
72 The interface link state is used to validate if the port is active or
74 .Bl -tag -width loadbalance
76 Sends traffic only through the active port.
77 If the master port becomes unavailable,
78 the next active port is used.
79 The first interface added is the master port;
80 any interfaces added after that are used as failover devices.
82 By default, received traffic is only accepted when they are received
83 through the active port.
84 This constraint can be relaxed by setting the
85 .Va net.link.lagg.failover_rx_all
87 variable to a nonzero value,
88 which is useful for certain bridged network setups.
90 Supports Cisco EtherChannel.
95 Supports the IEEE 802.1AX (formerly 802.3ad) Link Aggregation Control Protocol
96 (LACP) and the Marker Protocol.
97 LACP will negotiate a set of aggregable links with the peer in to one or more
98 Link Aggregated Groups.
99 Each LAG is composed of ports of the same speed, set to full-duplex operation.
100 The traffic will be balanced across the ports in the LAG with the greatest
101 total speed, in most cases there will only be one LAG which contains all ports.
102 In the event of changes in physical connectivity, Link Aggregation will quickly
103 converge to a new configuration.
105 Balances outgoing traffic across the active ports based on hashed
106 protocol header information and accepts incoming traffic from
108 This is a static setup and does not negotiate aggregation with the peer or
109 exchange frames to monitor the link.
110 The hash includes the Ethernet source and destination address, and, if
111 available, the VLAN tag, and the IP source and destination address.
113 Distributes outgoing traffic using a round-robin scheduler
114 through all active ports and accepts incoming traffic from
117 This protocol is intended to do nothing: it disables any traffic without
125 interface is created at runtime using interface cloning.
127 most easily done with the
131 .Va cloned_interfaces
135 The MTU of the first interface to be added is used as the lagg MTU.
136 All additional interfaces are required to have exactly the same value.
142 modes will use the RSS hash from the network card if available to avoid
143 computing one, this may give poor traffic distribution if the hash is invalid
144 or uses less of the protocol header information.
145 Local hash computation can be forced per interface by setting the
146 .Va net.link.lagg.X.use_flowid
148 variable to zero where X is the interface number.
149 The default for new interfaces is set via the
150 .Va net.link.lagg.default_use_flowid
153 Create a link aggregation using LACP with two
155 Gigabit Ethernet interfaces:
156 .Bd -literal -offset indent
159 # ifconfig lagg0 laggproto lacp laggport bge0 laggport bge1 \e
160 192.168.1.1 netmask 255.255.255.0
163 The following example uses an active failover interface to set up roaming
164 between wired and wireless networks using two network devices.
165 Whenever the wired master interface is unplugged, the wireless failover
167 .Bd -literal -offset indent
169 # ifconfig ath0 ether 00:11:22:33:44:55
170 # ifconfig create wlan0 wlandev ath0 ssid my_net up
171 # ifconfig lagg0 laggproto failover laggport em0 laggport wlan0 \e
172 192.168.1.1 netmask 255.255.255.0
175 (Note the mac address of the wireless device is forced to match the wired
176 device as a workaround.)
185 device first appeared in
191 driver was written under the name
194 .An Reyk Floeter Aq Mt reyk@openbsd.org .
195 The LACP implementation was written by
201 version was ported to
204 .An Markus Pfeiffer Aq Mt profmakx@dragonflybsd.org .
206 There is no way to configure LACP administrative variables, including system
208 The current implementation always performs active-mode LACP and uses 0x8000 as
209 system and port priorities.