How to Configure Windows 10 IP Address with CMD?
Configuring IP address in a Windows with CMD performed using netsh command line utility. The network shell ( netsh ) is a set of commands that help you configure any Windows operating system IP address, Network Interfaces, and Windows Firewall. The usage of the command line is for pro level Windows users. Those who are playing the network infrastructure configuration. But using the command line as normal Windows user indicate your expertise to Windows environment. If you are new to Windows command line, this article “configure IP address with command prompt in Windows 10” will help you begin using command line interface.
Configuring Windows IPv4 Networking with Netsh or Network Shell. Netsh is a command-line utility included in Microsoft’s Windows NT line of operating systems beginning with Windows 2000. It allows local or remote configuration of network devices such as the NICs.

Configure IP Address with Command Prompt in Windows 10
Before setting IP address with cmd in Windows 10, you need to know how to find your IP address on Windows 10. So before everything, you must know the network IP address configuration on your system.
Let’s learn the process of IP configuration step by step. I am going to explain it with an easy pictorial guide. If you don’t understand some part, just kindly comment us and ask your questions.
The process of Changing Windows 10 IP Address with Command Prompt:
- Find your IP address in Windows 10.
- View network interfaces card.
- Change IP address on Windows 10.
- Change DNS IP address with the command line.
- Reset IP address with Command Prompt.
How to Find your IP Address on Windows 10?
There are many options for finding IP address on Windows 10. The easy one is “ ipconfig ” command. To find your IP address on Windows 10, just type “ ipconfig ” in command prompt. To do this process:
- Press Windows+R keys to open the Run .
- Type “ cmd ” in the run and press enter.
- Now type “ ipconfig ” to show the IP address.
The “ ipconfig ” command shows everything about your computer network interfaces. You might have many physical or virtual network interface card.

Here, I just have one network interface on my Windows 10 computer. The result of ipconfig command shows that the IP 169.254.29.130 with the mask of 255.255.255.0 is my current Windows IP address.
This is a class C “autoconfiguration IPv4”. When your system doesn’t find any DHCP Server or manual IP address, it obtains auto IP address. So let’s change it.
How to C hange IP Address with Command Prompt?
For change IP address, open command prompt or PowerShell. Both works the same and you can run all command prompt commends on Powershell as well. Ok, run cmd or Powershell as administrator. Netsh work in both command prompt and Powershell. I’m using Windows Powershell to change IP address on Windows 10 completely. Becuase the user interface and color’s of Powershell is better than Command prompt.
- Type “ Powershell ” in Windows 10 search box to run Windows Powershell.
- You need to run Powershell as administrator. Just press Windows+Shift the press enter to run Powershell as administrator. Or right-click the Powershell and click Run as administrator .

To find the network interface with the command line, type the following command on Powershell.

The result shows two network interfaces. The Loopback and the Ethernet. The Loopback is Windows builtin network loopback interface, but our pointed network interface is the ethernet.
To find your IP address in Windows 10 with netsh command, just type the following command.

It displays all the network interface configuration. The output result is clear and better than output result of “ ipconfig ” command on Command prompt. So to find an exact information of the network interface, just add the index ID of the network interface at the end of the command.

That’s good. Let’s configure and change Windows 10 IP address with the command line. The command is bit long but easy to understand. No need to remember, just try to understand the netsh command structure.
To change the IP address of the “Ethernet0” network interface, type the following command.

Once the command executed successfully, check the result with “ netsh interface ipv4 show config 2 ” command. Yes, the output result shows the exact IP address has set on the “ Ethernet0 ” network interface. Now the Windows IP address is 200.100.10.5 with the mask of 255.255.255.0 and default gateway is 200.100.10.1.
Note : You can’t change the default gateway separately with the following command. It will remove the IP address and just set the default gateway address.
That’s good and enough for IP address configuration in Windows 10 with the command line. Let’s change DNS IP address from the command line.
- Related : MCSA Lab Manual Articles .
How to Change DNS IP address from Command Prompt?
DNS IP address is the unique address in the network that resolves computer name to IP address and IP address to the computer name. In the network, finding a computer with a name is easy than 32-bit IPv4 address. To set or change the DNS IP address, just simply do it with the following command.

You might see some error on a simple local network, because of not having a DNS server. When you don’t have a DNS server, it’s not necessary to set DNS IP address on your computer.

Finally, recheck the result with “ netsh interface ipv4 show config 2 ” command. The output netsh command should be displayed with DNS IP address.
Final World
Configure IP address with command prompt in Windows has tow benefits. The first benefit of working with Windows command line helps get you improve your skills in Windows environment. The second benefit is command line is faster than GUI. If you work with the command line, you will understand the power of command line.
The Windows command line interface has improved a lot in Windows 10. Now you can find some Linux commands that run in Windows 10 and works the same on Linux. Finally, hope you learn how to configure IP address with Command Prompt in Windows operating systems. If you don’t understand, please ask us about how to configure IP address with command prompt in Windows 10?
How to change DNS zone settings in Windows Server 2022?
How to Share Files Over Network (Share Permissions) on Windows 11
Deny Users Access to PC Settings and Control Panel using Group Policy
How to Add New Domain Controller to Existing Domain
I am thankful to you for your articles.
i changed my ip address and need it back
You are the greatest! I have been banging my head trying to find information on how to do this. 2 days and the only information I changed was “connected” to “not connected”, thank you so much
Your email address will not be published.
Save my name, email, and website in this browser for the next time I comment.
This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More
Welcome, Login to your account.
Recover your password.
A password will be e-mailed to you.

Home » Windows 10 » How To Set Static IP Address in Windows 10 using CMD

- How To Set Static IP Address in Windows 10 using CMD
I n this tutorial, we are going to see how to set static IP address in Windows 10 using CMD . There are several methods to set a static IP address in Windows 10. In this tutorial, we will see together how to set a static IP address from the Command Prompt.
In Windows 10, setting a static IP address for your device is an essential configuration that may be required in a number of scenarios. For example, if you plan to share files or a printer on a local network, or when you try to set up port forwarding.
Using CMD may seem difficult for some users, yet it is one of the fastest ways to assign a static IP address in Windows 10.

- IPv4 address
- Subnet mask
- Default gateway
- DNS servers

