473,748 Members | 2,502 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2117
"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*******@disc ussions.microso ft.com> wrote in message
news:CD******** *************** ***********@mic rosoft.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
10201
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 derived from Lance Olson's code. The examples use raw sockets and I get a permissions error: "An attempt was made to access a socket in a way
9
15307
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
3459
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 wondering if anyone has a ping function they could share with me. I have done some searching on this but cannot find anything specifically for vb2003. Sub PingComputer If PingStatus(PCName) = "Success" Then
0
1965
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 inside the switch is 30-150ms. Pinging the switch's own IP address from inside the switch is 1-20ms. Pinging the switch from the a network server or workstation is 30-50ms. Pinging network devices other than the Nortel switches is 1-4 ms response so I...
3
11871
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 the IP is pingable (true) image A is displayed if it is not (false) then image B is. The code i am using is as follows Dim IPAddress As String = "192.168.1.122"
0
1481
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 System.Diagnostics Imports System.Threading Public Class Form1
5
2321
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 to do is take each IP address, parse it to My.Computer.Network.Ping if the result returns false then the IP address is diaplayed in a TextBox1. If the result is true then the IP address is either disgarded or displayed in another TextBox field. ...
1
2565
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
4208
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 recommended. If anyone has some suggestions, I'd love to give them a try - this is driving me nuts!! I am connected via wired-LAN to a Linksys WRT-600N router; there are 4 other computers on the network. The other 3 computers are working perfectly...
0
8994
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8831
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9555
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9250
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4607
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.