Operating System - HP-UX
1830938 Members
1768 Online
110017 Solutions
New Discussion

Re: Using more than one domain

 
SOLVED
Go to solution
Dewa Negara_4
Regular Advisor

Using more than one domain

Hi All,

Could you please help me on this issue. We would like to use more than one domain for the same server. One of them as a primary domain. Let say domain1, domain2, domain3.So when I ping somename it will automatically ping somename.domain1.com, somename.domain2.com, somename.domain3.com etc

Can we do that in UNIX? How can we configure it? Must we use in /etc/resolv.conf file as "domain domain1.com domain2.com domain3.com"?

Please help. Thanks in advance.

Best Regards,
Negara
Santos
6 REPLIES 6
DGH_2
Valued Contributor

Re: Using more than one domain

Hi,
edit the /etc/resolv.conf
this what the file should look like.

nameserver IP_Address # name_server
nameserver 127.0.0.1 # localhost
nameserver IP_Adress #name_server1
search domain1.com domain2.com domain3.com domain4.com

DGH
Norman_21
Honored Contributor
Solution

Re: Using more than one domain

in /etc/resolv.conf
search
nameserver #domain1.com
nameserver #domain2.com
nameserver #domain3.com

this file should be setup on all machines in the domain.Remember, you can only confgure 3 dns severs in the resolv.conf file.
Also, /etc/nsswitch.conf file should be modified to put DNS first in line starting with the word hosts: so that a DNS is consulted before trying any other resolution method. Use sam for easy configuration of both DNS and nsswitch.files

Good luck
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Dewa Negara_4
Regular Advisor

Re: Using more than one domain

Thanks for your information. Must we specify the domain servers on search entry as well? Like below :

in /etc/resolv.conf
search domain1.com domain2.com domain3.com
nameserver #domain1.com
nameserver #domain2.com
nameserver #domain3.com

Thanks
Santos
DGH_2
Valued Contributor

Re: Using more than one domain

no need to add the ip addresses of the servers.
DGH
Norman_21
Honored Contributor

Re: Using more than one domain

# man resolv.conf
look under search, you can add more than one with space between each of them. Also, you might need to be aware that if nothing were found, resolv.conf will go to the next one according to your /etc/nsswitch.conf setup!
that means, /etc/hosts will be use...
"Attitudes are contagious, is yours worth catching"/ My first point was given by SEP on January 31, 2003
Adisuria Wangsadinata_1
Honored Contributor

Re: Using more than one domain

Hi Mr. Dewa,

Good day to you !
You can check this url below for your reference :

http://forums1.itrc.hp.com/service/forums/parseCurl.do?CURL=%2Fcm%2FQuestionAnswer%2F1%2C%2C0xa04ea22831ebd5118ff40090279cd0f9%2C00.html&admit=716493758+1068522888070+28353475

So to configure the DNS server to resolve multiple domains, you can follow the steps below :

1. added new domain to resolv.conf
eg. : search hp.com ibm.com dell.com

have to add these entries to your clients so that they can search for them NOTE : there is a limit of 6 domains to search in resolv.conf (see man page resolv.conf)

2. update DNS startup file to use the hosts_to_named option with -d option

after restarting the DNS service the /etc/named.data/named.boot file was correctly automatically updated
but the /etc/named.boot was not. Then manually added the primary entries into the /etc/named.boot

3. restart DNS services

The steps above is for DNS server. You can use the steps that Forums refer to you for clients system.

Hope this information can help you.

Best Regards,
Adisuria Wangsadinata
now working, next not working ... that's unix