Need a batch file for Rebooting DSL modem

August 5th, 2016

Hi my friends , I need a batch file for rebooting DSL modem ? Is it possile ? for windows 8 X64.
Thanks a lot.

Answer #1
@echo off ipconfig /release pause ipconfig /flushdns pause ipconfig /renew pause ipconfig /all
Answer #2
thanks a lot . also Is it possible to change “username” & “password” for PPPoE in modem’s sittings with a batch file too?
Answer #3
@echo off ipconfig /release pause ipconfig /flushdns pause ipconfig /renew pause ipconfig /all
Not working , I need sth to reboot my Modem only .
Answer #4
What is your Modems Model/Make?
Answer #5
What is your Modems Model/Make?
D-LINK 2640T.
Answer #6
This is just a sample please edit it accordingly

192.168.1.1 23
WAIT "login"
SEND "root\m"
WAIT "Password"
SEND "admin\m"
WAIT ">"
SEND "shell\m"
WAIT "#"
SEND "reboot\m"
WAIT ""

above script is written considering that your modem/router ip address is 192.168.1.1 and username and password is admin.These are default values, incase you have changed them, please change it in the script also.
Answer #7
I changed it like this but it’s not working my friend : 192.168.1.20 23
WAIT "login"
SEND "root\m"
WAIT "13532"
SEND "admin\m"
WAIT ">"
SEND "shell\m"
WAIT "#"
SEND "reboot\m"
WAIT ""

I changed my password & router ip but it’s not working.
Answer #8
…..How is a batch file going to communicate with a router that doesn’t even have SSH ?
You have to use the webui.
Answer #9
.....How is a batch file going to communicate with a router that doesn't even have SSH ?
You have to use the webui.

how do i do that my friend ?
Answer #10
go to the routers ip address, run ipconfig /all and with a browser go to the default gateway ip http://ip.
Answer #11
go to the routers ip address, run ipconfig /all and with a browser go to the default gateway ip http://ip.
you’re speaking kinda hard for me , please i need just a batch file , i can’t understand none of you’re tips.
thanks a lot.
Answer #12
You cant do this using a batch file, Its not possible you have to use the web page you used to change the password.
Answer #13
You cant do this using a batch file, Its not possible you have to use the web page you used to change the password.
I mean for rebooting DSL modem ,
Answer #14
Its the same thing, You cant do this you have to use the web page.
Answer #15

I need a batch file for rebooting DSL modem ? Is it possile ? for windows 8 X64.

Well, not with a plain batch file cause the batch environment does not offer commands for that. But Powershell offer commands for remote controlling the Internet Explorer to do the job for you.
Feel free to check the (german) script here: http://board.gulli.com/thread/1557934-reconnect-dir-635-mit-powershell-anpassungsfaehig-fuer-alle-routern-/
Otherwise you need at least a programming language like perl to interact with the web interface of your router.
A disconnect-connect in perl for a netgear-router will look like this:
use LWP::Simple;
use LWP::UserAgent;
$| = 1; # no flushing of output;
my( $req, $ua );
my( $username ) = ‘admin’;
my( $password ) = ‘admin’;
$ua = LWP::UserAgent->new;
# disconnect
$req = HTTP::Request->new( ‘POST’ => ‘http://192.168.1.1/st_poe.cgi’ );
$req->content( ‘Disconnect=Disconnect&ConMethod=Disconnect’ );
$req->authorization_basic( $username, $password );
my( $response ) = $ua->request( $req );
sleep( 20 ); # give the router 20s for disconnecting
#connect
$req = HTTP::Request->new( ‘POST’ => ‘http://192.168.1.1/st_poe.cgi’ );
$req->content( ‘Connect=%20%20Connect%20%20&ConMethod=Disconnect’ );
$req->authorization_basic( $username, $password );
$response = $ua->request( $req );
A more convenient way for non-programmers would be to use the scripting function of the jdownloader. There you can setup username and password for the router and a reset is just one click instead of logging in the web interface of the router to do it manually.

 

| Sitemap |