1.\" $NetBSD: agr.4,v 1.5 2007/12/02 22:12:04 wiz Exp $ 2.\" 3.\" Copyright (c)2005, 2007 YAMAMOTO Takashi, 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25.\" SUCH DAMAGE. 26.\" 27.\" ------------------------------------------------------------ 28.Dd November 5, 2007 29.Dt AGR 4 30.Os 31.\" ------------------------------------------------------------ 32.Sh NAME 33.Nm agr 34.Nd link aggregation pseudo network interface driver 35.\" ------------------------------------------------------------ 36.Sh SYNOPSIS 37.Cd pseudo-device agr 38.\" ------------------------------------------------------------ 39.Sh DESCRIPTION 40The 41.Nm 42driver provides link aggregation functionality (a.k.a. L2 trunking 43or bonding). 44.Pp 45It supports the IEEE 802.3ad Link Aggregation Control Protocol 46(LACP) and the Marker Protocol. 47.Pp 48The 49.Nm 50driver supports the following link specific flags for 51.Xr ifconfig 8 : 52.Bl -tag -width -link0 53.It Cm link0 54Use the round-robin distribution algorithm. 55Don't use it unless you're really sure, 56because it violates the frame ordering rule. 57.It Cm -link0 58Use the default distribution algorithm, which is based on the hash 59of DA/SA, TCI, and, if available, some upper layer protocol 60information like 61.Xr ip 4 62DA/SA. 63.El 64.\" ------------------------------------------------------------ 65.Sh EXAMPLES 66Create an 67.Nm 68interface, 69.Sy agr0 , 70and attach 71.Sy re0 72and 73.Sy re1 74to it. 75(In other words, aggregate 76.Sy re0 77and 78.Sy re1 79so that they can be used as a single interface, 80.Sy agr0 ) 81.Bd -literal -offset indent 82 ifconfig agr0 create 83 ifconfig agr0 agrport re0 84 ifconfig agr0 agrport re1 85.Ed 86.Pp 87Destroy an interface created in the above example. 88.Bd -literal -offset indent 89 ifconfig agr0 -agrport re0 90 ifconfig agr0 -agrport re1 91 ifconfig agr0 destroy 92.Ed 93.\" ------------------------------------------------------------ 94.Sh SEE ALSO 95.Xr ifconfig 8 96.\" ------------------------------------------------------------ 97.Sh STANDARDS 98IEEE 802.3ad Aggregation of Multiple Link Segments 99.\" ------------------------------------------------------------ 100.Sh HISTORY 101The 102.Nm 103driver first appeared in 104.Nx 4.0 . 105.\" ------------------------------------------------------------ 106.Sh AUTHORS 107The 108.Nm 109driver was written by 110.An YAMAMOTO Takashi . 111.\" ------------------------------------------------------------ 112.Sh BUGS 113The current implementation of the 114.Nm 115driver always attempts automatic configuration via LACP. 116There is no way to configure statically or use non IEEE 802.3 devices. 117.Pp 118There is no way to configure LACP administrative variables, including 119system and port priorities. 120The current implementation of the 121.Nm 122driver always performs active-mode LACP and 123uses 0x8000 as system and port priorities. 124.Pp 125The 126.Nm 127driver uses the MAC address of the first-added physical 128interface as the MAC address of the 129.Nm 130interface itself. 131Thus, removing the physical interface and using it for another purpose 132can result in non-unique MAC addresses. 133.Pp 134The current implementation of the 135.Nm 136driver doesn't prevent unsafe operations like some ioctls against 137underlying physical interfaces. 138Such operations can result in unexpected behaviors, and are strongly 139discouraged. 140.Pp 141There is no way to configure 142.Nm 143interfaces without attaching physical interfaces. 144.Pp 145Physical interfaces being added to the 146.Nm 147interface shouldn't have any addresses except for link level address. 148Otherwise, the attempt will fail with 149.Dv EBUSY . 150Note that it includes an automatically assigned IPv6 link-local address. 151