Re: all zeroes/all ones used in host IP's...

From: Henrik Olsen (henrik@iaeste.dk)
Date: Fri Jan 28 2000 - 16:23:06 EST


On Fri, 28 Jan 2000, Mike A. Harris wrote:
> On another mailing list I'm on there is a small discussion about
> using "0's" in IP addresses. Nobody could categorically say
> wether or not they are allowed or not including myself, so I
> hunted down RFC 1123, and found the relevant section.
RFC 1122 :)

> Here it is:
>
> IP addresses are not permitted to have the value 0 or -1 for
> any of the <Host-number>, <Network-number>, or <Subnet-
> number> fields (except in the special cases listed above).
> This implies that each of these fields will be at least two
> bits long.
>
> Now I interpreted that as meaning that none of the octets in an
> IP address could be 0 or "-1" in either the network/subnet or
> host portions of a valid host IP. The definition of "-1" is "all
> ones" in the host or network/subnet portion.
>
> I interpret the above as meaning that it is not legal to have a
> network like this:
>
> 192.168.0.0/24 or 23.0.0.0/24
>
> with hosts 192.168.0.1 through 192.168.0.254 or with hosts
> 23.0.0.1 through 23.0.0.254.
>
> The first zero makes it illegal no? Could someone in the know
> please clarify this as it has been bugging me for some time and
> nobody else seems to be able to say with 100% certainty what the
> proper rule is. Also, would a network like:
>
> 142.255.255.0/24 be illegal?
>
> Someone has suggested that my interpretation is wrong, and if
> that is indeed so, I'd like to know the proper interpretation and
> share it with everyone.
Your interpretation is essentially correct, but has been amended by modern
style Classless Inter-Domain Routing (CIDR), where the old concept of
class A-C nets is essentially thrown away, making 192.168.0.0/16 the net
number, if you then don't subnet it 192.168.0.1 WILL be a valid host,
since the host portion is 0.1

Courses on TCP/IP still blabber on about how class A-C nets are different,
but that's essentially useless knowledge nowadays, used only by lazy or
ignorant teachers because it's easy to grade on and they confuse memorised
facts with understanding.
 
> I looked through some of the kernel source and couldn't find any
> special handling of such addresses.
Modern routing code has no knowledge of the different classes (apart from
multicasting), and is entierly using the netmask.

>
> Thanks very much in advance.
> Take care!
> TTYL
>
> --
> Mike A. Harris Linux advocate
> Computer Consultant GNU advocate
> Capslock Consulting Open Source advocate

-- 
Henrik Olsen,  Dawn Solutions I/S       URL=http://www.iaeste.dk/~henrik/
  Blessed be the pessimist, for he hath taken backups.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:22 EST