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
Solved

Swapping TCP/IPv4 Settings

Posted on 2015-01-12
6
115 Views
Last Modified: 2015-01-16
I'm working on four to six small Windows based networks a day installing firewalls. The networks I run into either utilize a 10.1.10.x, 192.168.1.x or other addressing scheme. I'm always changing my Laptop to a different IP scheme.

Is there an app I can run from a flash drive that  stores each IP scheme in a small DB and allows me to select which scheme I want that Pc to use?
0
Comment
Question by:Tony Giangreco
  • 4
  • 2
6 Comments
 
LVL 9

Accepted Solution

by:
Trenton Knew earned 500 total points
ID: 40545066
you can probably accomplish this by using a pair of small batch files.

just need a couple lines like this...
netsh int ip set address name="Local Area Connection" address=10.1.10.x/24 gateway=10.41.10.x source=static

Open in new window


if you need to define alternate DNS servers, you can add the following line as well.
netsh int ip set dnsservers name="Local Area Connection" source=static address="10.1.10.x"

Open in new window

0
 
LVL 25

Author Comment

by:Tony Giangreco
ID: 40545245
I've tested the IP address command in a batch file and it works well.  I don't find a way to set the secondary dns. The primary works well.

Any suggestion?
0
 
LVL 9

Expert Comment

by:Trenton Knew
ID: 40545268
yes, repeat the command with index=2

netsh int ip set dnsservers name="Local Area Connection" source=static address="10.1.10.x" index=2

Open in new window

0
Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

 
LVL 25

Author Comment

by:Tony Giangreco
ID: 40545321
I'm running this on Win 7 pro. I'm getting a syntax error when I tried index. Can you see if something is missing?
0
 
LVL 9

Expert Comment

by:Trenton Knew
ID: 40545369
my apologies... need to do ADD instead of SET

netsh int ip add dnsservers name="Local Area Connection 2" address="10.x.x.x" index=2

"source=static" becomes unnecessary
0
 
LVL 9

Expert Comment

by:Trenton Knew
ID: 40545374
Final file should look like this...

netsh int ip set address name="Local Area Connection" address=10.1.10.x/24 gateway=10.1.10.x source=static
netsh int ip set dnsservers name="Local Area Connection" source=static address="10.x.x.x"
netsh int ip add dnsservers name="Local Area Connection" address="10.x.x.x" index=2

Open in new window

0

Featured Post

Easy, flexible multimedia distribution & control

Coming soon!  Ideal for large-scale A/V applications, ATEN's VM3200 Modular Matrix Switch is an all-in-one solution that simplifies video wall integration. Easily customize display layouts to see what you want, how you want it in 4k.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
laptop estate analysis 5 80
SCCM firewall status and security group members 4 56
The purpose of using BGP 33 115
Remote Desktop Support Tools Like "Go to MY PC", etc 10 50
The use of stolen credentials is a hot commodity this year allowing threat actors to move laterally within the network in order to avoid breach detection.
I'm a big fan of Windows' offline folder caching and have used it on my laptops for over a decade.  One thing I don't like about it, however, is how difficult Microsoft has made it for the cache to be moved out of the Windows folder.  Here's how to …
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

808 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