• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
统哥
博客园    首页    新随笔    联系   管理    订阅  订阅

CentOS双网卡绑定bond0

a)拷⻉并配置vim /etc/sysconfig/network-scripts/ifcfg-bond0配置⽂件(会自动创建文件)

DEVICE=bond0

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=static

IPADDR=xxx.xxx.xxx.xxx

NETMASK=xxx.xxx.xxx.xxx

GATEWAY=xxx.xxx.xxx.xxx

USERCTL=no

b)编辑em1,em2/eth0、eth1⽂件

vim /etc/sysconfig/network-scripts/ifcfg-em1

DEVICE=em1

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

USERCTL=no

vim /etc/sysconfig/network-scripts/ifcfg-em2

DEVICE=em2

TYPE=Ethernet

ONBOOT=yes

BOOTPROTO=none

MASTER=bond0

SLAVE=yes

USERCTL=no

c)配置vim /etc/modprobe.d/bonding.conf (CentOS 6.4)

 vim /etc/modprobe.conf (CentOS 5.9)

vi /etc/modprobe.conf/dis.conf (CentOS 6.5)

添加:

alias bond0 bonding

options bond0 miimon=100 mode=0

d)重启网络即可

 service network restart

posted @ 2014-07-16 21:52  统哥  阅读(9018)  评论(0)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3