AIM Systems Posted April 1, 2010 Report Share Posted April 1, 2010 Hi all,I'm hoping someone wiser that me can shred some light on this problem.We have 2 internet connection into the office, I want to write a default gateway switcher script.For day-to-day stuff we have a very high speed but capped DSL line.For downloading large files and less important stuff, we have a slower speed unlimited line.I'm trying to write a script that goes like:if ([find_current_gateway] == 192.168.0.100) then REM change to slower DSL route change 0.0.0.0 mask 0.0.0.0 192.168.0.200 echo Gateway is now [find_current_gateway]else if ([find_current_gateway] == 192.168.0.200) then REM change to faster DSL route change 0.0.0.0 mask 0.0.0.0 192.168.0.100 echo Gateway is now [find_current_gateway] endifendifDoes anyone know the DOS command (or group of commands) to return just the default gateway [find_current_gateway]?'netstat -nr' returns far too much information Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.