• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to connect router using java application  RSS feed

 
NagarajGoud uppala
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
i am new to network programing.i would like to connect to router.can any one please explain the procedure to connect router using telnet or ssh or http or snp.

Thanks & Regards,
Nagaraju
 
Joe Ess
Bartender
Posts: 9406
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That depends on what interface the router makes available. Then it's just a matter of sending the commands. Again, probably hardware-dependent.
UPNP may be an option as well, again, depending on your hardware.
 
NagarajGoud uppala
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joe Ess wrote:That depends on what interface the router makes available. Then it's just a matter of sending the commands. Again, probably hardware-dependent.

Hi Joe Ess,
thanks for your information.on my router i can connect using telnet or ssh protocal.for connection my thinking is
1)create a Serversocket
2)using UrlConnect
we can do it. isn't it?
any further information appriciated

Thanks in advance,
Nagaraju.

 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you trying to write Java code that connects to the router and then issues commands to it programmatically? If so, neither a ServerSocket, nor the URLConnection class will be of much help.

The Apache Commons Net library contains a Telnet client library you could use.
 
Rusty Shackleford
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NagarajGoud uppala wrote:
Joe Ess wrote:That depends on what interface the router makes available. Then it's just a matter of sending the commands. Again, probably hardware-dependent.

Hi Joe Ess,
thanks for your information.on my router i can connect using telnet or ssh protocal.for connection my thinking is
1)create a Serversocket
2)using UrlConnect
we can do it. isn't it?
any further information appriciated

Thanks in advance,
Nagaraju.



You can either:

1. Implement telnet using Socket, since it seems you are wanting client functionality

2. Use a telnet or ssh library.
 
NagarajGoud uppala
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Implement telnet using Socket, since it seems you are wanting client functionality

2. Use a telnet or ssh library.


Yes ok i will try if any problems raises i will ask here
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!