Latest Administrative Tools and Scripts
RegPol - Import .REG files even with GPO restrictions in place
KillPol - Temporarily remove policy restriction for the current user
Add 2 Administrators - Adds groups the the administrators group
IconZone - Icon, TCP/IP and Proxy setting automation
GPDrivesOptions - Control drive blocking via GPO
 

Read More

 

Top 10 Articles
Forgot the Administrator's Password?
Customize a New XP Installation
Download Free Windows 2000 Resource Kit Tools
Install Windows XP Pro
How to Install Active Directory on Windows 2000
Forgot the Administrator's Password? - Reset Domain Admin Password in Windows 2000 AD
Change the Serial in Windows XP
Windows Update Problems
How to Write ISO Files to CD
How to Install Active Directory on Windows 2003
 

Read More

 

EDULEARN
 
Latest Articles
Backing up Exchange 2000/2003 with NTBACKUP
Brick Level Backup of Mailboxes by using EXMERGE
Restore Exchange 2000/2003 with NTBACKUP
Configure Exchange 2000/2003 to Receive E-Mail for other Domains
Configure Specific E-Mail Addresses for Specific Exchange 2000/2003 Users
Configure MX Records for Incoming SMTP E-Mail Traffic
Working with Query Based Distribution Groups in Exchange 2003
Import Saved Queries in Windows Server 2003 AD Users & Computers
Saved Queries in Windows Server 2003 AD Users & Computers
LDAP Search Samples for Windows Server 2003 and Exchange 2000/2003
Recover Protected Office Documents
Windows XP SP2 Slipstreaming
 

Read More

 

Latest MS Security Bulletins
MS04-039 : Vulnerability in ISA Server 2000 and Proxy Server 2.0 Could Allow Internet Content Spoofing
MS04-038 : Cumulative Security Update for Internet Explorer
MS04-037 : Vulnerability in Windows Shell Could Allow Remote Code Execution
MS04-036 : Vulnerability in NNTP Could Allow Code Execution
MS04-035 : Vulnerability in SMTP Could Allow Remote Code Execution
MS04-034 : Vulnerability in Compressed (zipped) Folders Could Allow Code Execution
MS04-033 : Vulnerability in Microsoft Excel Could Allow Code Execution
MS04-032 : Security Update for Microsoft Windows
MS04-031 : Vulnerability in NetDDE Could Allow Remote Code Execution
MS04-030 : Vulnerability in WebDav XML Message Handler Could Lead to a Denial of Service
 

Read More

 

Latest MS Service Packs
Windows XP SP2
Office 2003 SP1
Exchange Server 2003 SP1
ISA Server 2000 SP2
Windows 2000 SP4
Exchange 2000 SP3
Office XP SP3
Office 2000 SP3
 

Read More

 

Author is a Windows Server System - Exchange Server MVP

 

Link to MCSEworld

 

By: Daniel Petri

How can I configure TCP/IP settings from the Command Prompt?

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.

Netsh.exe is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a computer that is currently running. Netsh.exe also provides a scripting feature that allows you to run a group of commands in batch mode against a specified computer. Netsh.exe can also save a configuration script in a text file for archival purposes or to help you configure other servers.

Netsh.exe is available on Windows 2000, Windows XP and Windows Server 2003.

You can use the Netsh.exe tool to perform the following tasks:

  • Configure interfaces
  • Configure routing protocols
  • Configure filters
  • Configure routes
  • Configure remote access behavior for Windows-based remote access routers that are running the Routing and Remote Access Server (RRAS) Service
  • Display the configuration of a currently running router on any computer
  • Use the scripting feature to run a collection of commands in batch mode against a specified router.

What can we do with Netsh.exe?

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

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 192.168.0.100, the subnet mask of 255.255.255.0, and a default gateway of 192.168.0.1:



(The above line is one long line, copy paste it as one line)

Netsh.exe can be also useful in certain scenarios such as when you have a portable computer that needs to be relocated between 2 or more office locations, while still maintaining a specific and static IP address configuration. With Netsh.exe, you can easily save and restore the appropriate network configuration.

First, connect your portable computer to location #1, and then manually configure the required settings (such as the IP address, Subnet Mask, Default Gateway, DNS and WINS addresses).

Now, you need to export your current IP settings to a text file. Use the following command:

When you reach location #2, do the same thing, only keep the new settings to a different file:

You can go on with any other location you may need, but we'll keep it simple and only use 2 examples.

Now, whenever you need to quickly import your IP settings and change them between location #1 and location #2, just enter the following command in a Command Prompt window (CMD.EXE):

or

and so on.

You can also use the global EXEC switch instead of -F:

Netsh.exe can also be used to configure your NIC to automatically obtain an IP address from a DHCP server:

Would you like to configure DNS and WINS addresses from the Command Prompt? You can. See this example for DNS:

Configure TCP/IP from the Command Prompt

 

 

Latest Administrative Tools and Scripts
RegPol - Import .REG files even with GPO restrictions in place
KillPol - Temporarily remove policy restriction for the current user
Add 2 Administrators - Adds groups the the administrators group
IconZone - Icon, TCP/IP and Proxy setting automation
GPDrivesOptions - Control drive blocking via GPO
 

Read More

 

Top 10 Articles
Forgot the Administrator's Password?
Customize a New XP Installation
Download Free Windows 2000 Resource Kit Tools
Install Windows XP Pro
How to Install Active Directory on Windows 2000
Forgot the Administrator's Password? - Reset Domain Admin Password in Windows 2000 AD
Change the Serial in Windows XP
Windows Update Problems
How to Write ISO Files to CD
How to Install Active Directory on Windows 2003
 

Read More

 

EDULEARN
 
