当前位置:首页 > 问答 > 正文

网卡绑定|网络配置 centos6.9绑定网卡,CentOS6.9网卡绑定操作步骤详解

🔍 关键词相关内容

网卡绑定(Bonding)

  • 作用:提升带宽/冗余性(高可用)
  • 模式:mode=0(负载均衡)、mode=1(主备)、mode=6(动态负载均衡)

CentOS6.9绑定网卡步骤 🛠️
1️⃣ 安装工具(若无):

网卡绑定|网络配置 centos6.9绑定网卡,CentOS6.9网卡绑定操作步骤详解

   yum install -y bonding

2️⃣ 加载bonding模块

   modprobe bonding

3️⃣ 配置bond0(编辑 /etc/modprobe.d/bonding.conf):

   alias bond0 bonding
   options bond0 miimon=100 mode=6

4️⃣ 修改网卡配置(如eth0、eth1):

  • 文件:/etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE=eth0
    MASTER=bond0
    SLAVE=yes

    5️⃣ 创建bond0配置文件ifcfg-bond0):

    网卡绑定|网络配置 centos6.9绑定网卡,CentOS6.9网卡绑定操作步骤详解

    DEVICE=bond0
    IPADDR=192.168.1.100
    NETMASK=255.255.255.0
    ONBOOT=yes
    BOOTPROTO=none

    6️⃣ 重启网络

    service network restart

验证绑定

  • 查看bond状态:
    cat /proc/net/bonding/bond0
  • 测试冗余性:拔掉一根网线观察切换日志(dmesg)。

💡 小贴士:CentOS6.9需手动加载模块,确保配置后重启生效!

发表评论