Gecko-AK.org Networking/Security Reference Pages


/

Binary

Net Mask

Total Hosts (n)

Subnets

Usable Hosts (n - 2)

/24

0000 0000

0

256

1

254

/25

1000 0000

128

128

2

126

/26

1100 0000

192

64

4

62

/27

1110 0000

224

32

8

30

/28

1111 0000

240

16

16

14

/29

1111 1000

248

8

32

6

/30

1111 1100

252

4

64

2

/31

1111 1110

254

2

128

0

/32

1111 1111

255

1

256

0





Example:

192.168.5.200/26

Network can be 192.168.5.128 or 192.168.5.192 for 192.168.5.x/26 because:

netmask (in binary) is 1111 1111.1111 1111.1111 1111.1100 0000

Therefore the valid subnets are:

x.y.z.1000 0000 (128) and
x.y.z.1100 0000 (192)

In this case, the IP is 192.168.5.200, so the network must be .192 (the largest network address less than the host IP address)

There are 64 potential host IP addresses on this subnet

there are 6 zeros in the netmask and 26=64, so there are 64 potential hosts.

The network address is 192.168.5.192.

The broadcast address is 192.168.5.255 192 (the network address) + 64 (the number of potential hosts) is 256 However, one of those addresses is 192 (the subnet address) and one of those addresses
is 255 (the broadcast address), so the last valid IP is 254.

Since neither .192 or .255 are valid hosts IPs (one is the network and one is the broadcast), the valid host IP range is:

192.168.5.193 through 192.168.5.254

For more information on subnetting, see www.learntosubnet.com