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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to change ip address from command prompt

Status
Not open for further replies.

Aslamvs

Technical User
Jul 8, 2002
472
Hi all

I had one query i want to change my machin's ip using commnd prompt. so how could i change it ?

thanks
 
Hi,

Need a bit more info really. Is your network using DHCP, if so you cant as you have a server assigned address from a pre-defined scope.

Or

Are you using static IP addressing? If so properties of Network Neighbourhood. Properties of the TCP/IP protocol, will show you the IP address and subnet mask, etc.

However if you are changing you need to make sure you keep
the subnet the same.

ie if you have a ip address 192.168.1.156
change only the last three numbers so it may be
192.168.1.234.

To change the ip address using the command prompt you need
to use the ARP command.

The command would read

ARP -s [mac address] [new ip address]

Paul
If it isnt broken, please dont try n fix it!!!!!
 
Paulovey - ARP doesn't change Ip addresses, it maps them to MAC addresses. It's kind of like DNS or WINS for MAC Addresses instead of Machine names.

Aslamvs - If you need to change the IP address, I don;t think you can from a command prompt (at lease not that I'm aware of).

You can edit the registry with programs like REG.EXE and REGINI.EXE, and set the IP that way, but the IP is not stored as regular numbers - it's in some weird HEX hash of the IP, and then you still need to reboot.

If you change the IP in the control panel applet you don't even need to reboot for it to take effect.

I do echo Paul's advice - if you don't need to change it, don't, but I assume that you are going through a network IP re-number as we did recently and you are looking for a way to script it. Sorry can't help with that original issue.
 
OZdog,

Thanks for pointing that one out there!!! I went off on total the wrong tangent there!!!! Giving the totally wrong advice!!!!!

Again, I am not aware of anyway to change a IP address from the command prompt! If it isnt broken, please dont try n fix it!!!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top