How to configure TCP/IP settings from the Command Prompt in Windows

In order to configure TCP/IP settings such as the IP address, Subnet Mask, Default Gateway, DNS and WINS addresses and many other options you can use Netsh.exe.

With Netsh.exe you can easily view your TCP/IP settings. Type the following command in a Command Prompt window (CMD.EXE):

netsh interface ip show config

With Netsh.exe, you can easily configure your computer’s IP address and other TCP/IP related settings. For example:

The following command configures the interface named Local Area Connection with the static IP address 10.0.0.100, the subnet mask of 255.255.255.0, and a default gateway of 10.0.0.1:

netsh interface ip set address name=»Local Area Connection» static 10.0.0.100 255.255.255.0 10.0.0.1 1 (The above is one long line)

If you want to export your current ip settings:

netsh -c interface dump > c:mySettings.txt 

If you want to import your ip settings:

netsh -f c:mySettings.txt

or instead of -f

netsh exec c:mySettings.txt

To automatically obatin an IP address using DHCP:

netsh interface ip set address «Local Area Connection» dhcp

DNS settings:

netsh interface ip set dns «Local Area Connection» static 10.0.0.254

WINS settings:

netsh interface ip set wins «Local Area Connection» static 10.0.0.254

Auto DNS settings:

netsh interface ip set dns «Local Area Connection» dhcp

Usefull links:

Link one and Link two

POSSIBLE CAUSES OF SLOW INTERNET UNDER LEOPARD

• Use better faster DNS servers, like OpenDNS.org (208.67.222.222, 208.67.220.220).
• Connect directly to DNS servers to avoid DNS forwarding through your router (acting as a DNS proxy).
• Turn off IPv6 DNS lookups in Firefox/Camino (references: mozilla.org).
• If DNS forwarding is required, change the DNS servers directly on the router.
• Update your router’s firmware (references: jungledisk.com, ubuntu.com) for better SRV and IPv6 handling.
• Below are detailed instructions on applying these fixes to slow dns lookups/slow Internet on Leopard