Oracle 11g R2 RAC: Configure DNS resolution scan vip Oracle 11gR2Grid Infrastructure (CRS) introduces Single Client Access Name (SCAN) to simplify Client Access to database services. This article will introduce in detail how to configure DNS to resolve scan vip demonstration environment OracleEnterprise Linux 5.6 I. Install DNS Server
Rpm-ivhbind-9.3.6-16.P1.el5.i386.rpmrpm-ivhbind-chroot-9.3.6-16.P1.el5.i386.rpmrpm-ivhcaching-nameserver-9.3.6-16.P1.el5.i386.rpmDNS daemon/usr/sbin/named/usr/sbin/rndcDNS script/etc/init. d/namedDNS port 53 953 (tcp udp) DNS configuration file/var/named/chroot/etc/named. conf (main configuration file)/var/named/chroot /*
2. Configure DNS Server 1. Create the master configuration file named. conf.
[Root @ rac1 Server] # cd/var/named/chroot/etc [root @ rac1 etc] # ls-lttotal 24-rw-r ----- 1 rootnamed 113 Jun 1 rndc. key-rw-r ----- 1 rootnamed 1230 Jan 14 2011named. caching-nameserver.conf-rw-r ----- 1 rootnamed 955 Jan 14 2011 named. rfc1912.zones-rw-r -- 1 rootroot 3519 Feb 27 2006 localtime [root @ rac1 etc] # more named. caching-nameserver.conf /// named. caching-nameserver.conf /// Provided by RedHat caching-nameserver package to configure the // isc bind named (8) DNS server as a caching only nameserver // (as a localhostDNS resolver only ). /// See/usr/share/doc/bind */sample/for example named configuration files. /// donot edit this file-use system-config-bind or an editor // tocreate named. conf-edits to this file will be lost on // caching-nameserver package upgrade. // ------ create named. conf configuration file [root @ rac1 etc] # cp-p named. caching-nameserver.conf named. conf [root @ rac1 etc] # ls-lttotal 28-rw-r ----- 1 rootnamed 113 Jun 1 rndc. key-rw-r ----- 1 rootnamed 1230 Jan 14 2011named. caching-nameserver.conf-rw-r ----- 1 rootnamed 1230 Jan 14 2011 named. conf-rw-r ----- 1 rootnamed 955 Jan 14 2011 named. rfc1912.zones-rw-r -- 1 rootroot 3519 Feb 27 2006 localtime ------- edit the created named. modify the conf file as follows: listen-on port 53 {127.0.0.1 ;}; allow-query {localhost ;}; match-clients {localhost ;}; match-destinations {localhost;}; allow-query-cache {localhost ;};
Change all the host information in the preceding entry to any. Note that the space in the source file is retained. 2. Configure forward and reverse resolution zones.
------ Configure forward resolution zone [root @ rac1 etc] # vinamed. rfc1912.zoneszone "oracle.com" IN {type master; file "rac. oracle. zone "; allow-update {none ;};------ configure reverse resolution zone [root @ rac1 etc] # vinamed. rfc1912.zoneszone "8.168.192.in-addr. arpa "IN {type master; file" rac. oracle. local "; allow-update {none ;};};
Note that reverse resolution reads IP addresses from left to right in the opposite direction, so you need to sort the IP addresses in reverse order. Here, the reverse resolution domain name of 192.168.8. * network segment is "8.168.192.in-addr. arpa ". 3. Create a database file for forward and reverse resolution using the template file
[Root @ rac1 etc] # cd/var/named/chroot/var/named [root @ rac1 named] # ls-lttotal 44-rw-r ----- 1 root named 198 Jan 14 2011 localdomain. zone-rw-r ----- 1 root named 195 Jan 14 2011 localhost. zone-rw-r ----- 1 root named 427 Jan 14 2011 named. broadcast-rw-r ----- 1 root named 1892 Jan 14 2011 named. ca-rw-r ----- 1 root named 424 Jan 14 2011 named. ip6.local-rw-r ----- 1 root named 426 Jan 14 2011 named. local-rw-r ----- 1 root named 427 Jan 14 2011 named. zerodrwxrwx --- 2 namednamed 4096 Aug 26 2004 datadrwxrwx --- 2 namednamed 4096 Jul 27 2004 slaves ----- create a forward parsing database file [root @ rac1named] # cp-p localhost. zonerac. oracle. zone ----- create a direction to parse the database file [root @ rac1named] # cp-p named. localrac. oracle. local ----- configure forward parsing of database files [root @ rac1 named] # vim rac. oracle. zone $ TTL 86400 @ in soa oracle.comroot.oracle.com (42; serial (d. adams) 3 H; refresh 15 M; retry 1 W; expiry 1D); minimum in ns oracle. comrac-scan IN A192.168.8.31rac-scan IN A192.168.8.32rac-scan IN A192.168.8.33 Note: no matter how many nodes a rac has, the number of scan vips can only be 3-configure reverse resolution of database files [root @ rac1 named] # vim rac. oracle. local $ TTL 86400 @ in soa oracle.com.root.oracle.com. (1997022700; Serial 28800; Refresh 14400; Retry 3600000; Expire 86400); Minimum in ns oracle.com. 31 IN PTRrac-scan.oracle.com.32 IN PTRrac-scan.oracle.com.33 IN PTRrac-scan.oracle.com.
Note: (1) write the last IP address number. For example, 192.168.6.100, write 100 (2) rac-scan. There is a point later. 4. Restart the DNS Server.
[root@rac1 named]#service named restartStopping named:[ OK ]Starting named:[ OK ]
5. Configure the DNS Client
[root@rac1 named]#more /etc/resolv.conf#search oracle.com#nameserver 8.8.8.8nameserver192.168.8.11
NOTE: If necessary, modify the/etc/nsswitch. conf file to configure host resolution mode 6. Verify DNS Configuration
[root@rac1 named]#nslookup 192.168.8.32Server: 192.168.8.11Address: 192.168.8.11#5332.8.168.192.in-addr.arpa name = rac-scan.oracle.com.[root@rac1 named]#cd /var/named/chroot/var/named[root@rac1 named]#nslookup rac-scanServer: 192.168.8.11Address: 192.168.8.11#53Name: rac-scan.oracle.comAddress:192.168.8.31Name: rac-scan.oracle.comAddress:192.168.8.32Name: rac-scan.oracle.comAddress:192.168.8.33[root@rac1 named]#nslookup rac-scan.oracle.comServer: 192.168.8.11Address: 192.168.8.11#53Name: rac-scan.oracle.comAddress:192.168.8.33Name: rac-scan.oracle.comAddress:192.168.8.31Name: rac-scan.oracle.comAddress:192.168.8.32[root@rac1 named]#nslookup 192.168.8.32Server: 192.168.8.11Address: 192.168.8.11#5332.8.168.192.in-addr.arpa name = rac-scan.oracle.com.#eth0 - PUBLIC192.168.8.11rac1.oracle.com rac1192.168.8.12rac2.oracle.com rac2#VIP192.168.8.21rac1-vip.oracle.com rac1-vip192.168.8.22rac2-vip.oracle.com rac2-vip#eth1 - PRIVATE10.10.10.11rac1-priv110.10.10.12rac2-priv2