zoukankan      html  css  js  c++  java
  • centos 7 网卡绑定 bond0 开机无法自启

    https://blog.csdn.net/u012881151/article/details/54910847

    1.环境
    CentOS Linux release 7.2.1511 (Core)
    linux core  3.10.0-327.el7.x86_64

    2.问题描述
    配置网卡绑定时,bond 网卡配置文件已经配置完毕
    同时,/etc/modprobe.conf 下,也已完成配置。
     
     使用 modprobe bonding 能够加载相应模块
     重启网络服务后,bond0 能够正确运行。
     
     那么问题来了
        重启后,模块就没了,只能手动再进行加载
        
        
    3.配置文件(随便复制了个)
    /etc/sysconfig/network-scripts

    # vi ifcfg-bond0
    DEVICE=bond0
    IPADDR=192.168.122.12
    NETMASK=255.255.255.0
    GATEWAY=192.168.122.1
    NM_CONTROLLED=no
    BOOTPROTO=none
    ONBOOT=yes


    # vi ifcfg-eth0
    DEVICE=eth0
    USERCTL=no
    ONBOOT=yes
    NM_CONTROLLED=no
    MASTER=bond0
    SLAVE=yes
    BOOTPROTO=none

    # vi ifcfg-eth1
    DEVICE=eth1
    USERCTL=no
    ONBOOT=yes
    NM_CONTROLLED=no
    MASTER=bond0
    SLAVE=yes
    BOOTPROTO=none


    # vi /etc/modprobe.d/bonding.conf
    alias bond0 bonding
    options bond0 mode=active-backup miimon=100 downdelay=200 updelay=200


    # modprobe bonding
    # service network restart

        
    4.解决方案
    貌似 CentOS 6.x 以后的版本已经不使用  /etc/modprobe.conf 这个配置文件了
    所以 只需要把 *.conf 文件 放到 /etc/modprobe.d  目录下就行了
    囧。。。。。。


    5.参考文档
    http://www.tokiwinter.com/configuring-interface-bonding-on-centosrheloel-6-x/
    ————————————————
    版权声明:本文为CSDN博主「河杨」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
    原文链接:https://blog.csdn.net/u012881151/article/details/54910847

  • 相关阅读:
    【go语言】Windows下go语言beego框架安装
    分页
    MongoDB用户与权限管理
    MongoDB安装在Centos7下安装
    centos7安装mysql5.7.33 tar包方式
    文件路径分隔符
    python之批量打印网页为pdf文件
    Python驱动SAP GUI完成自动化(五)
    动态内存与智能指针
    关联容器
  • 原文地址:https://www.cnblogs.com/wangmo/p/11700172.html
Copyright © 2011-2022 走看看