Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Mar 2004 13:14:16 -0500
From:      Charles Swiger <cswiger@mac.com>
To:        Martin McCormick <martin@dc.cis.okstate.edu>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Can Not ping Hosts by name when Underscores are Present.
Message-ID:  <94EA94E2-6D3E-11D8-85AD-003065ABFD92@mac.com>
In-Reply-To: <200403031756.i23HuKB7052724@dc.cis.okstate.edu>
References:  <200403031756.i23HuKB7052724@dc.cis.okstate.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 3, 2004, at 12:56 PM, Martin McCormick wrote:
> 	Does the ping utility do some sort of name checking when one
> wants to ping a particular host by name?

Ping uses gethostbyname2() to resolve the target hostname.

> 	A person with an account on a FreeBSD system demonstrated to
> me that one could successfully look up a given host using nslookup but
> if you pinged that host by name as in
>
> ping host_name.domain, one got an immediate complaint from the ping
> utility like:
>
> ping: cannot resolve cl_mail1.mydomain: Unknown server error

That sounds about right.  nslookup is a testing utility which allows 
one to query RRs for string you want, including ones which correspond 
to invalid hostnames.

The underscore is not allowed in Internet hostnames-- see RFC-952 and 
-1123.

-- 
-Chuck



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?94EA94E2-6D3E-11D8-85AD-003065ABFD92>