RHEL5下配置网卡绑定

来源:互联网 发布:大数据学院 编辑:程序博客网 时间:2024/06/06 14:22
1,/etc/sysconfig/network-scripts目录下生成如下三个文件
vi  ifcfg-bond1
DEVICE=bond1
BOOTPROTO=static
IPADDR=10.4.124.*
NETMASK=255.255.255.224
GATEWAY=10.4.124.*
ONBOOT=YES
TYPE=Ethernet
USERCTL=no
BONDING_OPTS="miimon=100 mode=1"


vi ifcfg-eth4

DEVICE=eth4
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
MASTER=bond1
SLAVE=yes

vi ifcfg-eth5

DEVICE=eth5
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
MASTER=bond1
SLAVE=yes

2,修改modprobe.conf文件按,添加一行
vi /etc/modprobe.conf
alias bond1 bonding

3,重启网络

service network restart


4,查看网络的状态

dtydb2 ~]$ cat /proc/net/bonding/bond2
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth0
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 0
Permanent HW addr: 5c:f3:fc:da:71:5c

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 5c:f3:fc:da:71:5e

原创粉丝点击