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