DrayTek UK Users' Community Forum

Help, Advice and Solutions from DrayTek Users

Telnet Scripting?

  • nigelmercier
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
12 Jan 2011 12:42 #65620 by nigelmercier
Telnet Scripting? was created by nigelmercier
I'm trying to find a way to speed-up my router install.

Is there a way to execute a batch file to the router via Telnet?

Please Log in or Create an account to join the conversation.

More
12 Jan 2011 15:10 #65627 by voodle
Replied by voodle on topic Telnet Scripting?
http://support.moonpoint.com/downloads/windows/network/Telnet/tst10.php

Very handy application once you get the hang of the scripting :)
The part I like most is that you can change lots of WAN settings through telnet without having to restart the router, which is good if you switch WAN connection types (although I havent figured out how to switch between ethernet and 3G yet, which is what I really want to do)

Please Log in or Create an account to join the conversation.

  • nigelmercier
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
12 Jan 2011 16:18 #65630 by nigelmercier
Replied by nigelmercier on topic Telnet Scripting?

Voodle wrote: http://support.moonpoint.com/downloads/windows/network/Telnet/tst10.php
Very handy application once you get the hang of the scripting :)



Great stuff, thank you. For the benefit of any others, here are the files I used, all saved on a flash drive:

Executable: tst10.exe (downloaded from above)

Batch file: ipbind2mac.bat (create with Notepad, then Save As | All Files)
Code:
tst10.exe /r:BIPM.txt


Script file: BIPM.txt
Code:
192.168.1.1 23 wait "assword:" send "admin\m" wait ">" send "ip bindmac add 192.168.0.2 00:14:6C:15:AC:3E\m" wait ">" send "\m" send "ip bindmac add 192.168.0.10 00:16:76:68:C9:08\m" wait ">" send "\m" send "ip bindmac add 192.168.0.11 00:1A:4D:57:9B:24\m" wait ">" send "\m" send "ip bindmac add 192.168.0.12 00:21:70:74:87:02\m" wait ">" send "\m" send "ip bindmac add 192.168.0.13 00:1F:E2:90:46:E7\m" wait ">" send "\m" send "ip bindmac add 192.168.0.15 00:16:E6:85:67:53\m" wait ">" send "\m" send "ip bindmac add 192.168.0.16 00:26:22:8C:08:60\m" wait ">" send "\m" send "ip bindmac add 192.168.0.17 90:4C:E5:86:B7:26\m" wait ">" send "\m" send "ip bindmac add 192.168.0.24 00:1A:A0:98:C7:BA\m" wait ">" send "\m" send "ip bindmac add 192.168.0.25 00:1F:D0:91:D6:75\m" wait ">" send "\m" send "ip bindmac add 192.168.0.26 00:1F:D0:91:D1:FD\m" wait ">" send "\m" send "ip bindmac add 192.168.0.31 00:18:84:40:21:6C\m" wait ">" send "\m" send "ip bindmac add 192.168.0.32 00:18:84:40:21:6D\m" wait ">" send "\m" send "ip bindmac add 192.168.0.33 00:18:84:40:21:6E\m" wait ">" send "\m" send "ip bindmac add 192.168.0.153 00:1A:4B:16:1C:1F\m" wait ">" send "\m" send "ip bindmac add 192.168.0.210 00:03:EA:03:22:52\m" wait ">" send "\m" send "\m" send "exit\m" send "\m" send "\m"


Just run the batch file, no need for PuTTY or similar.

Please Log in or Create an account to join the conversation.

More
12 Jan 2011 16:36 #65631 by thrain
Replied by thrain on topic Telnet Scripting?
check out cygwin and expect

Please Log in or Create an account to join the conversation.

  • nigelmercier
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
14 Jan 2011 17:35 #65670 by nigelmercier
Replied by nigelmercier on topic Telnet Scripting?

Thrain wrote: check out cygwin and expect



Yes, always easier to use Unix than a Windows program on a Windows PC :roll:

Please Log in or Create an account to join the conversation.

Moderators: ChrisSami