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

全部博文(135)

文章存档

2013年(12)

2012年(14)

2011年(42)

2010年(22)

2009年(18)

2008年(27)

分类: 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.

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