![]() |
Windows 2000/Windows XP netsh commands | ![]() |
|
***Official Disclaimer***
Neither I nor Alltel/Windstream/Your ISP/Anyone else will be held accountable for what you or anyone else does inside your router or on your computer or any software you download and/or install. If you change/remove/corrupt something up on your computer or router or equipment and someone has to fix it or replace it for you and charge you money/services/beer for fixing it then it's your responsibility not mine nor is it Alltel/Windstream's or your ISP's or anyone else's. I give you the information that I have learned/found/acquired. What you do with it is up to you. Do not email me with questions or complaints about why your router/computer/equipment/etc. doesn't work. I cannot guarantee that this config or these settings or information on this site will work for everyone. I can't test all solutions possible because I don't know them all and there are not enough hours in the day/week/month/year for me to test every combination possible. I have tested/used these configurations/software and they work for me. I am just letting my findings be open to help others in times of need at no cost. If you do not understand these instructions/configurations/software or are afraid that you will mess up the computer/router/equipment/software then you will want to contact a computer/network technician to help fix/configure/build what you need done. |
|
Here is a list of commands I use on a daily basis in Windows 2000/XP to setup networking connections and fix most common issues. All commands should be used from the command line. To access the command line click on the Start button then click on RUN, from here type in cmd and hit ENTER on the keyboard.
*NOTE* These are commands for either Windows 2000 with service pack 4 or Windows XP with service pack 2 or both, I would suggest upgrading to Service Pack 4 for Win2k or Service Pack 2 for WinXP if you don't have them already. In the examples below, Local Area Connection is the name of your Network Connection. If yours is named differently then use that instead of Local Area Connection. Make sure that you use the quotation marks. |
|
| Network Setup Commands | |
| netsh interface ip show config | To display all of the adapters in the computer with their current IP addresses |
| netsh -c interface dump > c:\location1.txt | Export the current IP settings to a file called location1.txt |
| netsh -f c:\location1.txt | Import IP settings from a file called location1.txt |
| netsh int ip set address "Local Area Connection" dhcp | Set interface to use DHCP (Obtain IP address information automatically.) |
|
netsh interface ip set address "Local Area Connection" StaticIpAddress SubnetMask Gateway Metric
(example) netsh interface ip set address "Local Area Connection" 192.168.1.2 255.255.255.0 192.168.1.1 1 |
Set interface to a static IP |
| netsh interface ip set dns "Local Area Connection" static DNSAddress | Hard set the DNS server |
| netsh int ip add dns "Local Area Connection" DNSAddress | Hard set the secondary DNS server |
| netsh interface ip set dns "Local Area Connection" dhcp | Set the computer to obtain DNS servers automatically. |
| Network Repair Commands | |
| netsh int ip reset log.txt | [WinXP] In extreme cases, the best solution for this issue may be to reinstall the Internet Protocol stack. But with the NetShell utility, you can reset the TCP/IP stack to restore it to its state that existed when the operating system was installed. |
| netsh int ip del arp | [Win2k/WinXP] Flushes out the arp cache for one or all interfaces. |
| ipconfig /flushdns | [Win2k/WinXP] Purges the DNS resolver cache |
| netsh winsock reset catalog | [WinXP] This command resets the Winsock catalog to the default configuration. This can be useful if a malformed LSP is installed that results in loss of network connectivity. While use of this command can restore network connectivity, it should be used with care because any previously-installed LSPs will need to be re-installed. |
| Links for various Windows fixes and solutions, tips and tricks. | |
|
How to reset Internet Protocol (TCP/IP) in Windows XP
How to determine and recover from Winsock2 corruption Changes to Functionality in Microsoft Windows XP Service Pack 2 Ramesh's Windows Troubleshooting page WinXPTutor's XP Resources |
|
![]() |
Windows 2000/Windows XP netsh commands | ![]() |