It's easy capable to alteration an IP reside connected your PC utilizing Control Panel, but did you cognize you tin besides do it from nan Command Prompt?
Key Takeaways
- You must motorboat Command Prompt, PowerShell, aliases Terminal arsenic admin to usage netsh.
- Use nan "netsh interface ipv4 show config" bid to find nan afloat sanction of nan web interface you want to change.
- Modify your IP address, subnet mask, and default gateway utilizing nan bid "netsh interface ipv4 group address". You tin besides alteration DNS settings utilizing "netsh interface ipv4 group dns".
Changing your IP reside pinch nan Control Panel interface isn't difficult, but it does require clicking done a number of different windows and dialog boxes. If you're a instrumentality of nan Command Prompt, though, you tin get it done much quickly utilizing nan netsh command, which is conscionable 1 of nan awesome network utilities built into Windows.
Launch Command Prompt arsenic Admin to Use Netsh
We're going to usage nan netsh command, but it requires that Command Prompt beryllium launched arsenic administrator to work. The netsh bid allows you to configure conscionable astir immoderate facet of your web connections successful Windows.
To motorboat Command Prompt (or PowerShell) arsenic Admin, unfastened up nan Start Menu, hunt "cmd," hover complete nan result, past click "Run arsenic Administrator."
In Windows 10 aliases Windows 11, you tin besides right-click nan Start paper (or property Windows+X connected your keyboard) to unfastened nan Power User Menu and take "PowerShell (Admin)."
You tin (and should) usage PowerShell for this instead.
View Your Network Information pinch Command Prompt
Before you alteration your IP reside and related information, you'll request to find nan afloat sanction of nan web for nan interface you want to change. To do this, type nan pursuing command:
netsh interface ipv4 show configScroll down until you spot nan interface you're looking for. In our example, we're going to modify nan Wi-Fi interface, which connected our instrumentality is conscionable named "Wi-Fi." You'll besides spot different default names that Windows assigns to interfaces, specified arsenic "Local Area Connection," "Local Area Connection* 2," and "Ethernet." Just find nan 1 you're looking for and make statement of nan nonstop name. You tin besides copy and paste nan sanction to Notepad and past backmost into Command Prompt later to make things easier.
Change Your IP Address, Subnet Mask, and Default Gateway
With nan interface sanction successful hand, you're fresh to alteration nan IP Address, subnet mask, and gateway. To do this, you'll rumor a bid utilizing nan pursuing syntax:
netsh interface ipv4 group reside name="YOUR INTERFACE NAME" fixed IP_ADDRESS SUBNET_MASK GATEWAYSo, for example, your bid mightiness look thing for illustration nan following:
netsh interface ipv4 group reside name="Wi-Fi" fixed 192.168.3.8 255.255.255.0 192.168.3.1Where nan info is replaced by immoderate you want to use. In our example, nan bid does nan following:
- Uses nan interface sanction "Wi-Fi"
- Sets nan IP reside to 192.168.3.1
- Sets nan subnet disguise to 255.255.255.0
- Sets nan default gateway to 192.168.3.1
And if you're utilizing a fixed IP reside but want to move to utilizing an IP reside assigned automatically by a DHCP server — specified arsenic your router — you tin usage nan pursuing bid instead:
netsh interface ipv4 group reside name="YOUR INTERFACE NAME" source=dhcpChange Your DNS Settings successful Command Prompt
You tin besides usage nan netsh bid to alteration nan DNS servers utilized by a web interface. Third-party DNS servers — for illustration Google Public DNS and OpenDNS —can beryllium faster and much reliable than nan DNS servers provided by your ISP. Whatever your logic for changing your DNS server, you tin do it either astatine nan router truthful it affects each nan devices that get their accusation from nan router aliases astatine nan individual device. If you want to alteration nan DNS servers for conscionable 1 PC, it's easy to do pinch nan netsh command.
You'll request to usage nan bid twice: erstwhile to group your superior DNS server and erstwhile to group your secondary, aliases backup, DNS server. To group your superior DNS server, usage nan pursuing syntax:
netsh interface ipv4 group dns name="YOUR INTERFACE NAME" fixed DNS_SERVERSo, for example, your bid mightiness look thing for illustration nan pursuing (in which we group it to Google's superior nationalist DNS server, 8.8.8.8):
netsh interface ipv4 group dns name="Wi-Fi" fixed 8.8.8.8To group your secondary DNS server, you'll usage a very akin command:
netsh interface ipv4 group dns name="YOUR INTERFACE NAME" fixed DNS_SERVER index=2So, continuing our example, you mightiness group your secondary DNS arsenic nan Google Public DNS secondary server, which is 8.8.4.4:
netsh interface ipv4 group dns name="Wi-Fi" fixed 8.8.4.4 index=2And conscionable for illustration pinch nan IP address, you tin besides alteration it truthful that nan web interface grabs its DNS settings automatically from a DHCP server instead. Just usage nan pursuing command:
netsh interface ipv4 group dnsservers name"YOUR INTERFACE NAME" source=dhcpAnd location you person it. Whether you for illustration typing astatine nan bid punctual amended aliases conscionable want to impressment your coworkers, now you cognize each nan bid statement magic you request for changing your IP reside settings.