The internet as we know it today stands on a foundation of numbers, specifically IP addresses. These addresses are the identifiers that let devices find and communicate with each other across the globe. In this blog, you’ll learn the IP address format of different types of IP addresses.

So, let’s begin by understanding what those types are. 

Image showing multiple IP addresses on a computer screen.

Generation of IP Addresses

As more and more devices have come online over the years, the demand for these unique IP addresses has skyrocketed. The strain put by this surge is where the generation of IP addresses comes into play. 

So far, there have been two generations of IP addresses, both of which have a unique IP address format.

Image showing a list of words used in the IP addressing context with IP address types IPv4 and IPv6 highlighted.

1. Internet Protocol Version 4 (IPv4)

IPv4 was born in the early days of the internet, and it’s the most familiar version of IP addressing. Even today, it handles a significant portion of global internet traffic. 

An IPv4 address looks like this: 192.168.0.1, four groups of numbers with three dots separating them.

Now, what does “32-bit” mean? Essentially, a 32-bit address means that there are 2^32 possible combinations, that’s 4,294,967,296 unique addresses. 

However, a lot of these are reserved for specific uses. 

For example, about 18 million addresses are private IP addresses, and another 270 million are for multicast addresses. The rest of the address range is spread out across the globe for public use.

With the rapid growth of internet-connected devices, especially mobile phones and IoT gadgets, the IPv4 pool of addresses started running dry. The internet needed a solution, and that’s where IPv6 comes in.

2. Internet Protocol Version 6 (IPv6)

To address the growing demand for IP addresses, the IANA had to introduce the IPv6 addressing system.

IPv6 is a much more robust system, with 128-bit addresses, giving us a nearly infinite supply of unique addresses. Just to give you an idea, IPv6 offers around 340 undecillion addresses (that’s 2^128!). 

Here’s an example of what an IPv6 address looks like: 

2001:0db8:85a3:0000:0000:8a2e:0370:7334

This massive range of IPv6 addresses ensures that we won’t run into an address shortage anytime soon.

Image showing IPv4 type of IP Address written on a screen with a human hand clicking on it.

How Are IP Addresses Formatted?

Let’s break down the IP Address Format of each of these IP versions.

IP Address Format for IPv4

IPv4 address format consists of four 8-bit octets, which makes 32 bits in total. These octets have a dot between them, meaning there are three dots in an IPv4 address.

For example, a typical IPv4 address looks like this: 192.168.0.1. This is called dot-decimal notation because the octets are decimal numbers (ranging from 0 to 255). 

But behind these familiar decimal numbers lies binary. The binary representation of each octet takes eight bits (1s and 0s). Here’s how the binary representation of 192.168.0.1 would look: 

11000000.10101000.00000000.00000001

IP Address Format for IPv6

IPv6 has two different IP address formats.

An IPv6 address in its pure form consists of eight segments of four hexadecimal digits with colons separating them. 

A hexadecimal digit can be any value between 0 and F. So, an IPv6 address could look like this:

2001:0db8:85a3:0000:0000:8a2e:0370:7334

That’s a lot of numbers, but to make it readable, this format for IP addresses allows a shorthand notation. 

Leading zeros are removable from each segment, e.g., 0001 becomes just 1. And if two or more consecutive segments are zero, you can replace them with a double colon::. So, the address above can be shortened to:

2001:db8:85a3::8a2e:370:7334

This makes it a bit easier to handle, especially when you’re dealing with addresses that have lots of zeros. For instance, an IPv6 address where the last six segments are zeros could look like:

2001:0db8::

Or, an address with nothing but zeros (which usually means it’s an unspecified address) would be written as:

::

Aside from the pure IPv6 address format, there’s also a hybrid model that combines IPv6 with embedded IPv4 addresses. Networks that still need to handle both IPv4 and IPv6 traffic usually rely on this address format.

In dual addresses, the first six segments follow the IPv6 format, and the last four numbers are IPv4 addresses. For example:

2001:db8:3333:4444:5555:6666:192.168.1.1

If the IPv6 portion is all zeros, you get something like:

::192.168.1.1

Image showing IP address in dotted decimal notation.

Subnetting and CIDR Notation of IP Address Format

Subnetting is a process of splitting an IP address format into two parts. One part identifies the network, and the other part identifies a specific device (or host) on that network.

The public IP address of devices in a network that route their traffic outside the network is the same. However, their private IP addresses are different to maintain a unique identity within the network.

Image showing the concept of subnetting in IPv4 addresses. It also shows the before and after results of subnetting an IPv4 address.

Subnetting in IPv4 

IPv4 divides its address space into classes: A, B, C, D, and E. Each of these classes has a different way of splitting the network and host portions. 

  • Class A addresses use the first 8 bits for the network and the remaining 24 bits for the host. An example of a Class A IP address could be 10.0.0.1, where “10” is the network part and “0.0.1” is the host part.
  • Class B uses the first 16 bits for the network and the other 16 for the host. A Class B example might be 172.16.0.1, where “172.16” represents the network, and “0.1” is the host.
  • Class C uses 24 bits for the network and 8 bits for the host. So, something like 192.168.1.1 would be a Class C IP, with “192.168.1” as the network and “1” as the host.

It can be difficult to identify network and host bits just by looking at the IP address. Classless Inter-Domain Routing (CIDR) solves this problem. It specifies how many bits belong to the network part using a slash notation, like /24

For example: 

  • 192.168.1.0/24 (first 24 bits ‘192.168.1’ specify the network)
  • 10.0.0.0/8 (first 8 bits are network)
  • 172.16.0.0/16 (first 16 bits are network)

Image showing an IPv6 multicast address structure.

Subnetting in IPv6

In most cases, the first 64 bits specify the network part, and the remaining 64 bits specify individual network devices.

The more common term for CIDR notation in IPv6 is the prefix length. 

For example, in 2001:db8:abcd:0012::/64, the prefix length of 64 tells that the network has 64 subnets.

You can tweak the prefix length to make smaller subnets. For instance, 2001:db8:abcd:0012::/80 means that now 80 bits make the network, and the rest identify devices. 

Geolocate IPs With GeoPlugin

Besides simply identifying the network and host, device IPs can also reveal their geographic location if you use IP geolocation.

If your business requires geolocation, GeoPlugin is a reputable service to count on. It can perform geolocation on any IP address format and give you the correct location details.

So, try GeoPlugin today and geolocate IPs like a pro!

FAQ

How many bits is an IP address?

An IPv4 address is 32 bits long, while an IPv6 address is 128 bits long. This length difference allows IPv6 to offer a larger pool of addresses.

What is the IPv4 address format?

The IPv4 address format consists of four 8-bit numbers (octets) separated by dots, each ranging from 0 to 255 (e.g., 192.168.1.1). The dotted-decimal format makes it easier to read.

What is the format for IPv6?

The IPv6 format consists of eight groups of four hexadecimal digits separated by colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). It also supports short-form notations.

author avatar
Mehal Rashid
Mehal is a Computer Science graduate who specializes in writing SEO articles about Tech, AI, and cybersecurity. In his free time, you will find Mehal in a boxing ring or playing snooker.