- Types of Ethernet Cable
- How to Install CAB File in Windows 10 using Command Line
- How to Change Multiple File Extensions at Once in Windows 10 Using PowerShell
- How to Make Taskbar Buttons Smaller in Windows 10
- How to Run AutoHotKey Script on Startup Windows 10
- How to Remap Keyboard Keys in Windows 10
- How to Search Files by Size in File Explorer on Windows 10
- How to Check Internet Data Usage in Windows 10
- How to Change Folder Background Color in Windows 10
- How to Turn off Location on Laptop Windows 10
- How to Disable Sleep Option from Windows 10 Start Menu
- How to Wake Up Computer From Sleep Mode in Windows 10 with Mouse
- How to Wake Up Computer From Sleep Mode in Windows 10 with Keyboard
- Batch File To Display Popup Message in Windows 10
- How to Display Popup Reminder in Windows 10
- How to See PC Startup and Shutdown History in Windows 10
- How to Record Your Screen with VLC on Windows 7/8/10
- How to Change Paging File Size in Windows 10
- How to Display Full Path in Title Bar of File Explorer on Windows 10
- How to Cancel Shutdown on Windows 10
- How to Schedule Auto Shutdown in Windows 10
- How to Schedule a Scan in Windows Defender
- How to Calculate Total Duration of Multiple Video Clips in Windows 10
- How to Fix Drag and Drop Problems in Windows 10
How to Disable Power Throttling in Windows 10
- How to Run Program as Administrator Without Password Prompt in windows 10
- How to Limit Windows Defender CPU Usage
- How to Check if Windows 10 is Activated
- How to Fix Right Click on Desktop Not Working in Windows 10
- Image Resizer on Right-click for Windows 10
- How to Change Computer Name in Windows 10
- How to Change Account Picture in Windows 10
- How to Zoom in and out in CMD and PowerShell
- How to Lock Screen After Inactivity on Windows 10
- How to Sync Computer Time With Internet in Windows 10
- Command To Check Open Ports in Windows
- How to Keep a Window Always On Top on Windows 10
- How to Increase Font Size in Windows 10
- How to Change Cursor Color in Windows 10
- How to Change Cursor Size in Windows 10
- How to Change Default PDF viewer on Windows 10
- How to Disable Security Questions in Windows 10
- How to Pin Specific Settings to the Start Menu in Windows 10
- How to Format USB Device When FAT32 Option is Not Available
- How to Automatically Open a Web Page at a Specific Time
- How to Restart explorer.exe in Windows 10 Using CMD
- How to Restart Explorer.exe in Windows 10 [2 Methods]
- How to Add Program Shortcut to Start Menu in Windows 10
- Hibernate Option Not Showing In Windows 10
- How To Delete Previous Version of Windows in Windows 10
- How to Add Print Option in Right-Click Menu
- How to Delay Startup Programs in Windows 10/8/7
- How to Disable Task Manager on Windows 10
- How to Turn on Network Discovery in Windows 10
- How to Check if Virtualization is Enabled in Windows 10
- How to Password Protect a Zip File on Windows 10
- How To Change User Folder Name in Windows 10
- How to Restore Drivers in Windows 10
- How to Backup Drivers using PowerShell Command in Windows 10
- How to Add Store Apps to Startup in Windows 10
- How to Enable Fingerprint in Windows 10
- How to Enable Autocorrect and Predictive Text in Windows 10
- How To Open a Second File Explorer Window in Windows 10
- How to Block Websites On Your Computer
- Check Disk Command in Windows 10
- How to Activate a Window by Hovering Over it with the Mouse in Windows 10
- How to Control Volume for Individual Programs in Windows 10
- How to Schedule Restart in Windows 10
- How to Change Microsoft Store Region in Windows 10
- How to Hide the Clock From Windows 10 Taskbar
- How to Enable Number Pad on Keyboard Windows 10
- How to Turn Off Taskbar Thumbnail Previews in Windows 10
- How Can I See All Drives in CMD
- How to Show All Drives in Windows 10 File Explorer
- Windows 10 Privacy Settings to Turn Off
- How to Change Desktop Icons in Windows 10
- How to Force a Program to Open in Full Screen in Windows 10
- How to Delete Temporary Files in Windows 10
- How to Enable Startup Sound in Windows 10
- How to Reset All Default Apps in Windows 10
- How to Change Default Action on Connecting a USB Device Windows 10
- How to Remove Old Drivers From Windows 10
- Where is the Drivers Folder in Windows 10
- How to Reset Windows Update in Windows 10
- How to Format USB Using CMD on Windows 10
- How To Check WiFi Signal Strength on Windows 10 Using CMD
- How to Remove “Show Desktop” Button on Windows 10
- How to Enable Remote Desktop on Windows 10
- How To Open File Explorer To “This PC”
- How to Stop the Screen From Turning Off on Windows 10
- How to Change Default Folder Name in Windows 10
- How to Display Day of Week in Windows 10 Taskbar
- How To Display Windows 10 Start Menu in Full Screen
- How to Create a New Library in Windows 10
- How to Reset the Settings App in Windows 10
- How To Disable Startup Programs in Windows 10
- How to Enable Registry Backup in Windows 10
- How to Remove Password at Windows 10 Startup
- How to Reset Windows 10 To Factory Settings
- How To Enable or Disable Night Light in Windows 10
- How to Add Clocks to Start Menu on Windows 10
- How to Disable Bing Web Search Results in Windows 10 Start Menu
- How to check Bluetooth battery level on Windows 10
- How To Find Out If a Program is 32 or 64-bit Windows 10
- How To Check Bios Firmware Version in Windows 10
- How To Activate Windows 10
- How to enter UEFI (BIOS) on Windows 10
- How to Boot From a USB Drive on Windows 10
- How to Reinstall Microsoft Store in Windows 10
- How to Enable Ultimate Performance Mode in Windows 10
- How to Stop Apps From Running in the Background on Windows 10
- How to Change Another User’s Password in Windows 10
- How to Delete Local User Account using PowerShell in Windows 10
- How to Create Local User Account using PowerShell in Windows 10
- How to Disable User Account Control (UAC) in Windows 10
- How to Block Inappropriate Websites on Windows 10
- How to Set Up a Child Account in Windows 10?
- How to Download Windows 10 ISO file (32 bits and 64 bits)
- How to Change the Default Save Location in Windows 10
- How to Add Open Command Prompt Here to right-click Menu in Windows 10
- Add Open PowerShell Window Here as Administrator in Windows 10
- How to Mount ISO Images on Windows 10
- How to Clear DNS Cache on Windows 10
- How to Change DNS Server in Windows 10
- How to Change Temp Folder Location in Windows 10
- How to Reduce the Size of the Search Bar in Windows 10
- How to Force Close a Program on Windows Without Task Manager
- How to Force Close a Program with Task Manager
- How to Speed Up Windows 10 Startup
- How to Enable Sandbox in Windows 10
- How to Disable Automatic Installation of Suggested Apps in Windows 10
- No Sounds on Windows 10? Here’s How to Fix It
- No Audio Output Device Is Installed in Windows 10 Fix
- Where is the Location of Startup Folder in Windows 10?
- How to Create a Windows 10 Bootable USB
- How To Run Computer Performance Test in Windows 10
- How To Tell If Your Computer Is 32 Or 64-bit Windows 10
- How to Remove Recycle Bin From Desktop on Windows 10
- How to Show My Computer, Recycle Bin Icon on Windows 10
- How To Enable Screen Saver In Windows 10
- How to Enable or Disable Updates For Other Microsoft Products on Windows 10
- How to Disable Windows 10 Startup Delay
- How To Open Emoji Keyboard on Windows 10
- How to Turn On File and Printer Sharing in Windows 10
- How To Optimize Windows 10 For Gaming
- How to Add Shortcuts to the “Send to” Menu in Windows 10
- How to Change the Screen Refresh Rate of Your Monitor in Windows 10
- How to Make a Program Run on Startup in Windows 10
- How to Turn Off SmartScreen in Windows 10
- How to Disable Telemetry in Windows 10
- How to Disable Windows 10 Tracking
- How to Disable Windows 10 Data Collection
- How to Free Up Disk Space in Windows 10
- Fast Way to Delete a Large Folder in Windows 10
- How to Create a Printer Shortcut on Desktop Windows 10
- How to Change Audio Output Device Per Application on Windows 10
- How to Format a Hard Drive or SSD in Windows 10
- How to Switch Between Windows in Windows 10 using Keyboard
- How to Download and Install Windows Media Player for Windows 10
- How to Create a Shortcut on Desktop Windows 10
- How to Block reopening of Programs on startup Windows 10
- How To Limit Windows Update Bandwidth in Windows 10
- How to remove the 3D Objects folder from This PC in Windows 10
- How to Remove Old User Account Pictures in Windows 10
How to Delete the Hibernation File hiberfil.sys
- How to Show Seconds in System Clock in Windows 10
- How to Open Files and Folders with Single Click in Windows 10
- How to Reset Your Microsoft Account Password for Windows 10
- How to Fix Corrupted Files in Windows 10
- How To Export And Import Start Menu Layout In Windows 10
- How to Stop Automatic Restart After Updating Windows 10
- How to Remove Ads From the Start Menu in Windows 10
- How to Create a Homegroup Network in Windows 10
- How to Disable ads in File Explorer in Windows 10
- How To Fix gpedit.msc Group Policy Editor Missing in Windows 10
- How to Change the Network Connection Priority in Windows 10
- How to Watch Videos While Working on Other Tasks on Windows 10 Computer
- How to Create a System Repair Disk in Windows 10
- How to Customize the Taskbar in Windows 10
- How to Change Taskbar Icons in Windows 10
- How to Show the Control Panel in File Explorer on Windows 10
- How to Uninstall Updates in Windows 10
- How to reset all Local Group Policy on Windows 10
- How To Turn Windows 10 Computer Into a Wi-Fi Hotspot
- How to Reset Network Settings in Windows 10 Using CMD
- How to Disable the Game Bar in Windows 10
- How to Clear Windows 10 Update Cache
- How to Create an Invisible Folder without Any Name in Windows 10
- How to Add Open With to Right-click Menu in Windows 10
- How to Change Default Apps on Windows 10
- How to Prevent Copying Files From USB to PC
- How to Find Your WiFi Password on Windows 10
How to Hide Your Name and Email Address on Windows Login
- How to Speed Up File Transfer in Windows 10
- How to Remove Power or Shutdown Button from Lock Screen in Windows 10
- How to Start Windows 10 in Safe Mode
- How to Stop Lock Screen ads in Windows 10
- How to Enable Guest Account in Windows 10 using CMD
- How to Restore Windows 10 Image Backup From Hard Drive
- How to Create a System Image in Windows 10
- How to Disable Automatic Update on Windows 10
- How to Stop Programs From Automatically Updating in Windows 10
- How to Take a Screenshot on Windows 10
- Windows 10: Start Menu And Taskbar Not Working
- How to Rebuild a Broken Icon Cache in Windows 10
- How to Turn Off Windows Security Notifications in Windows 10
- How to Preview a File Without Opening it in Windows 10
- How to Permanently Disable Windows Defender on Windows 10
- How to Disable the Action Center in Windows 10
- How To Reinstall Microsoft Edge In Windows 10
- How to Uninstall Microsoft Edge in Windows 10
- How to Change Start Menu and Taskbar Color in Windows 10
- How to Get Windows 7 Start Menu on Windows 10 with Classic Shell
- Why the Start Menu is Slow to Open in Windows 10
- How to Change Login Screen Background on Windows 10
- How to Restore Windows Photo Viewer in Windows 10
- How to Fix Screen Flickering in Windows 10
- How to Remove Windows 10’s Built-in Apps
- How to Fix Black Screen on Windows 10
- How to Remove Search Bar From Taskbar on Windows 10
- How to Disable Windows 10 Peer-to-Peer Updates
- How to Downgrade to Windows 7 From Windows 10
- How to Fix Windows 10 Start Menu And Cortana Not Working
- How to Backup and Restore Registry in Windows 10
- How to Change the Default Installation Location on Windows Using Regedit
- How to Force Restart Windows 10 with Keyboard
- How to Remove Shortcut Arrow from Desktop Icons on Windows 10
- How to Find Computer Specs on Windows 10
- How To Move Your Libraries To Another Drive in Windows 10
- How to Enable Numlock at Windows Startup
- How to Change CMD Color in Windows 10
- How To Increase Font Size In CMD
- How To Assign Letter To Drive In CMD
- How To Get MAC Address In CMD
- How to Open File Explorer Using CMD on Windows 10
- How To Run Batch File On Windows Startup
- How To Run EXE From A Batch File
- How To Run A Python Script From A Batch File
- How to Run PowerShell Script From A Batch File
- How to Run Multiple Batch Files From One Batch File
- Batch File To Copy All Files From One Folder To Another
- How To Compare Strings In Batch Files
- How To Concatenate Variables In Windows Batch File
- How To Clear A Variable In A Batch File
- For Loop Counting From 1 To N in a Batch File
- How to Run Batch File Automatically Every X Minutes
- Batch File To Get and Set System Date
- Batch File To Set Default Programs in Windows 10
- Batch File To Get Computer Name
- Batch File To Get Current Directory
- Batch File To Get Input From User
- Batch File To Get IP Address
- Batch File To Get MAC Address
- How to Add a Registry Key in a Batch File
- Batch File To Create Local User Accounts
- Batch File To Create a Text File
- Batch File To Create a Folder
- Batch File To Create Folders From a List
- Batch File To Write Ping Results To a Text File
- Batch File To Write Variable To a Text File
- Batch File To Write To a Text File
- Batch File To Read XML File
- Batch File To Read CSV / XLS
- Batch File To Read Text File Line By Line into A Variable
- Batch File To List Folder Names
- Batch File To List Folders and Subfolders
- Batch File To List Filenames in a Specified Folder
- Batch File to List All Files in a Folder and Subfolders
- How to Check Internet Connection using Batch File
- How to Check the Size of a File in a Windows Batch Script
- How To Check Batch File Error
- Batch File To Check If Folder Exists
- How to Check If a Path is File or Directory using Batch
- Batch File To Delete Folders Older Than N Days
- Batch File To Delete All Files in Folder Older Than N Days
- Batch File To Delete All Files In Folder
- Batch File To Delete A File If Exists
- Batch File To Check If Multiple Files Exist
- Batch File To Check If File Exists
- Batch File Commands List With Examples
- 8 Batch File Commands You Should Know
- How to Create a Batch File in Windows
- How to Run Batch File in CMD
- How to Run EXE File in CMD
- How to Change the MAC Address on Windows 10
- How to Create a Website Shortcut on Desktop In Windows 10
- 29 Run Commands in Windows You Should Know
- How to Ping IP Address in CMD
- How to Get IP Address Using Ipconfig in CMD
- How to Delete Folder Using CMD in Windows 10
- CMD Commands List You Should Know
- How to Change Lock Screen in Windows 10
- How to Show My Computer Icon on Desktop in Windows 10
- How to Change Compatibility Mode in Windows 10
- How to Uninstall Internet Explorer in Windows 10
- How to Add or Change Desktop Theme in Windows 10
- How to Disable Transparency Effects in Windows 10
- How to Delete and Uninstall Fonts in Windows 10
- How to Install New Fonts in Windows 10
- How to Disable Lock Screen on Windows 10 Using Registry
- How to Customize Action Center in Windows 10
- How to Disable Cortana in Windows 10 using Registry
- Battery Icon Missing From Taskbar in Windows 10 [Solved]
- How to Change Desktop Background in Windows 10
- How to Increase Battery Life of Windows 10 Laptop
- How to Turn off Notifications in Windows 10
- How to Create Keyboard Shortcuts in Windows 10
- How to Change Desktop Icon Size in Windows 10
- How to Turn On Dark Mode on Opera
- How to Turn On Dark Mode on Mozilla Firefox
- How to Turn On Dark Mode on Google Chrome
- How to Turn On Dark Mode on Microsoft Edge
- How to Enable Dark Mode in Windows 10
- How to Increase Mouse Sensitivity in Windows 10
- How to Find Which Programs are Slowing Down Your Boot Time in Windows 10
- How to Defrag the Hard Drive in Windows 10
- How to Copy and Paste Into Command Prompt in Windows 10
- How to Enable the On-Screen Keyboard in Windows 10
- How to Check Laptop Battery Health in Windows 10
- How to Use Offline Maps in Windows 10
- How to Calibrate Your Monitor in Windows 10
- How to Enable God Mode in Windows 10
- How to Increase Processor Speed in Windows 10
- How to Pin a Folder to Taskbar in Windows 10
- How to Pin a Website to Taskbar in Windows 10
- How to Switch Between Desktops in Windows 10
- How to Make Windows 10 Boot Faster
- How to Stop Windows 10 From Sleeping
- How to Set an Alarm Clock on Windows 10
- How to Go Directly to Desktop in Windows 10
- How to Create a New Folder on Windows 10
- How to Reduce Blue Light on Computer Screen on Windows 10
- How to Turn on Speech Recognition in Windows 10
- How to Sync My Settings in Windows 10
- How to Change the Screen Resolution on Windows 10
- How to Create a New User on Windows 10
- How to Turn Off Tablet Mode in Windows 10
- How to Uninstall a Program on Windows 10
- How To Change Password In Windows 10
- Top Keyboard Shortcuts in Windows 10
- How to Speed Up Windows 10 Shutdown
- How to Change Default Browser in Windows 10
- How to Disable the Lock Screen in Windows 10
- How to disable User Account Control in Windows 10
- How to Hide File Extensions in Windows 10
- How to Show Hidden Files and File Extensions in Windows 10
- How to Create a Restore Point with System Protection Enabled in Windows 10
- How to Delete Browsing History on Firefox in Windows 10
- How to Delete Browsing History on Microsoft Edge in Windows 10
- How to Delete Browsing History on Google Chrome in Windows 10

