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

Seth Mattinen sethm at rollernet.us
Wed Mar 28 16:17:40 EDT 2012


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




More information about the arin-tech-discuss mailing list