If you do not assign a static IP address, services or a port forwarding configuration may eventually stop working. The reason is that, by default, connected devices use dynamic IP addresses assigned by the Dynamic Host Configuration Protocol (DHCP) server (usually the router), which can change anytime, as soon as you restart the machine, or after the dynamically assigned configuration lease expires. In this guide, you will learn the steps to set a static IP (version 4) address to a Windows 10 device when providing a service on the network or simply configuring port forwarding to your device on the router.

Set static IP address on Windows 10 Set static IP address on Windows 10 from Control Panel Set static IP address on Windows 10 from Command Prompt Set static IP address on Windows 10 from PowerShell

Set static IP address on Windows 10

To assign a static IP address on Windows 10, use these steps: After you complete the steps, you can test your settings using your web browser to open a website.

Set static IP address on Windows 10 from Control Panel

To assign a static IP from Control Panel on Windows 10, use these steps: Once you complete the steps, you can open your web browser and load a website to see if the configuration works.

Set static IP address on Windows 10 from Command Prompt

To set a static IP address on Windows 10 from Command Prompt, use these steps: 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.

IPv4 Subnet mask Default Gateway DNS Servers

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. 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. In the command, replace Ethernet0 with your adapter’s name and 8.8.8.8 with an alternate DNS server address.

Microsoft is in the process of retiring netsh from Windows 10. As a result, you should start using the “NetTCPIP” networking module available in PowerShell instead.

Set static IP address on Windows 10 from PowerShell

Windows 10 also includes the PowerShell command line platform that allows you to use the “NetTCPIP” module to manage networking settings, including the ability to change the IP address settings of your computer. To set a static IP address with PowerShell, use these steps: After you complete the steps, you can test the new configuration by opening your web browser and navigating a website. After running the command, note the following information: 

InterfaceIndex IPv4Address IPv4DefaultGateway DNSServer

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. Change PrefixLength (subnet mask) with the correct bit number if necessary. Typically on a home network, the setting is 24. Also, change the DefaultGateway option with the default gateway address of the network.

If you need to set a secondary DNS server address, use a comma to use the same command with another address. For example: In the command, replace the InterfaceIndex number (5) with your network adapter’s corresponding number. Also, change ServerAddresses with the DNS IP address. 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 avoid address conflicts. If multiple devices share the same address, this will cause a networking conflict, preventing connection to the internet. All content on this site is provided with no warranties, express or implied. Use any information at your own risk. Always backup of your device and files before making any changes. Privacy policy info.