Início > Linux, Oracle, RedHat > RedHat 6.2 and Oracle: BONDING for local network and Interconnect

RedHat 6.2 and Oracle: BONDING for local network and Interconnect

Oracle 11.2.0.3
RedHat 6.2
bond0 – 2 Broadcom NIC 10Gbps for public network
bond1 – 2 Broadcom NIC 1Gbps for Oracle interconnect

Let´s start stopping NetworkManager to avoid headaches:

[root@ora1 ~]# service NetworkManager stop
Stopping NetworkManager daemon: [ OK ]
[root@ora1 ~]# chkconfig NetworkManager off

Set all DNS and domain:

[root@ora1 ~]cat /etc/resolf.conf
search dominio.corp
nameserver 172.17.160.104
nameserver 172.17.160.105

Create alias for your bonding:

[root@ora1 ~]# cat /etc/modprobe.d/modprobe.conf
alias bond0 bonding
alias bond1 bonding

Listing network scripts:

[root@ora1 ~]# ll /etc/sysconfig/network-scripts/ifcfg-*
-rw-r--r--. 1 root root 102 Mar 1 11:41 /etc/sysconfig/network-scripts/ifcfg-em1
-rw-r--r--. 1 root root 102 Mar 1 11:42 /etc/sysconfig/network-scripts/ifcfg-em2
-rw-r--r--. 1 root root 254 Oct 7 2011 /etc/sysconfig/network-scripts/ifcfg-lo
-rw-r--r--. 1 root root 103 Mar 1 11:42 /etc/sysconfig/network-scripts/ifcfg-p3p1
-rw-r--r--. 1 root root 103 Mar 1 11:42 /etc/sysconfig/network-scripts/ifcfg-p3p2

Script to create bond0 with NICs em1 and em2.
mode=0: Load balancing using Round Robin.

[root@ora1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE="bond0"
IPADDR=10.0.8.148
NETMASK=255.255.255.0
GATEWAY=10.0.8.1
NM_CONTROLLED=no
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
TYPE=BOND
BONDING_OPTS="mode=0 miimon=100 downdelay=200 updelay=200"
IPV6INIT=no

[root@ora1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-em1
DEVICE="em1"
HWADDR="90:B1:1C:E5:93:41"
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
NM_CONTROLLED=no

[root@ora1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-em2
DEVICE="em2"
HWADDR="90:B1:1C:E5:93:44"
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
NM_CONTROLLED=no

Script to create bond1 with NICs p3p1 and p3p2.
mode=6: Adaptive load balancing mode
MTU=9000: Recommended for Oracle interconnect

[root@ora1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-bond1
DEVICE="bond1"
IPADDR=10.0.200.148
NETMASK=255.255.255.0
NM_CONTROLLED=no
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
TYPE=BOND
BONDING_OPTS="mode=6 miimon=100 downdelay=200 updelay=100"
MTU=9000
IPV6INIT=no

[root@ora1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-p3p1
DEVICE="p3p1"
HWADDR="90:B1:1C:E5:93:45"
ONBOOT=yes
SLAVE=yes
MASTER=bond1
USERCTL=no
NM_CONTROLLED=no

[root@ora1 ~]# cat /etc/sysconfig/network-scripts/ifcfg-p3p2
DEVICE="p3p2"
HWADDR="90:B1:1C:E5:93:48"
ONBOOT=yes
SLAVE=yes
MASTER=bond1
USERCTL=no
NM_CONTROLLED=no

Listing network script again:

[root@ora1 ~]# ll /etc/sysconfig/network-scripts/ifcfg-*
-rw-r--r--. 1 root root 207 Mar 1 11:40 /etc/sysconfig/network-scripts/ifcfg-bond0
-rw-r--r--. 1 root root 201 Mar 1 11:41 /etc/sysconfig/network-scripts/ifcfg-bond1
-rw-r--r--. 1 root root 102 Mar 1 11:41 /etc/sysconfig/network-scripts/ifcfg-em1
-rw-r--r--. 1 root root 102 Mar 1 11:42 /etc/sysconfig/network-scripts/ifcfg-em2
-rw-r--r--. 1 root root 254 Oct 7 2011 /etc/sysconfig/network-scripts/ifcfg-lo
-rw-r--r--. 1 root root 103 Mar 1 11:42 /etc/sysconfig/network-scripts/ifcfg-p3p1
-rw-r--r--. 1 root root 103 Mar 1 11:42 /etc/sysconfig/network-scripts/ifcfg-p3p2

Loading bonding alias:

[root@ora1 ~]# modprobe -v bonding

Restarting network services:

[root@ora1 ~]# service network restart
Shutting down interface bond0: [ OK ]
Shutting down interface bond1: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface bond0: [ OK ]
Bringing up interface bond1: [ OK ]

Checking configuration:

[root@ora1 ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)

Bonding Mode: load balancing (round-robin)
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 200
Down Delay (ms): 200

Slave Interface: em1
MII Status: up
Speed: 10000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 90:b1:1c:e5:93:41
Slave queue ID: 0

Slave Interface: em2
MII Status: up
Speed: 100 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 90:b1:1c:e5:93:44
Slave queue ID: 0

[root@ora1 ~]# cat /proc/net/bonding/bond1
Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009)

Bonding Mode: adaptive load balancing
Primary Slave: None
Currently Active Slave: p3p1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 100
Down Delay (ms): 200

Slave Interface: p3p1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 90:b1:1c:e5:93:45
Slave queue ID: 0

Slave Interface: p3p2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 0
Permanent HW addr: 90:b1:1c:e5:93:48
Slave queue ID: 0

More about bonding mode:
– Mode 0 (balance-rr)
This mode transmits packets in a sequential order from the first available slave through the last. If two real interfaces are slaves in the bond and two packets arrive destined out of the bonded interface the first will be transmitted on the first slave and the second frame will be transmitted on the second slave. The third packet will be sent on the first and so on. This provides load balancing and fault tolerance.

– Mode 1 (active-backup)
This mode places one of the interfaces into a backup state and will only make it active if the link is lost by the active interface. Only one slave in the bond is active at an instance of time. A different slave becomes active only when the active slave fails. This mode provides fault tolerance.

– Mode 2 (balance-xor)
Transmits based on XOR formula. (Source MAC address is XOR’d with destination MAC address) modula slave count. This selects the same slave for each destination MAC address and provides load balancing and fault tolerance.

– Mode 3 (broadcast)
This mode transmits everything on all slave interfaces. This mode is least used (only for specific purpose) and provides only fault tolerance.

– Mode 4 (802.3ad)
This mode is known as Dynamic Link Aggregation mode. It creates aggregation groups that share the same speed and duplex settings. This mode requires a switch that supports IEEE 802.3ad Dynamic link.

– Mode 5 (balance-tlb)
This is called as Adaptive transmit load balancing. The outgoing traffic is distributed according to the current load and queue on each slave interface. Incoming traffic is received by the current slave.

– Mode 6 (balance-alb)
This is Adaptive load balancing mode. This includes balance-tlb + receive load balancing (rlb) for IPV4 traffic. The receive load balancing is achieved by ARP negotiation. The bonding driver intercepts the ARP Replies sent by the server on their way out and overwrites the src hw address with the unique hw address of one of the slaves in the bond such that different clients use different hw addresses for the server.

Categorias:Linux, Oracle, RedHat
  1. Nenhum comentário ainda.
  1. No trackbacks yet.

Deixe uma resposta

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair / Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair / Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair / Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair / Alterar )

Conectando a %s

%d blogueiros gostam disto: