It is small question, but I can't figure out these things. Please help me in simply way how to do this.
Consider the given ip address is 198.51.100.39/28. From this how can I found the first ,last and the number of address in this network
It is small question, but I can't figure out these things. Please help me in simply way how to do this.
Consider the given ip address is 198.51.100.39/28. From this how can I found the first ,last and the number of address in this network
The math behind requires converting IPv4 notation and CIDR block into binary.
198.51.100.39 in binary 11000110 00110011 01100100 00100111
255.255.255.240 (for /28) 11111111 11111111 11111111 11110000
---------------------------------------------------------------
FIRST (from logical AND) 11000110 00110011 01100100 00100000
LAST (host bits => 1) 11000110 00110011 01100100 00101111
These converted back into IPv4 notation gives range 198.51.100.32 - 198.51.100.47
.
The number of addresses can be calculated directly from CIDR (/28
): 2³²⁻²⁸ = 2⁴ = 16.
If you don't want to do this every time, you can use a CIDR to IPv4 Conversion tool.