zoukankan      html  css  js  c++  java
  • linux双网卡绑定实现冗余与负载均衡

    1 编辑/etc/modprobe.conf
      在/etc/modprobe.conf里加入如下两行:

      alias bond0 bonding

      options bond0 mode=1 miimon=100 use_carrier=0

    2 创建bond0虚拟设备
      vim /etc/sysconfig/network-scripts/ifcfg-bond0
     
      DEVICE=bond0

      BOOTPROTO=none

      ONBOOT=yes

      NETMASK=255.255.255.0

      IPADDR=192.168.68.150

      GATEWAY=192.168.68.254

    3 配置 eth0 eth1

      vim /etc/sysconfig/network-scripts/ifcfg-eth0
     
      DEVICE=eth0
      BOOTPROTO=none
      ONBOOT=yes
      MASTER=bond0
      SLAVE=yes

      vim /etc/sysconfig/network-scripts/ifcfg-eth1
     
      DEVICE=eth1
      BOOTPROTO=none
      ONBOOT=yes
      MASTER=bond0
      SLAVE=yes

    4 重启系统

  • 相关阅读:
    linux之uniq
    shell之sort
    tr命令的使用
    AWK 简明教程
    Word Frequency
    10亿个数中选出最大的100个数
    代理模式(也称委托模式)
    java内存相关
    Two Sum
    Java的集合
  • 原文地址:https://www.cnblogs.com/ruiy/p/bonding.html
Copyright © 2011-2022 走看看