Two questions about subnet masks as I’m learning from a book.
First, I don’t get why they’re needed. Sounds like they function to identify which parts of the IP address refer to subnets and which refer to hosts, and they only get used by routers to decide whether packets should go to the local subnet or get translated and sent up to a wider area. But, shouldn’t the router be able to do this by testing whether each octet or byte of the address matches its own? That is, if only the first part matches, the subnet mask would have been 255.0.0.0, and so forth. Why isn’t this sufficient?
Second, my book says that 255.0.0.0 and 255.255.0.0 and 255.255.255.0 are standard masks, but that most applications use other, nonstandard masks. I’m surprised, as I have seen all these used but have never seen any others used. BTW I can see why you might want to use a nonstandard mask and how you would do it, and can accept that systems allow it. My only question is in doubting the statement that most subnet masks include octets other than 255 and 0.