So a network masks helps you know which portion of the address identifies a network and which portion
of the address identifies the node.
An IPV four subnet mask consists of 32 bits, a sequence of one followed by a block of zero.
The trailing block of zeros designates that part as being the host identifier.
Class A, B and C networks have default masks, also known as natural masks.
And these masks are.
255.0.0.0 for class A.
255.255.0.0 for class B and.
255.255.255.0 for class C networks.
So an IP address for class B network that is not been subnet.
Would have an address mask pair similar to 131.107.1.2 being the address and 255.255.0.0 would be the
subnet mask.
Right.
Now in order to see how the mask helps you identify the network and node parts of the address, convert
the address and mask into binary numbers as seen on the slide.
So once you have the address and the mask represented in binary.
Then identification of the network and the host ID is a lot easier.
Any address bits which have corresponding mask bits set to one represent the network ID.
Any address.
Bits that have corresponding mask bits set to zero represent the host ID.
So in this example, the first part 131.107 is the network part of the IP address where the rest 1.2
represents the host.
All devices on this segment share the same network ID and the same subnet mask.
Now you can customize the subnet mask to divide a network into many smaller portions.
So here's a little brain tingler for you.
The network ID may be expressed in classless Inter-domain routing or Cidr notation, written as the
first address of a network followed by a slash character and ending with a bit length of the prefix.
So in our example, 131.107.0.016 is the prefix of the IPV four network starting at the given address,
having 16 bits allocated for the network prefix and the remaining 16 bits reserved for host addressing.