Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Static routes IP batch file for remote PC's

Posted on 2010-08-17
6
Medium Priority
?
1,492 Views
Last Modified: 2012-05-10
Hi guys

We have PC's on remote locations, that are connected to the WAN via our VPN. The issue I have is that many times in the week, some PC's lose connection to us which means that I have to keep running a batch file consisting of the static routes.

For example, one of the routes in the batch file (of many) will be:

route add 10.0.1.0 MASK 255.255.255.0 10.0.0.254

The strange thing is that in the DHCP manager, under the Classless Static Routes they have all been added, yet I still find myself having to run this batch file.

Is there anyway that I can do something to prevent this from constantly happening?

Thanks
Y
0
Comment
Question by:Yashy
  • 3
  • 3
6 Comments
 
LVL 8

Expert Comment

by:SGrossmann
ID: 33456583
1) You can change the VPN setup to route all traffic trough you VPN gateway as long as the gateway knows of all routes.2) If none of the routes is needed localy on the clients you can add the routes persistent route -p add ...
0
 
LVL 1

Author Comment

by:Yashy
ID: 33456960
Thanks SGrossmann, but I've got very basic knowledge when it comes to adding routes/vpn's.

The routes batch file is run on our Terminal Services box. People connect onto the TS server to work remotely. I may have to design a diagram to show what I mean?
0
 
LVL 8

Expert Comment

by:SGrossmann
ID: 33456993
To make it a bit clear, the whole thing is on a terminal server?Is the connection that does not work an outgoing connection or an incomming connect?
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
LVL 1

Author Comment

by:Yashy
ID: 33457177
This is the scenario:

PC1 is in a remote location. It has the following credentials:

IP: 10.0.14.10/24
Gateway: 10.0.14.1

Primary DNS: 10.0.0.2 (server at head office)
Secondary DNS: 10.0.0.15 (server at head office consisting of the route script batch file)

Their router has VPN details which connects to our HO router and hence they can log onto the WAN.

The user will then try to log onto the Domain and the system will say 'Domain unavailable' etc. We then run the static routes on our Head Office server and then miraculously, it creates a connection and then they are able to log on.



0
 
LVL 8

Accepted Solution

by:
SGrossmann earned 2000 total points
ID: 33457206
ok let's take the easiest way.as all you routes are always the same you can add them as static routes to the systems.change the following lineroute add 10.0.1.0 MASK 255.255.255.0 10.0.0.254toroute -p add 10.0.1.0 MASK 255.255.255.0 10.0.0.254this makes the route static and it will not disapear not even if you reboot a system.
0
 
LVL 1

Author Comment

by:Yashy
ID: 33458602
Thanks a lot for that. I'll go ahead and do that. Cheers!
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This tutorial will walk an individual through configuring a drive on a Windows Server 2008 to perform shadow copies in order to quickly recover deleted files and folders. Click on Start and then select Computer to view the available drives on the se…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

971 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