2007-04-10 00:27:25 +00:00
|
|
|
.\" $OpenBSD: trunk.4,v 1.18 2006/06/09 13:53:34 jmc Exp $
|
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2005, 2006 Reyk Floeter <reyk@openbsd.org>
|
|
|
|
.\"
|
|
|
|
.\" Permission to use, copy, modify, and distribute this software for any
|
|
|
|
.\" purpose with or without fee is hereby granted, provided that the above
|
|
|
|
.\" copyright notice and this permission notice appear in all copies.
|
|
|
|
.\"
|
|
|
|
.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
|
|
.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
|
|
.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
|
|
.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
|
|
.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
|
|
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
|
|
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
|
|
.\"
|
|
|
|
.\" $FreeBSD$
|
|
|
|
.\"
|
2007-04-17 07:09:23 +00:00
|
|
|
.Dd April 17, 2007
|
2007-04-17 00:35:11 +00:00
|
|
|
.Dt LAGG 4
|
2007-04-10 00:27:25 +00:00
|
|
|
.Os
|
|
|
|
.Sh NAME
|
2007-04-17 00:35:11 +00:00
|
|
|
.Nm lagg
|
2007-04-10 00:27:25 +00:00
|
|
|
.Nd link aggregation and link failover interface
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
To compile this driver into the kernel,
|
|
|
|
place the following line in your
|
|
|
|
kernel configuration file:
|
|
|
|
.Bd -ragged -offset indent
|
2007-04-17 00:35:11 +00:00
|
|
|
.Cd "device lagg"
|
2007-04-10 00:27:25 +00:00
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
Alternatively, to load the driver as a
|
|
|
|
module at boot time, place the following line in
|
|
|
|
.Xr loader.conf 5 :
|
|
|
|
.Bd -literal -offset indent
|
2007-04-17 00:35:11 +00:00
|
|
|
if_lagg_load="YES"
|
2007-04-10 00:27:25 +00:00
|
|
|
.Ed
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
interface allows aggregation of multiple network interfaces as one virtual
|
|
|
|
.Nm
|
|
|
|
interface for the purpose of providing fault-tolerance and high-speed links.
|
|
|
|
.Pp
|
|
|
|
A
|
|
|
|
.Nm
|
|
|
|
interface can be created using the
|
2007-04-17 00:35:11 +00:00
|
|
|
.Ic ifconfig lagg Ns Ar N Ic create
|
2007-04-10 00:27:25 +00:00
|
|
|
command.
|
|
|
|
It can use different link aggregation protocols specified
|
|
|
|
using the
|
2007-04-17 00:35:11 +00:00
|
|
|
.Ic laggproto Ar proto
|
2007-04-10 00:27:25 +00:00
|
|
|
option.
|
|
|
|
Child interfaces can be added using the
|
2007-04-17 00:35:11 +00:00
|
|
|
.Ic laggport Ar child-iface
|
2007-04-10 00:27:25 +00:00
|
|
|
option and removed using the
|
2007-04-17 00:35:11 +00:00
|
|
|
.Ic -laggport Ar child-iface
|
2007-04-10 00:27:25 +00:00
|
|
|
option.
|
|
|
|
.Pp
|
2007-04-17 00:35:11 +00:00
|
|
|
The driver currently supports the aggregation protocols
|
2007-04-10 00:27:25 +00:00
|
|
|
.Ic failover
|
|
|
|
(the default),
|
|
|
|
.Ic fec ,
|
|
|
|
.Ic lacp ,
|
|
|
|
.Ic loadbalance ,
|
|
|
|
.Ic roundrobin ,
|
|
|
|
and
|
|
|
|
.Ic none .
|
|
|
|
The protocols determine which ports are used for outgoing traffic
|
|
|
|
and whether a specific port accepts incoming traffic.
|
|
|
|
The interface link state is used to validate if the port is active or
|
|
|
|
not.
|
|
|
|
.Bl -tag -width loadbalance
|
|
|
|
.It Ic failover
|
|
|
|
Sends and receives traffic only through the master port.
|
|
|
|
If the master port becomes unavailable,
|
|
|
|
the next active port is used.
|
|
|
|
The first interface added is the master port;
|
|
|
|
any interfaces added after that are used as failover devices.
|
|
|
|
.It Ic fec
|
|
|
|
Supports Cisco EtherChannel.
|
|
|
|
This is a static setup and does not negotiate aggregation with the peer or
|
|
|
|
exchange frames to monitor the link.
|
|
|
|
.It Ic lacp
|
|
|
|
Supports the IEEE 802.3ad Link Aggregation Control Protocol (LACP) and the
|
|
|
|
Marker Protocol.
|
|
|
|
LACP will negotiate a set of aggregable links with the peer in to one or more
|
|
|
|
Link Aggregated Groups.
|
|
|
|
Each LAG is composed of ports of the same speed, set to full-duplex operation.
|
|
|
|
The traffic will be balanced across the ports in the LAG with the greatest
|
|
|
|
total speed, in most cases there will only be one LAG which contains all ports.
|
|
|
|
In the event of changes in physical connectivity, Link Aggregation will quickly
|
|
|
|
converge to a new configuration.
|
|
|
|
.It Ic loadbalance
|
|
|
|
Balances outgoing traffic across the active ports based on hashed
|
|
|
|
protocol header information and accepts incoming traffic from
|
|
|
|
any active port.
|
|
|
|
This is a static setup and does not negotiate aggregation with the peer or
|
|
|
|
exchange frames to monitor the link.
|
|
|
|
The hash includes the Ethernet source and destination address, and, if
|
|
|
|
available, the VLAN tag, and the IP source and destination address.
|
|
|
|
.It Ic roundrobin
|
|
|
|
Distributes outgoing traffic using a round-robin scheduler
|
|
|
|
through all active ports and accepts incoming traffic from
|
|
|
|
any active port.
|
|
|
|
.It Ic none
|
|
|
|
This protocol is intended to do nothing: it disables any traffic without
|
|
|
|
disabling the
|
|
|
|
.Nm
|
|
|
|
interface itself.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Each
|
|
|
|
.Nm
|
|
|
|
interface is created at runtime using interface cloning.
|
|
|
|
This is
|
|
|
|
most easily done with the
|
|
|
|
.Xr ifconfig 8
|
|
|
|
.Cm create
|
|
|
|
command or using the
|
|
|
|
.Va cloned_interfaces
|
|
|
|
variable in
|
|
|
|
.Xr rc.conf 5 .
|
2007-07-30 20:17:22 +00:00
|
|
|
.Pp
|
|
|
|
The MTU of the first interface to be added is used as the lagg MTU.
|
|
|
|
All additional interfaces are required to have exactly the same value.
|
2007-04-10 00:27:25 +00:00
|
|
|
.Sh EXAMPLES
|
2007-04-17 00:35:11 +00:00
|
|
|
Create a 802.3ad link aggregation using LACP with two
|
2007-04-10 00:27:25 +00:00
|
|
|
.Xr bge 4
|
|
|
|
Gigabit Ethernet interfaces:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
# ifconfig bge0 up
|
|
|
|
# ifconfig bge1 up
|
2007-04-17 00:35:11 +00:00
|
|
|
# ifconfig lagg0 laggproto lacp laggport bge0 laggport bge1 \e
|
2007-04-10 00:27:25 +00:00
|
|
|
192.168.1.1 netmask 255.255.255.0
|
|
|
|
.Ed
|
|
|
|
.Pp
|
2007-04-17 00:35:11 +00:00
|
|
|
The following example uses an active failover interface to set up roaming
|
2007-04-10 00:27:25 +00:00
|
|
|
between wired and wireless networks using two network devices.
|
|
|
|
Whenever the wired master interface is unplugged, the wireless failover
|
|
|
|
device will be used:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
# ifconfig em0 up
|
|
|
|
# ifconfig ath0 nwid my_net up
|
2007-04-17 00:35:11 +00:00
|
|
|
# ifconfig lagg0 laggproto failover laggport em0 laggport ath0 \e
|
2007-04-10 00:27:25 +00:00
|
|
|
192.168.1.1 netmask 255.255.255.0
|
|
|
|
.Ed
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Xr ng_fec 4 ,
|
|
|
|
.Xr ng_one2many 4 ,
|
|
|
|
.Xr ifconfig 8
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
device first appeared in
|
|
|
|
.Fx 7.0 .
|
|
|
|
.Sh AUTHORS
|
|
|
|
.An -nosplit
|
|
|
|
The
|
|
|
|
.Nm
|
2007-04-17 07:08:18 +00:00
|
|
|
driver was written under the name
|
|
|
|
.Nm trunk
|
|
|
|
by
|
2007-04-10 00:27:25 +00:00
|
|
|
.An Reyk Floeter Aq reyk@openbsd.org .
|
|
|
|
The LACP implementation was written by
|
|
|
|
.An YAMAMOTO Takashi
|
|
|
|
for
|
|
|
|
.Nx .
|
|
|
|
.Sh BUGS
|
|
|
|
There is no way to configure LACP administrative variables, including system
|
|
|
|
and port priorities.
|
|
|
|
The current implementation always performs active-mode LACP and uses 0x8000 as
|
|
|
|
system and port priorities.
|
|
|
|
.Pp
|
|
|
|
WPA security does not currently work correctly with a wireless interface added
|
2007-04-17 00:35:11 +00:00
|
|
|
to the lagg port.
|