What are IP addresses, subnet masks and how do you change them in Windows?

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. Read on to get into more detail and also learn how to change the IP address and subnet masks used by Windows, when you need to:

What is the IP address and how does it work?

To help you understand what IP addresses are, we are going to use a simple analogy of an example from real life:

Let's say that you want to send a letter to your grandmother. You have finished writing the message, and you want to send it. However, first, you need to know her address: street name, number and zip code. Otherwise, your letter will not get to her.

Now, think of an IP address as the address of a computer or network device inside a network. It is the unique identifier of a network device, that is used to establish communication, send and receive data to other computers or devices located either in the same network or on the Internet.

At the time this article was written, there are two important standards for IP addresses: IP version 4 (IPv4) and IP version 6 (IPv6). We are going to explain what each of these standards means in the next 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), which is a service that runs on dedicated servers in your network or on special network hardware, such as routers.

Dynamic addresses are the most used since static addresses can cause network problems if used carelessly. Also, they are harder to manage as they require manual intervention to create.

In a typical home network or a small business network, IP addresses are assigned and managed automatically by the router.

What is Internet Protocol Version 4 (IPv4)?

IP version 4 (IPv4) is the most used standard at the time this article was written. An IPv4 address uses 32-bit addresses which limits the address space to 4.294.967.296 (2^32) possible unique addresses. To be understood by everyone, 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:

IPv4 addresses can be 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 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, the 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 addresses.

What is Internet Protocol Version 6 (IPv6)?

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 huge 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 difficult 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.

What is the subnet mask?

A subnet mask is a division of an IP network, and because of that, it is also often called a subnetwork. You can think of it as the area code of your phone number. The subnet is used in large networks to split them into two or more networks and make them easier to manage. In home networks and small business networks, all your network computers and devices are usually on the same subnet, and 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 using the CIDR notation. It is written as the first address of a network, followed by a slash character (/), and ending with the bit-length of the prefix. For example, instead of writing the IP address like and the subnet mask like, 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:

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.

How to change the IP Address in Windows

Depending on your network configuration, you might need to change the IP address of your computer or device. Fortunately, the process is not too complicated:

First, you need to open the Network Connections window. If you are using Windows 10, you can get to it by launching the Settings app, then going to Network & Internet and then click or tap on the "Change adapter options" link.

If you are using Windows 7 or Windows 8.1, you can get to the Network Connections window by opening the Network and Sharing Center, and then click or tap on the "Change adapter settings" link, on the left side of the window.

Regardless of the Windows operating system you use, you should now have the Network Connections window open, and it should look similar to the screenshot below. Inside it, you can see all the network interfaces available on your computer or device, including virtual connections and Bluetooth network devices.

Tap and hold or right-click the network adapter for which you want to change the IP address. Then, click or tap on Properties.

The Properties window gives you information about the networking protocols used by the current network connection and allows you to install, uninstall or modify them. To change the IP address, scroll through the available items in the list and double-click on Internet Protocol Version 4 (TCP/IPv4) or Internet Protocol Version 6 (TCP/IPv6), depending on what IP address you want to change. Alternatively, you can also click or tap on it and then on the Properties button.

Both the Internet Protocol Version 4 (TCP/IPv4) Properties and the Internet Protocol Version 6 (TCP/IPv6) windows contain a General tab where you can set the IP address to either be obtained automatically or to be set manually. To configure it manually, check the option "Use the following IP address" and enter the required values for the IP address, subnet mask, and default gateway.

If you are changing the IPv6 Address, you do not have to specify a subnet mask, because this protocol does not need one. Instead, you can manually enter the "Subnet prefix length" which specifies the number of subnetworks on that network. Usually, this information is provided to you by the network administrator.

If you want to change your preferred DNS server and alternate DNS server addresses, you can do that here as well. Keep in mind, though, that this is not always necessary and you can change your IP address without also having to change these addresses. You can also check the "Validate settings upon" exit option so that the settings are applied as soon as you click or tap the OK button. This starts a Windows Network Diagnostics troubleshooter that validates your network connection after you manually change your IP address settings.

If you use your computer or device on multiple networks, you might need to configure a specific alternate address for one of those networks. To do this without having to change your automatically obtained address, click or tap the "Alternate Configuration" tab in the "Internet Protocol Version 4 (TCP/IPv4) Properties" or "Internet Protocol Version 6 (TCP/IPv6) Properties" window.

Important: The Alternate Configuration tab is only available if you have selected "Obtain an IP address automatically" in the General tab. Then, select the User configured option and type the required settings. Using this type of configuration makes your network adapter choose the alternate configuration when it is unable to obtain the IP address from a network automatically.

Click or tap OK to save your settings.

What are DNS, Gateway, WINS?

We do realize this topic is quite a bit more technical than others that we have covered, 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 will not be able to browse the web using traditional website addresses. The DNS Server is provided by your Internet Service Provider. You can find a more detailed explanation here: What is DNS? How do I see my DNS settings in Windows?.
  • 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.


Now that you have a basic understanding of what IP addresses and subnet masks are, and how you can change them, you should be able to configure the network settings of your Windows devices quite easily. We would like to know if you had any problems while changing your IP address. Share them with our readers and us, using the comments below, and we will do our best to help.