473,672 Members | 2,698 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 2110
"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
10199
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
15299
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
3454
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
1962
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
11865
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
1459
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
2320
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
2564
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
4201
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
8419
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
8945
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
8844
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...
1
8642
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7472
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6254
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5720
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
4239
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
1836
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.