Meaningless Drivel is fun!*
The moose likes Sockets and Internet Protocols and the fly likes multicasting java program with nodes on different static or dynamic networks! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "multicasting java program with nodes on different static or dynamic networks!" Watch "multicasting java program with nodes on different static or dynamic networks!" New topic
Author

multicasting java program with nodes on different static or dynamic networks!

Mandar Khire
Ranch Hand

Joined: Sep 11, 2007
Posts: 492

I am working on java program which runs on server. Java program monitor lots of electronics custom made device which connected to the server.
When at first time both server & that device starts, server send broadcast message which receive to that device, it send its details to server so basis of that details i can show different print statements on screen & we can understand that device no x condition, whether it connected, disconnected or working on plan a, plan b etc

Always i enter ip address in that device manually(Not every time only first time), so we can say every device ip address i know. Or i can change it. Device currently not smart to automatically get network Server network setting is not accessible to java user or developer but may be by program we can fetch server network configuration & print it in console!

Now problem is when i connect device on different network, & we dont know what is network ip...eg i can connect very easily if server connect on 192.168.0.0 network & some device on same network then on those devices i can keep ip like 192.168.0.3 or 192.168.0.254.

It not always happens that we can know the network ip or details by wire comes on table for internet which we can just plug on laptop or electronics device...in simple scenario like normal offices or home we can easily plug that wire to laptop & see network configuration by tracert or ping but some more secure place where laptop not allow & no one tells what ip for particular wire comes on table...some where far router placed restricted area there i face problem.

So that situation my java program fail to send broadcast packet using UDP.
I am try to find out way to communicate those electronic devices & server when both connect on different networks considering we can fetch network details on server or on electronics device!

I search on google, regarding how networks works, how router works, which protocol do what etc from basics.
So find out some points
1. If router configure for advertise its network details to all its ports then by that packet if our electronic device learn how to read it, then problem will solve?
2. By this we can list all network details for each electronic device on paper & in our java program we can use multicasting udp program given in many website (simple example).

I found one API also after reading this & this.
That API is jnetpcap.

Now i think my electronics device should more intelligent to read or fetch different packets. So it also do something for get reach to the server!

But i need guidance from expert...whether i am going right path or doing wrongly?

Millions saw the apple fall, but Newton asked why.
 
wood burning stoves
 
subject: multicasting java program with nodes on different static or dynamic networks!
 
Similar Threads
How come I can ping a machine?
naive server ip connection question
jpcap after capturing need some analis
trying to connect to another ip adress
IPAddress and Port