Solved

Swapping TCP/IPv4 Settings

Posted on 2015-01-12
6
113 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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need a cheap RFID setup 10 68
discontiguous network and EIGRP 12 63
Xymon customize http timeout 2 65
EIGRP Configuration 2 46
This article offers some helpful and general tips for safe browsing and online shopping. It offers simple and manageable procedures that help to ensure the safety of one's personal information and the security of any devices.
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
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…

920 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

12 Experts available now in Live!

Get 1:1 Help Now