Linux: Interface BONDING

From OnnoWiki
Revision as of 05:37, 30 September 2019 by Onnowpurbo (talk | contribs) (Created page with "Sumber: https://linoxide.com/how-tos/ethernet-bonding-on-redhat-linux/ Aktifkan module modprobe --first-time bonding modinfo bonding | more Edit vi /etc/modprobe.d/bond...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Sumber: https://linoxide.com/how-tos/ethernet-bonding-on-redhat-linux/

Aktifkan module

modprobe --first-time bonding
modinfo bonding | more

Edit

vi /etc/modprobe.d/bonding.conf
alias bond0 bonding


Edit

vi /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
NAME=bond0
TYPE=Bond
BONDING_MASTER=yes
IPADDR=192.168.43.100
PREFIX=24
ONBOOT=yes
BOOTPROTO=none
BONDING_OPTS="mode=1 miimon=100"

Note the directive BONDING_OPTS line, bonding uses a variety of options and mode. Modes can be:

  • mode 0 or balance-rr: Sets a round-robin policy for fault tolerance and load balancing.
  • mode 1 or active-backup: Sets an active-backup policy for fault tolerance.
  • mode 2 or balance-xor: Sets an XOR (exclusive-or) mode for fault tolerance and load balancing.
  • mode 3 or broadcast: Sets a broadcast policy for fault tolerance. All transmissions are sent on all slave interfaces.
  • mode 4 or 802.3ad: Sets an IEEE 802.3ad dynamic link aggregation policy. Creates aggregation groups that share the same speed and duplex settings.
  • mode 5 or balance-tlb: Sets a Transmit Load Balancing (TLB) policy for fault tolerance and load balancing. The outgoing traffic is distributed according to the current load on each slave interface. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed slave. This mode is only suitable for local addresses known to the kernel bonding module and therefore cannot be used behind a bridge with virtual machines.
  • mode 6 or balance-alb: Sets an Adaptive Load Balancing (ALB) policy for fault tolerance and load balancing. Includes transmit and receive load balancing for IPv4 traffic.


Konfigurasi Interface untuk Bonding

Interface ens33

vi /etc/sysconfig/network-scripts/ifcfg-ens33
DEVICE=ens33
NAME=bond0-slave
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes 

Interface ens34

vi /etc/sysconfig/network-scripts/ifcfg-ens34
DEVICE=ens34
NAME=bond0-slave
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes


Aktifasi Bonding

Interface Down

# ifdown ifcfg-ens33
# ifdown ifcfg-ens34

Interface Up

# ifup ifcfg-ens33
# ifup ifcfg-ens34

AKtifasi bonding

# nmcli con reload

Cek

# ifconfig

Referensi