본문 바로가기
RedHatEnterpriseLinux

RHEL bonding 5.x 6.x

by 북한산산적 2012. 2. 6.
RHEL 5.x bonding 


[root@test01 ~]# cd /etc/sysconfig/network-scripts/
[root@test01 network-scripts]# vi ifcfg-bond0 

DEVICE=bond0
BOOTPROTO=static
ONBOOT=yes
USERCTL=no
IPADDR=192.168.100.234
NETMASK=255.255.255.0
GATEWAY=192.168.100.1
BONDING_OPTS="mode=1 miimon=100"



[root@test01 network-scripts]# vi ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=52:54:00:CD:CC:E0
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no



[root@test01 network-scripts]# vi ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
HWADDR=52:54:00:CD:CC:E0
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no


[root@test01 network-scripts]# vi /etc/modprobe.conf
alias bond0 bonding 

[root@test01 network-scripts]# service network restart
인터페이스 bond0 (을)를 종료 중:                           [  OK  ]
loopback 인터페이스를 종료 중:                             [  OK  ]
loopback 인터페이스를 활성화 중:                           [  OK  ]
bond0 인터페이스 활성화 중:                                [  OK  ]


 
 [root@test01 network-scripts]# cat /proc/net/bonding/bond0 
Ethernet Channel Bonding Driver: v3.4.0-1 (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
Speed: 100 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 52:54:00:cd:cc:e0

Slave Interface: eth1
MII Status: up
Speed: 100 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 52:54:00:3f:b4:0e
[root@test01 network-scripts]# 




6.x 

/etc/modprobe.d/bonding.conf 파일을 만들어 주어야 한다. 


[root@test01 ~]# cd /etc/sysconfig/network-scripts/
[root@test01 network-scripts]# vi ifcfg-bond0 

DEVICE=bond0
BOOTPROTO=static
ONBOOT=yes
USERCTL=no
IPADDR=192.168.100.234
NETMASK=255.255.255.0
GATEWAY=192.168.100.1
BONDING_OPTS="mode=1 miimon=100"



[root@test01 network-scripts]# vi ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
HWADDR=52:54:00:CD:CC:E0
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no



[root@test01 network-scripts]# vi ifcfg-eth1
DEVICE=eth1
BOOTPROTO=none
HWADDR=52:54:00:CD:CC:E0
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no





[root@test01 network-scripts]# vi /etc/modprobe.d/bonding.conf
alias bond0 bonding