Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Principle and configuration of Oracle 11g RAC SCAN ip

2025-01-22 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Principle and configuration of Oracle 11g RAC SCAN ip

How Oracle 11g RAC Grid plug and play (GPnP) works:

SCAN concept:

Let's first introduce what is called SCAN,SCAN (Single Client Access Name). Oracle launched from 11g R2, and the client can load-balance connect to the RAC database through the SCAN feature. SCAN provides a domain name to access RAC. The domain name can resolve one to three (note, at most 3) SCAN IP, which can be resolved through DNS or GNS. Among them, DNS is very familiar to everyone, so there is not much to say here. GNS (Grid Naming Service) is a new feature of Oracle 11g R2, which can assign VIP and SCAN IP to nodes and SCAN through DHCP services. Another advantage is that for the new nodes in the cluster, it automatically assigns VIP addresses and updates the cluster resources, and the client still connects to the new cluster nodes with load balance through the SCAN feature. DNS and GNS configuration and parsing are also described below.

In addition to DNS and GNS parsing methods, SCAN can also be parsed using hosts files, but everyone who has used it knows that this method not only causes problems when installing RAC, but also has problems in later use. For example, a SCAN domain name can only define one SCAN IP. So this method is not recommended by Oracle. But in spite of this, it is still used in many production, that is, 11g's new feature SCAN has been abandoned and VIP connection is still used.

How SCAN ip works:

Configure SCAN IP through DNS:

The following example is to configure a DNS server in a Linux environment:

Steps:

1. Install the necessary software

[root@Dns_master/] # yum install bind bind-chroot caching-nameserver-y

... .

Installed:

Bind.i38630:9.3.6-4.P1.el5_4.2

Bind-chroot.i386 30 9.3.6-4.P1.el5_4.2 (may not be installed)

Caching-nameserver.i386 30Rank 9.3.6-4.P1.el5_4.2

2. Configuration

1) modify the main configuration file

[root@Dns_master /] # cd/var/named/chroot/

[root@Dns_masterchroot] # pwd

/ var/named/chroot

[root@Dns_masterchroot] # ls

Dev etc var

[root@Dns_masterchroot] # cd etc/

[root@Dns_masteretc] # ls

Localtime named.caching-nameserver.conf named.rfc1912.zones rndc.key

[root@Dns_master etc] # vi named.caching-nameserver.conf

Options {

Listen-on port 53 {any;}; # listening port

Listen-on-v6 port 53 {:: 1;}

Directory "/ var/named"

Dump-file "/ var/named/data/cache_dump.db"

Statistics-file "/ var/named/data/named_stats.txt"

Memstatistics-file "/ var/named/data/named_mem_stats.txt"

/ / Those options should be used carefully because they disable port

/ / randomization

/ / query-source port 53

/ / query-source-v6 port 53

Allow-query {any;}; # query address

}

Logging {

Channel default_debug {

File "data/named.run"

Severity dynamic

}

}

View any_resolver {

Match-clients {any;}; # client

Match-destinations {any;}; # query destination address

Recursion yes

Include "/ etc/named.rfc1912.zones"

}

2) declare a domain

[root@Dns_masteretc] # pwd

/ var/named/chroot/etc

[root@Dns_masteretc] # ls

Localtime named.caching-nameserver.conf named.rfc1912.zones rndc.key

[root@Dns_master etc] # vi named.rfc1912.zones

Zone "." IN {

Type hint

File "named.ca"

}

Zone "localdomain" IN {

Type master

File "localdomain.zone"

Allow-update {none;}

}

Zone "cuug.net" IN {

Type master

File "cuug.zone"

Notify no

}

Zone "8.168.192.in-addr.arpa" IN {

Type slave

File "192.zone"

Notify no

}

Zone "localhost" IN {

Type master

File "localhost.zone"

Allow-update {none;}

}

Zone "0.0.127.in-addr.arpa" IN {

Type master

File "named.local"

Allow-update {none;}

}

3) establish the corresponding forward solution and reverse region file

[root@Dns_masteretc] # cd.. / var/named/

[root@Dns_masternamed] # pwd

/ var/named/chroot/var/named

[root@Dns_masternamed] # ls

Data localhost.zone named.ca named.local slaves

Localdomain.zone named.broadcast named.ip6.local named.zero

Forward parsing file:

[root@Dns_master named] # cat cuug.zone

$TTL 86400

@ IN SOA dns.cuug.net. Root.mail.cuug.net. (

1997022700; Serial

28800; Refresh-3 hours

14400; Retry-1 hour

3600000; Expire-1 week

86400); Minimum-1 day

IN NS dns.cuug.net.

IN MX 10 mail.cuug.net.

Dns IN A 192.168.8.240

Scan IN A 192.168.8.100

Scan IN A 192.168.8.101

Scan IN A 192.168.8.102

Reverse parse the file:

[root@Dns_master named] # cat 192.zone

$TTL 86400

@ IN SOA dns.cuug.net. Root.mail.cuug.net. (

1997022700; Serial

28800; Refresh-3 hours

14400; Retry-1 hour

3600000; Expire-1 week

86400); Minimum-1 day

IN NS dns.cuug.net.

IN MX 10 mail.cuug.net.

240 IN PTR dns.cuug.net.

100 IN PTR scan.cuug.net.

101 IN PTR scan.cuug.net.

102 IN PTR scan.cuug.net.

Native reverse parsing library files:

Net.127

$TTL 86400

@ IN SOA localhost. Root.localhost. (

1997022700; Serial

28800; Refresh-3 hours

14400; Retry-1 hour

3600000; Expire-1 week

86400); Minimum-1 day

IN NS localhost.

1 IN PTR localhost.

Native forward parsing library file:

Net.local

$TTL 86400

@ IN SOA localhost. Root.localhost. (

1997022700; Serial

28800; Refresh-3 hours

14400; Retry-1 hour

3600000; Expire-1 week

86400); Minimum-1 day

IN NS localhost.

Localhost IN A 127.0.0.1

4) modify the permissions of the area file

[root@Dns_master named] # chown: named cuug.zone

[root@Dns_master named] # chown: named 192.zone

5) check the configuration file syntax

[root@Dns_master named] # named-checkconf # detect whether the configuration file has syntax errors

[root@Dns_master named] # named-checkzone cuug.net cuug.zone

Zonelinuxidc/IN: loaded serial 42

OK

3. Restart the named service

[root@Dns_master named] # service named restart

Stop named: [OK]

Start named: [OK]

4. Test

First add the DNS server record

Edit nsswitch.conf to add dns resolution

[root@Dns_master named] # vi / etc/nsswitch.conf

Add DNS parsing to hosts: dns files

[root@Dns_masternamed] # cat / etc/resolv.conf

Nameserver192.168.8.240

[root@Dns_masternamed] # host scan.cuug.net

Scan.cuug.net has address 192.168.1.100

Scan.cuug.net has address 192.168.1.100

Scan.cuug.net has address 192.168.1.100

@ so far, parsing scan ip through DNS has been successful!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report