xref: /freebsd/share/man/man4/lagg.4 (revision 94942af266ac119ede0ca836f9aa5a5ac0582938)
1.\"	$OpenBSD: trunk.4,v 1.18 2006/06/09 13:53:34 jmc Exp $
2.\"
3.\" Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org>
4.\"
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.
8.\"
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.
16.\"
17.\" $FreeBSD$
18.\"
19.Dd April 17, 2007
20.Dt LAGG 4
21.Os
22.Sh NAME
23.Nm lagg
24.Nd link aggregation and link failover interface
25.Sh SYNOPSIS
26To compile this driver into the kernel,
27place the following line in your
28kernel configuration file:
29.Bd -ragged -offset indent
30.Cd "device lagg"
31.Ed
32.Pp
33Alternatively, to load the driver as a
34module at boot time, place the following line in
35.Xr loader.conf 5 :
36.Bd -literal -offset indent
37if_lagg_load="YES"
38.Ed
39.Sh DESCRIPTION
40The
41.Nm
42interface allows aggregation of multiple network interfaces as one virtual
43.Nm
44interface for the purpose of providing fault-tolerance and high-speed links.
45.Pp
46A
47.Nm
48interface can be created using the
49.Ic ifconfig lagg Ns Ar N Ic create
50command.
51It can use different link aggregation protocols specified
52using the
53.Ic laggproto Ar proto
54option.
55Child interfaces can be added using the
56.Ic laggport Ar child-iface
57option and removed using the
58.Ic -laggport Ar child-iface
59option.
60.Pp
61The driver currently supports the aggregation protocols
62.Ic failover
63(the default),
64.Ic fec ,
65.Ic lacp ,
66.Ic loadbalance ,
67.Ic roundrobin ,
68and
69.Ic none .
70The protocols determine which ports are used for outgoing traffic
71and whether a specific port accepts incoming traffic.
72The interface link state is used to validate if the port is active or
73not.
74.Bl -tag -width loadbalance
75.It Ic failover
76Sends and receives traffic only through the master port.
77If the master port becomes unavailable,
78the next active port is used.
79The first interface added is the master port;
80any interfaces added after that are used as failover devices.
81.It Ic fec
82Supports Cisco EtherChannel.
83This is a static setup and does not negotiate aggregation with the peer or
84exchange frames to monitor the link.
85.It Ic lacp
86Supports the IEEE 802.3ad Link Aggregation Control Protocol (LACP) and the
87Marker Protocol.
88LACP will negotiate a set of aggregable links with the peer in to one or more
89Link Aggregated Groups.
90Each LAG is composed of ports of the same speed, set to full-duplex operation.
91The traffic will be balanced across the ports in the LAG with the greatest
92total speed, in most cases there will only be one LAG which contains all ports.
93In the event of changes in physical connectivity, Link Aggregation will quickly
94converge to a new configuration.
95.It Ic loadbalance
96Balances outgoing traffic across the active ports based on hashed
97protocol header information and accepts incoming traffic from
98any active port.
99This is a static setup and does not negotiate aggregation with the peer or
100exchange frames to monitor the link.
101The hash includes the Ethernet source and destination address, and, if
102available, the VLAN tag, and the IP source and destination address.
103.It Ic roundrobin
104Distributes outgoing traffic using a round-robin scheduler
105through all active ports and accepts incoming traffic from
106any active port.
107.It Ic none
108This protocol is intended to do nothing: it disables any traffic without
109disabling the
110.Nm
111interface itself.
112.El
113.Pp
114Each
115.Nm
116interface is created at runtime using interface cloning.
117This is
118most easily done with the
119.Xr ifconfig 8
120.Cm create
121command or using the
122.Va cloned_interfaces
123variable in
124.Xr rc.conf 5 .
125.Sh EXAMPLES
126Create a 802.3ad link aggregation using LACP with two
127.Xr bge 4
128Gigabit Ethernet interfaces:
129.Bd -literal -offset indent
130# ifconfig bge0 up
131# ifconfig bge1 up
132# ifconfig lagg0 laggproto lacp laggport bge0 laggport bge1 \e
133	192.168.1.1 netmask 255.255.255.0
134.Ed
135.Pp
136The following example uses an active failover interface to set up roaming
137between wired and wireless networks using two network devices.
138Whenever the wired master interface is unplugged, the wireless failover
139device will be used:
140.Bd -literal -offset indent
141# ifconfig em0 up
142# ifconfig ath0 nwid my_net up
143# ifconfig lagg0 laggproto failover laggport em0 laggport ath0 \e
144	192.168.1.1 netmask 255.255.255.0
145.Ed
146.Sh SEE ALSO
147.Xr ng_fec 4 ,
148.Xr ng_one2many 4 ,
149.Xr ifconfig 8
150.Sh HISTORY
151The
152.Nm
153device first appeared in
154.Fx 7.0 .
155.Sh AUTHORS
156.An -nosplit
157The
158.Nm
159driver was written under the name
160.Nm trunk
161by
162.An Reyk Floeter Aq reyk@openbsd.org .
163The LACP implementation was written by
164.An YAMAMOTO Takashi
165for
166.Nx .
167.Sh BUGS
168There is no way to configure LACP administrative variables, including system
169and port priorities.
170The current implementation always performs active-mode LACP and uses 0x8000 as
171system and port priorities.
172.Pp
173WPA security does not currently work correctly with a wireless interface added
174to the lagg port.
175