Skip to content

Add Network Interface+DNS config+SCAN IPs

October 8, 2013

=====================================================================================================

Creating DNS server on existing RAC Server (mgracsolsrv64bit1) and Config 3 SCAN IPS

=====================================================================================================

Note: Generally DNS Server should be separated from RAC Server, Due to shortage of resources on LAPTOP,

I have to configure DNS on existing RAC node1.

******Though I am not the master as how to config DNS, I tried to put some collected information for testing purpose *******

Scan-IPs

==========

I tried to keep all my public IP’s on 192.168.56.* as below

192.168.56.81

192.168.56.82

192.168.56.83

Checking Existing Server (mgracsolsrv64bit1) IP Details

=======================================================================================

(a) Machine details

=======================================================================================

mgracsolsrv64bit1:[root]$ hostname

mgracsolsrv64bit1

(b) Assign domain name (mgdom.com), create file if it does not exists.

======================================================================================

mgracsolsrv64bit1:[root]$ ls -l /etc/defaultdomain

/etc/defaultdomain: No such file or directory

vi /etc/defaultdomain

mgdom.com

mgracsolsrv64bit1:[root]$ domainname `cat /etc/defaultdomain`

mgracsolsrv64bit1:[root]$ cat /etc/defaultdomain

mgdom.com

mgracsolsrv64bit1:[root]$ domainname

mgdom.com

mgracsolsrv64bit1:[root]$ cat /etc/hosts

#

# Internet host table

#

::1     localhost

127.0.0.1       localhost

192.168.56.20   mgracsolsrv64bit1 mgracsolsrv64bit1.mgdom.com

(c) Only one Network interface card and respective IP is assigned to server (mgracsolsrv64bit1) as below

============================================================================================================

mgracsolsrv64bit1:[root]$ ifconfig -a

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1

inet 127.0.0.1 netmask ff000000

e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

inet 192.168.56.20 netmask ffffff00 broadcast 192.168.56.255

ether 8:0:27:9c:cb:8c

(d) Shutdown Server running on VMBOX

============================================================================================================

init 0

(e) Add Network Adapter for VMserver (mgracsolsrv64bit1) , this interface/IP will act as DNS server IP

============================================================================================================

First Select/Click VMServer (mgracsolsrv64bit1) => From Menu bar click Machine => Settings => Network => Selected 4th Adapter in my case => Enable check box (Enable Network Adapter) => Attached to Host-Only Adapter

Then Start the VMserver (mgracsolsrv64bit1) from Virtual box.

Once the Server is started, verify if you can see the newly added network interface is visible or not, we see the new interface is not visible yet as below.

mgracsolsrv64bit1:[root]$ ifconfig -a

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1

inet 127.0.0.1 netmask ff000000

e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

inet 192.168.56.20 netmask ffffff00 broadcast 192.168.56.255

ether 8:0:27:9c:cb:8c

(f) Enable the added network interface on VMserver (mgracsolsrv64bit1) as below

============================================================================================================

mgracsolsrv64bit1:[root]$ ifconfig -a plumb

ifconfig: SIOCSLIFNAME for ip: e1000g0: already exists

~~~~~

OR

~~~~~

Determine which interfaces are currently installed on the system.

=================================================================

REF : http://docs.oracle.com/cd/E19253-01/816-4554/fpdcn/index.html

mgracsolsrv64bit1:[root]$ dladm show-link

e1000g0         type: non-vlan  mtu: 1500       device: e1000g0

e1000g2         type: non-vlan  mtu: 1500       device: e1000g2

mgracsolsrv64bit1:[root]$ ifconfig e1000g2 plumb up

mgracsolsrv64bit1:[root]$ ifconfig e1000g2

e1000g2: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3

inet 0.0.0.0 netmask 0

ether 8:0:27:d2:9e:19

OR

mgracsolsrv64bit1:[root]$  ifconfig -a

lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1

inet 127.0.0.1 netmask ff000000

e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2

inet 192.168.56.20 netmask ffffff00 broadcast 192.168.56.255

ether 8:0:27:9c:cb:8c

e1000g2: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3

inet 0.0.0.0 netmask 0

