Type the following command to set a DNS server address and press Enter: netsh interface ip set dns name="Ethernet0" static 10.1.2.1 Change 10.1.2.220 255.255.255.0 10.1.2.1 with the device IP address, subnet mask, and default gateway address that corresponds to your network configuration. In the above command, replace Ethernet0 with the name of your network adapter.
Type the following command to assign a static IP address on Windows 10 and press Enter: netsh interface ip set address name="Ethernet0" static 10.1.2.220 255.255.255.0 10.1.2.1 Under the network adapter, note the name of the adapter as well as the following information in these fields: Type the following command to see your current networking configuration and press Enter: ipconfig /all Search for Command Prompt, right-click the top result, and select the Run as administrator option.
Use these steps to set a static IP address on Windows 10 using Command Prompt:
How to assign static IP address using Command PromptĪlthough using commands may be challenging for some users, this is one of the quickest ways to assign a static IP address on Windows 10.
How to assign static IP address using Control Panel.How to assign static IP address using Command Prompt.(You can also configure your router to assign a static IP address using the DHCP settings.) 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. 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 at any time, as soon as you restart the machine, or after the dynamically assigned configuration expires. If you do not assign a static IP address, services or a port forwarding configuration will eventually stop working. For instance, if you plan to share files, a printer on a local network, or configure port forwarding. On Windows 10, setting a static IP address to a computer is an essential configuration you may need to configure in many scenarios.