Not many users are aware that Windows 7 provides more than one way to configure a workstation’s network adaptor IP address or force it to obtain an IP address from a DHCP server. While the most popular method is configuring the properties of your network adaptor via the Network and Sharing Center, the less popular and unknown way for most users is using the netsh Command Prompt. In this tutorial, we show you how to use the Command Prompt netsh command to quickly and easily configure your IP address or set it to DHCP. Competent users can also create simple batch files (.bat) for each network (e.g home, work etc) so they can execute them to quickly make the IP address, Gateway IP and DNS changes.
In order to successfully change the IP address via Command Prompt, Windows 7 requires the user to have administrative rights. This means even if you are not the administrator, you must know the administrative password, since you will be required to use the administrative command prompt.
OPENING THE ADMINISTRATIVE COMMAND PROMPT ON WINDOWS 7
To open the administrative command prompt in Windows 7, first click on the Start icon. In the search dialog box that appears, type cmd and right-click on the cmd search result displayed. On the menu that Windows brings up, click on the Run as administrator option as shown in the below screenshot:
Depending on your User Account Control Settings (UAC), Windows may ask for confirmation. If this happens, simply click on Yes and Windows will present the CLI prompt running in elevated administrator privileged mode:
USING THE ‘NETSH’ COMMAND PROMPT TO CHANGE THE IP ADDRESS, GATEWAY IP AND DNS
At the Administrative Command Prompt, type netsh interface ip show config, which will display the network adapters available on your system and their names. Note down the name of the network adaptor for which you would like to set the static IP address.
In our example, we’ll be modifying the IP address of the interface named Wireless Network Connection, which is our laptop’s wireless network card.
Even if the Wireless Network Connection is set to be configured via DHCP, we can still configure a static IP address. Following is the command used to configure the interface with the IP address of 192.168.5.50 with a subnet mask of 255.255.255.0 and finally a Gatewayof 192.168.5.1:
C:\Windows\system32> netsh interface ip set address "Wireless Network Connection" static 192.168.5.50 255.255.255.0 192.168.5.1
Next, we configure our primary DNS server using the netsh command with the following parameters:
C:\Windows\system32> netsh interface ip set dnsserver "Wireless Network Connection" static 8.8.8.8
Note: When entering a DNS server, Windows will try to query the DNS server to validate it. If for any reason the DNS server is not reachable (therefore not validated), you might see the following error:
The configured DNS server is incorrect or does not exist
To configure the DNS server without requiring DNS Validation, use the validate=no parameter at the end of the command:
C:\Windows\system32> netsh interface ip set dnsserver "Wireless Network Connection" static 8.8.8.8 validate=no
This command forces the DNS server setting without any validation and therefor no error will be presented at the CLI output in case the DNS server is not reachable.
To verify our new settings, use the netsh command with the following parameters:
C:\Windows\system32> netsh interface ip show config
At this point, we should see the network settings we configured, as shown below:
USING THE 'NETSH' COMMAND PROMPT TO SET THE NETWORK INTERFACE CARD TO DHCP
You can use the netsh command to switch your current adapter from static to DHCP. To switch your network adaptor from static IP configuration to DHCP, use the following command:
C:\Windows\system32> netsh interface ip set address "Wireless Network Connection” dhcp
Windows will not return any confirmation after the command is entered, however if the network adaptor has successfully obtained an IP address and has Internet connection, there should not be any network icon with an exclamation mark in the taskbar notification areaas shown below:
Finally, to verify that DHCP is enabled and we’ve obtain an IP address, use the netsh command with the following parameters:
C:\Windows\system32> netsh interface ip show config
This article showed how to configure a Windows 7 network interface with an IP address, Gateway and DNS server, using the Administrative Command Prompt. We also showed how to set a Windows 7 network interface to obtain an IP address automatically from a DHCP server.
How To Change And Configure An Ip Address Or Set To Dhcp, Using The Command Prompt In Windows 7 >>>>> Download Now
ReplyDelete>>>>> Download Full
How To Change And Configure An Ip Address Or Set To Dhcp, Using The Command Prompt In Windows 7 >>>>> Download LINK
>>>>> Download Now
How To Change And Configure An Ip Address Or Set To Dhcp, Using The Command Prompt In Windows 7 >>>>> Download Full
>>>>> Download LINK