ether 8:0:27:d2:9e:19

(g) Configure newly added interface Or Assign IP address : 192.168.56.99 mgsrv-dns

============================================================================================================

mgracsolsrv64bit1:[root]$ ifconfig e1000g2

e1000g2: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3

inet 0.0.0.0 netmask 0

ether 8:0:27:d2:9e:19

Assign IP Address

=================

mgracsolsrv64bit1:[root]$ ifconfig e1000g2 192.168.56.99 netmask 255.255.255.0 broadcast + up

mgracsolsrv64bit1:[root]$ ifconfig e1000g2

e1000g2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3

inet 192.168.56.99 netmask ffffff00 broadcast 192.168.56.255

ether 8:0:27:d2:9e:19

mgracsolsrv64bit1:[root]$ ping -s 192.168.56.99

PING 192.168.56.99: 56 data bytes

64 bytes from 192.168.56.99: icmp_seq=0. time=0.122 ms

64 bytes from 192.168.56.99: icmp_seq=1. time=0.112 ms

64 bytes from 192.168.56.99: icmp_seq=2. time=0.0970 ms

^C

—-192.168.56.99 PING Statistics—-

3 packets transmitted, 3 packets received, 0% packet loss

round-trip (ms)  min/avg/max/stddev = 0.0970/0.110/0.122/0.013

mgracsolsrv64bit1:[root]$ ls -ltr /etc/hostname*

-rw-r–r–   1 root     root          39 Oct  6 15:06 /etc/hostname.e1000g0

We would Name DNS Server as below

=====================================

192.168.56.99     mgsrv-dns

Create new Host file for interface – e1000g2

=====================================

vi /etc/hostname.e1000g2

192.168.56.99   netmask  255.255.255.0

Add the newly create IP to /etc/hosts

============================================================================================================

mgracsolsrv64bit1:[root]$ ls -ltrh /etc/hosts

lrwxrwxrwx   1 root     root          12 Jul  7 18:50 /etc/hosts -> ./inet/hosts

vi /etc/inet/hosts

#

# Internet host table

#

::1     localhost

127.0.0.1       localhost

192.168.56.20   mgracsolsrv64bit1 mgracsolsrv64bit1.mgdom.com

192.168.56.99   mgsrv-dns         mgsrv-dns.mgdom.com       loghost

mgracsolsrv64bit1:[root]$ cat /etc/hosts

#

# Internet host table

#

::1     localhost

127.0.0.1       localhost

192.168.56.20   mgracsolsrv64bit1 mgracsolsrv64bit1.mgdom.com

192.168.56.99   mgsrv-dns         mgsrv-dns.mgdom.com       loghost

(h) Reboot and Verify if you can Login from Putty with New IP (192.168.56.99)

============================================================================================================

C:\Windows\System32>ping 192.168.56.99

Pinging 192.168.56.99 with 32 bytes of data:

Reply from 192.168.56.99: bytes=32 time<1ms TTL=255

Reply from 192.168.56.99: bytes=32 time=1ms TTL=255

Reply from 192.168.56.99: bytes=32 time<1ms TTL=255

Reply from 192.168.56.99: bytes=32 time<1ms TTL=255

Ping statistics for 192.168.56.99:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 0ms, Maximum = 1ms, Average = 0ms

C:\Windows\System32>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

                                                Now Continue with DNS Server Configuration

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

REF : http://docs.oracle.com/cd/E19455-01/806-1386/6jam5ahnd/index.html

Files Involved

================

/etc/named.conf             => main Config file

/etc/nsswitch.conf

/etc/nsswitch.files

/etc/resolv.conf

# ls -lt  /etc/nsswitch.files /etc/nsswitch.files /etc/named.conf /etc/resolv.conf /var/named

/etc/named.conf: No such file or directory

/etc/resolv.conf: No such file or directory

/var/named: No such file or directory

-rw-r–r–   1 root     sys          943 Aug  9  2007 /etc/nsswitch.files

-rw-r–r–   1 root     sys          943 Aug  9  2007 /etc/nsswitch.files

Following Below directory and files would be created as part of DNS server config Steps:

===============================================================================================

directory => /var/named

