Bind and unbind dual NICs in Linux + Oracle10gRAC

Source: Internet
Author: User
Two redhetEnterprise-R4-U4 systems rac1 and rac2 are installed on the Virtual Machine VMwareGSXServer, And the oracle10gRAC ring is built on the Virtual Machine VMwareGSXServer.

Two redhet Enterprise-R4-U4 systems rac1 and rac2 are installed on the Virtual Machine VMware GSX Server, and the oracle10g RAC ring is built on this basis.

I. Overview of software and hardware Environments

Two redhet Enterprise-R4-U4 systems rac1 and rac2 are installed on the Virtual Machine VMware GSX Server, and the Oracle10g RAC environment is built on the virtual shared storage.

1. rac1 two NICs: eth0: 192.168.2.111, eth1: 10.10.10.11

2. rac2 two NICs: eth0: 192.168.2.112, eth1: 10.10.10.12

/Etc/hosts file:

127.0.0.1

Localhost

192.168.2.111

Rac1.mycorpdomain.com

Rac1

192.168.2.13

Rac1-vip.mycorpdomain.com

Rac1-vip

10.10.10.11

Rac1-priv.mycorpdomain.com

Rac1-priv

192.168.2.112

Rac2.mycorpdomain.com

Rac2

192.168.2.14

Rac2-vip.mycorpdomain.com

Rac2-vip

10.10.10.12

Rac2-priv.mycorpdomain.com

Rac2-priv

2. Add the network adapter eth2

1. Add a NIC in host-only mode on rac1 and rac2 respectively.

A. Edit virtual machine

B. Add to add hardware wizard. Next Step

C. Select ethernet adapter.

D. Select host-only.

2. Start the VM. At this time, ifconfig-a can see an extra Nic eth2, but there is no IP address. On the hardware option page of the network configuration graphic interface, you can see eth2 and the status is OK.

3. Stopping databases and crs on rac1 and rac2

# Cd/u01/app/oracle/product/10.2.0/crs_1/bin

Stop a database instance

#./Srvctl stop instance-d devdb-I ora. devdb. devd1.inst

#./Srvctl stop instance-d devdb-I ora. devdb. devd2.inst

Stop Database

#./Srvctl stop database-d devdb

Stop an ASM instance

#./Srvctl stop asm-n rac1

#./Srvctl stop asm-n rac2

Stop vip, gsd, listener, ons

#./Srvctl stop nodeapps-n rac1

#./Srvctl stop nodeapps-n rac2

4. Change Nic configuration and bind Nic

Change the configuration files of eth0 and eth2, and bind eth0 and eth2 to a virtual network card bond0.

1. First create a virtual Nic bond0 configuration file ifcfg-bond0 under/etc/sysconfig/network-scripts/

# Cd/etc/sysconfig/network-scripts/

# Vi ifcfg-bond0

DEVICE = bond0

BOOTPROTO = none

BROADCAST = 192.168.2. 255

IPADDR = 192.168.2.111

NETMASK = 255.255.255.0

NETWORK = 192.168.2.0

ONBOOT = yes

TYPE = Ethernet

USERCTL = no

PEERDNS = yes

GATEWAY = 192.168.168.250

IPV6INIt = no

2. Change the configuration file ifcfg-eth0 for eth0, the changed content is as follows

Vi ifcfg-eth0

DEVICE = eth0

BOOTPROTO = none

ONBOOT = yes

TYPE = Ethernet

USERCTL = no

MASTER = bond0

SLAVE = yes

3. Add the configuration file ifcfg-eth2 of eth2

Vi ifcfg-eth2

DEVICE = eth2

BOOTPROTO = none

ONBOOT = yes

TYPE = Ethernet

USERCTL = no

MASTER = bond0

SLAVE = yes

4. Because the linux virtual Nic is implemented in the kernel module, you must install the module. Add the following content to the/etc/modules. conf file (if the file does not exist, create a new one ):

Alias bond0 bonding

Options bond0 miimon = 100 mode = 0 primary = eth0

Among them, miimon = 100 indicates that the link connection status is checked every Ms. If not, the physical Nic is switched. mode = 1 indicates that the active and standby modes, that is, only one Nic is active, only failure protection is provided. If mode = 0, it is in Server Load balancer mode. All NICs are active, and some other modes are rarely used. primary = eth0 indicates that eth0 is the default active Nic in Master/Slave mode.

5. Add modprobe bonding miimon = 100 mode = 0 to/etc/rc. local.

6. Make the same modification on rac2.

7. It takes effect after restart. ifconfig-a can check that the NIC bond0 is added and the ip address of eth0 is configured. bond0 is also added to the graphic interface of network configuration.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.