Skip to content
Tape and Square

N-01 · Subnet · /13

/13 subnet

A /13 network keeps 13 of the 32 address bits for the network and leaves 19 for hosts. Its mask, host count, the blocks it fits in and example networks, all worked out below.

Short answer

Subnet mask
255.248.0.0Wildcard 0.7.255.255
Usable hosts
524,286524,288 addresses in total

2^19 = 524,288 addresses. The first is the network address and the last the broadcast, so 524,286 can go to devices.

The /13 mask in binary and hex

13 one bits, then 19 zero bits. The wildcard is the mask inverted.

MaskDottedHex
Subnet mask255.248.0.0FF.F8.00.00
Wildcard0.7.255.25500.07.FF.FF

The mask ends inside the second octet, at 248 (11111000). That leaves 3 host bits in the octet, so /13 networks start every 8 in it: 0, 8, 16, 24 and so on. Cisco access lists take the wildcard form, 0.7.255.255, where a 1 bit means “any value” (Cisco document 23602).

RFC 1878's table lists /13 as FF.F8.00.00 hex, 512 K addresses, equal to 8 B in the old class terms. RFC 1878's host tables start at /17. The 524,286 usable figure is the same 2^19 − 2 rule, and Cisco's host and subnet table lists it.

How many /13 subnets fit

The three private ranges (RFC 1918) and one /24.

Block/13 subnets in it
10.0.0.0/832
172.16.0.0/122
192.168.0.0/16none: one /13 holds 8
172.22.181.0/24none: one /13 holds 2,048

10.0.0.0/8 holds 32 and 172.16.0.0/12 holds 2 /13 subnets. A /13 is larger than 192.168.0.0/16, so a private network of this size has to come from 10.0.0.0/8 or 172.16.0.0/12. One /13 spans 2,048 /24s.

Splitting a /13

Each extra prefix bit halves the block.

IntoSubnetsUsable each
/142262,142
/154131,070
/16865,534

Two /14 subnets hold 524,284 usable addresses between them, 2 fewer than one /13: each half gives up its own network and broadcast address.

/13 subnets of 172.16.0.0/12

172.16.0.0/12 holds 2 of them. The row in bold holds 172.22.181.150.

SubnetFirst usableLast usable
172.16.0.0/13172.16.0.1172.23.255.254
172.24.0.0/13172.24.0.1172.31.255.254

Check an address

Pre-filled with 172.22.181.150/13. Change the address or the prefix.

/13

Also accepts 192.168.1.130 255.255.255.192, 192.168.1.0 60 hosts or IPv6 like 2001:db8::/48.

Result

172.16.0.0/13

524,286 usable hosts

Network
172.16.0.0
First usable
172.16.0.1
Last usable
172.23.255.254
Broadcast
172.23.255.255
Subnet mask
255.248.0.0
Wildcard mask
0.7.255.255
Total addresses
524,288
PRIVATE

Inside 172.16.0.0/12, a private range (RFC 1918). Not routable on the public internet.

Binary view

Address · 172.22.181.150
10101100.00010110.10110101.10010110
Mask · 255.248.0.0
11111111.11111000.00000000.00000000
Network · 172.16.0.0
10101100.00010000.00000000.00000000

Bold bits are fixed for the network; orange bits number the hosts.

172.0.0.0/8 split into /13 · 32 blocks

  1. 172.16.0.0/13.16.0.1–.23.255.254 ◂
  2. … 24 more

/13 next to /12 and /14

One bit shorter, a /12 (255.240.0.0) has 1,048,576 addresses and 1,048,574 usable, 524,288 more than a /13. One bit longer, /14 (255.252.0.0) has 262,144 addresses and 262,142 usable. /12 subnet · /14 subnet

Ask the calculator for a host count and it answers /13 for 262,143 to 524,286 hosts: typing "172.16.0.0 524,286 hosts" gives this size, one more host gives a /12.

Worked example

Take 172.22.181.150/13. The mask ends in the second octet. There the address is 22 = 00010110 and the mask 248 = 11111000; AND keeps the first 5 bits: 00010000 = 16. The octets after it become 0, so the network is 172.16.0.0. OR the wildcard 0.7.255.255 onto it to set every host bit: 172.23.255.255, the broadcast.

Devices use 172.16.0.1 through 172.23.255.254: 524,286 addresses. 172.22.181.150 is number 439,702 of them. In 172.16.0.0/12 this is subnet 1 of 2.

References

  • RFC 4632, Classless Inter-domain Routing (CIDR), §3.1: prefix lengths and block sizes.
  • RFC 950, Internet Standard Subnetting Procedure: subnet masks.
  • RFC 1878, Variable Length Subnet Table For IPv4, the prefix table.
  • Cisco Tech Note 13790, Understand Host and Subnet Quantities: usable hosts per prefix.
  • RFC 1918, Address Allocation for Private Internets: 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16.

Other prefixes