You May Also Like

Leave a Reply Cancel reply
Your email address will not be published. Required fields are marked *
Show Contents
Assign an IP address from the command-line interface
Use the set network command to configure an IP address from the command line. The set network command includes the following parameters:
- ip = device ip : The IP address for the device.
- gateway = gateway : The network gateway IP address.
- garp= seconds : The frequency of Gratuitous ARP (GARP) announcements, in seconds, which are a broadcast announcement to the network of a device’s MAC address and the IP address.
- submask = device submask : The device subnet mask for the IPaddress.
- dhcp=off : Turns off use of the Dynamic Host Configuration Protocol (DHCP), so that the IP address assigned is permanent.
- static=on : Specifies that the IP address is static, and will remain as the specified IP address, gateway, and submask.
For example:
To configure the Digi Connect SP through the command line, you must change the DIP switches. See Set DIP switches on Digi Connect SP\Wi-SP for an illustration of the DIP switch settings.
© 2022 Digi International Inc. All rights reserved. Assign an IP address from the command-line interface updated on 02 Jul 2018 01:18 PM
How to set a Static IP Address in Windows 11/10
Assign a static ip address in windows 11/10, 1] setting a static ip address via control panel, 2] assign static ip address via settings, 3] assigning static ip address via powershell, 4] assign a static ip address using command prompt, what is static ip connection, what is static ip used for.
A static IP address offers convenient remote access which makes it easier to work remotely using a Virtual Private Network (VPN) or other remote access programs. Besides, it enables more reliable communication [use Voice over Internet Protocol (VoIP) for teleconferencing or other voice and video communications].
[email protected]

Configure IP Address and DNS from Command Line
Posted in Windows 10 , Windows 7 , Windows Vista , Windows Server by Steve Sinchak

The first thing you need to identify is the name of the network interface you want to modify. You can find the names of all network interfaces by running the following command:
This will list all the interfaces available. In most cases, your wired network adapter will be called "Local Area Connection" but it may include a number at the end of the name. It is important to use the full name in the commands below and surround it with quotes if the name contains spaces.
How to set a static IP address
A static IP address can be set from the command prompt by running the netsh command at an administrative level prompt. Make sure to substitute the parameters in the command below for your environment.
"Local Area Connection" is the name of the adapter you want to modify.
"123.123.123.123" is the IP address you want to set.
"255.255.255.0" is the subnet mask.
"123.123.123.1" is the gateway.
The "1" on the end of the command is the gateway metric. You will want to leave this as 1 for almost all cases.
How to enable DHCP instead of a static IP
If you want to enable DHCP you can run:
As mentioned in the previous section, replace "Local Area Connection" with the name of the network adapter you want to modify.
How to Set Specific DNS Servers
There are two commands for DNS since administrators typically configure a primary and secondary DNS server.
For the primary DNS server run:
For the secondary DNS server run:
How to configure the network adapter to use the DNS servers provided by DHCP:
If you PC is already configured to use DHCP want to configure the adapter to use DNS from DHCP as well run the following command.
When you are finished with all of your IP and DNS changes run ipconfig -all to review the new settings.
- Kill Processes from Command Prompt
- Manage Windows Features from Command Line with DISM
- Easily Configure Basic Settings in Server Core
- Google Public DNS Makes the Web Slower
- Configure Windows 10 to Prompt for Update Installs
- How to Easily Remove Bloatware from Windows 10
- Windows 10 Maintenance: What Has Changed and What You Need to Consider
- Guide to the Windows 10 Start Menu
- Click Here for More Free Magazines, Guides and eBooks!

