Reputation: 19
How can I calculate Subnet mask from IP address range manually?
For example IP addresses from 212.92.32.00 to 212.92.63.255, what is the mask in decimal dot format?
Upvotes: -2
Views: 2206
Reputation: 11
This IP range belongs to Class C means N.N.N.H (N means Network ID's and H means Host ID's) and Default Class C subset mask 255.255.255.0
. In binary format 11111111 11111111 11111111 00000000
.
Here 8 Host bits 2x2x2x2x2x2x2x2 = 256 (usable 254 only because 2 hosts not usable one for Network and one for Broadcast)
Now first sub-net as follows:
Network: 212.92.32.0/24
Broadcast: 212.92.32.255
HostMin: 212.92.32.1 ----- (usable IP starting)
HostMax: 212.92.32.254 -----(usable IP ending)
Netmask: 255.255.255.0
Hosts/Net: 254
and up-to 212.92.63.255
.
Upvotes: 0
Reputation: 2527
The first and the last IPv4 addresses of the subnet satisfy the following:
In this case, the netmask is simply /N. In your example, the addresses are:
11010100.01011100.00100000.00000000 and
11010100.01011100.00111111.11111111
so:
So, your netmask is /19, or 11111111.11111111.11100000.00000000, or 255.255.224.0.
Upvotes: 1