Mike's PBX Cookbook

IP Address Cheat Sheet

The Five IPv4 Classes:

Class 		Leading bits	Start 		End 			Default Subnet Mask 
A (CIDR /8) 	00000001	1.0.0.0 	126.255.255.255 	255.0.0.0
B (CIDR /16) 	10000000	128.0.0.0 	191.255.255.255 	255.255.0.0
C (CIDR /24) 	11000000	192.0.0.0 	223.255.255.255 	255.255.255.0
D 		11100000	224.0.0.0 	239.255.255.255 	
E 		11110000	240.0.0.0 	255.255.255.0

Possible subnets for a /8 suffix (traditional Class A):

CIDR		Network 	Available 	Available Hosts Total 
notation 	Mask 		Networks 	per network 	usable hosts
/8 	256	255.0.0.0 	1		16777214	16777214	00000000
/9 	128	255.128.0.0	2		8388606		16777212	10000000
/10 	64	255.192.0.0	4		4194302		16777208	11000000
/11 	32	255.224.0.0	8		2097150		16777200	11100000
/12 	16	255.240.0.0	16		1048574		16777184	11110000
/13 	8	255.248.0.0	32		524286 		16777152	11111000
/14 	4	255.252.0.0	64		262142 		16777088	11111100
/15 	2	255.254.0.0	128		131070		16776960	11111110

Possible subnets for a /16 suffix (traditional Class B):

CIDR		Network 	Available 	Available Hosts Total 
notation 	Mask 		Networks 	per network 	usable hosts
/16 	256	255.255.0.0 	1		65534 		65534		00000000
/17 	128	255.255.128.0	2		32766 		65532		10000000
/18 	64	255.255.192.0	4		16382 		65528		11000000
/19 	32	255.255.224.0	8		8190 		65520		11100000
/20 	16	255.255.240.0	16		4094 		65504		11110000
/21 	8	255.255.248.0	32		2046 		65472		11111000
/22 	4	255.255.252.0	64		1022 		65408		11111100
/23 	2	255.255.254.0	128		510 		65280		11111110

Possible subnets for a /24 suffix (traditional Class C):

CIDR		Network 	Available 	Available Hosts Total 
notation 	Mask 		Networks 	per network 	usable hosts
/24 	256	255.255.255.0 	1 		254 		254		00000000 
/25 	128	255.255.255.128 2 		126 		252		10000000 
/26 	64	255.255.255.192 4 		62 		248		11000000 
/27 	32	255.255.255.224 8 		30 		240		11100000 
/28 	16	255.255.255.240 16 		14 		224		11110000 
/29 	8	255.255.255.248 32 		6 		192		11111000 
/30 	4	255.255.255.252 64 		2 		128		11111100 
/31 	2	255.255.255.254 128 		2 * 		256		11111110 
* only applicable on point-to-point links

The Internet Assigned Numbers Authority (IANA) has reserved the following three blocks of the IP address space for private internets:

     10.0.0.0        -   10.255.255.255  (10/8 prefix)
     172.16.0.0      -   172.31.255.255  (172.16/12 prefix)
     192.168.0.0     -   192.168.255.255 (192.168/16 prefix)
     169.254.0.0     -   169.254.255.255 (Link-local/self assigned *)

We will refer to the first block as "24-bit block", the second as "20-bit block", and to the third as "16-bit" block. Note that (in pre-CIDR notation) the first block is nothing but a single class A network number, while the second block is a set of 16 contiguous class B network numbers, and third block is a set of 256 contiguous class C network numbers.

* If a host cannot acquire an IP address from a DHCP server, it may assign itself an IP
address from the reserved Link-local address range (169.254.0.0 - 169.254.255.255).

ping 127.0.0.1 is the diagnostic or loopback address.

Subnet 	Mask	Blocks	Hosts	Subnets
/22	.252	1024	1022	
/23	.254	512	510	
/24 	.0	256 	254 	1
/25 	.128	128 	126 	2
/26 	.192	64	62 	4
/27 	.224	32	30 	8
/28 	.240	16	14	16
/29 	.248	8 	6	32
/30 	.252	4 	2	64

 16  32  48  64  80  96 112 128
144 160 176 192 208 224 240 256