I have one box (Rasberry Pi, running rasberian) with a static IP. It's running in a network with a domainname, and I have several DNS-server set up.
However, I can not get FQDN name to work on this box:
sitron@pi:~ $ domainname
(none)
sitron@pi:~ $ dnsdomainname
sitron@pi:~ $ hostname -f
pi
I believe I have set up DNS correctly:
sitron@pi:~ $ hostname -I
192.168.10.9 2001:db8:abba::9
sitron@pi:~ $ cat /etc/resolv.conf
domain example.org
search example.org
nameserver 2001:db8:abba::5
nameserver 192.168.10.5
sitron@pi:~ $ dig +short -x 192.168.10.9 @2001:db8:abba::5
pi.example.org.
sitron@pi:~ $ dig +short -x 2001:db8:abba::9 @2001:db8:abba::5
pi.example.org.
sitron@pi:~ $ dig +short -x 2001:db8:abba::9 @192.168.10.5
pi.example.org.
sitron@pi:~ $ dig +short -x 192.168.10.9 @192.168.10.5
pi.example.org.
My nsswitch.conf:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat
group: compat
shadow: compat
gshadow: files
hosts: files mdns4_minimal dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
And /etc/hosts:
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 pi
What is the missing link?
options single-request-reopen
into your/etc/resolve.conf
file. this should fix any mistake happens when you are using both ipv4 and ipv6 into yourresove.conf
"The resolver uses the same socket for the A and AAAA requests. Some hardware mistakenly sends back only one reply. When that happens the client system will sit and wait for the second reply. Turning this option on changes this behavior so that if two requests from the same port are not handled correctly it will close the socket and open a new one before sending the second request."/etc/hosts
like this:127.0.0.1 pi.example.com pi localhost
?