Bonding: Difference between revisions

From Alpine Linux
No edit summary
(use https link)
 
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
This article shows how to bond (or aggregate) multiple ethernet interfaces into a bond0 interface.
This article shows how to bond (or aggregate) multiple ethernet interfaces into a bond0 interface.
 
{{Note| Alpine Linux v2.4 or later is required}}
==Installation==
==Installation==
First, install the ''bonding'' package. This will give you support for bonding in the ''/etc/network/interfaces'' file.
First, install the ''bonding'' package. This will give you support for bonding in the ''/etc/network/interfaces'' file.
{{Cmd|apk add bonding}}
{{Cmd|apk add bonding}}
And if you want to setup a LACP setup with a ''bridge'' interface you also need to install:
{{Cmd|apk add bridge}}


==Configuration==
==Configuration==
Line 17: Line 19:
</pre>
</pre>


References: http://www.kernel.org/doc/Documentation/networking/bonding.txt
The keyword is ''bond-slaves'' that will make ifup add the slaves to the bond0 interface.
 
References: https://www.kernel.org/doc/Documentation/networking/bonding.txt
 
[[Category:Networking]]
 
 
 
Bonding with br0 (LACP)
<pre>
auto bond0
iface bond0 inet manual
        bond-slaves eth0 eth1
        bond-mode 802.3ad
        bond-xmit-hash-policy layer2+3
 
auto br0
iface br0 inet dhcp
        bridge-ports bond0
        bridge-stp 0
                hostname alpine
</pre>

Latest revision as of 02:45, 25 August 2023

This article shows how to bond (or aggregate) multiple ethernet interfaces into a bond0 interface.

Note: Alpine Linux v2.4 or later is required

Installation

First, install the bonding package. This will give you support for bonding in the /etc/network/interfaces file.

apk add bonding

And if you want to setup a LACP setup with a bridge interface you also need to install:

apk add bridge

Configuration

Edit the /etc/network/interfaces file:

auto bond0
iface bond0 inet static
	address 192.168.0.2
	netmask 255.255.255.0
	gateway 192.168.0.1
	# specify the ethernet interfaces that should be bonded
	bond-slaves eth0 eth1 eth2 eth3

The keyword is bond-slaves that will make ifup add the slaves to the bond0 interface.

References: https://www.kernel.org/doc/Documentation/networking/bonding.txt


Bonding with br0 (LACP)

auto bond0
iface bond0 inet manual
        bond-slaves eth0 eth1
        bond-mode 802.3ad
        bond-xmit-hash-policy layer2+3

auto br0
iface br0 inet dhcp
        bridge-ports bond0
        bridge-stp 0
                hostname alpine