mgracsolsrv64bit1:[root]$ ls -ltrh /var/named/*

-rwxr-xr-x   1 root     root        3.0K Oct  7 15:38 /var/named/db.cache

-rw-r–r–   1 root     root         260 Oct  7 15:54 /var/named/db.127.0.0

-rw-r–r–   1 root     root         268 Oct  7 16:11 /var/named/db.192.168.56

-rw-r–r–   1 root     root         390 Oct  7 16:19 /var/named/db.mgdom.com

mgracsolsrv64bit1:[root]$ svcs -a |grep dns

disabled       12:03:14 svc:/network/dns/client:default

disabled       12:03:15 svc:/network/dns/server:default

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1) First Step is to configure “named.conf” file

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

(a) Make sure your DNS daemon is disabled.

===============================================================================================

mgracsolsrv64bit1:[root]$ svcs -a |grep dns

disabled       14:29:47 svc:/network/dns/client:default

maintenance    14:30:02 svc:/network/dns/server:default

mgracsolsrv64bit1:[root]$ svcadm disable dns/server

mgracsolsrv64bit1:[root]$ svcs -a |grep dns

disabled       14:29:47 svc:/network/dns/client:default

disabled       14:46:52 svc:/network/dns/server:default

(b) create the DNS confiuration file “named.conf”

===============================================================================================

REF :

http://shtnawi.blogspot.in/2011/09/dns.html

http://docs.oracle.com/cd/E19455-01/806-1386/6jam5ahnu/index.html

mgracsolsrv64bit1:[root]$ ls -l /etc/named.conf

/etc/named.conf: No such file or directory

mgracsolsrv64bit1:[root]$ touch /etc/named.conf

mgracsolsrv64bit1:[root]$  ls -l /etc/named.conf

-rw-r–r–   1 root     root           0 Oct  7 14:48 /etc/named.conf

Note That :-

=============

Block1:-tells the DNS that zone files or DNS related config files are located in “/var/named”.

Block2:- tells the DNS the address of root servers and the zone configuration file is called db.cache,

if you don’t know what root servers follow this link HOW DNS WORK. This files need to downloaded from site mentioned.

Block3:-tells the DNS server there are  a localhost zone and its called db.127.0.0

This zone allows resolution of the name ‘localhost’ to the loopback address 127.0.0.1 when using the DNS server.

Block4:- tells the DNS server that there are reverse lookup zone and the zone configuration file is called db.192.168.2 .

Block5:- tells the DNS server that there are forward zone and the zone configuration file is called db.domain.test.

===============================================================================================

Add below entries or 5 Blocks {} to file /etc/named.conf, each Block is explained above

===============================================================================================

// Block 1

options {

directory “/var/named”;

};

// Block 2

zone “.” {

type hint;

file “db.cache”;

};

// Block 3

zone “0.0.127.in-addr.arpa” {

type master;

file “db.127.0.0”;

};

// Block 4

zone “56.168.192.in-addr.arpa” {

type master;

file “db.192.168.56”;

};

// Block 5

zone “mgdom.com” {

type master;

file “db.mgdom.com”;

};

—————————————————————————————————————————

mgracsolsrv64bit1:[root]$ cat /etc/named.conf

// Block 1

options {

directory “/var/named”;

};

// Block 2

zone “.” {

type hint;

file “db.cache”;

};

// Block 3

zone “0.0.127.in-addr.arpa” {

type master;

file “db.127.0.0”;

};

// Block 4

zone “56.168.192.in-addr.arpa” {

type master;

file “db.192.168.56”;

};

// Block 5

zone “mgdom.com” {

type master;

file “db.mgdom.com”;

};

Note :

===========

Look at Block# 4, as mentioned in beginning, I tried to put all my public IPs in IP range 192.168.56.*,

also you see the reverse of it in Zone header (“56.168.192.in-addr.arpa”)

FYI , My added network interface/IP was as below in /etc/hosts

Or

I call this IP(192.168.56.99) as DNS Server (mgsrv-dns)

mgracsolsrv64bit1:[root]$ cat /etc/hosts |grep dns

192.168.56.99   mgsrv-dns         mgsrv-dns.mgdom.com       loghost

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2) Second step is to create and configure zone file, as shown in “named.conf” file,

there are four zone configuration files, db.cache , db.127.0.0 , db.192.168.56 , db.mgdom.com .

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

REF :

http://docs.oracle.com/cd/E19455-01/806-1386/6jam5aho1/index.html

Example entries or their meanings:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

; SOA rec – A Start of Authority (SOA) record

@  IN SOA test.yahoo.com mytest.gmail.com (

20131007       ;  serial number (YYYYMMDD##)

10800          ;  refresh every 3 hours

10800         ;  retry every 3 hours

604800       ;  expire after a week

86400 )     ;  TTL of 1 day

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

 

(1) Create db.cache

===============================================================================================

mkdir /var/named

cd /var/named

Download root servers (named.root) file from link ftp://ftp.rs.internic.net/domain/

============================================================================================

/usr/sfw/bin/wget ftp://ftp.rs.internic.net/domain/named.root

I downloaded to location : /mnt/sf_winshare/

============================================================================================

mgracsolsrv64bit1:[root]$ ls -ltrh /mnt/sf_winshare/named.root

-rwxrwxrwx   1 root     vboxsf      3.0K Oct  6 20:18 /mnt/sf_winshare/named.root

copy/rename named.root to db.cache:

======================================

cp /mnt/sf_winshare/named.root /var/named/db.cache

mgracsolsrv64bit1:[root]$ ls -lh /var/named/db.cache

-rwxr-xr-x   1 root     root        3.0K Oct  7 15:38 /var/named/db.cache

mgracsolsrv64bit1:[root]$ cat /var/named/db.cache

;       This file holds the information on root name servers needed to

;       initialize cache of Internet domain name servers

;       (e.g. reference this file in the “cache  .  <file>”

;       configuration file of BIND domain name servers).

;

;       This file is made available by InterNIC

;       under anonymous FTP as

;           file                /domain/named.cache

;           on server           FTP.INTERNIC.NET

;       -OR-                    RS.INTERNIC.NET

;

;       last update:    Jan 3, 2013

;       related version of root zone:   2013010300

;

; formerly NS.INTERNIC.NET

;

.                        3600000  IN  NS    A.ROOT-SERVERS.NET.

A.ROOT-SERVERS.NET.      3600000      A     198.41.0.4

A.ROOT-SERVERS.NET.      3600000      AAAA  2001:503:BA3E::2:30

;

; FORMERLY NS1.ISI.EDU

;

.                        3600000      NS    B.ROOT-SERVERS.NET.

B.ROOT-SERVERS.NET.      3600000      A     192.228.79.201

;

; FORMERLY C.PSI.NET

;

.                        3600000      NS    C.ROOT-SERVERS.NET.

C.ROOT-SERVERS.NET.      3600000      A     192.33.4.12

;

; FORMERLY TERP.UMD.EDU

;

.                        3600000      NS    D.ROOT-SERVERS.NET.

D.ROOT-SERVERS.NET.      3600000      A     199.7.91.13

D.ROOT-SERVERS.NET.      3600000      AAAA  2001:500:2D::D

;

; FORMERLY NS.NASA.GOV

;

.                        3600000      NS    E.ROOT-SERVERS.NET.

E.ROOT-SERVERS.NET.      3600000      A     192.203.230.10

;

; FORMERLY NS.ISC.ORG

;

.                        3600000      NS    F.ROOT-SERVERS.NET.

F.ROOT-SERVERS.NET.      3600000      A     192.5.5.241

F.ROOT-SERVERS.NET.      3600000      AAAA  2001:500:2F::F

;

; FORMERLY NS.NIC.DDN.MIL

;

.                        3600000      NS    G.ROOT-SERVERS.NET.

G.ROOT-SERVERS.NET.      3600000      A     192.112.36.4

;

; FORMERLY AOS.ARL.ARMY.MIL

;

.                        3600000      NS    H.ROOT-SERVERS.NET.

H.ROOT-SERVERS.NET.      3600000      A     128.63.2.53

H.ROOT-SERVERS.NET.      3600000      AAAA  2001:500:1::803F:235

;

; FORMERLY NIC.NORDU.NET

;

.                        3600000      NS    I.ROOT-SERVERS.NET.

I.ROOT-SERVERS.NET.      3600000      A     192.36.148.17

I.ROOT-SERVERS.NET.      3600000      AAAA  2001:7FE::53

;

; OPERATED BY VERISIGN, INC.

;

.                        3600000      NS    J.ROOT-SERVERS.NET.

J.ROOT-SERVERS.NET.      3600000      A     192.58.128.30

J.ROOT-SERVERS.NET.      3600000      AAAA  2001:503:C27::2:30

;

; OPERATED BY RIPE NCC

;

.                        3600000      NS    K.ROOT-SERVERS.NET.

K.ROOT-SERVERS.NET.      3600000      A     193.0.14.129

K.ROOT-SERVERS.NET.      3600000      AAAA  2001:7FD::1

;

; OPERATED BY ICANN

;

.                        3600000      NS    L.ROOT-SERVERS.NET.

L.ROOT-SERVERS.NET.      3600000      A     199.7.83.42

L.ROOT-SERVERS.NET.      3600000      AAAA  2001:500:3::42

;

; OPERATED BY WIDE

;

.                        3600000      NS    M.ROOT-SERVERS.NET.

M.ROOT-SERVERS.NET.      3600000      A     202.12.27.33

M.ROOT-SERVERS.NET.      3600000      AAAA  2001:DC3::35

; End of File

(2) Create db.127.0.0

===============================================================================================

http://docs.oracle.com/cd/E19455-01/806-1386/6jam5aho1/index.html#cdcserv-17099

vi db.127.0.0

@ IN SOA mgsrv-dns.mgdom.com. maleshsrv.mgdom.com. (

20131007 ; serial number

7200 ; Refresh Interval

3600 ; Retry Interval

86400 ; Expire

600 ) ; TTL

NS mgsrv-dns.mgdom.com.

1     IN     PTR     localhost.

Note :-

===========

Here : 1 is last part of 127.0.0.1

mgsrv-dns.mgdom.com is:-(your DNS server name).(your domain).

To find your server name :- uname -n

In my case I do not have separate/dedicated DNS server, I have used the servername of added interface/IP as below

mgracsolsrv64bit1:[root]$ cat /etc/hosts |grep dns

192.168.56.99   mgsrv-dns         mgsrv-dns.mgdom.com       loghost

Above May be Secondary DNS : maleshsrv.mgdom.com, which is not functional in my case.

(3) Create  db.192.168.56

===============================================================================================

vi db.192.168.56

@ IN SOA mgsrv-dns.mgdom.com. maleshsrv.mgdom.com. (

20131007 ; serial number

7200 ; Refresh Interval

3600 ; Retry Interval

86400 ; Expire

600 ) ; TTL

NS mgsrv-dns.mgdom.com.

99     IN     PTR     mgsrv-dns.mgdom.com.

Note :-

===========

Here : 99 is last part of DNS Server IP 192.168.56.99

(4) Create  db.mgdom.com

===============================================================================================

vi db.mgdom.com

@ IN SOA mgsrv-dns.mgdom.com. maleshsrv.mgdom.com. (

20131007 ; serial number

7200 ; Refresh Interval

3600 ; Retry Interval

86400 ; Expire

600 ) ; TTL

NS mgsrv-dns.mgdom.com.

mgsrv-dns.mgdom.com  IN     A     192.168.56.99

mgrac-scan           IN     A     192.168.56.81

mgrac-scan           IN     A     192.168.56.82

mgrac-scan           IN     A     192.168.56.83

Note :

======

My 3 SCAN IPS configured as above

mgrac-scan                         IN     A     192.168.56.81

mgrac-scan                         IN     A     192.168.56.82

mgrac-scan                         IN     A     192.168.56.83

(5) Check your configuration syntax

===============================================================================================

http://docs.oracle.com/cd/E23824_01/html/821-1455/dnsref-31.html

named-checkconf -z /etc/named.conf

mgracsolsrv64bit1:[root]$ named-checkconf -z /etc/named.conf

db.127.0.0:1: no TTL specified; using SOA MINTTL instead

zone 0.0.127.in-addr.arpa/IN: loaded serial 20131007

db.192.168.56:1: no TTL specified; using SOA MINTTL instead

zone 56.168.192.in-addr.arpa/IN: loaded serial 20131007

db.mgdom.com:1: no TTL specified; using SOA MINTTL instead

zone mgdom.com/IN: NS ‘mgsrv-dns.mgdom.com’ has no address records (A or AAAA)

zone mgdom.com/IN: loaded serial 20131007

(6) Enable dns server daemon

===============================================================================================

check

======

svcs -a |grep dns

mgracsolsrv64bit1:[root]$ svcs -a |grep dns

disabled       15:00:03 svc:/network/dns/client:default

disabled       15:00:04 svc:/network/dns/server:default

Enable

=======

svcadm enable dns/server

check

======

mgracsolsrv64bit1:[root]$ svcs -a |grep dns

disabled       15:00:03 svc:/network/dns/client:default

online         16:38:06 svc:/network/dns/server:default

Check the status of dns/server daemon

========================================

mgracsolsrv64bit1:[root]$ svcs -a | grep dns/server

online         16:38:06 svc:/network/dns/server:default

7) Client Set Up

======================

REF:

http://docs.oracle.com/cd/E19455-01/806-1386/6jam5ahnd/index.html

=====================================================================

Setting up DNS on a client machine involves two tasks:

(i) Creating the /etc/resolv.conf file, as described in”Creating the resolv.conf File”.

(ii) Modifying the /etc/nsswitch.conf file, as described in “Enabling a Machine to Use DNS”.

mgracsolsrv64bit1:[root]$ svcs -l dns/server

fmri         svc:/network/dns/server:default

enabled      true

state        online

next_state   none

state_time   Mon Oct 07 16:38:06 2013

logfile      /var/svc/log/network-dns-server:default.log

restarter    svc:/system/svc/restarter:default

contract_id  98

dependency   require_all/none svc:/system/filesystem/local (online)

dependency   require_any/error svc:/network/loopback (online)

dependency   optional_all/error svc:/milestone/network (online)

(a) Edit the file /etc/nsswitch.conf and /etc/nsswitch.files and add the entry ‘dns’ to the end of ‘files’ entry as below

“hosts: files dns”

=============================================================================================================================

cat /etc/nsswitch.conf |grep hosts

mgracsolsrv64bit1:[root]$ cat /etc/nsswitch.conf |grep hosts

# “hosts:” and “services:” in this file are used only if the

hosts:      files

mgracsolsrv64bit1:[root]$ cat /etc/nsswitch.files |grep hosts

# “hosts:” and “services:” in this file are used only if the

hosts:      files

vi /etc/nsswitch.conf and /etc/nsswitch.files, modified entry should look as below

=============================================================================================================================

mgracsolsrv64bit1:[root]$ cat /etc/nsswitch.conf |grep hosts

# “hosts:” and “services:” in this file are used only if the

hosts:      files  dns

mgracsolsrv64bit1:[root]$ cat /etc/nsswitch.files |grep hosts

# “hosts:” and “services:” in this file are used only if the

hosts:      files dns

(b) Create or edit a file called /etc/defaultdomain and add the single entry:

=============================================================================================================================

REF:

http://www.logiqwest.com/dataCenter/Demos/RunBooks/DNS/DNSsetup.html

Add domain name

=======================

vi /etc/defaultdomain

mgdom.com

Execute the domainname command to set the domain as follows:

===========================================================

#domainname `cat /etc/defaultdomain`

(c) Edit /etc/resolv.conf

=============================================================================================================================

mgracsolsrv64bit1:[root]$ cat /etc/hosts

#

# Internet host table

#

::1     localhost

127.0.0.1       localhost

192.168.56.20   mgracsolsrv64bit1 mgracsolsrv64bit1.mgdom.com

192.168.56.99   mgsrv-dns         mgsrv-dns.mgdom.com       loghost

vi /etc/resolv.conf

domain mgdom.com

nameserver 192.168.56.99

search mgdom.com

(d) Restart the named service

=============================================================================================================================

svcs – report service status

svcadm – manipulate service instances

svcs -a |grep dns

svcs -a |grep dns/server

mgracsolsrv64bit1:[root]$ svcs -a |grep dns

disabled       15:00:03 svc:/network/dns/client:default

online         16:38:06 svc:/network/dns/server:default

Above Client Demon is shown to be down.

Named services can be started by issuing the command:

==================================================================

#/usr/sbin/in.named &  (Not tested)  ignore this for now

svcadm disable dns/server

svcadm enable dns/server

Or

svcadm enable /network/dns/server

mgracsolsrv64bit1:[root]$ svcs -a |grep dns

disabled       15:00:03 svc:/network/dns/client:default

online         17:20:31 svc:/network/dns/server:default

mgracsolsrv64bit1:[root]$ nslookup 192.168.56.99

Server:         192.168.56.99

Address:        192.168.56.99#53

99.56.168.192.in-addr.arpa      name = mgsrv-dns.mgdom.com.

mgracsolsrv64bit1:[root]$ nslookup mgsrv-dns.mgdom.com

Server:         192.168.56.99

Address:        192.168.56.99#53

Name:   mgsrv-dns.mgdom.com.mgdom.com

Address: 192.168.56.99

mgracsolsrv64bit1:[root]$ svcadm enable /network/dns/client

mgracsolsrv64bit1:[root]$ svcs -a |grep dns

online         17:20:31 svc:/network/dns/server:default

online         17:24:21 svc:/network/dns/client:default

Now Test the SCAN Name to resolve 3 IP’s in Round Robin Fashion

================================================================

1st

========

mgracsolsrv64bit1:[root]$ nslookup mgrac-scan

Server:         192.168.56.99

Address:        192.168.56.99#53

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.81

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.82

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.83

2nd

========

mgracsolsrv64bit1:[root]$  nslookup mgrac-scan

Server:         192.168.56.99

Address:        192.168.56.99#53

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.82

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.83

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.81

3rd

========

mgracsolsrv64bit1:[root]$ nslookup mgrac-scan

Server:         192.168.56.99

Address:        192.168.56.99#53

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.83

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.81

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.82

We see above at each nslookup SCAN-IP changing in round robin fashion.

(8) Configurating Clients to use DNS to use DNS, clients need to modify the /etc/resolv.conf, and /etc/nsswitch.conf as below.

The /etc/defaultdomain file must also be created and established as below.

################ Configure Solaris 10 machine to be on DNS##############

(a). Check for file resolv.conf in /etc directory, if it doesn’t exist create it

 (b). add below information to the resolv.conf file

——————————————————————-

vi /etc/resolv.conf

domain mgdom.com

nameserver 192.168.56.99

search mgdom.com

(c). Check for file nsswitch.conf in /etc directory

——————————————————————-

hosts:      files

ipnodes:    files

## edit the above 2 lines and add “dns” in front of file

vi /etc/nsswitch.conf  and /etc/nsswitch.files

hosts:      files dns

ipnodes:    files dns

(d) Set domain

——————————————————————-

vi /etc/defaultdomain

mgdom.com

Execute the domainname command to set the domain as follows:

==========================================================

#domainname

#domainname `cat /etc/defaultdomain`

#domainname

mgdom.com

(e) Now Test the SCAN Name to resolve 3 IP’s in Round Robin Fashion

—————————————————————————————————

mgracsolsrv64bit1:[root]$ nslookup mgrac-scan

Server:         192.168.56.99

Address:        192.168.56.99#53

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.81

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.82

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.83

9) Reboot the server and verify again if SCAN work after reboots

===========================================================================

init 6 (Reboots the server)

mgracsolsrv64bit1:[root]$ svcs -a |grep dns

online         18:35:01 svc:/network/dns/client:default

online         18:35:08 svc:/network/dns/server:default

mgracsolsrv64bit1:[root]$ nslookup mgrac-scan

Server:         192.168.56.99

Address:        192.168.56.99#53

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.81

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.82

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.83

mgracsolsrv64bit1:[root]$ nslookup mgrac-scan

Server:         192.168.56.99

Address:        192.168.56.99#53

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.82

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.83

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.81

mgracsolsrv64bit1:[root]$ nslookup mgrac-scan

Server:         192.168.56.99

Address:        192.168.56.99#53

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.83

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.81

Name:   mgrac-scan.mgdom.com

Address: 192.168.56.82

Additional Information:

================================

Test SCAN Name using dig command:

================================

http://docs.oracle.com/cd/E18752_01/html/816-5166/dig-1m.html

http://docs.oracle.com/cd/E19253-01/816-5166/dig-1m/index.html

dig– DNS lookup utility

The dig utility (domain information groper) is a flexible tool for interrogating DNS name servers.

It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried.

Most DNS administrators use dig to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output.

Other lookup tools tend to have less functionality than dig.

Command

========================================

dig mgrac-scan.mgdom.com +noall +answer

mgracsolsrv64bit1:[root]$ dig mgrac-scan.mgdom.com +noall +answer

; <<>> DiG 9.6-ESV-R8 <<>> mgrac-scan.mgdom.com +noall +answer

;; global options: +cmd

mgrac-scan.mgdom.com.   600     IN      A       192.168.56.82

mgrac-scan.mgdom.com.   600     IN      A       192.168.56.83

mgrac-scan.mgdom.com.   600     IN      A       192.168.56.81

mgracsolsrv64bit1:[root]$ dig mgrac-scan.mgdom.com +noall +answer

; <<>> DiG 9.6-ESV-R8 <<>> mgrac-scan.mgdom.com +noall +answer

;; global options: +cmd

mgrac-scan.mgdom.com.   600     IN      A       192.168.56.83

mgrac-scan.mgdom.com.   600     IN      A       192.168.56.81

mgrac-scan.mgdom.com.   600     IN      A       192.168.56.82

mgracsolsrv64bit1:[root]$ dig mgrac-scan.mgdom.com +noall +answer

; <<>> DiG 9.6-ESV-R8 <<>> mgrac-scan.mgdom.com +noall +answer

;; global options: +cmd

mgrac-scan.mgdom.com.   600     IN      A       192.168.56.81

mgrac-scan.mgdom.com.   600     IN      A       192.168.56.82

mgrac-scan.mgdom.com.   600     IN      A       192.168.56.83

mgracsolsrv64bit1:[root]$ dig mgrac-scan.mgdom.com

; <<>> DiG 9.6-ESV-R8 <<>> mgrac-scan.mgdom.com

;; global options: +cmd

;; Got answer:

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2883

;; flags: qr aa rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:

;mgrac-scan.mgdom.com.          IN      A

;; ANSWER SECTION:

mgrac-scan.mgdom.com.   600     IN      A       192.168.56.82

mgrac-scan.mgdom.com.   600     IN      A       192.168.56.83

mgrac-scan.mgdom.com.   600     IN      A       192.168.56.81

;; AUTHORITY SECTION:

mgdom.com.              600     IN      NS      mgsrv-dns.mgdom.com.

;; Query time: 3 msec

;; SERVER: 192.168.56.99#53(192.168.56.99)

;; WHEN: Mon Oct  7 17:44:41 2013

;; MSG SIZE  rcvd: 110

References:

================

http://docs.oracle.com/cd/E23824_01/html/821-1458/fpcwh.html#scrolltoc

http://shtnawi.blogspot.in/2011/09/dns.html

http://oracletempspace.wordpress.com/2011/02/15/q-how-do-i-setup-dns-server-solaris-10/

http://docs.oracle.com/cd/E19455-01/806-1386/6jam5ahnd/index.html

http://docs.oracle.com/cd/E19455-01/806-1386/6jam5ahnp/index.html

http://unixtips.hpage.co.in/dns_8462084.html

http://oracletempspace.wordpress.com/2011/02/15/q-how-do-i-setup-dns-server-solaris-10/

ftp://ftp.rs.internic.net/domain/

http://easyoradba.com/2012/01/29/configuring-dns-on-solaris-10-joining-solaris10-server-to-domain/

http://www.logiqwest.com/dataCenter/Demos/RunBooks/DNS/DNSsetup.html

Click Here to get PDF Version

Advertisements

From → OS, Unix, Virtual-Box

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: