zoukankan      html  css  js  c++  java
  • redhat6.8链路聚合

    centos 6.X   聚合链路


    0、查看NetworkManager服务,停止NetworkManager服务。不做这一步很可能出问题
              service NetworkManager status
              service NetworkManager stop

    1、修改三类文件
              /etc/sysconfig/network-scripts/下的ifcfg-*文件
              /etc/modprobe.conf 文件   redhat 6.8 :   /etc/modprobe.d/bond0.conf
              /etc/init.d/rc.local 文件

    2、编辑虚拟网口配置文件 ,记住此文件复制的时候要把MAC地址去掉,去掉UUID
         vi     /etc/sysconfig/network-scripts/ifcfg-bond0
    DEVICE=bond0
    TYPE=Ethernet
    ONBOOT=yes
    BOOTPROTO=static 
    IPADDR=192.168.1.111
    NETMASK=255.255.255.0
    GATEWAY=192.168.1.1

    3、编辑各网卡的配置文件
         vi /etc/sysconfig/network-scripts/ifcfg-eth0
    BOOTPROTO=none
    TYPE=Ethernet 
    DEVICE=em1
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes

    vi /etc/sysconfig/network-scripts/ifcfg-eth1
    BOOTPROTO=none
    TYPE=Ethernet
    DEVICE=em2
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes

    4、修改/etc/modprobe.conf     centos 6.5 是/etc/modprobe.d/bonding.conf    redhat6.8 是/etc/modprobe.d/bond0.conf 
         最后两行加入
    alias bond0 bonding
    options bond0 miimon=100 mode=6

    //     如果有多个bond配置文件,可按如下方式添加
    alias bond1 bonding
    options bond1 miimon=100 mode=6

    注:
    (1)、miimon 是链路监测的时间间隔单位是毫秒,miimon=100的意思就是,每100毫秒检测网卡和交换机之     间是否连通,如不通则使用另外的链路。
    (2)、mode=0 表示负载均衡方式,两块网卡都工作,需要交换机作支持
          mode=1 表示冗余方式,网卡只有一个工作,一个出问题启用另外的
          mode=6 表示负载均衡方式,两块网卡都工作,不需要交换机作支持

    5、修改/etc/rc.d/rc.local,加入以下内容     ,配置了modprobe.conf 可能不再需要配置rc.local
         modprobe bonding miimon=100 mode=0     // 也有加入 ifenslave bond0 eth0 eth1 这种形式
    6、service network  restart     // 查看虚拟接口是否起来
         reboot        // 查看是否开机启动

  • 相关阅读:
    UIStoryBoard 中修改控件borderColor
    iOS自定义AlertView 与 ActionSheet 遮罩提示+弹出动画
    iOS开发 UIWebView+JavaScript 交互总结
    【注入攻击】SQL注入(不完整总结)
    [内存溢出]栈溢出基础版
    [Windows驱动开发]之内存管理
    [找工作]程序员面试宝典【笔记】(part 1)
    [Windows安装]安装程序无法创建新的系统分区,也无法定位现有系统分区
    M1卡分析
    [逆向/壳]脱壳方法
  • 原文地址:https://www.cnblogs.com/jjp816/p/6435012.html
Copyright © 2011-2022 走看看