IP addresses and subnet masks stand at the core of computer networking. They are not concepts that are easy to understand in their entirety, especially if you do not have a technical background. However, with a bit of help, anybody can understand the basics of IP addresses and subnet masks, what they do, and why they are useful. If you want to know what an IP address is, what's the purpose of an internet protocol address, or what's a subnet mask, read on. We're explaining it all in simple terms:
What is an IP address? What is the purpose of an Internet Protocol address?
To help you understand what IP addresses are, in simple terms, let's use an analogy from real life:
You want to send a written letter to a friend. You are done writing the message and want to send it. For the letter to reach its destination, you need to know your friend's address - street name, number, and zip code - and write it on the letter. Otherwise, the postal service doesn't know where to deliver your letter.
Think of an IP address as the address of a computer or device inside a network. The IP addresses are the unique identifiers of network devices used to establish communication, send, and receive data to or from other computers or devices in the same network or on the internet.
At present, there are two relevant standards for IP (Internet Protocol) addresses: IP version 4 (IPv4) and IP version 6 (IPv6). We are going to explain what these standards mean in the next two sections of this guide, so bear with us for a little longer. 🙂
You should also know that an IP address can be either static or dynamic. A static IP address is one that you need to configure yourself through the Windows network settings. A dynamic address is assigned by the Dynamic Host Configuration Protocol (DHCP), usually for a limited time frame. DHCP is a service that runs on dedicated servers in your network or on specialized network hardware, such as wireless routers. Dynamic IP addresses are the most used since static addresses can cause network problems if used carelessly. Static IP addresses are also harder to manage, as they require manual intervention to create and manage, especially in larger networks such as those from offices or institutions.
Thus, in a typical home network or a small business network, IP addresses are assigned and managed automatically by the router via DHCP.
What is an Internet Protocol Version 4 (IPv4) address?
IP version 4 (IPv4) is the most used standard right now. IPv4 uses 32-bit addresses, which limits the address space to 4.294.967.296 (2^32) possible unique addresses. So that everyone can easily understand them, IPv4 addresses are represented by four decimal numbers separated by dots. Each of these four numbers contains one to three digits, and each of them can range from 0 to 255. For example, an IPv4 address could look like this: 18.104.22.168.
IPv4 addresses are divided into three categories, called classes. As you can see in the table below, the main difference between each class is the number of bits allocated for network and host identification. Also, the class from which an IPv4 address comes can be identified according to the form of the leading bits of the first integer, from dot-decimal notation. For example, the IP address in the picture above is a class B IP address because the leading bits of the binary form of 172 (10101100) are 1 and 0 (10).
Also, there are other addresses used for particular actions. As you can see in the table below, the class D IPv4 addresses are used for multicast addressing. In computer networking, multicast refers to group communication where information is addressed to a group of destination computers simultaneously. For example, multicast addressing is used in Internet television and multipoint video conferences. The class E IPv4 addresses cannot be used in real life because they are only used in experimental ways.
However, because the world is running out of possible combinations for IP addresses, IPv4 is currently being phased out. Therefore, to add more network devices, we need to switch to IPv6 because it allows us to use a lot more IP addresses.
What is an Internet Protocol Version 6 (IPv6) address?
Internet Protocol version 6 or IPv6 was created in 1995 to replace IPv4 addresses. IP version 6 (IPv6) is a standard that is not yet widely implemented but will be once all the IPv4 addresses run out. IPv6 addresses are made up of eight-digit groups separated by colons. Unlike the IPv4 addresses, these can also contain letters from a to f, so an IPv6 address could well look like this: 2a00:1450:400d:0802:0000:0000:0000:200e. As a comparison to IPv4, this standard can manage 2^128 addresses. The maximum number of addresses is a massive number with 39 digits, and that should satisfy our needs for IP addresses for the next couple of decades.
As you can see in the picture above, the IPv6 addresses are quite challenging to manage. So, there are some rules that simplify the way you write these addresses. If one or more groups are "0000", the zeros may be omitted and replaced with two colons (::) and the zeros from the beginning of a group can also be omitted. Also, in contrast to IPv4, the IPv6 addresses are not divided into classes.
NOTE: If you want to find out the IP address of your computer or device or learn how to change it, read:
- 8 ways to find your IP address in Windows (all versions)
- 3 ways to change the IP address in Windows 10
What is a subnet mask? What is a subnet mask used for?
A subnet mask is a way to divide an IP network. You can think of it as the area code of your phone number. In simple terms, subnet masks are used in networks to split them into two or more subnetworks, making them easier to manage. On home networks and small business networks, all your network computers and devices are usually on the same subnet, so all the computers or devices located on the same subnet have the same subnet mask.
To get a little more technical, a subnet mask is a 32-bit number that masks an IP address and divides the IP address into a network address and host address. The subnet mask is made by setting network bits to all "1" and setting host bits to all "0".
The subnet mask can be represented in two ways: one is the usual dot-decimal notation like an IP address, and the second is using the CIDR notation.
In CIDR notation, a subnet mask is specified as the first IP address of a network, followed by a slash character (/) and the bit-length of the subnet prefix. For example, instead of writing the IP address like 192.168.1.0 and the subnet mask like 255.255.255.0, you could write only the address, followed by a slash and the bit-length of the prefix, which is the number of bits "1" from the binary form of the subnet mask: 192.168.1.0/24. Unfortunately, it is not easy to calculate the subnet prefix length, so if you want or have to do it, we recommend you to use tools such as this online IP Subnet Calculator.
The subnet mask is used in the subnetting process, which involves dividing the network into smaller portions called subnets. As you know, an IP address is divided into two parts, one for network identification and one for host identification. Using the subnet mask, the main network is divided into one or more smaller networks. This is performed by a bitwise AND operation between the IP address and the (sub)network mask. In simple terms, this means that a part of the bits from the host number is used for the new (sub)network identification.
If you want to learn how to change the subnet mask on your Windows 10 PCs, as well as for all the computers and devices in your local home network, read this guide: 4 ways to change the Subnet Mask in Windows 10.
What are DNS, Gateway, WINS?
We do realize this topic is a bit more technical, although we're trying to use simple terms as much as possible, so here is a short and friendly version of what all of these complementary notions mean. It is better if you know what they mean because, to understand how an IP address works, you also need to understand these additional topics that work together to enable the communication between our network computers and devices.
So, without further ado, here is a short description of them:
- Gateway - a gateway is usually a router located on the network that acts as an access point to another network and the internet. For example, your Internet Service Provider has one or multiple gateway servers that your computer uses to connect to the internet. In large business environments, gateways are also used to connect the different subnets/networks that are owned by the company.
- DNS Server - it stands for Domain Name System, and it is a naming system for internet-connected devices and computers that matches easily-memorizable addresses, such as www.digitalcitizen.life to their IP address. If your DNS server is not working, then you are not able to browse the web using traditional website addresses. The DNS Server is usually provided by your Internet Service Provider. You can find a more detailed explanation here: What is DNS? How is it useful?. However, you can also change the DNS servers on your own. Find out more about it in 3 ways to change the DNS settings in Windows 10 and What is a third party DNS server? 8 reasons to use public DNS servers.
- WINS Server - it stands for Windows Internet Name Service, and it is an outdated type of naming system that was used on older computers and Microsoft operating systems, like Windows 98 or Windows 2000. It was used to map IP addresses to computer names dynamically. However, DNS servers are now used for this task as they perform better.
Do you have any questions regarding IP addresses or subnet masks?
Now that you have a basic understanding of what IP addresses and subnet masks are, you should be able to correctly configure the network settings of your Windows devices quite easily. Do you have any other questions about IP addresses or subnet masks? Ask away in the comments below, and we will do our best to help.