IP Ranges
What we are using now is IP Version 4 (IPv4). In the future, if the number of connected devices increases, IPv6 will be used. For now, we will discuss IPv4.
In IPv4, an IP Address is used as 4 parts and 32 bits. (8 bits per part). Each part is separated by dots (.). This may not be clear enough, so please look at the image below.
IPv4 address in dotted-decimal notation
8 bits
1 byte
32 bits (4 bytes)
In the image, you can see the 4 parts of an IP address. Since each part is defined by Binary 8 bits (1 byte), the entire IP Address is 32 bits (or) 4 bytes. This may be difficult to understand right now. Please keep reading.
There are five IP Classes in IPv4: Class A, B, C, D, and E. Each class has a specific, designated IP address range. The most commonly used classes are Class A, B, and C.
Class A IP Ranges
When a network needs to include many hosts, a Class A IP is used. In a Class A IP, the first part, called the first octet, represents the Network identification, while the remaining three parts are for host identification.
In a Class A Network, the first octet (the first part) that represents the Network identification ranges from 1 to 127. Since the leading zero is reserved for special usage, and 127 is reserved for loopback addresses, the usable IP range for a Class A network is truly from 1 to 126. Therefore, you can remember that there are 126 networks in a Class A network.
This is why the Public IP in a Class A Network is in the range of 1.0.0.0 to 127.0.0.0. There are 126 networks in Class A, and each network can use up to 16,777,214 hosts (about 17 million hosts).
Class B IP Ranges
A Class B Network is not as large as a Class A, but it also has a considerably large IP range, so it is included in the category of large networks. The Network identifier for a Class B network is the first two parts of the IP, and the remaining two parts are for host identification. Therefore, while there are more networks in Class B, the number of hosts that can connect to each network is fewer.
Class B includes the range from 128 to 191, so its range is from 128.0.0.0 to 191.255.0.0. The Network identification consists of the first two parts, which is 8 bits x 2 = 16 bits. There are 16,382 usable networks, and each network can connect up to 65,534 hosts.
Class C IP Ranges
Class C Networks are for small networks. The first three parts of the IP are used for network identification, making it a 24-bit network (8 bits x 3 = 24 bits). The first octet of the IP is from 192 to 223. As it is 24 bits, there are over 2 million usable networks in Class C.
To show the IP address range clearly, it includes from 192.168.0.0 to 223.255.255.0. Therefore, Class C has 2,097,150 networks, but each network can only connect 254 hosts. This is what you would find in home and small office networks.
Class D IP Ranges
Class D is mostly used for audio and video streaming, and IP TV networks. It is primarily intended for multicasting, which is different from unicasting. In unicasting, communication is one-to-one between a sender and a receiver. In multicasting, it becomes one-to-many communication.
This means that in multicasting, a sender can send data simultaneously to multiple receivers. This has the advantage of being useful in areas like video streaming, online gaming, conferencing, and software updates. It can also work across different networks. So, to summarize, Class D networks are primarily used for multicast.
The IP Range in a Class D Network is from 224.0.0.0 to 239.255.255.255, and unlike Classes A, B, and C, there are no specific numbers for networks and hosts. This is because multicasting is group communication across different networks.
Class E IP Ranges
Class E is used only for Research purposes. Its range is from 240.0.0.0 to 255.255.255.255, and it does not have a specific number of networks or hosts.
Since the IP Classes you normally see are A, B, and C, I will not talk about the others in detail. For a summary, you can look at this table.
Public IP Range | Private IP Range | Subnet Mask | # of Networks | # of Hosts per Network | |
---|---|---|---|---|---|
Class A | 1.0.0.0 to 127.0.0.0 |
10.0.0.0 to 10.255.255.255 |
255.0.0.0 | 126 | 16,777,214 |
Class B | 128.0.0.0 to 191.255.0.0 |
172.16.0.0 to 172.31.255.255 |
255.255.0.0 | 16,382 | 65,534 |
Class C | 192.0.0.0 to 223.255.255.0 |
192.168.0.0 to 192.168.255.255 |
255.255.255.0 | 2,097,150 | 254 |
The reference for this information was taken from meridianoutpost.com.
I would like to add a few more points that were not complete in my explanation of Private & Public IPs. Public IPs cannot be duplicated anywhere in the world. However, Private IPs can be the same in different networks. People often ask me questions like, "My Kali's IP at home is 192.168.1.5, but there's another computer at my office with the IP 192.168.1.5." This is because the IPs used in a Local Area Network are addresses that are only used within that specific network.
Another point is that servers use Public IPs and can be connected to using that IP. However, our own Public IP (the one you can see from whatismyipaddress.com) cannot be connected to directly. If there is an absolute need to connect, you would have to use methods such as Port Forwarding, using a VPN, Remote Software, using a cloud service, SSH Tunneling, or a reverse proxy.
0 Comments