Hot Downloads

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: changing static ip address

changing static ip address 12 years 8 months ago #2198

how to change static ip address from command prompt ..
The administrator has disabled public write access.

Re: changing static ip address 12 years 8 months ago #2200

  • Neon
  • Neon's Avatar
  • Offline
  • Distinguished Member
  • Posts: 101
  • Karma: 0
That's a VERY good question I often wondered that myself until I stumbled upon a website talking about that.

Alright for Windows 2000/XP there is a command for just that:

NETSH

Well since I got that off a site I'll just paste the dump here
How can I configure my IP address and other settings from the command prompt?

In Windows 2000 (and in XP) you can use the NETSH utility to do just that, and much more. Netsh.exe is a tool an administrator can use to configure and monitor Windows-based computers at a command prompt.

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.



For example:
To save your current IP settings:

netsh -c interface dump > c:\data\interface.txt

To restore (or configure) your settings from a text file:

netsh -f c:\data\interface.txt

If you need to plug your laptop into different networks, you can save and restore the appropriate network configuration using netsh.exe. When you have your laptop correctly configured for your office network, you can save the network configuration for later restoration.

netsh -c interface dump > c:\configs\officeinterface.txt

Now lets say you take it home and reconfigure it correctly for you home network. To save you home network configuration for later use:

netsh -c interface dump > c:\configs\homeinterface.txt

OK. Now you take the laptop back to the office and you need to reconfigure for the office environment: nic address, wins, gateway address... Use the following command to restore your office network interface:

netsh -f c:\configs\officeinterface.txt

At end of day, you take it home. To setup for home, run:

netsh -f c:\configs\homeinterface.txt

As you can imagine, this is very valuable if you have get your laptop to function in multiple network locations.

You can also use the NETSH command in Windows 2000 or XP to script the process of changing a computer from a static IP address to Dynamic Host Configuration Protocol (DHCP) or vice versa. The NETSH command accomplishes this task without the need to restart the computer. This feature is particularly useful for laptops that move from one environment to another, when it is necessary to use statically assigned IP addresses at one location and DHCP assigned IP addresses at another.

To switch the specified adapter from a static address to DHCP, type the following command:

netsh interface ip set address "Local Area Connection" dhcp

To display all of the adapters in the computer with their current IP addresses to determine the correct adapter name, type the following command:

netsh interface ip show config

To change to a static address, type the following command:

netsh interface ip set address "Local Area Connection" static ipaddr subnetmask gateway metric

Note: Replace ipaddr with the static IP address, subnetmask with the subnet mask, gateway with the default gateway and, if necessary, metric with the appropriate metric. The following example changes the interface "Local Area Connection" to a static address of 192.168.0.10 with a subnet mask of 255.255.255.0, and the interface has a default gateway of 192.168.0.1 with a metric of 1:

netsh interface ip set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1

Thats from http://www.petri.co.il/configure_tcp_ip_from_cmd.htm by the way :)
The administrator has disabled public write access.

Re: changing static ip address 12 years 8 months ago #2201

  • Neon
  • Neon's Avatar
  • Offline
  • Distinguished Member
  • Posts: 101
  • Karma: 0
ADD: To be honest I didn't think windows would be friendly enough to actually add that command :o

Also if you go to the URL I supplied, you will notice that great amount of other things the site offers about Microsoft stuff as it’s a MCSE site :)
The administrator has disabled public write access.

Re: changing static ip address 12 years 8 months ago #2204

  • sahirh
  • sahirh's Avatar
  • Offline
  • Honored Member
  • Posts: 1700
  • Karma: 0
*Yoda*
This Neon,... strong in the force he is.... many windows tricks knows he...

*Luke*
But Master, how come you didn't know how to do this ?

*Yoda*
A saying there is -- in the forums of firewall.cx things will be learnt.

*Luke*
Now I understand master ! I will not fail, I will change my IP address from the command prompt.


I was watching Attack Of The Clones on DVD... like you guys din't figure. Nice tip Neon.
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
The administrator has disabled public write access.

Re: changing static ip address 12 years 8 months ago #2210

  • tfs
  • tfs's Avatar
  • Offline
  • Expert Member
  • Posts: 521
  • Karma: 0
Wait a minute.

What happened to Gandalph?
Thanks,

Tom
The administrator has disabled public write access.

Re: changing static ip address 12 years 8 months ago #2225

  • sahirh
  • sahirh's Avatar
  • Offline
  • Honored Member
  • Posts: 1700
  • Karma: 0
LOTR still hasn't come here !!! I think it might release mid-Jan. Getting impatient now.
Sahir Hidayatullah.
Firewall.cx Staff - Associate Editor & Security Advisor
tftfotw.blogspot.com
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 0.090 seconds

CCENT/CCNA

Cisco Routers

  • SSL WebVPN
  • Securing Routers
  • Policy Based Routing
  • Router on-a-Stick

VPN Security

  • Understand DMVPN
  • GRE/IPSec Configuration
  • Site-to-Site IPSec VPN
  • IPSec Modes

Cisco Help

  • VPN Client Windows 8
  • VPN Client Windows 7
  • CCP Display Problem
  • Cisco Support App.

Windows 2012

  • New Features
  • Licensing
  • Hyper-V / VDI
  • Install Hyper-V

Linux

  • File Permissions
  • Webmin
  • Groups - Users
  • Samba Setup