473,327 Members | 1,952 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

Ping an IP address on a Local Network

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
Nov 18 '05 #1
2 2090
"Devin" wrote...
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
Nov 18 '05 #2
There are some classes here that should help you put together a page that
can do a ping:

http://www.gotdotnet.com/community/u...spx?query=ping

There's also a commercial component here:

http://www.asp.net/ControlGallery/Co...069&tabindex=2
"Devin" <an*******@discussions.microsoft.com> wrote in message
news:CD**********************************@microsof t.com...
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.


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Tim C | last post by:
Is there a way to do a Ping from C# if you are not logged in as administrator on W2k? I am trying to do a Ping from C# running under ASP.NET. I have found several examples on the web, mostly...
9
by: Mantorok | last post by:
Hi all I want to ping an ipaddress/host to check for a response. Is there any easy way in C#/.Net to do this? Thanks Kev
6
by: Dave Marden | last post by:
I currently use this routine in vbscript to ping computers and get the status of ping to determine whether to try to backup a machine, I am trying to change it to work with vb2003.net I am...
0
by: aalguire | last post by:
We have quite a few Nortel Baystack 450 switches. We are experiencing daily network outages and in the process of diagnosis I noticed that ping response times were slow. Response times pinging from...
3
by: SyGC | last post by:
Hi People, Im trying to do a simple Loop where by an IP address is pinged (Using My.computer.network.ping) and the results, true or false, are used to invoke another line of code. Basically if...
0
by: SyGC | last post by:
Hi Guys, I have used Threading for Network.Ping to continuously ping an IP address if ping is successful Image A is displayed if not Image B. The code is as follows: Imports System Imports...
5
by: SyGC | last post by:
Greetings All, I have established a working Remote Connection to a MySQL DB using ODBC which allows me to select data in a Datagridview in my Form. The data is a list of IP addresses. What i want...
1
by: somsub | last post by:
Can any one help me on ping command . for this line of code ($ret, $duration, $ip) = $p->ping ($line) If i give any 1> invalid entry as a parameter ($line) in ping command or
6
by: belias | last post by:
So...here we go. I'm having an issue with one computer on a network not being able to ping other computers by name. I've spent the last day searching similar issues and I've tried all the steps...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.