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
  • 相关阅读:
    递归和分类问题之间的区别
    基于TF-IDF的推荐
    mnist
    服饰分类的神经网络模型
    基于内容的推荐
    深度学习-术语
    FiBiNET-学习
    30,新起点,再出发。
    md5加盐加密
    批处理for命令中的/r和/d参数
  • 原文地址:https://www.cnblogs.com/wyglog/p/12431371.html
Copyright © 2011-2022 走看看