- Tweaks.com Logon Changer
- Enable iOS AirPrint Support on...
- Change Windows Product Key After...
- Quickly Generate Large Test Files...
- How to install Telnet with only one...
- Configure IP Address and DNS from...
- Share your entire Windows Desktop...
- Run Kali Linux on Windows 10
- Download Windows 10 20H2 (October...
Hot Deals @ DealGizmo.com

$46.99 $37.39 (20% off) Rechargeable Lighted Makeup Mirror Wall Mount Extendable Double Sided Vanity Mirror with 10X...

$80.38 $59.00 (27% off) Apple 96W USB-C Power Adapter

$12.99 $9.99 (23% off) Multi Plug Outlet Extender with USB Outlets Power Strip Non Surge Protector Electric Outlet Splitter...

$99.00 $79.00 (20% off) Apple 140W USB-C Power Adapter

$349.99 $280.00 (20% off) SteelSeries Arctis Nova Pro Wireless Xbox Multi-System Gaming Headset - Premium Hi-Fi Drivers -...

$139.99 NOBLEWELL Computer Desk with Storage Shelves 47 inch Home Office Desk with Monitor Stand Writing...

Sold Out / Pre-Order Apple 20W USB-C Power Adapter - iPhone Charger with Fast Charging Capability Type C Wall Charger

$479.97 $379.97 (21% off) Sceptre IPS 43.8 inch UltraWide 32:9 LED Monitor 3840x1080 up to 120Hz DisplayPort HDMI USB Type-C...

$699.99 $573.00 (18% off) Acer Aspire Vero AV15-51-7617 Green PC | 15.6" FHD IPS 100% sRGB-Display | 11th Gen Intel Core...

$359.80 $199.90 (44% off) ATOTO F7 XE 7inch Wireless CarPlay & Wireless Android Auto Double-DIN Car Stereo Receiver- Mirror...

- Assign a Machine to a User in VMWare View – Step 6
- How to Create Desktop Pool in VMware View – Step 5
- How to Install VMWare Horizon Agent – Step 4
- Add vCenter Server and VMWare View Composer in Horizon Connection Server 7 – Step 3
- How to Install VMWare View Composer 7 – Step 2

ITIngredients
Add Spice To Technology

How to change IP Address from command prompt
How to change ip address from command prompt.
In this post we’ll learn the steps to assign an IP address to Windows Server 2012 R2 from command prompt. We’ll use Netsh command to change an IP. IP (Internet Protocol) is an identify of your Computer. It is required for computers to communicate with teach other. There are multiple ways to change the IP address, in addition to that you can either assign static IP address to your Computer or Dynamic IP address to your Computer. DHCP Server is required if you want Dynamic IP Address to be assigned to your Server.
1. Right click on start and select the command prompt (admin).

2. On User Account Control window click on “Yes” to open command prompt.

3. Type command “ ipconfig ” to check an IP address of your computer. This shows an APIPA IP address . APIPA is “ Automatic Private IP Addressing “, this concludes that our computer is not able to communicate with DHCP Server as currently we don’t have any DHCP in our environment.

4. To assign an IP to our computer type “ Netsh “. It will show “ netsh> ” console. Then type “ Interface IP ” this will change the console to “ netsh interface ipv4 “.

5. Type the command “ set address “Ethernet0” static 192.168.1.10 255.255.255.0 192.168.1.1 “. In this command “Ethernet0” is the name of our Ethernet Adapter. As we are assigning static IP address therefore we need to mention an IP address and a subnet mask. 192.168.1.10 is an IP address that we want to assign and 255.255.255.0 is a subnet mask. In addition to IP we are also assigning Gateway to this computer after subnet mask we can define the gateway which is 192.168.1.1 in this example.

6. Moreover we need to define DNS information. Type a command “ set dnsservers “Ethernet0” static 192.168.1.10 primary ” to define the primary DNS. Here, “Ethernet0” is the name of our network adapter and 192.168.1.10 is the IP of DNS.

7. Type “ Exit ” to exit from netsh interface ipv4 console.

8. Type “ ipconfig /all ” to verify that static IP address, subnet mask, default gateway and DNS server IP is assigned.

If you are not fond of commands then you can change IP address from GUI .
Related articles:
- How to promote Domain Controller
- Change IP address using GUI mode
- How to rename computer
- ← How to Change IP Address in Windows Server 2012 R2 (GUI)
- How to promote Domain Controller 2012 R2 →
How to Assign Static IP Address to Your Devices

By default, your router assigns dynamic IP Address to every device that connects to it. This is called DHCP (short for Dynamic Host Control Protocol). But sometimes, we need our devices to have the same IP address (i.e. Static IP) every time it connects to the network. Reason being,
- Access your computer from the Internet.
- Share data between two devices on the same network.
- Quickly access your Network Printer or NAS.
- Use your computer as a media server.
- Or your work WiFi requires you to use Static IP address.

What IP address should you choose?
If two devices on the network have the same IP address, then there will be conflicts. The Internet won’t work on one of them or both, depending on your router. So, it’s important to assign a unique IP address to your computer. There are a couple of ways to pick an unused IP address.
For instance– first find your device’s IP address , say it’s 192.168.1.7 ; then keep the first three values (i.e. 192.168.1) as it’s and replace the last digit with some far number like 192.168.1.222 . Though make sure the last digit should be between a 0-255 range.
Assigning Static IP address to most devices is easy, just go to its network settings, look for DHCP option and turn it OFF. Once you do that, you’ll see a text area to enter Static IP address. Enter the new IP address there, save changes and that’s it.
So let’s see how to Assign Static IP address to various Operating Systems
1. Assign IP Address on Windows 10/8/7
You can do this quickly through the command line. You will need to first find your subnet mask, default gateway, and network adapter name. In my case, I’m on a Wi-Fi network, so the adapter name is Wi-Fi. To find yours just type the following command.
Once you get the output, find for the Network Adapter which has IP listed under it. The adapter name is a one-word name suffixed to the end of the Network Title. You will also need the Subnet mask and the Default Gateway Address.

Once you have the adapter name, Subnet Mask and Default Gateway, run the following command.
Wherein, Wi-Fi should be replaced by your adapter name and the IP, subnet mask and gateway address according to your configuration.

This will change your IP address from DHCP to manual with the static IP address you have specified.
In case you find it too confusing, you are not alone. You can do the same via GUI which is much more intuitive. You’ll need the Subnet Mask and Default Gateway Address . You can refer to the above step on how to find these details. Once you have noted down the address, click on Start Menu and type in Network and Sharing Center. Click once you see the Network and Sharing Center Icon.

Alternatively, if you are in Windows 10 then you can right-click on the Start menu and click on “ Network Connections “.

A new window will open, click on Change Adapter Options.

Right Click on your Current Network Adapter ( like WiFi) and choose Properties.

When the new window pops up, select Internet Protocol Version 4(TCP/IPv4) and click on Properties.

Once you get the pop-up window, select “ Enter the IP address you want ” and fil the IP Address, For Subnet Mask , and Default Gateway Address enter the values that you have noted down previously. Next, click on OK to save changes.

To switch to dynamic IP, click on Obtain the IP address automatically. Once this is enabled, your system will start picking an IP address dynamically from the router.
2. How to setup static IP on Ubuntu
On Ubuntu, you can set a static IP Address via the terminal or GUI. Firstly, let’s start with the command line. Right-click anywhere on the desktop to open the terminal.

Once the terminal window opens, we need to run a command. We need the subnet mask and network adapter name in order to set a static IP and to get that, run the following command on the terminal.

Once you have the subnet mask noted down, in my case, it’s 255.255.255.0, we can proceed further.
It is pretty simple and straight forward. We need to open the Network Adapter settings. To do that, click on the Network Icon at the top right corner of the desktop.

Now, navigate on the active network and click on the expand button for more options. Click on Wired Settings to open the Network menu.

Once you get the Wired Settings dialogue, make sure you are on the Network page. Click on the Settings icon beside the active network to open the adapter properties.

When you get the pop-up, navigate to the IPv4 tab to change the IP settings.

On the IPv4 tab, select the radio button which says “ Manual “. Some text fields will appear, you need to enter the IP address, Netmask and Gateway accordingly. Once it is validated, you can click on the Apply button to register the changes.

Again you need to restart the network for the changes to take effect. You can do it manually via command line or just switch off and switch on the Network adapter. Once done, run ifconfig on the terminal to check the IP address. It should be the same IP address which you have specified earlier.

3. How to setup static IP on Mac
If you are on macOS, setting static IP is quite similar to that of Ubuntu. But, here you don’t need the subnet mask or Default Gateway Address. Right click on the apple icon at the top left corner of the desktop. Click on System Preferences from the dropdown list.

Once the System Preferences dialogue box displays, navigate to Network and click on it to open the Network Settings

Alternatively, you can also hit Cmd+Space to trigger the Spotlight search. Type “ Network ” in the search bar and click on the icon once it appears. This will directly navigate you to the Network Settings.

From the pop-up window, select an active network interface. For example, I am connected to a WiFi network so my active network is Wi-Fi. Make sure you are on the active network tab and then click on Advanced .

A new window will open the configuration settings for that adapter. Move over to the IP settings by clicking on the TCP/IP tab .

From the Configure IPv4 menu, choose Using DHCP with manual address. Enter a static IP address in the IPv4 Address and leave the Subnet Mask and Router field as default. Click Ok to save the changes.

Now when you do an ifconfig, the system should be using the static IP you have defined in the previous times. If the IP’s have not changed, try restarting the Wi-Fi and it should fix it.
To switch back to dynamic IP, move back to “ Using DHCP ” from the Configure IPv4 menu.
4. How to setup static IP on Android

The network which you are connected to should be on top of the list. Tap on the settings icon beside the Wi-Fi network name.

Once the pop-up opens, you will see IP settings at the bottom of the menu. The default option is “DHCP”. Tap on it to change the IP configuration.

Select “ Static ” from the presented drop-down menu. Enter the desired IP address and leave the other options as default. Make sure that other devices are not using the same IP. You can see the IP address of the other devices in your network by using a small utility called Fing . For a detailed process, check our article on how to find the IP Address of any Device on your network . Once you have entered the IP, click on Save to register the change. Now, your Android phone should start using the desired IP Address.

In almost all the Android version, you get the option to set static IP Address. For some rare older Android versions, you can use a third-party app like WiFi Static . It’s free and it doesn’t require ROOT.
To switch back to dynamic IP, repeat the same procedure and select “DHCP” from the IP settings instead.
5. How to setup static IP on iPhone and iPad
If you are using an iPhone or iPad, then you can set static IP Address natively. You would need the Subnet Mask of your network. This can be obtained from the Wi-Fi settings and we would see to it in the further steps. To get started, click on the Settings icon in the dock to get to the Settings menu.

Now on the Settings menu page, tap on Wi-Fi to get to the Wi-Fi settings.

On the Wi-Fi page, you should see your connected Wi-Fi network at the top. Click on the “i” button beside it. This will open the Wi-Fi configuration window.

Once the Wi-Fi settings page appears, you will see an option called “ Configure IP “. By Default, this would be set to automatic. Just below this option, you will see “ Subnet Mask “, note it down as we will need it in the further steps. In order to set static IP, we need to change Configure IP it to Manual. Tap on it and it will open the IPv4 settings page.

There should be 3 options available on the “Configure IPv4” page. Select “ Manual ” from it. As soon as Manual IP is enabled, you will get extra text fields at the bottom to enter the IP Address, Subnet Mask, Router. We need to fill in the IP Address of our choice and Subnet Mask which we noted down in the previous step. Now, after you fill both the fields, the save button at the top right corner will be enabled. Click on it to save the static IP configuration.

Now, when you return to the Wi-Fi settings page, you will see your device is using the Static IP address. This should be the same IP address we have set in the IP configuration menu.

This static IP address will be applicable only to that particular Wi-Fi network. In case, you connect to some other Wi-Fi network the IP will change accordingly.
6. How to setup static IP to any Device from Router
Other network devices like your Wireless Printer, PS4, NAS, IP Camera, Raspberry Pi , etc. do not have an Interface. Hence, in order to configure the network, either you have to connect remotely or use the router. If you have access to the router, setting Static IP for network devices is the easiest and convenient way. I would recommend this method over any other.
So, to assign a Static IP Address to any network device, you need to login to the web portal of the router. The web portal address, username, and password are mostly printed behind the router. In case you don’t have physical access to the router, the web portal URL is mostly the PC’s gateway address. To find that, open command prompt and type the following command.
Once you have the web portal loaded, log in with the credentials. Now every router has a different web UI, but the overall structure is the same. Basically, you will have to link the IP Address to the Mac Address and Hostname of the device. So, we need to find the MAC address & Hostname of the network device. To do that, look for DHCP client list which should look something like the following screenshot.

You can get your MAC Address & Hostname under DHCP Client list. Once, you have the MAC address & Hostname noted down, we can proceed further. On most of the routers, you will have the option to set a Static IP under the section IP Mac binding or DHCP Static IP option. In case you are on a custom ROM like dd-wrt, head over to Services tab and you will have DHCP Server . Under DHCP Server, add an entry for Static Leases by clicking on the Add button.

Clicking on the Add button will create a new row. You have to enter the MAC Address, Hostname, desired Static IP and Lease time . Lease time is a unit in minutes after which your IP will be renewed. Since we are adding only 1 entry for the particular host the IP will be the same even after the renewal. Once, done click on Save changes .

Once you have configured successfully on the router, just restart the Wi-Fi on the device. When it connects it should start using the static IP. In case of issues, make sure that you have the correct MAC Address and Hostname. To check, just run the command ipconfig or look back again in the router’s DHCP client list.

These changes are written to the ROM so restarting the router won’t make changes to the static IP configuration. In order to get back to Dynamic IP, just remove the entry from the IP leases.
What’s next
Once you have started configuring the IPs on Router and network devices, you are good to go configure telnet and SSH. Have a look at our brief article on How to Enable Telnet Server in Windows 10 , Best SSH clients for iOS To Manages Remote Servers and 6 Best FTP Clients For Android . A word of caution would be to note down the static IPs assigned to devices as assigning the same IP to two network devices would render them useless.
Also Read: How To Change DNS on Windows|Mac|Android|iOS
Mrinal Saha
Mrinal is a tech geek who spends half of his day reading and writing about tech. While the nights are spent on shooting or editing YouTube videos. Feel free to geek out with him on-
You may also like
How to sign out of amazon on all..., how to setup youtube premium family plan, how to see saved items on facebook marketplace, how to get microsoft teams status change notifications, how to add paid partnership label on instagram..., 25 things you can do with chatgpt, how to add, edit, reorder or delete experience..., top 8 ways to fix snapchat story sound..., 5 best ai art and image generators that..., how to remove titles from continue watching list....
How to configure a static IP on Windows 10 or 11
Do you need to switch from a dynamic to a static IP address configuration on Windows 11 or 10? Here's how.

- Windows 11 static IP
- Windows 10 static IP
On Windows, the router's Dynamic Host Configuration Protocol (DHCP) server is (usually) responsible for assigning a dynamic Transmission Control Protocol/Internet Protocol (TCP/IP) configuration to every device in the network, including to your computer running Windows 11 or Windows 10.
Although a dynamic IP address is the recommended configuration for most situations, you may need to change to a static IP address if you're thinking about setting up a printer or file sharing, or you have to configure port forwarding on the router to your computer.
The reason is that a dynamic network configuration can change at any time after the lease from the DHCP expires and if the address changes, network resources you may have configured will stop working. Setting a static IP address will always stay the same on the computer, allowing a more reliable experience sharing resources in the network or forwarding ports.
Whatever the reason, on Windows 10 and 11, you have many ways to configure a static TCP/IP address, including using the Settings app and Command Prompt.
This guide will walk you through the different ways to configure a static network configuration on Windows 11 and 10.

How to set a static TCP/IP network configuration on Windows 11
On Windows 11, you can change your computer's dynamic IP configuration to static in at least two ways through the Settings app or commands.
Configure IP from Settings app
To assign a permanent TCP/IP configuration on Windows 11, use these steps:
- Open Settings .
- Click on Network & internet .
- (Optional) Click on Advanced network settings .
- Under the "More settings" section, click on Hardware and connection properties.
- Note the current IPv4 , Subnet mask , Default Gateway , and DNS server addresses to determine the new configuration, as it has to be in the same network scope.
- Click the Ethernet or Wi-Fi page on the right side from the "Network & internet." page.
- Quick note: If you select the Wi-Fi page, you need to click on the connection properties to access the network settings.
- Click on the Edit button for the "IP assignment" setting.
- Select the Manual option from the drop-down menu.
- Turn on the IPv4 toggle switch.
- Confirm the IP address for the computer – for example, 10.1.4.90.
- Confirm the subnet mask for the configuration – for example, 255.255.255.0.
- Confirm the default gateway address (usually your router's IP) – for example, 10.1.4.1.
- Confirm the preferred DNS address – for example, 10.1.4.1.
- Quick note: In a home network, you may also be able to use the router's IP address for the DNS configuration. You can also use third-party DNS services like Google Public DNS, Cloudflare, Cisco's OpenDNS, and others.
- (Optional) Select the "On (automatic template)" option for the "DNS over HTTPS" setting and leave the "Fallback to plaintext" option disabled unless you want to encrypted as well as unencrypted traffic or you're troubleshooting connectivity.
- Quick note: DNS over HTTPS (DoH) is a feature that encrypts the DNS queries over the HTTPS protocol to improve security and privacy on the internet. You only want to enable this feature if the DNS server supports this feature.
- Confirm the alternate DNS address (if applicable).
- (Optional) Select the "On (automatic template)" option for the "DNS over HTTPS" setting and leave the "Fallback to plaintext" option disabled.
- Click the Save button.
Once you complete the steps, the computer will start using the static network configuration. If everything has been configured correctly, you should be able to open the web browser to access the internet.
If you entered an address (such as the DNS address) and then changed it, you probably won't be able to save the settings. If this is the case, cancel the configuration, start over, enter the correct configuration, and then try to save the settings.
Configure IP from Command Prompt
To set a static TCP/IP configuration on Windows 11, use these steps:
- Open Start .
- Search for Command Prompt , right-click the top result, and select the Run as administrator option.
- Type the following command to see your current networking configuration and press Enter : ipconfig /all
- Confirm the name of the adapter and the networking configuration, including the IPv4 , Subnet mask , Default Gateway , and DNS Servers .
- Type the following command to configure a static TCP/IP address and press Enter : netsh interface ip set address name= "ADAPTER-NAME" static IP-ADDRESS SUBNET-ADDRESS DEFAULT-GATEWAY-ADDRESS
In the above command, replace ADAPTER-NAME with the name of your network adapter. Change IP-ADDRESS SUBNET-ADDRESS DEFAULT-GATEWAY-ADDRESS with the device IP address, subnet mask, and default gateway addresses you want. For example, this command sets the 10.1.4.90, 255.255.255.0, 10.1.4.1 configuration: netsh interface ip set address name="Ethernet 10Gb" static 10.1.4.90 255.255.255.0 10.1.4.1
- Type the following command to set a DNS server address and press Enter : netsh interface ip set dns name="ADAPTER-NAME" static DNS-ADDRESS
In the command, change ADAPTER-NAME with your adapter's name and DNS-ADDRESS with the DNS server address of the network. For example, this command sets the local router as the DNS server: netsh interface ip set dns name="Ethernet 10Gb" static 10.1.4.1
- Type the following command to set an alternate DNS server address and press Enter : netsh interface ip add dns name="ADAPTER-NAME" DNS-ADDRESS index=2
In the command, change ADAPTER-NAME with the adapter's name and DNS-ADDRESS with an alternate DNS server address. For example, netsh interface ip add dns name="Ethernet 10Gb" 1.1.1.1 index=2
After you complete the steps, the commands will set a static network configuration on Windows 11.
How to set a static TCP/IP network configuration on Windows 10
On Windows 10, you can also use the Settings app and Command Prompt to set up a static IP network configuration.
To assign a permanent TCP/IP configuration on Windows 10, use these steps:
- Click on Ethernet or Wi-Fi .
- Click on the active connection on the right side.
- Click the Edit button for the "IP assignment" setting.
- Select the Manual option.
- Confirm the subnet prefix length (subnet mask) for the configuration – for example, 24 to specify the 255.255.255.0 subnet mask.
- Quick tip: It's important to use the number that represents the network instead of the subnet mask. Otherwise, the configuration won't save. If you don't know the subnet prefix length for your subnet mask, you can use any online subnet calculator (opens in new tab) to find out.
Once you complete the steps, Windows 10 will start using the static IP configuration. If you lose network connectivity, restart the computer to regain access to the local network and internet.
To change from dynamic to static IP address with commands on Windows 10, use these steps:
In the command, change ADAPTER-NAME with your adapter's name and DNS-ADDRESS with the DNS server address of the network. For example, this command sets the local router as the DNS server: netsh interface ip set dns name=" Ethernet 10Gb" static 10.1.4.1
In the command, change ADAPTER-NAME with the adapter's name and DNS-ADDRESS with an alternate DNS server address. For example, netsh interface ip add dns name="Ethernet0" 1.1.1.1 index=2
After you complete the steps, the network configuration will switch from dynamic to static on Windows 10.
Windows Central Newsletter
Get the best of Windows Central in your inbox, every day!
Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.
Thank you for signing up to Windows Central. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.
- 2 Destiny 2 Lightfall: How to get Terminal Overload keys
- 3 Fantasy MMO Pax Dei is coming to PC and cloud gaming platforms
- 4 Hi-Fi Rush has attracted two million players on Xbox and PC
- 5 The Wolf Among Us 2 delayed out of 2023 to keep from crunching
To work with the site requires support for JavaScript and Cookies.
Change ip address in windows via command prompt.
To see a list of interfaces:
To set/change an address:
Where "Ethernet" is the name of the interface, 10.0.0.100 is the IP address, 255.255.0.0 is the subnet mask, and 10.0.0.1 is the default gateway.
In Windows, you can use the netsh command to edit network interfaces. To see a list of network interfaces on your system (including copies or disabled adapters), type in the following:
To see a list of NICs with their configured network settings, type in the command below:
To set a static IP, run the netsh command with the following format:
So, for example, if you need to set the IP address on Local Area Connection 3 to 10.0.0.100 (with a /16 subnet mask and a 10.0.0.1 default gateway), you would enter the following:
If you are setting a static IP for the first time, you will also need to configure a DNS server:
To change the connection back to DHCP, run the following:
- Buying Guides
Complete Guides by How-To Geek
Our latest product roundups, reader favorites, more from how-to geek, latest geek news, latest reviews, across lifesavvy media.
Join 425,000 subscribers and get a daily digest of news, geek trivia, and our feature articles.
By submitting your email, you agree to the Terms of Use and Privacy Policy .
How to Quickly Add Multiple IP Addresses to Windows Servers
Read more...
If you have ever added multiple IP addresses to a single Windows server, going through the graphical interface is an incredible pain as each IP must be added manually, each in a new dialog box. Here’s a simple solution.

Needless to say, this can be incredibly monotonous and time consuming if you are adding more than a few IP addresses. Thankfully, there is a much easier way which allows you to add an entire subnet (or more) in seconds.
Adding an IP Address from the Command Line
Windows includes the “netsh” command which allows you to configure just about any aspect of your network connections. If you view the accepted parameters using “netsh /?” you will be presented with a list of commands each which have their own list of commands (and so on). For the purpose of adding IP addresses, we are interested in this string of parameters:
netsh interface ipv4 add address
Note: For Windows Server 2003/XP and earlier, “ipv4” should be replaced with just “ip” in the netsh command.
If you view the help information, you can see the full list of accepted parameters but for the most part what you will be interested in is something like this:
netsh interface ipv4 add address “Local Area Connection” 192.168.1.2 255.255.255.0
The above command adds the IP Address 192.168.1.2 (with Subnet Mask 255.255.255.0) to the connection titled “Local Area Network”.
Adding Multiple IP Addresses at Once
When we accompany a netsh command with the FOR /L loop, we can quickly add multiple IP addresses. The syntax for the FOR /L loop looks like this:
FOR /L %variable IN (start,step,end) DO command
So we could easily add every IP address from an entire subnet using this command:
FOR /L %A IN (0,1,255) DO netsh interface ipv4 add address “Local Area Connection” 192.168.1.%A 255.255.255.0
This command takes about 20 seconds to run, where adding the same number of IP addresses manually would take significantly longer.
A Quick Demonstration
Here is the initial configuration on our network adapter:
ipconfig /all
Now run netsh from within a FOR /L loop to add IP’s 192.168.1.10-20 to this adapter:
FOR /L %A IN (10,1,20) DO netsh interface ipv4 add address “Local Area Connection” 192.168.1.%A 255.255.255.0
After the above command is run, viewing the IP Configuration of the adapter now shows:
- › How to Optimize Your Steam Deck for a Longer Lasting Battery
- › We Let ChatGPT Create AI Art, Here’s What It Made
- › Alienware Has New Gaming Keyboards, Mice, Monitors, and More
- › E-Win Champion Series CPG Fabric Gaming Chair Review: It Gets the Job Done
- › Should You Buy a Projector for Gaming?
- › The Best PS5 Accessories of 2023
How to set a static IP address on Windows 11
Here are the steps to set a static IP address on Windows 11 with Command Prompt, PowerShell, Control Panel, and Settings.
UPDATED 11/2/2022: On Windows 11, a static IP address is a network configuration that never changes, making it the preferred option to share files , a printer on a local network , or configure port forwarding.
Usually, when a computer connects to the network, it receives a dynamic IP address assigned by the local Dynamic Host Configuration Protocol (DHCP) server. The only problem is that this configuration can change at any time, as soon as you restart the computer or after the settings expire, and this can cause services like port forwarding and remote desktop to stop working. A static network configuration always maintains the same settings, making it ideal for hosting services that other users can access through the network.
This guide will teach you the steps to set a static IP (version 4) address on Windows 11 . (See also this video tutorial with the steps to complete this task.)
Assign static IP address on Windows 11 from Command Prompt
Assign static ip address on windows 11 from powershell, assign static ip address on windows 11 from settings, assign static ip address on windows 11 from control panel.
To set a static IP address on Windows 11 with Command Prompt, use these steps:
Open Start on Windows 11.
Search for Command Prompt , right-click the top result, and select the Run as administrator option.
Type the following command to see your current networking configuration and press Enter :
Under the network adapter, note the name of the adapter as well as the following information in these fields:
- Subnet mask
- Default Gateway
- DNS Servers

Type the following command to assign a static IP address on Windows 11 and press Enter :
In the above command, replace Ethernet0 with the name of your network adapter. Change 10.1.4.119 255.255.255.0 10.1.4.1 with the device IP address, subnet mask, and default gateway address corresponding to the local area network.
Type the following command to set a DNS server address and press Enter :
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.
Type the following command to set an alternate DNS server address and press Enter :
In the command, change Ethernet0 with the adapter’s name and 8.8.8.8 with an alternate DNS server address.

After you complete the steps, you can use the ping command (for example ping google.com ) to see if the configuration is working correctly.
You can use PowerShell with the “NetTCPIP” module to manage networking settings, including changing the IP address settings to a static configuration.
To set a static IP address with PowerShell, use these steps:
Open Start .
Search for PowerShell , right-click the result, and select the Run as administrator option.
Type the following command to view your current network configuration and press Enter :

Confirm the following network information:
- InterfaceIndex
- IPv4Address
- IPv4DefaultGateway
Type the following command to set a static IP address and press Enter :

In the command, replace the InterfaceIndex number (10) 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.
Type the following command to assign a DNS server address and press Enter :

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 (10) with your network adapter’s corresponding number. Also, change ServerAddresses with the DNS IP address.
Once you complete the steps, the new network configuration will apply to the computer.
Regardless of your chosen method, always assign a TCP/IP address in the network range and outside of the DHCP server scope to allow proper connectivity and avoid configuration conflicts. The reason is that multiple computers sharing the same address will cause problems, preventing them from connecting to the internet.
On Windows 11, you can set a static IP address configuration from the Settings app for wireless and wired adapters.
Set static IP address on Wi-Fi adapter
To assign a static IP address configuration to a Wi-Fi adapter, use these steps:
Open Settings on Windows 11.
Click on Network & Internet .
Click the Wi-Fi tab.

Select the current network connection.

Under the “IP settings” section, click the Edit button.

Select the Manual option.

Turn on the IPv4 toggle switch.
Set a static IP address for Windows 11 – for example, 10.1.4.119 .

Specify a Subnet mask – for example, 255.255.255.0 .
Specify a Default Gateway address.
Specify a Preferred DNS address (required).
(Optional) Specify an “Alternate DNS” address.
Use the “DNS over HTTPS” drop-down menu and select the Off option for the preferred and alternate addresses, but you can enable DoH with these options:
- Off: Transmits all DNS traffic without encryption.
- On (automatic template): Sends all DNS traffic with encryption.
- On (manual template): Allows you to specify a specific template. Only required if the DNS service doesn’t work automatically or has a template that works as expected.
Turn off the “Fallback to plaintext” toggle switch (if you enable DoH).
Click the Save button.
Once you complete the steps, the static network configuration will apply to the computer. You can test the new settings by opening the web browser and loading a website.
Set static IP address on Ethernet adapter
To assign a static IP address to an Ethernet (wired) adapter on Windows 11, use these steps:
Open Settings .
Click the Ethernet tab.

After you complete the steps, you can test your settings using your web browser to open a website.
On Windows 11, you can still use Control Panel to change the IP settings for Ethernet or Wi-Fi adapters.
To assign a static IP configuration through Control Panel, use these steps:
Open Control Panel .
Click on Network and Internet .
Click on Network and Sharing Center .
Click the Change adapter settings option on the left navigation pane.

Right-click the network adapter and select the Properties option.
Select the “Internet Protocol Version 4 (TCP/IPv4)” option.
Click the Properties button.

Select the “Use the following IP address” option.
Assign the static IP address – for example, 10.1.4.119 .

Specify a Subnet mask . Typically, on a home network, the subnet mask is 255.255.255.0 .
Specify a Default gateway address – for example, 10.1.4.1 (Usually, your router’s address).
Under the “Use the following DNS server addresses set Preferred DNS server” section, set the “Preferred DNS server address,” which is usually your router’s IP address or server IP address providing DNS resolutions (for example, 10.1.4.1 ).
(Optional) Specify an “Alternative DNS server,” which the computer will use if it cannot reach the preferred DNS server.
Click the OK button.
Click the Close button again.
Once you complete the steps, you can open the web browser and load a website to see if the configuration works.
If you want to revert the changes, you can use these instructions to remove the static settings to configure a dynamic IP address on Windows 11.
- Windows 11 build 25227 brings Start and Widgets visual changes
- How to disable flashing apps in Taskbar on Windows 11
We hate spam as much as you! Unsubscribe any time Powered by follow.it ( Privacy ), our Privacy .

How to set static IP Address in Windows 11 ( Three easy ways )
When you connect to a network, your device automatically gets an IP address from the DHCP server. However, you are also able to assign an IP address to your PC manually. So stay with me till the end of the session; I will show you how to set a static IP address in Windows 11.
IP, or in a full form Internet Protocol address, is a unique identification number separated by dots or periods and is used to let the devices communicate with each other on the network.
The dynamic IP address often changes from time to time. On the other hand, the static IP address does not change until you change it manually. If you have a remote connection or set your computer as a server, the static IP address works much better than the dynamic one.
In the following article, I will assign a static IPV4 address to my PC running Windows 11 using the Settings app, Control Panel, and Command Prompt.
Related : How to find MAC Address in Windows 11
First method: Set the static IP address on Windows 11 from the settings
The first easy way to configure your PC’s IP address is via the setting app. But first of all, you need to find out the current configuration of your networks, like the default gateway address and name of the adapter, because you will need those details later.
Open Command Prompt and write IpConfig and enter.

Now that you have taken note of your current network configuration follow the steps below to change your computer’s IP address.
- Open the Settings app from Start Menu or press Windows + I buttons.
- Alternatively, right-click on the Network icon in the taskbar and click on the Network and Internet settings .
- In the Network and Internet page, click on the properties .

- Scroll down and click on the Edit button in front of the IP Assignment.

- A small window pops up; change the Automatic (DHCP) to Manual. Now select which types of IP version you want to assign to your computer.

- Here I turn on the IPV4 and set my static IP address (192.168.1.10), Subnet mask (255.255.255.0), default gateway (192.168.43.1), and preferred DNS (8.8.8.8).

Note : The Default Gateway must be the same address you received from your ISP. The DNS address can be the address of any DNS server. People mostly use the DNS server of google, which is 8.8.8.8. Additionally, make sure to set an IP address out of DHCP scope.
- After you set the static IP address, default gateways, and DNS address, click on the Save button. You will be disconnected for a short period, and soon you will reconnect.
Second Method: Assign a static IP address from the Control Panel
The Control Panel is the second method to set a static IP address on your PC.
- Open the Control panel and click on the Network and Internet.

- Click on the Network and Sharing Center.
- In the Network and Sharing Center windows, click on the active network you want to change their IP address.

- In the Wi-Fi status window, click on the properties.

- Select the Internet Protocol Version (TCP/IP4) and click on the properties.

- Select the radio button ‘Use the following IP address and enter the desired IP address, subnet mask, and gateway. Additionally, set static DNS address as well.

- After you have assigned all the addresses, click the OK button.
That is it! Using the Control Panel, you successfully assigned a static IP address to your computer.
Third method: How to set static IP address with Command Prompt
Another easy and quick way to configure your PC’s IP address is from the Command Prompt.
- Run the command prompt as administrator from the Start Menu or search box.
- If you do not know the default gateway and current network configurations, write the IPConfig /all command to see the current configuration and take note of them.
- Now write the following command and enter.
Netsh Interface IP set address name =" Network Name" static NewIPAddress Subnet Mask Default gateway

Remember! Write the name of your network instead of the ‘Network Name.’ Your IP address must not be in the scope of the DHCP server. The default gateway address must also be the same as the ISP address.
- You assigned the static IP address successfully. Now let’s assign a static DNS address for the DNS server.
Netsh interface IP set DNS name =" Network Name" static DNS Address

To conclude, the above paragraphs discussed the IP configuration in Windows 11 and 10. I hope you enjoyed it and can share your thoughts and questions in the comment section.
Related: How to backup and restore full system in Windows 11?
Related Posts

The 8 best new Windows 11 features you should use
How to show wifi password in windows 11 (easy ways).

How to set static IP address and DNS Server using Command Line in Windows 10
Repeatedly having to change your Static IP address when shifting from one network to another can be a pain in the neck. The process is lengthy on Windows 10 and…
Repeatedly having to change your Static IP address when shifting from one network to another can be a pain in the neck. The process is lengthy on Windows 10 and a bit irritating. If you are the person who needs to switch between IP addresses, then this article is for you.
Here we shall show you how you can configure your system’s IP address directly through the command line interface on your Windows 10 platform. It is very less time consuming and can be done in a few steps.
Table of contents
How to check Interface Index using PowerShell
How to set static ip address using command prompt, how to set dns address using command prompt, how to set static ip address using powershell, how to set dns address using powershell, closing words.
The IP address is a unique identifier of your machine that lets every other component on the network know where the packets need to be routed to. Since it is unique, it cannot conflict with another IP address on the same network.

You can manage your IP address by both the Command Prompt and the PowerShell, which shall be discussed further in the article.
If you are looking for a way to instantly switch between different network profiles, you can make use of NetSetMan 5 .
The Interface Index is a unique number assigned to either a physical or virtual networking port. Each port is assigned a number that is used to address the respective port on the machine. For example, if there are 5 different networking adapters on a computer, each one would have its own Interface Index.
To check the associated Interface Index for each, run the following command in PowerShell with administrative privileges :

In the example above, the “ifIndex” is identified as the Interface Index. Note that the ports are repeated as the first half represents IPv6, while the 2nd half represents IPv4 configuration. Nonetheless, the Interface Indexes of the same ports are the same.
Note down the associated Interface Indexes as they will be required when assigning static IPs through PowerShell.
These commands are relatively easier with the Command Prompt when compared with PowerShell . You can change the IP address of your computer using this quick command.
Launch the Command Prompt with administrative privileges and then use the command below to assign the desired IP address configuration:
In the above command, you need to place the information according to your requirement. Replace NameOfPort with the alias name of the network adapter you wish to set the IP of. Also, replace [IP address] with the IP address of the port you wish to assign, replace [Subnet mask] with its subnet, and replace [Default gateway] with the gateway of the adapter.
Here is an example:
Since the name of my port is “Ethernet,” entering the command above would result in the following configuration:

As you may have noticed above, we did not set up the DNS. This is because you need to enter a separate command to configure the DNS, which is as below:
This will set the first DNS entry as 8.8.8.8. Note that this will only occur if the port can communicate with the DNS. Else it will throw an exception.
The above command would result in something like this:

To change the second DNS server, use the following command:

Remember to change the port name, IP address, gateway, and subnet mask according to your requirement.
Each time you need to switch between your IPs and DNSs, use these commands, and it will automatically overwrite the previous entering.
Although the PowerShell command lines are more complex than those of the Command Prompt, they also offer more parameters to be addressed. However, we will try and keep it as plain and simple as possible.
Before we proceed further, you need to understand some terms to enter the correct parameters. Below are a few arguments and their descriptions used in PowerShell to set static IPs and DNS entries.
Now, modify the following command according to your needs, launch Windows PowerShell with administrative privileges and enter the command:

Note that we determined the correct Interface Index using the command we had discussed earlier in the article. This is what the IP configuration of the port would look like after running the command above:

You can also use PowerShell to assign DNS addresses as well quickly. In the example below, we have assigned both the primary and the secondary DNS addresses to our port simultaneously.

You may repeatedly use these commands in PowerShell to overwrite new IP address, subnet mask, gateway and DNS entries of any network port you want on your PC.
Now you do not need to worry about switching from one network to another. You can make the process even quicker by saving the respective IP configuration on your PC and copy-pasting it to the command line when required to switch.
If, however, you run into a problem associated with your computer network, you may use this guide to reset the TCP/IP stack .
Related posts:
- How to Change Network Priority in Windows (Ethernet + Wifi Networks)
- How To Find And Close Listening Ports In Windows 10
- How to Set Up Remote Desktop Over the Internet on Windows 10
- 3 Ways to Access Network Path Using Command Line in Windows 10
- 4 Ways To Forget Wi-Fi Network Profile In Windows 11/10
- How To Install & Use Active Directory Users And Computers (DSA.msc) Snap-In On Windows 11/10
- How To Merge Folders And Files In Windows 11, 10
- 6 Ways To Run App/Program As Different User (RunAs) In Windows 11/10
Filed under:
This article covers:
Subhan Zafar
Subhan Zafar is an established IT professional with interests in Windows and Server infrastructure testing and research, and is currently working with Itechtics as a research consultant. He has studied Electrical Engineering and is also certified by Huawei (HCNA & HCNP Routing and Switching).
Pradip Shah
I have been using netsh for more than 10 years now to switch between 2 ISP’s services. My only problem was the jokers at MS kept changing command line switches with every version of Windows. XP -> 7 -> 10. Why is something beyond me.
Forgot to mention that I religiously avoid using power shell & work only with “Take Command” from JPSoft.
How to Configure IP Address with Command Prompt in Windows 10?

Configuring IP address in a Windows with CMD performed using netsh command line utility. The network shell ( netsh ) is a set of commands that help you configure any Windows operating system IP address, Network Interfaces, and Windows Firewall. The usage of the command line is for pro level Windows users. Those who are playing the network infrastructure configuration. But using the command line as normal Windows user indicate your expertise to Windows environment. If you are new to Windows command line, this article “configure IP address with command prompt in Windows 10” will help you begin using command line interface.
Configuring Windows IPv4 Networking with Netsh or Network Shell. Netsh is a command-line utility included in Microsoft’s Windows NT line of operating systems beginning with Windows 2000. It allows local or remote configuration of network devices such as the NICs.
Configure IP Address with Command Prompt in Windows 10
Before setting IP address with cmd in Windows 10, you need to know how to find your IP address on Windows 10. So before everything, you must know the network IP address configuration on your system.
Let’s learn the process of IP configuration step by step. I am going to explain it with an easy pictorial guide. If you don’t understand some part, just kindly comment us and ask your questions.
The process of Changing Windows 10 IP Address with Command Prompt:
- Find your IP address in Windows 10.
- View network interfaces card.
- Change IP address on Windows 10.
- Change DNS IP address with the command line.
- Reset IP address with Command Prompt.
How to Find your IP Address on Windows 10?
There are many options for finding IP address on Windows 10. The easy one is “ ipconfig ” command. To find your IP address on Windows 10, just type “ ipconfig ” in command prompt. To do this process:
- Press Windows+R keys to open the Run .
- Type “ cmd ” in the run and press enter.
- Now type “ ipconfig ” to show the IP address.
The “ ipconfig ” command shows everything about your computer network interfaces. You might have many physical or virtual network interface card.
Here, I just have one network interface on my Windows 10 computer. The result of ipconfig command shows that the IP 169.254.29.130 with the mask of 255.255.255.0 is my current Windows IP address.
This is a class C “autoconfiguration IPv4”. When your system doesn’t find any DHCP Server or manual IP address, it obtains auto IP address. So let’s change it.
How to C hange IP Address with Command Prompt?
For change IP address, open command prompt or PowerShell. Both works the same and you can run all command prompt commends on Powershell as well. Ok, run cmd or Powershell as administrator. Netsh work in both command prompt and Powershell. I’m using Windows Powershell to change IP address on Windows 10 completely. Becuase the user interface and color’s of Powershell is better than Command prompt.
- Type “ Powershell ” in Windows 10 search box to run Windows Powershell.
- You need to run Powershell as administrator. Just press Windows+Shift the press enter to run Powershell as administrator. Or right-click the Powershell and click Run as administrator .
To find the network interface with the command line, type the following command on Powershell.
The result shows two network interfaces. The Loopback and the Ethernet. The Loopback is Windows builtin network loopback interface, but our pointed network interface is the ethernet.
To find your IP address in Windows 10 with netsh command, just type the following command.
It displays all the network interface configuration. The output result is clear and better than output result of “ ipconfig ” command on Command prompt. So to find an exact information of the network interface, just add the index ID of the network interface at the end of the command.
That’s good. Let’s configure and change Windows 10 IP address with the command line. The command is bit long but easy to understand. No need to remember, just try to understand the netsh command structure.
To change the IP address of the “Ethernet0” network interface, type the following command.
Once the command executed successfully, check the result with “ netsh interface ipv4 show config 2 ” command. Yes, the output result shows the exact IP address has set on the “ Ethernet0 ” network interface. Now the Windows IP address is 200.100.10.5 with the mask of 255.255.255.0 and default gateway is 200.100.10.1.
Note : You can’t change the default gateway separately with the following command. It will remove the IP address and just set the default gateway address.
That’s good and enough for IP address configuration in Windows 10 with the command line. Let’s change DNS IP address from the command line.
- Related : MCSA Lab Manual Articles.
How to Change DNS IP address from Command Prompt?
DNS IP address is the unique address in the network that resolves computer name to IP address and IP address to the computer name. In the network, finding a computer with a name is easy than 32-bit IPv4 address. To set or change the DNS IP address, just simply do it with the following command.
You might see some error on a simple local network, because of not having a DNS server. When you don’t have a DNS server, it’s not necessary to set DNS IP address on your computer.
Finally, recheck the result with “ netsh interface ipv4 show config 2 ” command. The output netsh command should be displayed with DNS IP address.
Final World
Configure IP address with command prompt in Windows has tow benefits. The first benefit of working with Windows command line helps get you improve your skills in Windows environment. The second benefit is command line is faster than GUI. If you work with the command line, you will understand the power of command line.
The Windows command line interface has improved a lot in Windows 10. Now you can find some Linux commands that run in Windows 10 and works the same on Linux. Finally, hope you learn how to configure IP address with Command Prompt in Windows operating systems. If you don’t understand, please ask us about how to configure IP address with command prompt in Windows 10?


How to Assign a Static IP Address to a Windows 11/10 PC
Makes establishing a remote connection easier
Usually, your network router assigns a dynamic IP address to your devices, including your Windows 10 and 11 PCs. If you need a static IP address for your PC, you either need to configure your router or change a settings option on your computer.
The good thing is there are multiple ways to assign a static IP address to your Windows PC. Depending on what you feel comfortable with, you can choose a method and proceed with it to acquire a fixed IP address for your machine.

Why Use a Static IP Address?
There are many reasons you need a static IP address. It’s possible you use a remote connection to connect to your PC. In this case, having a permanent IP address makes establishing the remote connection easier.
Similarly, if you use your PC for network file sharing , a static IP address ensures the other devices on your network can connect to your PC without any reconfigurations.
Assign a Static IP to Your Windows 11/10 PC Using Your Router
One way to get a static IP for your PC is by configuring your router to allocate a specified IP address to your machine. Most routers offer this option but how you configure the router is different for each router model.
Generally, you’d follow the following steps to configure a static IP for your PC on your network router.
Find Your Network Adapter’s MAC Address
For your router to identify your PC and assign it a specific IP address, you need to enter your network adapter’s (which is in your PC) unique MAC address on your router’s settings page.
So, let’s first find your network adapter’s MAC address:
- Open the Start menu, search for Command Prompt , and select Command Prompt in the search results.

- Type the following command in the Command Prompt window and press Enter :
ipconfig /all

- Command Prompt will display various values on your screen. Find your network adapter here and look for the Physical Address field’s value. That’s your adapter’s unique MAC address. Make a note of this address.

Configure Your Router to Assign a Static IP to Your PC
You now need to access your router’s settings page. For most routers, you can do this by entering the 192.168.1.1 IP address in a web browser on your computer. If this doesn’t work for you, consult your router’s manual to find out how to access the settings page.
- Launch a web browser on your computer, type the following IP address, and press Enter .
192.168.1.1
- You’ll see your router’s login page. Enter your router’s username and password and continue. For most routers, you can use admin in both username and password fields.
- Select Network Settings at the top of your router’s settings page.

- Choose DHCP Client & Address Reservation from the sidebar on the left.
- Enter the static IP address you’d like to assign to your PC in the IP Address field on the right.

- Type your network adapter’s unique MAC address in the MAC Address field. Then, select Add and then select OK at the bottom of the page.
- Restart your router.
When your Windows 11 or 10 PC connects to your router, your router will assign the specified IP address to your PC. This will happen each time you connect your PC to your router.
Assign a Static IP to Your Windows 10 PC
If you don’t wish to configure your router’s settings, the other way to assign a static IP address to your Windows 10 PC is by using the Windows Settings app. You can configure your IP settings in this app to ensure your PC always gets a unique static IP.
However, there’s a slight issue with this method. If your router has already assigned the IP address that you want for your PC to another device, you’ll experience issues connecting your PC to your router .
To get around this, try to use an IP address far beyond the general IP addresses that your router assigns. For example, if your router usually gives IP addresses up to, say, 192.168.1.10, then use 192.168.1.20 as the static IP for your PC.
To proceed with this method:
- Open the Settings app on your PC by pressing Windows + I keys at the same time.
- Select Network & Internet on the Settings window.

- Scroll down the Status page that opens and choose Change adapter options .

- You’ll see a list of your network adapters. Right-click the adapter that you use with your network and select Properties from the menu.

- Choose Internet Protocol Version 4 (TCP/IPv4) in the list and select Properties .

- Enable the Use the following IP address option on the following window.

- Select the IP address field and type the static IP address you’d like to assign to your PC.
- Fill in the Subnet mask field, which is usually 255.255.255.0 . Type your router’s gateway, which is usually 192.168.1.1 , in the Default gateway field.
- For DNS servers, you can use Google’s Public DNS. To use these, select the Preferred DNS server field and type 8.8.8.8 . Select the Alternate DNS server field and type 8.8.4.4 . Then, choose OK .
- Close the Properties window by selecting Close .
Your Windows 10 PC will disconnect from your router, and it will then automatically reconnect. After this reconnection, your PC should now have the specified static IP address allocated to it.
Assign a Static IP to Your Windows 11 PC
Like with Windows 10, you can use the Windows Settings app to assign a static IP address to your Windows 11 PC.
- Press Windows + I keys simultaneously to open the Settings app.
- Select Network & internet from the sidebar on the left in Settings.

- Select Advanced network settings at the bottom of the Network & internet page.

- Find your network adapter in the list and select the adapter. Then, select View additional properties .

- Select Edit next to IP assignment .

- Choose Manual from the Edit IP settings dropdown menu. Then, toggle on the IPv4 option.

- Select the IP address field and type the static IP address to assign to your PC.

- Select the Subnet mask field and enter 255.255.255.0 . Enter your router’s IP address, which is usually 192.168.1.1 , in the Default gateway field.
- Enter 8.8.8.8 in the Preferred DNS field. Enter 8.8.4.4 in the Alternate DNS field.
- Select Save at the bottom.
And your Windows 11 PC now has a static IP address assigned to it. In the future, your PC will continue to acquire this static IP address from your router, provided there are no IP conflict issues with your router .
Mahesh has been obsessed with technology since he got his first gadget a decade or so ago. Over the last few years, he's written a number of tech articles on various online publications including but not limited to MakeTechEasier and Android AppStorm. Read Mahesh's Full Bio
Read More Posts:

Subscribe to Online Tech Tips
Join 25,000+ others who get daily tips, tricks and shortcuts delivered straight to their inbox.
Thanks for subscribing!
We will never spam you, unsubscribe at any time.

IMAGES
VIDEO
COMMENTS
In Windows 10 or 8.1, right-click the Start menu (or press Windows+X on your keyboard) and choose "Command Prompt (Admin)." In previous versions of Windows, search Start for "command prompt" and then right-click the result and choose "Run as Administrator." RELATED: How to Find Your Private and Public IP Addresses
To find your IP address on Windows 10, just type " ipconfig " in command prompt. To do this process: Press Windows+R keys to open the Run. Type " cmd " in the run and press enter. Now type " ipconfig " to show the IP address. The " ipconfig " command shows everything about your computer network interfaces.
To set a static IP address in Windows 10 or 11, open Settings -> Network & Internet and click Properties for your active network. Choose the "Edit" button next to IP assignment and change the type to Manual. Flip the IPv4 switch to "On", fill out your static IP details, and click Save.
Step 1: There are two ways to open the command line. Click on the Start menu, type CMD in the search box, then right-click on it and select Run as administrator. Or press WIN + R, type CMD, and press Enter.
Assign an IP address from the command-line interface Use the set network command to configure an IP address from the command line. The set network command includes the following parameters: ip=device ip: The IP address for the device. gateway=gateway: The network gateway IP address.
4] Assign a Static IP Address using Command Prompt To set a static IP address in Windows 10 using a command prompt, follow the below suggestions: Right-click on the Start button and select Run to ...
There are two commands for DNS since administrators typically configure a primary and secondary DNS server. For the primary DNS server run: netsh interface ip set dns name="Local Area Connection" static 208.67.222.222 For the secondary DNS server run: netsh interface ip add dns name="Local Area Connection" 208.67.220.220 index=2
1. Right click on start and select the command prompt (admin). 2. On User Account Control window click on "Yes" to open command prompt. 3. Type command " ipconfig " to check an IP address of your computer. This shows an APIPA IP address.
To find your local IP address from the CMD Command prompt, simply type "ipconfig" into the prompt. It will be listed as "IPv4 Address". To find your public (external) IP address from a command prompt, type "curl ifconfig.me" on Windows 10 or 11.
To assign a static IP from Control Panel on Windows 10, use these steps: Open Control Panel. Click on Network and Internet. Click on Network and Sharing Center. Click the Change adapter settings option on the left navigation pane. Right-click the network adapter and select the Properties option.
From the Configure IPv4 menu, choose Using DHCP with manual address. Enter a static IP address in the IPv4 Address and leave the Subnet Mask and Router field as default. Click Ok to save the changes. Now when you do an ifconfig, the system should be using the static IP you have defined in the previous times.
Type the following command to set a DNS server address and press Enter : netsh interface ip set dns name="ADAPTER-NAME" static DNS-ADDRESS In the command, change ADAPTER-NAME with your...
Solution. In Windows, you can use the netsh command to edit network interfaces. To see a list of network interfaces on your system (including copies or disabled adapters), type in the following: netsh interface show interface. To see a list of NICs with their configured network settings, type in the command below: netsh interface ip show config.
Adding an IP Address from the Command Line Windows includes the "netsh" command which allows you to configure just about any aspect of your network connections. If you view the accepted parameters using "netsh /?" you will be presented with a list of commands each which have their own list of commands (and so on).
In this Video I Will show you guys how to change or assign ip address using cmd in windows 10 computer.commands : netsh interface ipv4 show confignetsh inter...
To assign a static IP configuration through Control Panel, use these steps: Open Control Panel. Click on Network and Internet. Click on Network and Sharing Center. Click the Change adapter settings option on the left navigation pane. Right-click the network adapter and select the Properties option.
Click on Properties. Select the Internet Protocol Version (TCP/IP4) and click on the properties. Select IPv4 and click on Properties. Select the radio button 'Use the following IP address and enter the desired IP address, subnet mask, and gateway. Additionally, set static DNS address as well.
Launch the Command Prompt with administrative privileges and then use the command below to assign the desired IP address configuration: netsh interface ipv4 set address name="NameOfPort" static [IP address] [Subnet mask] [Default gateway] In the above command, you need to place the information according to your requirement.
Configuring IP address in a Windows with CMD performed using netsh command line utility. The network shell (netsh) is a set of commands that help you configure any Windows...
Choose Manual from the Edit IP settings dropdown menu. Then, toggle on the IPv4 option. Select the IP address field and type the static IP address to assign to your PC. Select the Subnet mask field and enter 255.255.255.. Enter your router's IP address, which is usually 192.168.1.1, in the Default gateway field.