lynn said the following on 03/30/2012 07:12 AM:
And you have reverse lookup as well so that the FQDN of the machine based on its 192.whatever IP address can be determined?
No. It's straight from the box, as fas as it can be straight out of the box on openSUSE, cache only but we have added the dlz for dynamic updates.
Sorry: please clarify. Are you saying your DNS server is 'straight out of the box'? Have you tried the reverse lookup? (Sorry this is complicated but its finding the IP address in a site independent manner) # dig -s $( ip addr show to 0.0.0.0/0 scope global | \ awk '/[[:space:]]inet / { print gensub("/.*","","g",$2) }' ) That should give you the FQDN of your host.
It really should be 127.0.0.1 localhost.localdomain localhost
Setting only that does not work for, e.g. Kerberos realm lookups. In particular, krb5 nfs mounts fail if the 127.0.1.1 address is not specified.
Having that setting is 'out of the box'. The fact that Kerberos lookups don't work unless that is altered from the default makes me think you have an incorrect setup. As you can see below, properly set up, 127.0.0.1 *IS* there ... via DNS. And the lookup of the Kerberos server should be done by DNS, and the lookup of the NFS server(s) should be done by DNS. That's the point of having it 'centrally managed' and the distributed/replicated database that is DNS (and LDAP for that matter!) If you read the man page HOSTS(5) you;ll see it says <quote> The Berkeley Internet Name Domain (BIND) Server implements the Internet name server for UNIX systems. It augments or replaces the /etc/hosts file or hostname lookup, and frees a host from relying on /etc/hosts being up to date and complete. </quote> Yes there is the proviso for bootstrapping and yes you can buqqer this up by a mistake in /etc/nsswitch. Yes there is the provision for standalone. But if your machine is using /etc/hosts to do reverse lookup or to find the address of servers then either a) your DNS has failed, or b) your DNS is misconfigured. The latter could be because a) /etc/nsswitch is wrong b) information handed back by the DHCP server is wrong or inadequate c) your DNS is not set up correctly I'm skipping your named.conf. You can use nslookup, host or dig to test your DNS from this box. Before any network mount, any other stuff to do with networking, the machines needs an IP address. Its getting that either from DHCP or its hard wired. The ifconfig tool will tell you what the address is. You should be able to use the DNS lookup tools (see above) to do a reverse lookup of that IP address. It should make use of the DNS server if you have /etc/resolve set properly (either via DHCP or manually). Using the debug option will tell you how the DNS server is being interrogated. You should get something like this. It is from my redhat w/s which uses DHCP and my dns server is at .18 # dig -x 127.0.0.1 ; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.2.rc1.fc15 <<>> -x 127.0.0.1 ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 5784 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1 ;; QUESTION SECTION: ;1.0.0.127.in-addr.arpa. IN PTR ;; ANSWER SECTION: 1.0.0.127.in-addr.arpa. 86400 IN PTR localhost. ;; AUTHORITY SECTION: 0.0.127.in-addr.arpa. 86400 IN NS localhost. ;; ADDITIONAL SECTION: localhost. 86400 IN A 127.0.0.1 ;; Query time: 30 msec ;; SERVER: 192.168.2.18#53(192.168.2.18) ;; WHEN: Fri Mar 30 07:49:50 2012 ;; MSG SIZE rcvd: 93 Note that this is querying the DNS server, not /etc/hosts.
which makes me think you have an error in you DNS config.
Everything else works fine. The dynamic updates included.
In some ways networking is very tolerant of minor errors and has fallbacks (that's the point of /etc/nsswitch) That your routing and DNS lets you access google and youtube and msn and facebook doesn't mean that you have *any* reverse lookup set up correctly. The fact that your /etc/hosts settings are used for reverse lookup tells me that the DNS reverse lookup isn't working or isn't being used. The latter emerges from how /etc/nsswitch is set. But a running system (aka 'after a successful boot and network start-up) with properly set up DNS etc shouldn't need /etc/hosts. OK so there are a pile of 'yes-buts' people are going to argue with on this. One I've seen is to set /etc/nsswitch to use 'files dns' for host lookup on the basis that file lookup is faster than DNS lookup. OK, but that's if and but; it says nothing about caching, it says nothing about correctness and maintenance. The point is that you *should* be able run without /etc/hosts. See the man page, as I quoted. The fact that you can't, the fact that you have to jimmy stuff in there to make it work, tells me something is wrong, and I suspect the DNS side of things. -- Think then act - There is nothing so useless as doing efficiently that which should not be done at all - Peter Drucker. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org