Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I want to know how to set the ip addres of a machine from the command

Status
Not open for further replies.

u400393

Technical User
Apr 11, 2003
2
GB
I want to know how to set the ip addres of a machine from the command Line?
 
if you are using W2k, XP or .NET use the 'netsh' command

C:\>netsh /?

Usage: netsh [-a AliasFile] [-c Context] [-r RemoteMachine]
[Command | -f ScriptFile]

The following commands are available:

Commands in this context:
? - Displays a list of commands.
add - Adds a configuration entry to a list of entries.
delete - Deletes a configuration entry from a list of entries.
dump - Displays a configuration script.
exec - Runs a script file.
help - Displays a list of commands.
interface - Changes to the `interface' context.
ras - Changes to the `ras' context.
routing - Changes to the `routing' context.
set - Updates configuration settings.
show - Displays information.

The following subcontexts are available:
routing interface ras

To view help for a command, type the command, followed by a space, and then
type ?.

----------

netsh int ip set address local static 192.168.20.10 255.255.255.0 192.168.20.1

or

netsh int ip set address "Local Area Connection 2" source=dhcp

or

netsh int ip set address local source=dhcp
netsh int ip set dns local source=dhcp
netsh int ip set wins local source=dhcp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top