Linux Bonding 安装与使用
copyright(c) 2005 made by Jeantean Lin
All right reserved.







1. 操作系统 : Fedora core 3

2. 硬件系统 :
CPU : P2 celeron 300A
RAM : 384 MB
HDD : 30GB
NIC :
D-Link 530
RTL 8139C(螃蟹卡)
HUB :
3com 10/100 MB switch hub


3. 主要测试功能 :
<1> 网络输出入频宽负载平衡
<2> 多片网卡线路备援
 

安装测试设定数据 :

<1> 请先修改 /etc/modprobe.conf
alias eth0 via-rhine
alias eth1 8139too

alias bond0 bonding
options bond0 miimon=100 mode=0

说明 :
主要增加的部份为黑体字的部份
alias bond0 bonding
options bond0 miimon=100 mode=0

<2> 请于 /etc/sysconf/network-scripts 增加一个档案 ifcfg-bond0

案内容如下 :

BOOTPROTO=none
DEVICE=bond0
NETMASK=255.255.0.0
BROADCAST=10.1.1.255
IPADDR=10.1.1.200
NETWORK=10.1.0.0
USERCTL=no
ONBOOT=yes

<3> 请修改原本 /etc/sysconf/network-scripts/ifcfg-eth0 档案内容如下 :

BOOTPROTO=none
SLAVE=yes
DEVICE=eth0
MASTER=bond0
USERCTL=no
ONBOOT=yes
 

<4> 请修改原本 /etc/sysconf/network-scripts/ifcfg-eth1 档案内容如下 :

BOOTPROTO=none
SLAVE=yes
DEVICE=eth
1
MASTER=bond0
USERCTL=no
ONBOOT=yes

<5> 重新启动网卡 /etc/rc.d/init.d/network restart 就可以让 eth0 eth1加入
bond0 的虚拟接口中


 

 

安装附记 :

1. NIC bonding 的功能不需要特别的Switch HUB 就可以达到
2. 若你有三片四片网卡的话可以再加入 bond0
3. 装完后你可以拔除任一条的网络线来测试所有网卡是否正常运作
4. Bonding 功能于 Linux kernal 2.4 以后就内建, 若是采用 Kernal 2.4 以前的版本需要重新编译核心
5. 这次是用手动安装, Red Hat 不知道有没有相关工具可以设定, 下次找到后再试
 

[鄙雕兔这个人 ] [曾经 ] [发表的文 ] [作过的事 ] [计算机的问题 ]

[生活记载 ] [计算机手扎 ] [说说鄙雕兔 ] [ 命理讲义 ]


MADE BY C.J.T.L.
[回首页]

Copyright(c)2005 by C.J.T.L.
All Right Reserved