zoukankan      html  css  js  c++  java
  • linux配置bond

    [root@slave ~]# cd  /etc/sysconfig/network-scripts
    [root@slave network-scripts]# ls  
    找以ifcfg-开头的配置文件
    [root@slave network-scripts]# vim  ifcfg-eth0
    [root@slave network-scripts]# cat  ifcfg-eth0
    DEVICE=eth0               网口名eth0
    TYPE=Ethernet            以太网接口
    ONBOOT=yes              LINUX在启动时激活该网口
    BOOTPROTO=none    使用什么协议激活网口
                                                   none表示不使用任何协议
                                                   static表示设置静态IP
                                                   dhcp表示动态获取IP
    MASTER=bond0         指定虚拟网口的名字
    SLAVE=yes                  备用
     
    [root@slave network-scripts]# vim  ifcfg-eth1
    [root@slave network-scripts]# cat  ifcfg-eth1
    DEVICE=eth1               网口名eth1
    TYPE=Ethernet            以太网接口
    ONBOOT=yes              LINUX在启动时激活该网口
    BOOTPROTO=none    使用什么协议激活网口
                                                  none表示不使用任何协议
                                                  static表示设置静态IP
                                                  dhcp表示动态获取IP
    MASTER=bond0         指定虚拟网口的名字
    SLAVE=yes                  备用
    备注:eth0、eth1的MASTER(主人)是bond0,本身是属于从设备作为bond0的SLAVE(备用)
     
    [root@slave network-scripts]# vim  ifcfg-bond0
    [root@slave network-scripts]# cat  ifcfg-bond0
    DEVICE=bond0
    TYPE=Ethernet
    ONBOOT=yes
    BOOTPROTO=static
    IPADDR=IP
    NETMASK=255.255.0.0
    GATEWAY=网关
     
    配置bonding
    [root@slave network-scripts]# vim  /etc/modprobe.d/dist.conf
    末尾增加以下两行
    alias bond0 bonding
    options bond0 miimon=100 mode=1
    在/etc/rc.d/rc.local文件中加入下面语句,是系统启动自动运行。
    ifenslave  bond0  eth0  eth1
  • 相关阅读:
    CSS3动画基本的转换和过渡
    学习进度(2016.4.3)
    敏捷开发方法综述
    学习进度(2016.3.27)
    数组问题(二)求环形数组子数组和的最大值
    数组问题(一)求子数组和的最大值
    学习进度(2016.3.20)
    程序设计之四则运算三
    学习进度(2016.3.13)
    Right-BICEP 测试四则运算二程序
  • 原文地址:https://www.cnblogs.com/wyglog/p/12431371.html
Copyright © 2011-2022 走看看