It may not be that the ping is a problem, it is more likely my ISP. You see a GNU-License, Perl script that my firewall uses ("syswatch" by Point Clark Networks) checks if a WAN iface is "up", then attempts to use an icmp ping via the explicit iface to check if it still has internet connectivity.

This works fine thru FIOS, but Comcast seems to block or otherwise mangle the icmp pings (no matter what target host I try). I tried switching the ping object to use UDP, but that doesn't work at all, and the Net::Ping docs seem to indicate that those are the only protocols that can be explicitly directed to a specific iface -- which I need to do, in order to check that specific connection.

Does anyone have any other options I can try to validate a WAN link's internet connectivity? I thought of using a WWW-Head request over http, but that can't be directed through a specific interface -- maybe if we dynamically adjusted the OS's routes to push the request thru an interface, but that seems klunky at best.

Anyone have any ideas how I can get Perl to detect my WAN status more accurately when I have multiple WAN interfaces? Thanks! -AJ


In reply to Net::Ping not working right by aweber1nj

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.