Solved

Command Live Instruction to change IP Address - Windows 7

Posted on 2013-11-12
2
501 Views
Last Modified: 2013-11-12
Say,

I wish to change the gateway of my Windows 7 PC using command line instruction. From time to time i need to choose a different router and keep looking for quick & simple ways to achieve this - how can i do it?

TX
0
Comment
Question by:shaunwingin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 84

Expert Comment

by:oBdA
ID: 39643820
You can do that with netsh.exe (see http://technet.microsoft.com/en-us/library/bb490943.aspx); replace "Ethernet" with the name of the card you want to configzure, and 1.2.3.4 obviously with your gateway address:
netsh.exe interface ip set address name="Ethernet" gateway=1.2.3.4

Open in new window

0
 
LVL 43

Accepted Solution

by:
Steve Knight earned 500 total points
ID: 39643834
Or for temporary changes I would normally change the routing table and keep your gateway the same:

route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 X.X.X.X

Use this to see the results:

route print

That will need to be run as admin, e.g. a quick batch file:

@echo off
route print | find " 0.0.0.0"
Set Gateway=1.2.3.4
set /p Gateway=Enter new gateway - press return for %gateway%:
route delete 0.0.0.0
route add 0.0.0.0 mask 0.0.0.0 %gateway%

Steve
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

While working, an annoying popup showing below will come and we cannot cancel or close it form the screen. The error message will come again and again.
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will give you a introduction in two parts how to utilize Windows Live Movie Maker to its maximum editing capability. This will be demonstrated using Windows Live Movie Maker on Windows 7 operating system.

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question