Friday, July 10, 2009

Oracle Clusterware and network bond for redundancy i.e bond0,bond2 etc

The Private and Public interface used in case of RAC 10g should have redundancy
in network interface so that in case a network interface fails the backup interface can take over.

To create a channel bonding interface, first create a file in the /etc/sysconfig/network-scripts/ directory.

You can copy an existing ifcfg-eth# to ifcfg-bond#, where # is a number for the interface.

In general # start with 0. Update the ifcfg-bond#,
change the DEVICE= directive must be bond#.

When the bonding device config file is created you need to update the interfaces which you want to bond and add the master=bond# to the interface configuration fileas well as add slave=yes.

Remove the IP adress information. Repeat this step for 2 interfaces.Below is an example of the configuration file of the interfaces.


Example: interface bond0
GATEWAY=192.168.100.1
DEVICE=bond0
BONDIG_OPTS="mode=1 miimon=500
"BOOTPROTO=none
NETMASK=255.255.255.0
IPADDR=192.168.100.10
ONBOOT=yesUSERCTL=no
Example: interface ifcfg-eth2
GATEWAY=192.168.100.1
TYPE=Ethernet
DEVICE=eth2
BOOTPROTO=none
NETMASK=255.255.255.0
MASTER=bond0 <=== here the bond0 is defined
SLAVE=yes <== here the interface role is defined
ONBOOT=yes
USERCTL=no
IPV6
INIT=no
PEERDNS=yes
Beside the interface configuration you need to update the /etc/modprobe.conf and add the following line:alias bond0 bondinginstall bond0 /sbin/modprobe bonding -o bonding0 mode=1 miimon=500
When the above steps are performed you can start the interfaces and check the result.ifup bond0ifup eth0ifup eth2
cat /proc/net/bonding/bond0
example output:
Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)
Bonding Mode: load balancing (round-robin)MII Status: upMII Polling Interval (ms): 0Up Delay (ms): 0Down Delay (ms): 0
Slave Interface: eth0MII Status: upLink Failure Count: 0Permanent HW addr: 00:0c:29:8a:5e:21
Slave Interface: eth2MII Status: upLink Failure Count: 0Permanent HW addr: 00:0c:29:8a:5e:0d