Skip to main content
added 1245 characters in body
Source Link
OzNetNerd
  • 2.3k
  • 13
  • 17

EDITING to respond to your comment - "You basically told me how to calculate subnet mask (128 + 64) = 192, but the question was why 131 is a host address?"

The host address is found simply by adding the host bits to the subnet bits when the two are in the same octet.

Let's take another look at the example you gave:

                                                                 HHHHHH
IP Address:       192.168.10.131  | 11000000.10101000.00001010.10000011    
                                                               SS
Subnet Mask:      255.255.255.192 | 11111111.11111111.11111111.11000000  
                                                               NN
Network Address:  192.168.10.128  | 11000000.10101000.00001010.10000000  
  • The 'S' bits represent bits which have been 'reserved' as Subnet mask bits.
  • The 'N' bits represent the Network address bits.
  • The 'H' bits represent the Host bits.

Notice how the "IP Address" section's first two bits are identical to the "Network Address'" first two bits. This is how we know that the Host address resides in that Network.

To find the host's IP address we add all of the Host bits together - 128 + 2 + 1 = 131.

As mentioned above, I have explained this in great detail on my blog. This post is most relevant to your question.

EDITING to respond to your comment - "You basically told me how to calculate subnet mask (128 + 64) = 192, but the question was why 131 is a host address?"

The host address is found simply by adding the host bits to the subnet bits when the two are in the same octet.

Let's take another look at the example you gave:

                                                                 HHHHHH
IP Address:       192.168.10.131  | 11000000.10101000.00001010.10000011    
                                                               SS
Subnet Mask:      255.255.255.192 | 11111111.11111111.11111111.11000000  
                                                               NN
Network Address:  192.168.10.128  | 11000000.10101000.00001010.10000000  
  • The 'S' bits represent bits which have been 'reserved' as Subnet mask bits.
  • The 'N' bits represent the Network address bits.
  • The 'H' bits represent the Host bits.

Notice how the "IP Address" section's first two bits are identical to the "Network Address'" first two bits. This is how we know that the Host address resides in that Network.

To find the host's IP address we add all of the Host bits together - 128 + 2 + 1 = 131.

As mentioned above, I have explained this in great detail on my blog. This post is most relevant to your question.

Source Link
OzNetNerd
  • 2.3k
  • 13
  • 17

WHY 131 is NOT included in the network portion as it also has 1s in it.

The first two bits of the fourth octet in the "IP Address" (highlighted with * below) are included in the network portion. This is because the first two bits of the fourth octet in the "Subnet Mask" (highlighted with ! below) dictates this.

                                                               **
IP Address:       192.168.10.131  | 11000000.10101000.00001010.10000011    

                                                               !!
Subnet Mask:      255.255.255.192 | 11111111.11111111.11111111.11000000  

In other words, the subnet mask determines how many bits are network bits. Because the subnet mask takes the two most significant bits from the fourth octet (128 + 64), we get a subnet mask with its fourth octet set to 192.

As the host address uses the two least significant bits (1 + 2), we get 3. When that 3 is added to the last octet of the network address (128 + 3), we get 131.

By the way, in case you're interested I've written quite a few blog posts on subnetting.