Thats the whole point :) The netstat -i on node1 will return something like
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs + Coll en0 1500 link#2 0.4.ac.3e.65.22 169651762 0 150335201 + 0 0 en0 1500 172.22.6 node1 169651762 0 150335201 + 0 0 en2 1500 link#3 0.4.ac.3e.15.54 1387003 0 1389752 +0 0 en2 1500 172.22.7 node1hb 1387003 0 1389752 0 + 0 en1 9000 link#4 0.4.ac.7c.95.ec 232558546 0 76198992 + 0 0 en1 9000 172.22.5 node1r 232558546 0 76198992 0 + 0 <loop back interfaces snipped>
and a netstat -i on node2 will return something like
Name Mtu Network Address Ipkts Ierrs Opkts Oerrs + Coll en0 1500 link#2 0.4.ac.3e.65.4a 36127938 0 37211569 +0 0 en0 1500 172.22.6 node2 36127938 0 37211569 +0 0 en2 1500 link#3 0.4.ac.3e.65.c6 1412752 0 1364210 +0 0 en2 1500 172.22.7 node2hb 1412752 0 1364210 0 + 0 en1 9000 link#4 0.4.ac.7c.97.2f 76199094 0 232558588 +11 0 en1 9000 172.22.5 node2r 76199094 0 232558588 11 + 0 <loop back interfaces snipped>
Where node? is the primary interface, node?hb is the heartbeat link and node?r is the redundant link that node2 will use to pretend to be node1 in the event of node1 failing, in which case interface en1 will no longer have a name of node2r but node1. Sooo, if node1 is up the test will fail on node2 (which is what we want) but if node1 is dead the test will succeed which, again, is what we want. I hope that makes more sense now.

In reply to Re: Re: HA node check by coec
in thread HA node check by coec

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.