Become a member

Get the best offers and updates relating to Liberty Case News.

― Advertisement ―

spot_img

Announcing Windows 11 Insider Preview Build 26257 (Canary Channel)

Hello Windows Insiders, today we are releasing Windows 11 Insider Preview Build 26257 to the Canary Channel. Developers, please note that for a short...
HomeTechnologyHow to set static IP address on Windows 10

How to set static IP address on Windows 10


  • To set a static IP address on Windows 10, open Settings > Network & Internet > Wi-Fi (or Ethernet), click the connection, click“Edit,” select “Manual,” turn on “IPv4,” and set the static IP address.
  • To manually configure a static network configuration from Control Panel, open Control Panel > Network and Internet > Network and Sharing Center > Change adapter settings, open the network adapter properties, check the “Internet Protocol Version 4 (TCP/IPv4),” click “Properties,” and set the static IP address.
  • Alternatively, you can manually set a static IP address from Command Prompt and PowerShell.

On Windows 10, setting a static IP address on your computer may be necessary for various reasons. For example, if you plan to share files in the network, set up a shared printer, enable and use Remote Desktop, or configure port forwarding on the router, you may need to do this.

If you don’t assign a static IP address, services or a port forwarding configuration will eventually stop working. The reason is that devices use dynamic IP addresses assigned by the Dynamic Host Configuration Protocol (DHCP) server (usually the router) by default, which can change anytime, as soon as you restart the machine or after the dynamically assigned configuration lease expires. On the other hand, a static configuration is permanent, and it’ll remain the same until you change it.

Whatever the reason it might be, Windows 10 offers multiple ways to configure a static network configuration through the Settings app, the legacy Control Panel, and the command line using Command Prompt and PowerShell.

In this guide, I will teach you how to set a static IP address to a Windows 10 computer. (You can also use these instructions to configure a static address on Windows 11.)

Set a static IP address on Windows 10 from Settings

To set a static IP address manually on Windows 10, use these steps:

  1. Open Settings on Windows 10.

  2. Click on Network & Internet.

  3. Click on “Wi-Fi” or “Ethernet.”

  4. Click on the current network connection.

    Windows 10 Wi-Fi settings

  5. Click the Edit button under the “IP settings” section.

    Wi-Fi IP settings on Windows 10

  6. Select the Manual option from the drop-down menu.

  7. Turn on the “IPv4” toggle switch.

    Wi-Fi edit IP address settings

  8. Set a static IP address for use on the Windows 10 computer.

  9. Specify a “Subnet prefix length” (subnet mask). If your network’s subnet mask is 255.255.255.0, then you should use the subnet prefix length “24.”

    Quick tip: Windows 10 doesn’t accept the IP address annotation for the subnet; you have to use the subnet bit number, in this case, 24. You can also use an IP subnet calculator to find out the correct bit.
  10. Specify a “Default Gateway” address.

    Quick note: This is typically the router’s IP address.

  11. Specify a “Preferred DNS” address.

  12. Specify an “Alternate DNS address” (if applicable).

  13. Click the Save button.

    Wi-Fi TCP/IPv4 static configuration

After you complete the steps, you can test your settings using your web browser to open a website.

 

Check if the IP address is static or dynamic

To check if you configured the settings correctly or to tell if your device is using static or dynamic settings, use these steps:

  1. Open Settings.

  2. Click on Network & Internet.

  3. Click on Wi-Fi or Ethernet.

  4. Select the network connection.

  5. Check whether the computer is using static (manual) or dynamic (automatic) IP address configuration under the “IP settings” section.

    IP assignment status

Once you complete the steps, you will know if your computer has been configured correctly.

Set a static IP address on Windows 10 from Control Panel

To configure a static IP from the Control Panel, use these steps:

  1. Open Control Panel.

  2. Click on Network and Internet.

  3. Click on Network and Sharing Center.

  4. Click the Change adapter settings option on the left navigation pane.

    Control Panel's Network and Sharing Center

  5. Right-click the Wi-Fi or Ethernet adapter and select the Properties option.

  6. Select the “Internet Protocol Version 4 (TCP/IPv4)” option.

  7. Click the Properties button.

    Control Panel's network adapter properties

  8. Select the “Use the following IP address” option.

  9. Set the static IP address for the adapter – for example, 10.1.2.220.

  10. Specify a Subnet mask for the network, such as 255.255.255.0.

    Quick note: Unlike the Settings app, you can use the IP address annotation format for the subnet mask in the Control Panel or when using Command Prompt, but PowerShell also requires the subnet bit to be specified.

  11. Specify a Default gateway (which is usually the router’s IP address).

  12. Confirm the “Preferred DNS server” address under the “Use the following DNS server addresses set Preferred DNS server” section. (It is Usually your router’s IP address or the server IP address that provides the DNS resolution.)

  13. (Optional) Specify an Alternative DNS server. (The computer will use this address if it cannot reach the preferred DNS server.)

  14. Click the OK button.

    Windows 10 network adapter TCP/IPv4 properties

  15. Click the Close button again.

