跳过导览列.
首页
做最好的Linux技术文档网站

linux下双网卡绑定简单实现!

1: 首先修改bonding模块参数

修改/etc/modprobe.conf文件,加入两行

aliase bond0 bonding

aliase bond1 bonding

options bonding millmon=100 mode=1 max_bonds=2

2:修改/etc/sysconfig/network-scripts/ifcfg-ethX 内容如下

DEVICE=ethX

USERCTL=no

BOOTPROTO=none

ONBOOT=yes

MASTER=bond0(or bond1)

SLAVE=yes

3:添加ifcfg-bond0和ifcfg-bond1

DEVICE=bond0(bond1)

USERCTL=no

ONBOOT=yes

BOOTPROTO= none

IPADDR=x.x.x.x

NETMASK=255.255.255.0

GATEWAY=x.x.x.x

4: 重新启动网络即可:service network restart