IP Address – Determining Host Portion from a Given IP Address

ipip addressipv4subnet

I need to determine the subnetmask and Host Id of a given address: 175.142.213.217/22

This is what I have so far:

Address:    01010111.10001110.11010101.11011001
SubnetMask: 11111111.11111111.11111100.00000000 = 255.255.252.0

The part I'm stuck on is how to determine the Host Id.

Can someone please explain to me in great detail how I would get to that point from what I have so far (assuming my answers above are correct)

Best Answer

You have a subnet mask, but you need a host mask, which is just the NOT of the subnet mask (reverse the ones and zeros) to get 00000000.00000000.00000011.11111111.

AND the address and the host mask (only ones in both positions get to be one in the result) to get 00000000.00000000.00000001.11011001.

Convert that back to decimal (0.0.1.217) or give it as an offset into the subnet (473).

Related Topic