[arin-tech-discuss] zero-padded IP addresses in "startAddress" and "endAddress" values

Aaron Hughes aaronh at bind.com
Wed Mar 28 16:38:41 EDT 2012


+1

Thanks Seth.

Cheers,
Aaron

On Wed, Mar 28, 2012 at 01:17:40PM -0700, Seth Mattinen wrote:
> On 3/28/12 12:40 PM, David Huberman wrote:
> > Hello Dani,
> > 
> > ARIN's Registration RESTful web service has always expressed IP addresses
> > with zero padding. As you point out, however, the Whois RESTful web
> > service does not.  I think a fair explanation of these two behaviors is
> > that Whois is assumed to be read mostly by humans, and in contrast, the
> > output of the Registration RESTful web service is assumed to be
> > interpreted by machines.
> > 
> 
> I find that logic flawed; leading zeros can mean "octal" to machines. If
> indeed the output is assumed to be interpreted be machines as octal then
> leading zeros would be appropriate, whereas a human would normally read
> a zero-padded number as base 10. If you're going to zero-pad then for
> consistency you should return "075.0126.000.000" rather than an
> ambiguous mix of potentially octal and potentially base 10. Or simply
> don't zero pad without a technical basis.
> 
> For example, if I were to take that output and feed it into "ping" on
> any of my Linux servers they do indeed interpret 075 as octal and try to
> ping "61.126.0.0".
> 
> ~Seth
> 
> -- 
> arin-tech-discuss mailing list
> arin-tech-discuss at arin.net
> http://lists.arin.net/mailman/listinfo/arin-tech-discuss

-- 

Aaron Hughes 
aaronh at bind.com
+1-831-824-4161
Key fingerprint = AD 67 37 60 7D 73 C5 B7 33 18 3F 36 C3 1C C6 B8
http://www.bind.com/



More information about the arin-tech-discuss mailing list