Before we begin to describe the differences between the parts of an IP address, we need to distinguish between traditional, or IPv4 addresses, and IPv6 addresses.IPv4 addresses are the type that take the format of 123.234.345.456 that you may be used to seeing.They are 32-bit addresses, meaning that they contain 232 different combinations. IPv6 addresses are 128 bit addresses, or have 2128 different combos. For the purpose of this article, we will be focusing on IPv4.
Let’s first look at this form of IP address, which is the type with which you might be most familiar. It is made up of four octet, each. In an IPv54 address, the 32 bits are divided into four octets, made up of 8 bits (with 256 different possible entries, represented as 0-255).These represent, in order
In this way, a single IP address will identify which network an address belongs to, which sub-network within that network, and eventually the final endpoint, or the host.It is worth noting that the “host” in this case can represent another internal network (e.g., a wireless network inside a home.)These internal networks are also assigned individual hosts.In home networks these are typically within the 192.168.*.* range, and in corporate or company networks they tend to reside under 10.*.*.* These are reserved internal networks, which we discuss in a separate article.
It is important to understand that these are represented as binary objects, with each position representing a different value.We can think of these as on/off switches.The values in IP address can be seen in the table below:
Don't reinvent the wheel.
Abstract's APIs are production-ready now.
Abstract's suite of API's are built to save you time. You don't need to be an expert in email validation, IP geolocation, etc. Just focus on writing code that's actually valuable for your app or business, and we'll handle the rest.Get started for free
While these are divided into 4 groups, we can actually split them into two. The first two octets refer to the network, and the last two reference the host.
The first octet defines the class of the object; it is the only part of the IP address that is assigned by the InterNIC authority.
If an address falls in the first 128 bits (0-127) this means that is a class A network. There are only, therefore, 127 class A addresses. Each of these can handle up to 16,777,214 hosts.For class A networks, these remaining numbers can be set up by the network administrator to manage hosts. In other words these are reserved for very large networks such as major governmental resources or major providers.
Class B networks, which fall in the range of 128-191, use 16 bits for the network address, and 16 bits for the host numbers. In this case, the first two bytes are assigned by the InterNIC , and the remaining bytes are assigned by the network administrator.
Class C addresses cover the range between 192.0.0.* and 223.255.255.*.
Class D covers the range between 188.8.131.52 to 184.108.40.206, and is reserved for multicasting. Tthis data is not limited to a particular host.
Class E is an experimental range which covers between 240.*.*.* and 255.*.*.*
There is certain information you can get directly from an IP address, such as its location and whether the IP address is using a VPN or if the IP address is using a proxy. However, you typically would need a third party data provider like Abstract's IP Geolocation API to enrich this data for you.
These concepts are a little difficult to cover in a short article such as this one, and there are many more elaborations that can occur, such as with the use of subnets, and more for distributing resources within a network. What we can see is that there is a great deal to be understood in the structure of an IP address.
While you can break apart each of these elements and then look them up one of the central databases for determining who manages which ranges, it’s often easier to make uses of external APIs, which do a lot of the difficult legwork with you.
Reliable IP geolocation using Abstract's API's. Start for free today.Get started for free