Ping an IP address on a Local Network

G

Guest

I am trying to figure out a way to ping IP address. This is because we assign all of our IP address in house, and when we are assigning a new one, we wish to verify that it is not already in use. THis functionality needs to be webpage based though. Basically all I need is a way to tell a computer to ping a certian IP, and tell me if it is in use or not. Any ideas? If someone could provide some code that would do that it would be greatly appreciated. Thank you
 
R

Rob Meade

...
I am trying to figure out a way to ping IP address. This is because we
assign all of our IP address in house, and when we are assigning a new one,
we wish to verify that it is not already in use. THis functionality needs to
be webpage based though. Basically all I need is a way to tell a computer to
ping a certian IP, and tell me if it is in use or not. Any ideas? If someone
could provide some code that would do that it would be greatly appreciated.
Thank you.

Hi Devin,

I had to do something similar myself recently to see if our development
servers were running or not (cheap trick I guess)...

I had 2 options at the time (as I dont know .net inside out yet) - one was
to use SQL Server - have a stored procedure which does the actual pinging,
and then parse the results in the recordset when they are returned to the
webform (do a google search for "asp ping from sql server" and you'll
probably get the article immediately!)...

The other option I discovered was a http request method in .net - dont have
the code to hand, this was what we used in the end, with some exception
catching.

Once we got it to a 'yes' / 'no' kinda thing we went from there - built a
small status page for the boxes...

A colleague mentioned about just executing a shell command - meant little to
me - but I guess there's a way to fire a "ping xxx.xxx.xxx.xxx" directly
from the server via .net.

I hope this is of some use at least...

Regards

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top