Date: Sun, 17 Jun 2001 22:47:57 -0400 From: James Housley <jim@thehousleys.net> To: john@day-light.com Cc: freebsd-isp@freebsd.org Subject: Re: IP resolving to Octal Message-ID: <3B2D6BDD.A02291A@thehousleys.net> References: <000501c0f79d$ff696fc0$0b00a8c0@dle>
next in thread | previous in thread | raw e-mail | index | archive | help
John Brooks wrote: > > I assisted a friend to setup a new FreeBSD4.3 box (the first in his > network). Network has 50+ linux boxes resolving from hosts files in this > format (don't ask me why, it's his format): > > 010.000.010.012 charity.cs.domain.edu > 010.000.010.013 patience.cs.domain.edu > 010.000.010.014 virtue.cs.domain.edu > ... > > On linux this apparently worked, on BSD it gets converted to octal and > returned in dotted decimal. "charity" resolved to an IP of 8.0.8.10 instead > of 10.0.10.12. Anyway, we worked through all issues first and then set up > DNS which is working properly - he now thinks BSD is "way cool". > > My question is why would BSD and Linux interpret the same hosts file in such > a different manner? Which should be considered the correct behavior? > For the 20+ years I have been programming, it has been standard to represent octal number with a leading zero. Seeing the FreeBSD's roots go back further then my 20 years. And if you check RFC-1035 section 3.5, it states ". . . one octet of an Internet address, and is expressed as a character string for a decimal value in the range 0-255 (with leading zeros omitted except in the case of a zero octet which is represented by a single zero)." This actually relates to IN-ADDR.ARPA domain. I stopped searching after finding this one. I am also sure there is an RFC for hosts files which are more pertinent. Jim -- /"\ ASCII Ribbon Campaign . \ / - NO HTML/RTF in e-mail . X - NO Word docs in e-mail . / \ ----------------------------------------------------------------- jeh@FreeBSD.org http://www.FreeBSD.org The Power to Serve jim@TheHousleys.Net http://www.TheHousleys.net --------------------------------------------------------------------- A Microsoft Certified Systems Engineer is to computing what a McDonalds Certified Food Specialist is to fine cuisine. -- Jack O'Neill To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3B2D6BDD.A02291A>