Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 297
  • Last Modified:

How to do ARP-like request

Hi,

We're creating a capability for distributed measuring of application performance that runs on workstations and that we can deploy on our network.

We'd like for these "watchdog" PCs to announce themselves to the nearest data consolidation server.

So, what we'd like to do is have them do some sort of a broadcast to find the servers that are out there available for receiving the data they're collecting.

How would one write a "broadcast" network request (like ARP or a DHCP client request) to announce themselves.  We would know the "port" to use, but not the IP address to direct the message to (it should be anything that responds).

Any example code (C, Java, VB, perl, etc.) that does this would be even better.
0
Gene Klamerus
Asked:
Gene Klamerus
  • 6
  • 3
1 Solution
 
kiranghagCommented:
you need to work with raw packets.
you can create layer 2 frames using raw packets. which platform are u using...

afik, unix platform has many libraries which allow you to send raw packets on the wire.

exp. if u send an ethernet frame to address with all ones as destination address, its read by every machine.

here we need to assume that the underlying network which we'll be using suports broadcast frames.

and yes, when u send broadcast packets, u need not bother yourself with the ports. ports come into picture when u deal with network layer, this notion greatly comes from tcp/ip world.

you must deal with the frame type when u send mac layer packets. take a look at various data link layer frame formats (ethernet for exp.). u need to give - source mac address, dest mac address, data length, data, frame type and checksum at minumum.

start with the complete frame understanding for your network's pysical layer. if u are putting this thing onto professional use, register a frame type for yourself or code with any unused one. and then choose the programming language which has the required libraries and which u know to use.

HTH
0
 
Gene KlamerusTechnical ArchitectAuthor Commented:
This is an ethernet, IP network.  There are multiple machine types on it (mainframes, VAXen, Wintel).

Is this do-able from windows with some flavour of sockets?  As I said, we have windows clients.  Is there any other commercial library out that that could be used?

I was hoping there might be some way to broadcast to a port, but not an address.  That way the server listeners could be written as a normal network service, and it would only the the clients that would be "weird".  It sounds like you're saying this might be possible by using an ethernet address of all ones.  Is that correct?  That would be very easy.

0
 
kiranghagCommented:
nope, as i said, ports do not apply to this level.
this can be well done on windows platforms....but not sure where u'll get libs and other stuff.
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
Gene KlamerusTechnical ArchitectAuthor Commented:
Such is life
0
 
Gene KlamerusTechnical ArchitectAuthor Commented:
The problem with working at level 2 is the routing.  So far as I know, our routers only pass along a fixed set of request types that aren't working at the IP level (BOOTP, etc.).  The requirement here is for a solution across our corporate WAN, so working at level 2 isn't going to work.

We'll probably need to define a network service "broker" that keeps tracks of what servers are available and directs a client to an appropriate server.  We could set this up as a web server and put the servers into a Load Balanced Cluster to get redundancy on the broker.

This is sort of how Documentum (a doc mgmt product) works.  Individual servers "advertise" their availability to a broker.  Clients ask the broker for what servers are available, and the users of the clients choose which they want.  We'd just have an application as a "user".
0
 
Gene KlamerusTechnical ArchitectAuthor Commented:
The problem with working at level 2 is the routing.  So far as I know, our routers only pass along a fixed set of request types that aren't working at the IP level (BOOTP, etc.).  The requirement here is for a solution across our corporate WAN, so working at level 2 isn't going to work.

We'll probably need to define a network service "broker" that keeps tracks of what servers are available and directs a client to an appropriate server.  We could set this up as a web server and put the servers into a Load Balanced Cluster to get redundancy on the broker.

This is sort of how Documentum (a doc mgmt product) works.  Individual servers "advertise" their availability to a broker.  Clients ask the broker for what servers are available, and the users of the clients choose which they want.  We'd just have an application as a "user".
0
 
Gene KlamerusTechnical ArchitectAuthor Commented:
well that was weird.
0
 
kiranghagCommented:
if you want to work across the network, u can use the common protocol which is already being used by all of them.
so if u are having a tcp/ip based network. u can advertise using udp.
broadcasts are often not desirable for many reasons, one - they create more network traffic. and two - they are not forwarded by many intermediate devices (routers, switches).
you can register a multicast address for advertiseing.
routing algorothms use multicast to advertise and find the routers on the network. this traffic is ignored by others.
you can study diff. routing algos. exp. ospfl. this algorithm automatically  finds out routers on a network and exchange info among them.

a good study of such algorithms would greatly simplify your design..
HTH
0
 
Gene KlamerusTechnical ArchitectAuthor Commented:
Unfortunately, we have no control over the networking in the environment (that's run by EDS), and we do have numerous routers (hundreds) that route data across the WAN.  We aren't allowed to modify them.  We can only provide rules for the firewalls between our various environments.  As I understand it, the routers won't route level 2 protocols.

We can send out broadcasts (provided they're routed).  These broadcast messages will only happen when we bring up one of these data collector PCs (to find a nearby server).  Or if they reboot or something.  At most, this is a once / day thing and will have no significant network impact.

We can do UDP and we could do a broadcast type message, but I've been told that we don't have a multicast network (I don't know what that means).  Is that something that requires setup on the bridges/switches/hubs/etc.?
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now