Subnet mask notation

SONYFX

Senior member
May 14, 2003
403
0
0
From what I understand if you have:

128.100.0.0/25

This means the first 25 bits are subnet address and the rest (32-25) are for addresses within the subnet.

Now if I have address range from 128.100.0.128 to 128.100.0.255

Is the subnet notation this: 128.100.0.128/24 ?


 

Yellow Dog

Banned
Apr 1, 2005
256
0
0
128.100.0.0/25 is the same as a subnet mask of 255.255.255.128

For network 128.100.0.0 the dafault mask is 255.255.0.0 or 128.100.0.0/16 depending on your notation method.

An additional 9 bits (17 - 25) of what is normally the host portion of that address is being used to subnet the network.
 

whalen

Golden Member
Dec 5, 2000
1,176
0
0
Originally posted by: SONYFX
From what I understand if you have:

128.100.0.0/25

This means the first 25 bits are subnet address and the rest (32-25) are for addresses within the subnet.

Now if I have address range from 128.100.0.128 to 128.100.0.255

Is the subnet notation this: 128.100.0.128/24 ?

If you had hosts in the range of 128.100.0.128 - 128.100.0.255, it would be:

128.110.0.128/25

128.110.0.128 is the network address (not usable for a host)
128.110.0.255 is the broadcast address (not usable for a host)

so you have 129-254 for host addresses.



Address space is only 32bits for IPv4. If you have a 24bit mask (255.255.255.0) that means you have 2^8 bits left for hosts, or 255. From 255, you subtract 2, one for the network address and one for the broadcast. If you look at it in binary, it makes more sense.

11111111.11111111.11111111.00000000

1's = network bits; 0's = host bits