Network Knowledge Base

Understanding IP Addresses

Last updated: October 26, 2023 | Category: Network Fundamentals

An Internet Protocol (IP) address is a numerical label assigned to each device participating in a computer network that uses the Internet Protocol for communication. It serves two main functions: host or network interface identification and location addressing. The role of an IP address in networking is comparable to that of a postal address in the physical world, enabling devices to find and communicate with each other.

Example IPv4 Address: 192.168.1.1 Example IPv6 Address: 2001:0db8:85a3:0000:0000:8a2e:0370:7334

Types of IP Addresses

IP addresses are broadly categorized into two main versions:

IPv4 (Internet Protocol version 4)

IPv4 is the older and most widely used version of IP. It uses a 32-bit address scheme, allowing for approximately 4.3 billion unique addresses. IPv4 addresses are typically written in dot-decimal notation, consisting of four sets of numbers separated by dots, where each set represents an 8-bit number (0-255).

IPv6 (Internet Protocol version 6)

IPv6 is the next-generation IP address standard designed to address the limitations of IPv4. It uses a 128-bit address scheme, providing an exponentially larger address space (approximately 340 undecillion unique addresses). This vastness is intended to support the growing number of internet-connected devices for the foreseeable future.

IP Address Components

An IP address is logically divided into two parts:

The distinction between the network ID and host ID is determined by a subnet mask (for IPv4) or the prefix length (for IPv6).

Subnet Mask (IPv4)

A subnet mask is a 32-bit number used in conjunction with an IPv4 address to separate the network portion from the host portion of the address. It consists of a series of '1's followed by a series of '0's. The '1' bits correspond to the network portion, and the '0' bits correspond to the host portion.


IPv4 Address:     192.168.1.100
Subnet Mask:      255.255.255.0
Network Address:  192.168.1.0
            

Prefix Length (IPv6)

In IPv6, the network portion of an address is indicated by a prefix length, similar to CIDR notation in IPv4. It specifies the number of bits from the left that represent the network ID.


IPv6 Address:     2001:0db8:85a3::/48
Prefix Length:    48 bits (meaning the first 48 bits identify the network)
            

Public vs. Private IP Addresses

IP addresses are also classified based on their scope:

Devices with private IP addresses typically use Network Address Translation (NAT) to communicate with the internet through a router with a public IP address.

Common Use Cases

IP addresses are fundamental to almost every aspect of internet and network communication, including: