gatorback DD-WRT User
Joined: 04 Feb 2007 Posts: 426 Location: Fountain of Youth
|
Posted: Sat Jul 25, 2015 17:30 Post subject: Windows 7 Gateway DNS Variable |
|
My Win7 laptop access several different dd-wrt routers that are at various sites around town. Each time I need to access a particular gateway, I must find the LAN IP of the gateway and type this into the web browser.
In an ideal world, the LAN IP would be put into a variable:
Code: | set "ip="
for /f "tokens=1-2 delims=:" %%a in ('ipconfig^|find "Default"') do if not defined ip set ip=%%b
ping %ip% |
This .bat file finds the IP address and stores it in a variable.
Is there a clever way to assign the LAN gateway IP to a local DNS variable=mygateway?
My Google search was unsuccessful, but I am hopeful that someone clever has already done this. Thanks in advance for either links to the solution or actionable examples. _________________ My Routers | RT-N16 Wiki | TMO Cellspot Wiki
Peacock Flashing | Wireless N Conf | Linking Routers |
DD-WRT Wiki | DD-WRT Builds | Broadcom FAQ| QoS| OTRW |
|