RFC: Partial IP4 syntax
Ben Efros
ben at xgendev.com
Wed Sep 29 05:56:19 CEST 2004
Simon Lodal wrote:
> Examples:
> 10 = 10.0.0.0/8
<SNIP>
> Iknow IP address syntax should not change every day. But this will not
> break or exclude old syntax. I do not see it clashing with
> other/future syntax.
Wrong. IP numbers can also be written in 32-bit unsigned notation. In
your first example:
10 being 10.0.0.0/8
10 is actually treated as unsigned 32bit int, meaning you're address is
actually 0.0.0.10
Try this command and see for yourself:
"ping 5000"
Notice how ping is actually sending to "0.0.19.136" ?
This is done because 32-bit addresses should be representable as a 32bit
number and not just as a string representation of the address for a
variety of reasons.
Unfortunately your idea would break a LOT of very useful tools and ways
of representing valid ip numbers.
Ben
More information about the netfilter-devel
mailing list