This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes how to connect router using java application Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Reply Bookmark "how to connect router using java application " Watch "how to connect router using java application " New topic
Author

how to connect router using java application

NagarajGoud uppala
Ranch Hand

Joined: Nov 13, 2008
Posts: 86
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


I know Life is very Tough...But I AM TOUGHER
SCJP 1.5
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8262

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.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
NagarajGoud uppala
Ranch Hand

Joined: Nov 13, 2008
Posts: 86
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
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
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.


Android appsImageJ pluginsJava web charts
Rusty Shackleford
Ranch Hand

Joined: Jan 03, 2006
Posts: 490
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.

"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
NagarajGoud uppala
Ranch Hand

Joined: Nov 13, 2008
Posts: 86
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
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: how to connect router using java application
 
Similar Threads
How to make LAN chat working over INTERNET
How to create application router using java?
router configuration
Connecting to a router
configure Internet wireless router