This article gives a brief introduction on IPv4, Public and Private Addresses, how the IP address is broken down and how subnetting occurs.
Find a complete introductory guide on Routing and Switching in our Ubiquiti Broadband Routing & Switching Specialist (UBRSS) guide, downloadable in our Training section.
Table of Contents
- Intro to IPv4 Networking
- Private vs. Public Addresses
- IP Network Schema
- Intro to Subnetting
- Related Articles
Intro to IPv4 Networking
A Node wishing to communicate on the Network receives a unique Network Address, and is formally called a Host. IPv4 specifies the system of addressing for Hosts to identify themselves on the Network.
IPv4 Addresses specify four octets of summed bit values, where each bit value represents 2-to-the-power-of-its position in the octet. From left-to-right within the octet, bits carry a value, 2-to-the-power-of-8, all the way to 2-to-the-power-of-0. For example, the address 0.0.0.0 would contain all 8 zero bits across each octet, while the address 255.255.255.255 would contain 8 one bits across each octet.
Chart showing the IPv4 Address 10.5.37.156 (decimal notation) expressed in binary notation.
Private vs. Public Addresses
Broadly speaking, there are two types of IPv4 addresses. Private addresses (commonly called RFC 1918 addresses) are assigned to IPv4 Hosts on every Local Area Network. Private IPv4 addresses consist of three network IP ranges, listed from largest to smallest below:
10.0.0.0/810.0.0.0 to 10.255.255.255
(00001010.00000000.00000000.00000000 - 00001010.11111111.11111111.11111111)
172.16.0.0/12172.16.0.0 - 172.31.255.255
(10101100.00010000.00000000.00000000 - 10101100.00011111.11111111.11111111)
192.168.0.0/16192.168.0.0 - 192.168.255.255
(11000000.10100100.00000000.00000000 - 11000000.10100100.11111111.11111111)
IP addresses falling outside these ranges are considered either "reserved", or public addresses to be used on the public Internet. Compared to private IP addresses, which are re-used on all LANs, public IPv4 addresses are generally assigned to unique, WAN-facing interfaces.
IP Networking Schema
The first address in every network is called the Network ID, while the last address in every network is called the Broadcast ID. While neither should ever be used for Host addresses, they are referenced by Hosts for both local & internetwork communication, as well as admins, when creating networks.
Network Ranges are commonly defined by the Network ID and Network Mask. Also known as the Prefix, the Network Mask appears similar to a host IPv4 address, but contains a specific number of 1 bits from left to right.
In this way, the Prefix is abbreviated as a slash & the total number of 1 bits. For the following network ranges, the notation is as follows:
10.0.0.0 - 10.255.255.255Abbreviated as 10.0.0.0 (Network ID) with Prefix /8, as 10.0.0.0/8.
172.16.0.0 - 172.31.255.255Abbreviated as 172.16.0.0 (Network ID) with Prefix /12, as 172.16.0.0/12.
192.168.0.0 - 192.168.255.255Abbreviated as 192.168.0.0 (Network ID) with Prefix /16, as 192.168.0.0/16.
Intro to Subnetting
A Prefix, or Network Mask, can contain anywhere from zero-to-32 bits. As the Prefix increases in size, the Network Range decreases in size, and vice-versa. Increasing the Prefix is also the way by which Subnetting occurs, a vital part of networking through which a larger network is divided into smaller networks.
Recall that 192.168.0.0/16 represents all the addresses from 192.168.0.0 to 192.168.255.255.
After applying the Prefix /17 to the same network range 192.168.0.0/16, two smaller subnetworks are created, just as /18 creates four subnets, /19 eight subnets, and so forth until we arrive at /24, which creates 256 possible subnets. In another example, subnetting the network 192.168.0.0/24, creating subnetworks requires a longer prefix (/25, /26, etc.), which results in fewer hosts per network, but more subnetworks created.
You can become more familiar with IPv4 addressing and practice subnetting with Subnet Calculators. While Host addresses are easily understood in Static & DHCP Addressing, Subnetting is especially important to networking with Routing, Firewalls, and more.
A closer look at how to create subnetworks (/25, /26, etc.) based on an initial network range (ex. 192.168.0.0/24).
Read our other introductory networking articles in the Intro to Networking section.