GNS

GNS

For BIND, DHCPC and GNS setup please read the following article.

Overview of GNS ( new 11.2 feature )

  • GNS provides dynamic DHCP allocated addresses for the SCAN and nodes VIPs
  • A sub-domain with zone delegation  needs to be configured ( DNS forwards request to GNS )
  • Delete and Add Node is simplified compared to using static addresses
  • No network manager intervention needed for add Node
  • should be used if cluster node count increases
  •  Multicast Domain Name Service (mDNS): Used by Grid Plug and Play to locate profiles in the cluster, as well as by GNS to perform name resolution. The mDNS process is a background process on Linux and UNIX and on Windows.

GNS  11.2 COMMAND REFERENCE

Display current GNS status 
$ srvctl config gns -a
GNS is enabled.
GNS is listening for DNS server requests on port 53
GNS is using port 5353 to connect to mDNS
GNS status: OK
Domain served by GNS: grid.example.com
GNS version: 11.2.0.3.0
GNS VIP network: ora.net1.network

GNS display current GNS status including the RAC DNS records
$  srvctl config gns -a -l
GNS is enabled.
GNS is listening for DNS server requests on port 53
GNS is using port 5353 to connect to mDNS
GNS status: OK
Domain served by GNS: grid.example.com
GNS version: 11.2.0.3.0
GNS VIP network: ora.net1.network
Name                 Type Value
grac1-vip            A    192.168.1.107
grac2-vip            A    192.168.1.112
GRACE2-MyTestVIP-vip A    192.168.1.91
GRACE2-scan          A    192.168.1.108
GRACE2-scan          A    192.168.1.109
GRACE2-scan          A    192.168.1.110
GRACE2-scan1-vip     A    192.168.1.108
GRACE2-scan2-vip     A    192.168.1.109
GRACE2-scan3-vip     A    192.168.1.110

If zone delegation works your nslookup and dig should provide the following results.
$ nslookup GRACE2-scan.grid.example.com
Server:        192.168.1.50
Address:    192.168.1.50#53
Non-authoritative answer:
Name:    GRACE2-scan.grid.example.com
Address: 192.168.1.108
Name:    GRACE2-scan.grid.example.com
Address: 192.168.1.109
Name:    GRACE2-scan.grid.example.com
Address: 192.168.1.110

$ dig @192.168.1.50 GRACE2-scan.grid.example.com
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6 <<>> @192.168.1.50 GRACE2-scan.grid.example.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 18172
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 1
;; QUESTION SECTION:
;GRACE2-scan.grid.example.com.    IN    A
;; ANSWER SECTION:
GRACE2-scan.grid.example.com. 120 IN    A    192.168.1.110
GRACE2-scan.grid.example.com. 120 IN    A    192.168.1.108
GRACE2-scan.grid.example.com. 120 IN    A    192.168.1.109
;; AUTHORITY SECTION:
grid.example.com.    3600    IN    NS    ns1.example.com.
grid.example.com.    3600    IN    NS    gns.grid.example.com.
;; ADDITIONAL SECTION:
ns1.example.com.    3600    IN    A    192.168.1.50
;; Query time: 8 msec
;; SERVER: 192.168.1.50#53(192.168.1.50)
;; WHEN: Sun Aug 18 11:12:03 2013
;; MSG SIZE  rcvd: 146

References:
http://martincarstenbach.wordpress.com/2011/11/17/simplified-gns-setup-for-rac-11-2-0-2-and-newer/
http://gjilevski.com/2010/09/05/gns-configuration-for-oracle-11gr2-in-dns-using-dhcp/

Change GNS-VIP TCP/IP address ( 12.1 )

Change GNS VIP IP Address 
# $GRID_HOME/bin/srvctl stop  gns 
Verify the IP address is not in use 
# ping 192.168.1.58
PING 192.168.1.58 (192.168.1.58) 56(84) bytes of data.
From 192.168.1.81 icmp_seq=2 Destination Host Unreachable
From 192.168.1.81 icmp_seq=3 Destination Host Unreachable
# $GRID_HOME/bin/srvctl stop  gns 
# $GRID_HOME/bin/srvctl modify  gns -i 192.168.1.58 
# $GRID_HOME/bin/srvctl start gns
# $GRID_HOME/bin/srvctl config gns -a -l
GNS is enabled.
GNS is listening for DNS server requests on port 53
GNS is using port 5,353 to connect to mDNS
GNS status: OK
Domain served by GNS: grid12c.example.com
GNS version: 12.1.0.1.0
Globally unique identifier of the cluster where GNS is running: 191a52ec780d5f30bf460333c96cb46e
Name of the cluster where GNS is running: grac112
Cluster type: server.
GNS log level: 1.
GNS listening addresses: tcp://192.168.1.58:40122.
#  $GRID_HOME/bin/srvctl status gns
GNS is running on node grac122.
GNS is enabled on node grac122.

 

Usefull GNS 12.1 commands and GNS verification using dig and nslookup

