Link to home
Start Free TrialLog in
Avatar of pzxkys
pzxkys

asked on

Question about Solaris DNS client name resolution

I'm stumped. We have a solaris network that uses both DNS and NIS. For the moment they both have the same domain name (aaa.bbb.com). I need to change the default DNS domain name. I edited resolv.conf and changed it to ccc.ddd.com. I then tested resolution of a host in the original domain. My test : nslookup host1.aaa.bbb.com. As I expected nslookup failed to resolve the name. I then tried ping host1 and expected name resolution failure but was surprised to see that host1 was resolved and the ip address was pinged. Got the same result with telnet host1. Success when I expected failure. I see that these 2 DNS client applications do not use the domain name in resolv.conf as their default. I cleared nscd cache and stopped nscd. The info isn't / wasn't cached. I checked /etc/hosts. Host1 isn't defined there. I now suspect /etc/defaultdomain which still has aaa.bbb.com in it. I understand that NIS is using this file for its default domain information. How can I force the DNS client applications to look elsewhere for their default domain name?

Thanks! Marty
Avatar of pzxkys
pzxkys

ASKER

Correction to my original post :-). Where I said I tested nslookup host1.aaa.bbb.com ... I should have said I tested "nslookup host1" ... the point, of course, was to see if nslookup would add the default domain aaa.bbb.com. It obviously tacked on the new default domain ccc.ddd.com from resolv.conf as expected ... and failed because there currently is no such domain.
SOLUTION
Avatar of bpeterse
bpeterse
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Tintin
Tintin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pzxkys

ASKER

Thanks for the feedback.

The resolv.conf entry of ccc.ddd.com is a bogus one for testing purposes only. I want to prove that "ping host1" is not attaching aaa.bbb.com to the hostname for IP address discovery. So our DNS server does not need the new domain name. And /etc/resolv.conf has "domain ccc.ddd.com" as the first entry, followed by IP addresses for servers of the other domain aaa.bbb.com.

My nsswitch.conf file has
hosts:      files nis dns

I have no entry for host1 in /etc/hosts. I removed all entries for host1 from the NIS hosts file and if the ping application uses resolv.conf for a domain name it gets the bogus one. Name resolution for host1 should work its way through each of these entries and fail. Right?

Any chance it's getting the domain name aaa.bbb.com from /etc/defaultdomain? My goal is to make "ping host1" fail but for now it continues to come up with an IP address. Why?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pzxkys

ASKER

Good point ... and I sort of did this already but the results were not pleasing :-). I used the "domainname" command to change the system domainname that I believe is used by NIS. So far as I know the domainname value is read from /etc/defaultdomain at boot time.

When I changed "domainname" at a command prompt it did NOT modify the contents of /etc/defaultdomain. It did, however, break my NIS connection, my e-mail connection and the ping host1 command. It does, in fact, seem that ping gets its domain name from whatever data or environment variable is holding the domainname data ...

I guess I was hoping that some expert :-) who really understands how all this stuff works would just explain it to me. It's my understanding that /etc/defaultdomain is the ultimate source of the default NIS domain. I need to be able to leave that alone ... so my NIS domain does not change. My DNS domain, on the other hand, must change. They need to be different. Thus I don't think I can fiddle with /etc/defaultdomain ...

Thanks again for the feedback!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pzxkys

ASKER

Interesting suggestion. I made the change in nsswitch.conf. I rebooted. I modified aaa.bbb.com in resolv.conf to ccc.ddd.com and ran ping host1. Ping host1 still worked. Not what I was hoping for ...
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pzxkys

ASKER

Sorry for the delay on this. I've split the points up and given them to all 3 respondents. No answer was actually adequate. No answer solved the problem. Perhaps the problem/question was too complex. In any case it was easier to share the points that have the question cancelled. Thanks for your effort and assistance!

Oh by the way: I found that if I entered a search list in the resolv.conf file that ping and telnet correctly resolved the target hostname. Still don't understand why exactly.