zoukankan      html  css  js  c++  java
  • centos7 双网口绑定

    1、关闭和停止NetworkManager服务
    systemctl stop NetworkManager.service # 停止NetworkManager服务
    systemctl disable NetworkManager.service # 禁止开机启动NetworkManager服务
    ps: 一定要关闭,不关会对做bonding有干扰

    2、加载bonding模块
    modprobe --first-time bonding
    没有提示说明加载成功, 如果出现modprobe: ERROR: could not insert 'bonding': Module already in kernel说明你已经加载了这个模块
    也可以使用lsmod | grep bonding查看模块是否被加载
    lsmod | grep bonding
    bonding 146875 0

    接下来 使用 ip a 查看 bond0 虚拟网卡

    3.配置网卡
    [root@jupiter network-scripts]# cat ifcfg-bond0
    TYPE=Ethernet
    BOOTPROTO=static
    NAME=bond0
    DEVICE=bond0
    ONBOOT=yes
    IPADDR=13.13.13.2
    NETMASK=255.255.0.0
    BONDING_OPTS="mode=6 miimon100"

    [root@jupiter network-scripts]# cat ifcfg-p9p1
    TYPE=Ethernet
    BOOTPROTO=static
    NAME=p9p1
    DEVICE=p9p1
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes

    [root@jupiter network-scripts]# cat ifcfg-p9p2
    TYPE=Ethernet
    BOOTPROTO=static
    NAME=p9p2
    DEVICE=p9p2
    ONBOOT=yes
    MASTER=bond0
    SLAVE=yes

    4.重启网络:systemctl restart network
    5。
    查看bond0的接口状态信息 ( 如果报错说明没做成功,很有可能是bond0接口没起来)
    cat /proc/net/bonding/bond0

  • 相关阅读:
    python 函数嵌套
    python 函数对象
    python 函数参数
    python 连接MySQL报错及解决方案
    解决 No module named pip
    python 文件处理
    python
    python 元祖
    python 读取域名信息
    ubuntu 配置网卡,DNS, iptables
  • 原文地址:https://www.cnblogs.com/lph970417/p/11777276.html
Copyright © 2011-2022 走看看