Display all  GNS records:
# $GRID_HOME/bin/srvctl config gns -list
Oracle-GNS A 192.168.1.58 Unique Flags: 0x15
grac112-scan A 192.168.1.148 Unique Flags: 0x81
grac112-scan A 192.168.1.149 Unique Flags: 0x81
grac112-scan A 192.168.1.150 Unique Flags: 0x81
grac112-scan1-vip A 192.168.1.148 Unique Flags: 0x81
grac112-scan2-vip A 192.168.1.149 Unique Flags: 0x81
grac112-scan3-vip A 192.168.1.150 Unique Flags: 0x81
grac112.Oracle-GNS SRV Target: Oracle-GNS Protocol: tcp Port: 40122 Weight: 0 Priority: 0 Flags: 0x15
grac112.Oracle-GNS TXT CLUSTER_NAME="grac112", CLUSTER_GUID="191a52ec780d5f30bf460333c96cb46e", NODE_ADDRESS="192.168.1.58", SERVER_STATE="RUNNING", VERSION="12.1.0.1.0", DOMAIN="grid12c.example.com" Flags: 0x15
grac121-vip A 192.168.1.147 Unique Flags: 0x81
grac122-vip A 192.168.1.152 Unique Flags: 0x81

Display the served subdomain
#  $GRID_HOME/bin/srvctl config gns  -subdomain
Domain served by GNS: grid12c.example.com

Verify GNS  with nslookup 
# nslookup grac112-scan3-vip.grid12c.example.com
Server:        192.168.1.50
Address:    192.168.1.50#53
Non-authoritative answer:
Name:    grac112-scan3-vip.grid12c.example.com
Address: 192.168.1.150
# nslookup 192.168.1.50
Server:        192.168.1.50
Address:    192.168.1.50#53
50.1.168.192.in-addr.arpa    name = ns1.example.com.

Query DNS with dig command for resolving a SCAN VIP IP address 
# dig  @192.168.1.50  grac112-scan3-vip.grid12c.example.com
; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.10.rc1.el6 <<>> @192.168.1.50 grac112-scan3-vip.grid12c.example.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 42331
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1
;; QUESTION SECTION:
;grac112-scan3-vip.grid12c.example.com. IN A
;; ANSWER SECTION:
grac112-scan3-vip.grid12c.example.com. 120 IN A    192.168.1.150
;; AUTHORITY SECTION:
grid12c.example.com.    3600    IN    NS    ns1.example.com.
grid12c.example.com.    3600    IN    NS    gns12c.grid12c.example.com.
;; ADDITIONAL SECTION:
ns1.example.com.    3600    IN    A    192.168.1.50
;; Query time: 6 msec
;; SERVER: 192.168.1.50#53(192.168.1.50)
;; WHEN: Mon Aug 26 10:25:12 2013
;; MSG SIZE  rcvd: 126

 

CLeanup GNS

Use the following command to delete address entries from GNS
# srvctl update gns -delete  gract-scan -address 192.168.1.161

A quick SCAN test using srvctl, nslookup and dig

[root@gract3 ~]#  srvctl config scan
 SCAN name: gract-scan.grid12c.example.com, Network: 1
Subnet IPv4: 192.168.1.0/255.255.255.0/eth1, dhcp
Subnet IPv6: 
SCAN 0 IPv4 VIP: -/scan1-vip/192.168.1.189
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes: 
SCAN VIP is individually disabled on nodes: 
SCAN 1 IPv4 VIP: -/scan2-vip/192.168.1.191
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes: 
SCAN VIP is individually disabled on nodes: 
SCAN 2 IPv4 VIP: -/scan3-vip/192.168.1.190
SCAN VIP is enabled.
SCAN VIP is individually enabled on nodes: 
SCAN VIP is individually disabled on nodes: 

[root@gract3 ~]#   nslookup gract-scan.grid12c.example.com
Server:        192.168.1.50    <-- DNS server 
Address:    192.168.1.50#53

Non-authoritative answer:
Name:    gract-scan.grid12c.example.com
Address: 192.168.1.188                   <-- SCAN Vips 
Name:    gract-scan.grid12c.example.com
Address: 192.168.1.191
Name:    gract-scan.grid12c.example.com
Address: 192.168.1.190
Name:    gract-scan.grid12c.example.com
Address: 192.168.1.189

[root@gract3 ~]#  dig @192.168.1.50 gract-scan.grid12c.example.com

; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.0.2.el6_4.6 <<>> @192.168.1.50 gract-scan.grid12c.example.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49154
;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 2, ADDITIONAL: 1

;; QUESTION SECTION:
;gract-scan.grid12c.example.com.    IN    A

;; ANSWER SECTION:
gract-scan.grid12c.example.com.    120 IN    A    192.168.1.191  <-- SCAN Vips
gract-scan.grid12c.example.com.    120 IN    A    192.168.1.190
gract-scan.grid12c.example.com.    120 IN    A    192.168.1.189
gract-scan.grid12c.example.com.    120 IN    A    192.168.1.188

;; AUTHORITY SECTION:
grid12c.example.com.    3600    IN    NS    ns1.example.com.
grid12c.example.com.    3600    IN    NS    gns12c.grid12c.example.com.

;; ADDITIONAL SECTION:
ns1.example.com.    3600    IN    A    192.168.1.50

;; Query time: 159 msec
;; SERVER: 192.168.1.50#53(192.168.1.50)
;; WHEN: Sun Aug 10 10:00:47 2014
;; MSG SIZE  rcvd: 167a

 

GNS SCAN listener Nslookup Errors

Leave a Reply

Your email address will not be published. Required fields are marked *