F20
I put an IPv4 entry for a server in my /etc/hosts file. I can 'ping bob', but 'host bob' comes back with:
Host bob not found: 3(NXDOMAIN)
I have this vague memory from years back about a file that set precedence of hosts file and dns for fqdn lookup. Can't remember it of find it.
Of course the problem might simply be the host command is incapable of processing the /etc/hosts file?
thanks for any help on this.
On 05/02/14 04:52, Robert Moskowitz wrote:
F20
I put an IPv4 entry for a server in my /etc/hosts file. I can 'ping bob', but 'host bob' comes back with:
Host bob not found: 3(NXDOMAIN)
I have this vague memory from years back about a file that set precedence of hosts file and dns for fqdn lookup. Can't remember it of find it.
Of course the problem might simply be the host command is incapable of processing the /etc/hosts file?
thanks for any help on this.
The host command does only DNS lookups.
On 05/01/2014 04:56 PM, Ed Greshko wrote:
On 05/02/14 04:52, Robert Moskowitz wrote:
F20
I put an IPv4 entry for a server in my /etc/hosts file. I can 'ping bob', but 'host bob' comes back with:
Host bob not found: 3(NXDOMAIN)
I have this vague memory from years back about a file that set precedence of hosts file and dns for fqdn lookup. Can't remember it of find it.
Of course the problem might simply be the host command is incapable of processing the /etc/hosts file?
thanks for any help on this.
The host command does only DNS lookups.
Well that is a straightforward answer.
Kind of thought so. So is there an equiv command that follows system priorities for both dns and hosts file?
Once upon a time, Robert Moskowitz rgm@htt-consult.com said:
Kind of thought so. So is there an equiv command that follows system priorities for both dns and hosts file?
getent hosts www.google.com
That will follow the IPv6-before-IPv4 rules (so by default, if the host has an IPv6 entry, only that will be shown).
To see all the matches, IPv6 and IPv4, you can use "ahosts" instead (which also has "ahostsv4" and "ahostsv6" to get only a specific address family). That will return all socket types (so usually STREAM, DGRAM, and RAW). This is done via a calls to getaddrinfo() and so should match the behavior of modern (akak IPv6-ready) programs.
On 05/01/2014 05:12 PM, Chris Adams wrote:
Once upon a time, Robert Moskowitz rgm@htt-consult.com said:
Kind of thought so. So is there an equiv command that follows system priorities for both dns and hosts file?
getent hosts www.google.com
That will follow the IPv6-before-IPv4 rules (so by default, if the host has an IPv6 entry, only that will be shown).
Yes. It is stopping at the ipv6 address
To see all the matches, IPv6 and IPv4, you can use "ahosts" instead
comannd not found. I will have to figure out what rpm provides it, as it was not part of the base f20 install. But thanks
(which also has "ahostsv4" and "ahostsv6" to get only a specific address family). That will return all socket types (so usually STREAM, DGRAM, and RAW). This is done via a calls to getaddrinfo() and so should match the behavior of modern (akak IPv6-ready) programs.
On 5-1-14 22:35:54 Robert Moskowitz wrote:
On 05/01/2014 05:12 PM, Chris Adams wrote:
To see all the matches, IPv6 and IPv4, you can use "ahosts" instead
comannd not found. I will have to figure out what rpm provides it, as it was not part of the base f20 install. But thanks
getent ahosts www.google.com
On 05/02/2014 12:26 AM, Garry T. Williams wrote:
On 5-1-14 22:35:54 Robert Moskowitz wrote:
On 05/01/2014 05:12 PM, Chris Adams wrote:
To see all the matches, IPv6 and IPv4, you can use "ahosts" instead
comannd not found. I will have to figure out what rpm provides it, as it was not part of the base f20 install. But thanks
getent ahosts www.google.com
Oh. I did not get that from your first write up. Got it now. thanks.
2014-05-01 23:52 GMT+03:00 Robert Moskowitz rgm@htt-consult.com:
F20
I put an IPv4 entry for a server in my /etc/hosts file. I can 'ping bob', but 'host bob' comes back with:
Host bob not found: 3(NXDOMAIN)
I have this vague memory from years back about a file that set precedence of hosts file and dns for fqdn lookup. Can't remember it of find it.
Of course the problem might simply be the host command is incapable of processing the /etc/hosts file?
thanks for any help on this.
Check your /etc/host.conf for line order hosts,bind and /etc/nsswitch.conf for correct order hosts: files dns However results may differ
-- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedoraproject.org/mailman/listinfo/users Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines Have a question? Ask away: http://ask.fedoraproject.org
On 05/01/2014 05:04 PM, Alchemist wrote:
2014-05-01 23:52 GMT+03:00 Robert Moskowitz <rgm@htt-consult.com mailto:rgm@htt-consult.com>:
F20 I put an IPv4 entry for a server in my /etc/hosts file. I can 'ping bob', but 'host bob' comes back with: Host bob not found: 3(NXDOMAIN) I have this vague memory from years back about a file that set precedence of hosts file and dns for fqdn lookup. Can't remember it of find it. Of course the problem might simply be the host command is incapable of processing the /etc/hosts file? thanks for any help on this.Check your /etc/host.conf for line order hosts,bind
multi on
and /etc/nsswitch.conf for correct order hosts: files dns
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
However results may differ