From owner-freebsd-questions@FreeBSD.ORG Wed May 7 12:50:31 2008 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E70EA1065677 for ; Wed, 7 May 2008 12:50:31 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from mail.potentialtech.com (internet.potentialtech.com [66.167.251.6]) by mx1.freebsd.org (Postfix) with ESMTP id B56318FC31 for ; Wed, 7 May 2008 12:50:31 +0000 (UTC) (envelope-from wmoran@potentialtech.com) Received: from vanquish.ws.pitbpa0.priv.collaborativefusion.com (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.potentialtech.com (Postfix) with ESMTPSA id BD8A1EBC3B; Wed, 7 May 2008 08:35:30 -0400 (EDT) Date: Wed, 7 May 2008 08:35:49 -0400 From: Bill Moran To: Christopher Key Message-Id: <20080507083549.2a4b1d3b.wmoran@potentialtech.com> In-Reply-To: <4821896B.60005@cam.ac.uk> References: <4821896B.60005@cam.ac.uk> X-Mailer: Sylpheed 2.4.8 (GTK+ 2.12.9; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: questions@freebsd.org Subject: Re: Underscores in host names X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 May 2008 12:50:32 -0000 In response to Christopher Key : > Hello, > > I've a host on the network called "GC100_000C1E00AC3F_GlobalCache", and > I'm getting interesting behaviour when I try to do DNS lookups on it. > > Under FreeBSD, ping fails with 'Unknown server error'(distinct from the > standard 'Unknown host'), and nslookup succeeds. OSX and Windows > machines will do a DNS lookup on it quite happily > > The best explanation I can manage is that ping etc. are using different > code from nslookup, and only nslookup is allowing the underscores within > the hostname. > > Is this behaviour by design? My understanding is that underscores are > not strictly permitted, but that most implementations choose to allow > them unless there's a specific reason not to. I had this discussion with some colleagues a short time back. Our conclusion (based on some research and experimentation): 1) Underscores are not valid in domain names. 2) _most_ DNS systems will work with them anyway. 3) Just enough DNS systems don't work with _, that it's a really bad idea to use them in domain names. -- Bill Moran http://www.potentialtech.com