xref: /netbsd-src/share/man/man4/agr.4 (revision e1088c05eb15758697ba5a04e3ab5dd21a9c55f8)
1.\"	$NetBSD: agr.4,v 1.12 2023/10/11 11:00:17 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 February 23, 2010
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
40.Em The driver described in this manual page is obsolete
41.Em and will be removed from a future version of the system.
42.Pp
43.Xr lagg 4
44.Em should be used instead.
45.Pp
46The
47.Nm
48driver provides link aggregation functionality (a.k.a. L2 trunking
49or bonding).
50.Pp
51It supports the IEEE 802.3ad Link Aggregation Control Protocol
52(LACP) and the Marker Protocol.
53.Pp
54The
55.Nm
56driver supports the following link specific flags for
57.Xr ifconfig 8 :
58.Bl -tag -width "-link0"
59.It Cm link0
60Use the round-robin distribution algorithm.
61Don't use it unless you're really sure,
62because it violates the frame ordering rule.
63.It Cm -link0
64Use the default distribution algorithm, which is based on the hash
65of DA/SA, TCI, and, if available, some upper layer protocol
66information like
67.Xr ip 4
68DA/SA.
69.It Cm link1
70Disable LACP.
71Prevents any LACP or Marker messaging which leaves
72the ports in the default static configuration.
73Set this prior to adding ports.
74.El
75.\" ------------------------------------------------------------
76.Sh EXAMPLES
77Create an
78.Nm
79interface,
80.Sy agr0 ,
81and attach
82.Sy re0
83and
84.Sy re1
85to it.
86In other words, aggregate
87.Sy re0
88and
89.Sy re1
90so that they can be used as a single interface,
91.Sy agr0 .
92The physical interfaces which are attached to the
93.Nm
94interface must not have any IP addresses, neither IPv4 nor IPv6.
95.Bd -literal -offset indent
96	ifconfig re0 inet xxx.xxx.xxx.xxx delete
97	ifconfig re0 inet6 fe80::xxxx:xxxx:xxxx:xxxx delete
98	ifconfig re1 inet xxx.xxx.xxx.xxx delete
99	ifconfig re1 inet6 fe80::xxxx:xxxx:xxxx:xxxx delete
100
101	ifconfig agr0 create
102	ifconfig agr0 agrport re0
103	ifconfig agr0 agrport re1
104.Ed
105.Pp
106Destroy an interface created in the above example.
107.Bd -literal -offset indent
108	ifconfig agr0 -agrport re0
109	ifconfig agr0 -agrport re1
110	ifconfig agr0 destroy
111.Ed
112.\" ------------------------------------------------------------
113.Sh SEE ALSO
114.Xr lagg 4 ,
115.Xr ifconfig 8
116.\" ------------------------------------------------------------
117.Sh STANDARDS
118IEEE 802.3ad Aggregation of Multiple Link Segments
119.\" ------------------------------------------------------------
120.Sh HISTORY
121The
122.Nm
123driver first appeared in
124.Nx 4.0
125and was obsoleted in
126.Nx 10.0 .
127.Pp
128The
129.Nm
130driver will be removed from
131.Nx 11.0 .
132.\" ------------------------------------------------------------
133.Sh AUTHORS
134The
135.Nm
136driver was written by
137.An YAMAMOTO Takashi .
138.\" ------------------------------------------------------------
139.Sh BUGS
140There is no way to configure LACP administrative variables, including
141system and port priorities.
142The current implementation of the
143.Nm
144driver always performs active-mode LACP and
145uses 0x8000 as system and port priorities.
146.Pp
147The
148.Nm
149driver uses the MAC address of the first-added physical
150interface as the MAC address of the
151.Nm
152interface itself.
153Thus, removing the physical interface and using it for another purpose
154can result in non-unique MAC addresses.
155.Pp
156The current implementation of the
157.Nm
158driver doesn't prevent unsafe operations like some ioctls against
159underlying physical interfaces.
160Such operations can result in unexpected behaviors, and are strongly
161discouraged.
162.Pp
163There is no way to configure
164.Nm
165interfaces without attaching physical interfaces.
166.Pp
167Physical interfaces being added to the
168.Nm
169interface shouldn't have any addresses except for link level address.
170Otherwise, the attempt will fail with
171.Dv EBUSY .
172Note that it includes an automatically assigned IPv6 link-local address.
173