What are IP Addresses?
Beginner’s Guide to IP Addresses: Understanding IPv4 and IPv6

IP addresses are unique numerical identifiers assigned to each device connected to a network, enabling them to communicate effectively. Imagine them as street addresses for devices, allowing them to communicate with each other.
What is an IPv4 Address?
An IPv4 address is a 32-bit numerical label assigned to a device connected to a network. Think of it as the unique ID that helps identify your device in a network. An IPv4 address is typically written in four decimal numbers separated by dots, like 192.168.1.10
Components of IPv4 Addresses:
- Network ID: This part specifies the particular network a device is on.
- Host ID: This identifies the specific device within the network.
Let me explain it with an example —
IP Address: 192.168.1.10
, in this IP address, the network ID and host ID are —
- Network ID:
192.168.1
- Host ID:
10
So basically, it means that the device is part of the network 192.168.1.0
, and it’s device number 10
.
IPv4 Address Classes
IPv4 addresses are divided into different classes, each designed for networks of varying sizes:
- Class A:
- For very large networks (e.g., large organizations).
- The first octet (first number) represents the network.
- Example:
10.0.0.0
2. Class B:
- For medium-sized networks (e.g., universities).
- The first two octets represent the network.
- Example:
172.16.0.0
3. Class C:
- For smaller networks (e.g., small businesses).
- The first three octets represent the network.
- Example:
192.168.0.0
4. Class D:
- Reserved for multicast groups, used to send data to multiple destinations at once.
- Range: 224.0.0.0 to 239.255.255.255
5. Class E:
- Reserved for experimental purposes.
- Range: 240.0.0.0 to 255.255.255.255
Private vs. Public IPv4 Addresses
There are two types of IPv4 addresses:
- Private IP Addresses: These are used within local networks and can’t be accessed directly from the internet.
- Class A:
10.0.0.0
to10.255.255.255
- Class B:
172.16.0.0
to172.31.255.255
- Class C:
192.168.0.0
to192.168.255.255
2. Public IP Addresses: These are globally unique and assigned by the Internet Assigned Numbers Authority (IANA) for communication over the Internet.
What is an IPv6 Address?
With the growing number of devices connected to the internet, IPv4 addresses started running out. That’s why IPv6 was developed. It uses a 128-bit system, which allows for many more possible addresses.
An IPv6 address looks different from an IPv4 address. It’s written as eight groups of four hexadecimal digits, separated by colons, like this:
Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334
To simplify the address, leading zeros can be omitted, and consecutive zero groups can be replaced with a double colon (::
), like this:
Example: 2001:db8:85a3::8a2e:370:7334
Types of IPv6 Addresses:
- Unicast: Identifies a single device, just like an IPv4 address.
- Multicast: Used to send data to multiple devices at once.
- Anycast: Delivers data to the nearest device from a group of devices.
Subnetting: Organizing Your Network
Subnetting is the process of dividing a larger network into smaller, more manageable sub-networks or subnets. This improves network efficiency and security.
Why Subnet?
- Efficient IP usage: Prevents wasting IP addresses on networks that don’t need them
- Improved performance: Reduces network congestion
- Enhanced security: Isolates network segments
- Easier management: Smaller networks are simpler to manage and troubleshoot
How Subnetting Works
Subnetting involves modifying the IP address and its associated subnet mask. A subnet mask is a 32-bit number that identifies which parts of an IP address belong to the network and which to the host.
Example of Subnetting
Let’s subnet the network 192.168.1.0/24 into two equal subnets:
- Original subnet mask: 255.255.255.0 (/24)
- New subnet mask: 255.255.255.128 (/25)
This creates two subnets:
- Subnet 1: 192.168.1.0–192.168.1.127
- Subnet 2: 192.168.1.128–192.168.1.255
Each subnet can now host up to 126 devices (2⁷ — 2, subtracting 2 for the network and broadcast addresses)
That’s it from my side. Check out my other articles, too!
Final Thoughts
In this article, I’ve covered everything you need to know about IP addresses. I think I did well, let me know your thoughts/reviews in the comments.
Happy coding, and see you in my next article!
