Chinaunix首页 | 论坛 | 博客
  • 博客访问: 300577
  • 博文数量: 108
  • 博客积分: 4260
  • 博客等级: 上校
  • 技术积分: 1145
  • 用 户 组: 普通用户
  • 注册时间: 2008-02-21 13:22
文章分类

全部博文(108)

文章存档

2011年(40)

2010年(22)

2009年(17)

2008年(29)

我的朋友

分类: LINUX

2010-04-14 09:36:23

Network interfaces can be bonded to provide fault-tolerant operation. Here’s how to do it in Ubuntu. I will assume the interfaces to be bonded are eth0 and eth1.

First, install the ifenslave package. The ifenslave tool will be used to actually bond the interfaces.

apt-get install ifenslave

Create file /etc/modprobe.d/bonding with the following contents:

alias bond0 bonding
options bonding mode=0 miimon=100

Load the bonding module:

modprobe bonding

Add a bonded interface into /etc/network/interfaces:

auto bond0
iface bond0 inet static
address 192.168.0.1
gateway 192.168.0.254
netmask 255.255.255.0
pre-up modprobe bonding
up ifenslave bond0 eth0 eth1
pre-down ifenslave bond0 -d eth0 eth1
post-down rmmod bonding

Restart networking:

/etc/init.d/networking restart

That’s it! The bonded interface should come up automatically after a reboot as well.

阅读(597) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~