双网卡绑定之mode6

  1. 创建bond0
    [root@vms73 network-scripts]# cat ifcfg-bond0 
    DEVICE=bond0
    BONDING_OPTS='miimon=100 mode=6'
    BOOTPROTO=none
    ONBOOT=yes
    IPADDR=192.168.108.73
    NETMASK=255.255.255.0
    GATEWAY=192.168.108.2
    USERCTL=no
  2. 添加网卡
    [root@vms73 network-scripts]# cat ifcfg-ens33
    DEVICE=ens33
    TYPE=Ethernet
    ONBOOT=yes
    NM_CONTROLLED=yes
    BOOTPROTO=none
    MASTER=bond0
    SLAVE=yes
    USERCTL=no


    [root@vms73 network-scripts]# cat ifcfg-ens37
    DEVICE=ens37
    TYPE=Ethernet
    ONBOOT=yes
    NM_CONTROLLED=yes
    BOOTPROTO=none
    MASTER=bond0
    SLAVE=yes
    USERCTL=no
  3. 修改配置文件
    cat > /etc/modprobe.d/bonding.conf <<EOF
    alias bond0 bonding
    EOF
  4. 加载bond模块
    modprobe bonding
  5. 重启网络
    systemctl restart network
  6. 绑定成功的标志
    [root@vms73 ~]# cat /proc/net/bonding/bond0 
    Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
    
    Bonding Mode: adaptive load balancing
    Primary Slave: None
    Currently Active Slave: ens33
    MII Status: up
    MII Polling Interval (ms): 100
    Up Delay (ms): 0
    Down Delay (ms): 0
    
    Slave Interface: ens33
    MII Status: up
    Speed: 1000 Mbps
    Duplex: full
    Link Failure Count: 0
    Permanent HW addr: 00:0c:29:d3:25:94
    Slave queue ID: 0
    
    Slave Interface: ens37
    MII Status: up
    Speed: 1000 Mbps
    Duplex: full
    Link Failure Count: 0
    Permanent HW addr: 00:0c:29:d3:25:9e
    Slave queue ID: 0

     

posted @ 2020-07-28 10:43  汝南  阅读(772)  评论(0)    收藏  举报