Once you complete the steps, you can open your web browser and load a website to see if the configuration works.

Set a static IP address on Windows 10 from Command Prompt

To set a static IP address manually from Command Prompt, use these steps:

  1. Open Start.

  2. Search for Command Prompt, right-click the top result, and select the Run as administrator option.

  3. Type the following command to see your current networking configuration and press Enter:

    ipconfig /all
  4. Under the network adapter, note the name of the adapter as well as the following information in these fields:

    • IPv4
    • Subnet mask
    • Default Gateway
    • DNS Servers

    Windows 10 ipconfig command

  5. Type the following command to assign a static IP address on Windows 10 and press Enter:

    netsh interface ip set address name="Ethernet1" static 10.1.4.220 255.255.255.0 10.1.4.1

    In the above command, replace “Ethernet0” with the name of your network adapter. Change “10.1.4.220 255.255.255.0 10.1.4.1” with the device IP address, subnet mask, and default gateway address corresponding to your network configuration.

  6. Type the following command to set a DNS server address and press Enter:

    netsh interface ip set dns name="Ethernet1" static 10.1.4.1

    In the command, make sure to change “Ethernet0” with your adapter’s name and “10.1.4.1” with the DNS server address of the network.

  7. Type the following command to set an alternate DNS server address and press Enter:

    netsh interface ip add dns name="Ethernet1" 8.8.8.8 index=2

    In the command, replace “Ethernet0” with your adapter’s name and “8.8.8.8” with an alternate DNS server address.

    Windows 10 netsh command to set static IP address

After you complete the steps, you can test the new configuration using the ping command (for example ping google.com) to see if the internet is working. Alternatively, you can open a website to see if the configuration works.

Set a static IP address on Windows 10 from PowerShell

Windows 10 also includes the PowerShell command line console that allows you to use the “NetTCPIP” module to manage networking settings, including the ability to change your computer’s IP address settings. Microsoft recommends using this command-line method instead of netsh.

To set a static IP address on Windows 10 from PowerShell, use these steps:

  1. Open Start.

  2. Search for PowerShell, right-click the result, and select the Run as administrator option.

  3. Type the following command to view your current network configuration and press Enter:

    Get-NetIPConfiguration

    After running the command, note the following information: 

    • InterfaceIndex
    • IPv4Address
    • IPv4DefaultGateway
    • DNSServer

    PowerShell's Get-NetIPConfiguration command

  4. Type the following command to set a static IP address and press Enter:

    New-NetIPAddress -InterfaceIndex 5 -IPAddress 10.1.4.220 -PrefixLength 24 -DefaultGateway 10.1.4.1

    PowerShell's New-NetIPAddress command

    In the command, replace the “InterfaceIndex” number (5) with the corresponding number of your adapter. Change “IPAddress” with the static IP address you want to assign to your device. If necessary, change PrefixLength (subnet mask) with the correct bit number. Typically, on a home network, the setting is “24.” Also, change the “DefaultGateway” option with the network’s default gateway address.

  5. Type the following command to assign a DNS server address and press Enter:

    Set-DnsClientServerAddress -InterfaceIndex 5 -ServerAddresses 10.1.4.1

    PowerShell's Set-DNSClientServerAddress command

    If you need to set a secondary DNS server address, use a comma to use the same command with another address. For example:

    Set-DnsClientServerAddress -InterfaceIndex 5 -ServerAddresses 10.1.4.1, 8.8.8.8

    In the command, replace the “InterfaceIndex” number (5) with your network adapter’s corresponding number. Also, change “ServerAddresses” with the DNS IP address.

After you complete the steps, you can test the new configuration by opening your web browser and navigating a website.

Whatever method you use, assigning an IP address within the network range and outside of the DHCP server scope is recommended to allow proper connectivity and prevent address conflicts. If multiple devices share the same address, this will cause a networking conflict, preventing connection to the internet.

Although there are two main versions, IPv4 and IPv6, version 4 is still the most widely used, especially in lock networks, and for this reason, this guide focuses on setting up IPv4.

Update July 4, 2024: This guide has been updated to ensure accuracy and reflect changes to the process.



Source link