Debian: network bonding: Difference between revisions
From OnnoCenterWiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 3: | Line 3: | ||
apt-get install ifenslave | apt-get install ifenslave | ||
apt -y install ifenslave | apt -y install ifenslave | ||
modprobe bonding | |||
modprobe 8021q | |||
echo 'bonding' >> /etc/modules | |||
echo '8021q' >> /etc/modules | |||
Interface Down | Interface Down | ||
| Line 11: | Line 17: | ||
/etc/init.d/networking stop | /etc/init.d/networking stop | ||
Edit | |||
vi /etc/network/interfaces | |||
# The primary network interface | |||
allow-hotplug enp2s0 | |||
allow-hotplug enp3s0 | |||
auto enp2s0 | |||
iface enp2s0 inet dhcp | |||
#iface enp2s0 inet static | |||
# address 192.168.0.7 | |||
# netmask 255.255.255.0 | |||
# network 192.168.0.0 | |||
# gateway 192.168.0.222 | |||
auto enp3s0 | |||
iface enp3s0 inet dhcp | |||
# iface enp3s0 inet static | |||
# address 192.168.0.8 | |||
# netmask 255.255.255.0 | |||
# network 192.168.0.0 | |||
# gateway 192.168.0.222 | |||
auto bond0 | auto bond0 | ||
iface bond0 inet static | iface bond0 inet static | ||
address 192.168.0.7 | |||
netmask 255.255.255.0 | |||
gateway 192.168.0.222 | |||
bond-slaves enp2s0 enp3s0 | |||
# bond-mode 0 = round robin | |||
# bond-mode 4 = 802.3ad AKA LACP | |||
bond-mode 0 | |||
bond-miimon 100 | |||
bond-downdelay 200 | |||
bond-updelay 200 | |||
# bond-lacp-rate 1 | |||
# bond-xmit-hash-policy layer2+3 | |||
# up ifconfig bond0 0.0.0.0 up | |||
Latest revision as of 22:47, 26 February 2022
Install
apt-get install ifenslave apt -y install ifenslave modprobe bonding modprobe 8021q echo 'bonding' >> /etc/modules echo '8021q' >> /etc/modules
Interface Down
ifdown eth0 (Repeat for all interfaces included in the bond) ifdown enp3s0 ifdown enp2s0 /etc/init.d/networking stop
Edit
vi /etc/network/interfaces
# The primary network interface
allow-hotplug enp2s0
allow-hotplug enp3s0
auto enp2s0
iface enp2s0 inet dhcp
#iface enp2s0 inet static
# address 192.168.0.7
# netmask 255.255.255.0
# network 192.168.0.0
# gateway 192.168.0.222
auto enp3s0
iface enp3s0 inet dhcp
# iface enp3s0 inet static
# address 192.168.0.8
# netmask 255.255.255.0
# network 192.168.0.0
# gateway 192.168.0.222
auto bond0
iface bond0 inet static
address 192.168.0.7
netmask 255.255.255.0
gateway 192.168.0.222
bond-slaves enp2s0 enp3s0
# bond-mode 0 = round robin
# bond-mode 4 = 802.3ad AKA LACP
bond-mode 0
bond-miimon 100
bond-downdelay 200
bond-updelay 200
# bond-lacp-rate 1
# bond-xmit-hash-policy layer2+3
# up ifconfig bond0 0.0.0.0 up