Results 1 to 5 of 5

Thread: Pinging/retreiving IP addresses on different subnets

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2024
    Posts
    10

    Pinging/retreiving IP addresses on different subnets

    I am working on an application that should search a subnet for a range of connected IP addresses.

    I was planning on pinging an IP address range to see who is connected, but i am unclear how to ping to different subnets.

    Using the My.Computer.Network.Ping() function i am able to return devices on my current subnet, but how can i search different subnets for connected devices?

  2. #2
    PowerPoster PlausiblyDamp's Avatar
    Join Date
    Dec 2016
    Location
    Pontypool, Wales
    Posts
    2,678

    Re: Pinging/retreiving IP addresses on different subnets

    If the other subnets are part of your network and you can route to them then you should be able to exactly the same for each subnet.

    This does assume routing is properly configured and no firewalls etc. are blocking ping packets.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2024
    Posts
    10

    Re: Pinging/retreiving IP addresses on different subnets

    When you say "route to them", does this mean making a routing entry to my PC from my application?

  4. #4
    Powered By Medtronic dbasnett's Avatar
    Join Date
    Dec 2007
    Location
    Jefferson City, MO
    Posts
    9,804

    Re: Pinging/retreiving IP addresses on different subnets

    Quote Originally Posted by PlausiblyDamp View Post
    If the other subnets are part of your network and you can route to them then you should be able to exactly the same for each subnet.

    This does assume routing is properly configured and no firewalls etc. are blocking ping packets.
    Your PC is connected to a network
    That network knows how to get to other networks
    Those networks know how to get to even more networks, etc.

    As PlausiblyDamp said it will depend on the configuration of the network devices you pass through to get to the target host.

    Use the command prompt and theping command to test.

    results from my PC
    Code:
    Pinging google.com [172.217.5.14] with 32 bytes of data:
    Reply from 172.217.5.14: bytes=32 time=23ms TTL=50
    Reply from 172.217.5.14: bytes=32 time=23ms TTL=50
    Reply from 172.217.5.14: bytes=32 time=23ms TTL=50
    Reply from 172.217.5.14: bytes=32 time=23ms TTL=50
    
    Ping statistics for 172.217.5.14:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 23ms, Maximum = 23ms, Average = 23ms
    My First Computer -- Documentation Link (RT?M) -- Using the Debugger -- Prime Number Sieve
    Counting Bits -- Subnet Calculator -- UI Guidelines -- >> SerialPort Answer <<

    "Those who use Application.DoEvents have no idea what it does and those who know what it does never use it." John Wein

  5. #5
    PowerPoster
    Join Date
    Nov 2017
    Posts
    3,324

    Re: Pinging/retreiving IP addresses on different subnets

    Quote Originally Posted by RadioscoutNews View Post
    When you say "route to them", does this mean making a routing entry to my PC from my application?
    No, and we already went through this with you in your other thread in Network Programming. If you are still trying to tackle this lack of connectivity problem from a "let's solve this using VB.NET code" standpoint, then you are doing it wrong.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width