Proxy ping tool - TCP-IP

This is a discussion on Proxy ping tool - TCP-IP ; I am writing a script to test external network reachability of all machines in our LAN. I have a list of IPs of the machines attached to the router. I want to traverse the list and make each of them ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Proxy ping tool

  1. Proxy ping tool

    I am writing a script to test external network reachability of all
    machines in our LAN. I have a list of IPs of the machines attached to
    the router. I want to traverse the list and make each of them ping a
    well known URL - say www.yahoo.com

    The list is like:
    192.168.1.23
    192.168.1.97
    192.168.1.112

    Is there a tool that can achieve this? I want to instruct a set of
    machines to ping www.yahoo.com to make sure they can access external
    network.

    Thanks


  2. Re: Proxy ping tool

    On Thu, 03 Jul 2008 23:38:03 -0700, simpleton007 wrote:

    > I am writing a script to test external network reachability of all
    > machines in our LAN. I have a list of IPs of the machines attached to
    > the router. I want to traverse the list and make each of them ping a
    > well known URL - say www.yahoo.com
    >
    > The list is like:
    > 192.168.1.23
    > 192.168.1.97
    > 192.168.1.112
    >
    > Is there a tool that can achieve this? I want to instruct a set of
    > machines to ping www.yahoo.com to make sure they can access external
    > network.


    Have a look at rancid, especially the clogin (or more generally and
    login) utility.

    HTH,
    M4

  3. Re: Proxy ping tool

    On Thu, 3 Jul 2008 23:38:03 -0700 (PDT), simpleton007@gmail.com wrote:
    > I am writing a script to test external network reachability of all
    > machines in our LAN. I have a list of IPs of the machines attached to
    > the router. I want to traverse the list and make each of them ping a
    > well known URL - say www.yahoo.com
    >
    > The list is like:
    > 192.168.1.23
    > 192.168.1.97
    > 192.168.1.112
    >
    > Is there a tool that can achieve this?


    Yes, Unix and ssh:

    for host in 192.168.1.23 192.168.1.97 192.168.1.112 ; do
    ssh $host ping -c1 -w5 -q www.yahoo.com \
    || complain_about_connectivity $host
    done

    It assumes you have configured ssh, for this user, to accept a
    password-less public key, or used ssh-agent(1) to unlock the key.

    But note that it is impolite to ping www.yahoo.com frequently from a
    script. Do you really need to test more than one host in your LAN? Do
    you really have situations where both host A and B are on the LAN, but
    only host A can reach the internet? If so, can't you just wait until
    it causes problems, and detect those problems?

    /Jorgen

    --
    // Jorgen Grahn \X/ snipabacken.se> R'lyeh wgah'nagl fhtagn!

+ Reply to Thread