[CLUE-Tech] WAS: Netmask trivia question...

black at galaxy.silvren.com black at galaxy.silvren.com
Sun Aug 31 10:37:16 MDT 2003


Hi, not to start stepping on toes, but netmasks quite positively have to
be contiguous 1's. 255.255.1.0 and the like are impossible. You can't
borrow bits for host addresses arbitrarily.

255.255.1.0 is a valid HOST address, but it is most certainly not a valid
netmask.


On Sat, 30 Aug 2003, Keith Hellman wrote:

> On Sat, Aug 30, 2003 at 04:25:18PM -0600, David Anselmi wrote:
> > Trivia question:  Why would you want to write a netmask the long way
> > (e.g., 255.255.255.0) rather than the short way (e.g., /24), assuming
> > your application can accept either?
>
> IIRC, netmasks do not *HAVE* to be a sequence of 'all-on' bits,
> 255.255.1.0 or 255.0.255.0 are valid netmasks - though I doubt they
> would work all that much in the wild.  The hiccup (I think) being
> whether your network card takes only the lower bits for the node numbers
> of simply does a ~netmask to determine all node addresses (the latter
> woiuld be the more correct, I think...).
>
> Think I read this in Perlman's Bridges and Routers book.  If I'm right,
> I'm sure I got all the details wrong, but I'll leave the corrections to
> DA.
>
> --
> Keith Hellman                             #include <disclaimer.h>
> khellman at mcprogramming.com                from disclaimer import standard
>
> "We will perhaps eventually be writing only small modules which are identified
> by name as they are used to build larger ones, so that devices like
> indentation, rather than delimiters, might become feasible for expressing local
> structure in the source language."
>
> -- Donald E. Knuth, "Structured Programming with goto Statements", Computing
> Surveys, Vol 6 No 4, Dec. 1974
> _______________________________________________
> CLUE-Tech mailing list
> Post messages to: CLUE-Tech at clue.denver.co.us
> Unsubscribe or manage your options: http://clue.denver.co.us/mailman/listinfo/clue-tech
>



More information about the clue-tech mailing list