Ubuntu1604 blance-alb链路聚合mode6

此为在ubuntu16.04下,叠加带宽模式balance-alb mode=6模式

  1. 安装软件
apt install ifenslave
  1. 编辑文件/etc/modprobe.d/bond.conf
alias bond0 bonding
options bond0 mode=balance-alb miimon=100
  1. 开机加载模块,编辑文件/etc/modules
bonding
  1. 编辑文件/etc/networko/interfaces

auto lo
iface lo inet loopback

auto enp129s0f1
iface enp129s0f1 inet dhcp

auto bond0
iface bond0 inet static
        address 192.168.137.26
        netmask 255.255.255.0
        gateway 192.168.137.1

bond-mode 6
bond-miimon 100
bond-slaves ens5f0 ens5f1

auto ens5f0
iface ens5f0 inet manual
bond-master bond0

auto ens5f1
iface ens5f1 inet manual
bond-master bond0

  1. 配置完成后重启主机reboot

  2. 检验带宽情况

root@ubuntu:~# ethtool bond0
Settings for bond0:
        Supported ports: [ ]
        Supported link modes:   Not reported
        Supported pause frame use: No
        Supports auto-negotiation: No
        Advertised link modes:  Not reported
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: 20000Mb/s
        Duplex: Full
        Port: Other
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: off
        Link detected: yes

  1. ping一下其他机器看是否可以连通

教程结束

你可能感兴趣的:(Linux)