Having to plan local area networks from time to time, I find it really handy to keep these IP basics somewhere close.
Public and Private Internet Protocols (IPs)
Public IP addresses are IP addresses that are visible to the world. Private IP addresses, also known as internal IP addresses, are not visible to the world. Quite simple and obvious, isn’t it?
In the TCP/IP protocol suite, IP is the core protocol used for logical addressing. TCP/IP supports about 4 billion (232) addresses for IPv4, and mathematically 3.403×1038 (2128) addresses for IPv6. There are no duplicated IPv4 addresses, each of them is a unique 32-bit number, consisting of four 8-bit octets.
Depending on usage, IPv4 addresses are classified into five different groups: A, B, C, D and E. Three of them, classes A, B and C, have reserved private IP ranges that are used for local area networks (LAN) only.
|Class||Address Range||Reserved Private Addresses|
|A||184.108.40.206 – 127.255.255.255||10.0.0.0 – 10.255.255.255|
|B||220.127.116.11 – 18.104.22.168||172.16.0.0 – 172.31.255.255|
|C||192.0.0.0 – 22.214.171.124||192.168.0.0 – 192.168.255.255|
|D||126.96.36.199 – 188.8.131.52||none|
|E||240.0.0.0 – 255.255.255.255||none|
Reserved Private IP Ranges
Unlike public IP, private IP addresses are not valid on the Internet. They are reserved for LANs and cannot communicate with the Internet directly unless used with a device performing Network Address Translation (NAT).
|Class||From IP||To IP||Default Subnet Mask|
The private class A range provides up to
256 * 256 * 256 – 2 = 16,777,214
hosts (usable addresses) on one network. Although eight bits have 256 possible combinations, only the numbers from 1 to 254 can be used to identify hosts in an IP address.
The number 0 is used as a network ID and represents the entire group of hosts. For example, 10.0.0.0 represents all of the hosts whose first octet is 10.
The number 255 is reserved for broadcast communications. In general, class A is used for large companies having hundreds of thousands of devices, or by extremely busy admins who don’t like to type much.
The private class B range provides up to
256 * 256 – 2 = 65,534
hosts (usable addresses) per subnet and has up to 16 subnets. The total number of usable IP addresses is
65,534 * 16 = 1,048,544
All devices using class B IP addresses share first two octets. It is usually used for medium-sized networks which require tens of thousands of private addresses.
The private class C range of IP addresses is designed to support up to 65,534 hosts. In practice, it’s used for home and small-sized network.
Network Masks Reference
|CIDR||Host Bits||Netmask||Available Addresses||Classful Name|