Latest Articles
Backing up Exchange 2000/2003 with NTBACKUP
Brick Level Backup of Mailboxes by using EXMERGE
Restore Exchange 2000/2003 with NTBACKUP
Configure Exchange 2000/2003 to Receive E-Mail for other Domains
Configure Specific E-Mail Addresses for Specific Exchange 2000/2003 Users
Configure MX Records for Incoming SMTP E-Mail Traffic
Working with Query Based Distribution Groups in Exchange 2003
Import Saved Queries in Windows Server 2003 AD Users & Computers
Saved Queries in Windows Server 2003 AD Users & Computers
LDAP Search Samples for Windows Server 2003 and Exchange 2000/2003
Recover Protected Office Documents
Windows XP SP2 Slipstreaming
 

Read More

 

Latest MS Security Bulletins
MS04-039 : Vulnerability in ISA Server 2000 and Proxy Server 2.0 Could Allow Internet Content Spoofing
MS04-038 : Cumulative Security Update for Internet Explorer
MS04-037 : Vulnerability in Windows Shell Could Allow Remote Code Execution
MS04-036 : Vulnerability in NNTP Could Allow Code Execution
MS04-035 : Vulnerability in SMTP Could Allow Remote Code Execution
MS04-034 : Vulnerability in Compressed (zipped) Folders Could Allow Code Execution
MS04-033 : Vulnerability in Microsoft Excel Could Allow Code Execution
MS04-032 : Security Update for Microsoft Windows
MS04-031 : Vulnerability in NetDDE Could Allow Remote Code Execution
MS04-030 : Vulnerability in WebDav XML Message Handler Could Lead to a Denial of Service
 

Read More

 

Latest MS Service Packs
Windows XP SP2
Office 2003 SP1
Exchange Server 2003 SP1
ISA Server 2000 SP2
Windows 2000 SP4
Exchange 2000 SP3
Office XP SP3
Office 2000 SP3
 

Read More

 

Author is a Windows Server System - Exchange Server MVP

 

Link to MCSEworld

 

By: Daniel Petri

How can I configure TCP/IP settings from the Command Prompt?

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.

Netsh.exe is a command-line scripting utility that allows you to, either locally or remotely, display or modify the network configuration of a computer that is currently running. Netsh.exe also provides a scripting feature that allows you to run a group of commands in batch mode against a specified computer. Netsh.exe can also save a configuration script in a text file for archival purposes or to help you configure other servers.

Netsh.exe is available on Windows 2000, Windows XP and Windows Server 2003.

You can use the Netsh.exe tool to perform the following tasks:

  • Configure interfaces
  • Configure routing protocols
  • Configure filters
  • Configure routes
  • Configure remote access behavior for Windows-based remote access routers that are running the Routing and Remote Access Server (RRAS) Service
  • Display the configuration of a currently running router on any computer
  • Use the scripting feature to run a collection of commands in batch mode against a specified router.

What can we do with Netsh.exe?

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

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 192.168.0.100, the subnet mask of 255.255.255.0, and a default gateway of 192.168.0.1:



(The above line is one long line, copy paste it as one line)

Netsh.exe can be also useful in certain scenarios such as when you have a portable computer that needs to be relocated between 2 or more office locations, while still maintaining a specific and static IP address configuration. With Netsh.exe, you can easily save and restore the appropriate network configuration.

First, connect your portable computer to location #1, and then manually configure the required settings (such as the IP address, Subnet Mask, Default Gateway, DNS and WINS addresses).

Now, you need to export your current IP settings to a text file. Use the following command:

When you reach location #2, do the same thing, only keep the new settings to a different file:

You can go on with any other location you may need, but we'll keep it simple and only use 2 examples.

Now, whenever you need to quickly import your IP settings and change them between location #1 and location #2, just enter the following command in a Command Prompt window (CMD.EXE):

or

and so on.

You can also use the global EXEC switch instead of -F:

Netsh.exe can also be used to configure your NIC to automatically obtain an IP address from a DHCP server:

Would you like to configure DNS and WINS addresses from the Command Prompt? You can. See this example for DNS:

and this one for WINS:

Or, if you want, you can configure your NIC to dynamically obtain it's DNS settings:

As you now see, Netsh.exe has many features you might find useful, and that goes beyond saying even without looking into the other valuable options that exist in the command.

Links

How to Use the Netsh.exe Tool and Command-Line Switches - 242468

How to Use the NETSH Command to Change from Static IP Address to DHCP in Windows 2000 - 257748

 

up

back

 

Page updated: 05-09-2004
Google
Web www.petri.co.il
The best Computer Based Training (CBT)

Test your skills with realistic exam simulators for A+, MCSE, Network+, CCNA, etc. Click here.

Read More

 

GFI LANguard Network Security Scanner

Automatically detect security vulnerabilities on your network with GFI LANguard Network Security Scanner! Free version available for download!

Read More

 

GFI Network Server Monitor

Automatic network & server monitoring made easy with GFI Network Server Monitor! A freeware version available for download!

Read More

 

 

Sponsor MCSEworld

Bandwidth costs are growing, server hosting is expensive. Help me keep the site free for all.

Read More

  Copyright © 1998 Daniel Petri Ltd. No portion may be reproduced without my written permission. Microsoft, MS-DOS, Windows, Windows 2000, Windows XP, Windows Server 2003, Windows NT, Windows 98, Windows 95 are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A. and other countries. All other names are registered trademarks of their respective companies. Should any right be infringed, it is totally unintentional. Send me an e-mail and I will promptly and gladly rectify it. All external sites will open in a new browser. MCSEworld does not endorse external sites and is not responsible for their content. For broken links, site problems - please send Feedback.