Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Static Route using batch file

Status
Not open for further replies.

eseabrook2008

Technical User
Jan 9, 2008
74
0
0
CA
I'm trying to setup a batch file to add a static route for a VPN user. The problem is, the below only works if I put the exact interface ID in

route add 172.16.0.0 mask 255.255.0.0 172.16.xxx.xxx IF XXXXXXXX

If I don't specify the interface, I get an error (Interface index wrong or gateway not on same network as interface). Since I need to specify the IF (which changes every time I connect the VPN), how can I get that information for a batch file?

Background - access network data over VPN and access internet through local resources.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top