- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Ping does'nt work with dotted name in /etc/hos...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2005 05:36 AM
10-13-2005 05:36 AM
Here is my question :
Having "204.1.4.23 ict-prod-ce0" in /etc/hosts
The ping succed :
ping ict-prod-ce0
PING ict-prod-ce0: 64 byte packets
64 bytes from 204.1.4.23: icmp_seq=0. time=1. ms
64 bytes from 204.1.4.23: icmp_seq=1. time=0. ms
----ict-prod-ce0 PING Statistics----
4 packets transmitted, 4 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/1
But with "204.1.4.23 ict-prod.ce0" in /etc/hosts
It does NOT :(
ping ict-prod.ce0
ping: unknown host ict-prod.ce0
WHY ?
Thanks a lot for any responses .
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2005 05:47 AM
10-13-2005 05:47 AM
SolutionEither do not use a . in the hostname, or change the ndots setting, as per
man hostname
and
man 5 hostname
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2005 06:08 AM
10-13-2005 06:08 AM
Re: Ping does'nt work with dotted name in /etc/hosts
Doesn't work like a DNS database.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2005 06:16 PM
10-13-2005 06:16 PM
Re: Ping does'nt work with dotted name in /etc/hosts
It worked by renaming /etc/resolve.conf
mv /etc/resolve.conf /etc/resolve.conf.old
There was probably some stuff in resolve.conf making trouble
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2005 06:40 PM
10-13-2005 06:40 PM
Re: Ping does'nt work with dotted name in /etc/hosts
Check for hosts: entry in that which decides host -> ip and ip -> host resolvation.
Try to keep as,
hosts: files dns
# mv /etc/resolv.conf.old /etc/resolv.conf
You can verify this setting as,
# nsquery hosts 204.1.4.23 "files dns"
# nsquery hosts 204.1.4.23 "dns"
hth.
It will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2005 10:51 PM
10-13-2005 10:51 PM
Re: Ping does'nt work with dotted name in /etc/hosts
anyway the content of the /etc/resolv.conf (now is resolv.conf.old) was :
domain xxx.net.ma
nameserver x.y.z.t
nameserver x.y.z.t
if that may help understanding how the name resolution work .
Mouad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2005 10:59 PM
10-13-2005 10:59 PM
Re: Ping does'nt work with dotted name in /etc/hosts
/etc/nsswitch sets the search order for a NAME RESOLUTION PROVIDER, like /etc/hosts( termed as file in nsswitch.conf), NIS, DNS etc.
For example if your /etc/nsswitch.conf has got the following entry, the search for a host name resolution will start in the /etc/hosts then DNS and finally NIS resources.
hosts: files dns nis
/etc/resolv.conf is the file for a DNS client where it specifies the search order for a DNS resource.
Regards,
Syam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2005 11:15 PM
10-13-2005 11:15 PM
Re: Ping does'nt work with dotted name in /etc/hosts
But what if nsswitch.conf does'nt even exists, I guess it starts searching in /etc/hosts by default, but the problem here is that it still takes entries in /etc/hosts as host.domain (if dotted name)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2005 11:43 PM
10-13-2005 11:43 PM
Re: Ping does'nt work with dotted name in /etc/hosts
#
#
# For example:
# 192.1.2.34 hpfcrm loghost
#
# See the hosts(4) manual page for more information.
# Note: The entries cannot be preceded by a space.
# The format described in this file is the correct format.
# The original Berkeley manual page contains an error in
# the format description.
#