Solved

Swapping TCP/IPv4 Settings

Posted on 2015-01-12
6
112 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
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Suggested Solutions

Quality of Service (QoS) options are nearly endless when it comes to networks today. This article is merely one example of how it can be handled in a hub-n-spoke design using a 3-tier configuration.
David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now