| LAGG(4) | Device Drivers Manual | LAGG(4) |
lagg —
pseudo-device lagg
lagg interface allows aggregation of multiple
network interfaces as one virtual lagg interface for
the purpose of providing fault-tolerance and high-speed links.
A lagg interface can be created using the
ifconfig laggN
create command. It can use different link
aggregation protocols specified using the laggproto
proto option. Child interfaces can be added using the
laggport child-iface option
and removed using the -laggport
child-iface option. A priority of each child interface
can be configured using the laggport
child-iface pri N or
laggportpri child-iface
N option. The interface preferentially uses the child
interface that is the smallest numeric in the priority.
The driver currently supports the aggregation protocols
failover, loadbalance,
lacp, and none (the
default). 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.
failoverReceived traffic is accepted through all active port if
laggfailover rx-all
option is enabled. The option is enabled by default, and it can be
disabled by laggfailover
-rx-all option. If the option is disabled,
received traffic is only accepted through the sending port.
loadbalancelacplagglacp multi-speed
option is configured. The function can be disabled by
lagglacp -multi-speed
option. Outgoing traffic across the distributing ports based on hashed
protocol header information and accepts incoming traffic from any
collecting port. The maximum number of active ports in a LAG can be
configured by lagglacp
maxports N option.nonelagg interface itself.Each lagg interface is created at runtime
using interface cloning. This is most easily done with the
ifconfig(8)
create command.
The MTU of the lagg(4) is applied to each physical interfaces. And the physical interfaces can not change its MTU directly.
# ifconfig wm0 up # ifconfig wm1 up # ifconfig lagg0 create # ifconfig lagg0 laggproto lacp laggport wm0 laggport wm1 \ 192.168.1.1 netmask 255.255.255.0
Create a link aggregation using FAILOVER with two wm(4) Gigabit Ethernet interfaces and set each priority:
# ifconfig wm0 up # ifconfig wm1 up # ifconfig lagg0 create # ifconfig lagg0 laggproto failover # ifconfig lagg0 laggport wm0 pri 1000 # ifconfig lagg0 laggport wm1 pri 2000 # ifconfig lagg0 inet 192.168.1.1 netmask 255.255.255.0
lagg device first appeared in
NetBSD 10.0.
lagg driver was written under the name
trunk by Reyk Floeter
<reyk@openbsd.org>.
| April 2, 2020 | NetBSD 10.0 |