{"id":574,"date":"2019-08-15T07:55:20","date_gmt":"2019-08-15T12:55:20","guid":{"rendered":"http:\/\/www.hpux.ws\/?p=574"},"modified":"2019-08-15T07:56:29","modified_gmt":"2019-08-15T12:56:29","slug":"apa-network-pairings-how-to-find-out-fast-what-they-are","status":"publish","type":"post","link":"http:\/\/www.hpux.ws\/?p=574","title":{"rendered":"APA network pairings: How to find out fast what they are"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>Script for detecting\nAPA network bonded pairs. It is already built into the cinam21t drd image. It\nwill save you 3-5 hours of guess work on future builds.<\/p>\n\n\n\n<p>Networking was\nchanged to protect the innocent.<\/p>\n\n\n\n<p>Here is an example:<\/p>\n\n\n\n<table class=\"wp-block-table\"><tbody><tr><td>   [root@cinam21t]:\/home\/root #   .\/apanetwork_discover 142.18.1.26 142.18.1.96   &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;   -This script figures out which NIC cards   are APA paired.-   -It has two   inputs:&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.-   -1- The assigned IP address of the APA   Group lan90#&#8230;..-   <br>-2- The known network address of an HP-UX   server on net.-   -ex .\/apanetwork_discover 142.18.1.26 142.18.1.96   &#8230;&#8230;-   <br>&#8211; These are cinam21t and   stlam31t&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..-   <br>&#8211; The system must be OFF network for this   to work &#8230;&#8230;-  <br> &#8211; Instruction:   &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..-   <br>&#8211; \/sbin\/init.d\/net stop   &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;..-   <br>&#8211; \/sbin\/init.d\/vlan stop   &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.-  <br> &#8211; \/sbin\/init.d\/hplm stop   &#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;&#8230;.-   <br>&#8211; \/sbin\/init.d\/hpapa stop (You may need to   ctrl-break&#8230;-   <br>&#8211; netstat -rn (ifconfig lan# down then   unplumb any lans.-   <br>&#8211; Wash,rinse and repeat for   lan901,lan902,lan903 &#8230;&#8230;.-  <br> &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;   <br>The LAN is lan0   Success lan0 as 142.18.1.26 was able to   ping 142.18.1.96   The LAN is lan8   NO JOY lan8 as 142.18.1.26 was able NOT to   ping 142.18.1.96   <br>The LAN is lan16   NO JOY lan16 as 142.18.1.26 was able NOT to   ping 142.18.1.96   <br>The LAN is lan19   NO JOY lan19 as 142.18.1.26 was able NOT to   ping 142.18.1.96   <br>The LAN is lan2   NO JOY lan2 as 142.18.1.26 was able NOT to   ping 142.18.1.96   <br>The LAN is lan49   NO JOY lan49 as 142.18.1.26 was able NOT to   ping 142.18.1.96   <br>The LAN is lan52   NO JOY lan52 as 142.18.1.26 was able NOT to   ping 142.18.1.96   <br>The LAN is lan56   Success lan56 as 142.18.1.26 was able to   ping 142.18.1.96   [root@cinam21t]:\/home\/root #   <\/td><\/tr><\/tbody><\/table>\n\n\n\n<p>In this case lan0\nare in the bonded pair (lan900)<\/p>\n\n\n\n<p>Take a nwmgr output before bringing network down. Run from console only<\/p>\n\n\n\n<p>Here is the script code<\/p>\n\n\n\n<p>\/root\/build # cat apanetwork_discover<\/p>\n\n\n\n<h1 class=\"wp-block-heading\">!\/bin\/ksh<\/h1>\n\n\n\n<p>#<br>\necho &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8220;<br>\necho &#8220;-This script figures out which NIC cards are APA paired.-&#8220;<br>\necho &#8220;-It has two inputs:\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026.-&#8220;<br>\necho &#8220;-1- The assigned IP address of the APA Group lan90#\u2026..-&#8220;<br>\necho &#8220;-2- The known network address of an HP-UX server on net.-&#8220;<br>\necho &#8220;-ex .\/apanetwork_discover 172.19.1.26 172.19.1.96 \u2026\u2026-&#8220;<br>\necho &#8220;- These are stlam34t and stlam31t\u2026\u2026\u2026\u2026\u2026\u2026\u2026..-&#8220;<br>\necho &#8220;- The system must be OFF network for this to work \u2026\u2026-&#8220;<br>\necho &#8220;- Instruction: \u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026..-&#8220;<br>\necho &#8220;- \/sbin\/init.d\/net stop \u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026..-&#8220;<br>\necho &#8220;- \/sbin\/init.d\/vlan stop \u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026.-&#8220;<br>\necho &#8220;- \/sbin\/init.d\/hplm stop \u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026\u2026.-&#8220;<br>\necho &#8220;- \/sbin\/init.d\/hpapa stop (You may need to ctrl-break\u2026-&#8220;<br>\necho &#8220;- netstat -rn (ifconfig lan# down then unplumb any lans.-&#8220;<br>\necho &#8220;- Wash,rinse and repeat for lan901,lan902,lan903 \u2026\u2026.-&#8220;<br>\necho &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8220;<br>\nIP2=$2<br>\nIPADDY=$1<\/p>\n\n\n\n<p>nwmgr | awk &#8216;!\/hp_apa\/{ printf &#8220;%s %s\\n&#8221;,  $1,$2 }&#8217; | awk &#8216;\/UP\/{print $1}&#8217; | while read -r LN<br>\ndo<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> sleep 1\n echo \"The LAN is ${LN}\"\n ifconfig ${LN} ${IPADDY} netmask 255.255.255.0 up > \/dev\/null\n ping ${IP2} -n 1 -m 5 > \/dev\/null\n rc=$?\n if [ $rc -eq 0 ]\n then\n   echo \"Success $LN as $IPADDY was able to ping $IP2\"\n else\n   echo \"NO JOY $LN as $IPADDY was able NOT to ping $IP2\"\n fi\n ifconfig ${LN} down\n ifconfig ${LN} unplumb<\/code><\/pre>\n\n\n\n<p>done<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Script for detecting APA network bonded pairs. It is already built into the cinam21t drd image. It will save you 3-5 hours of guess work on future builds. Networking was changed to protect the innocent. Here is an example: [root@cinam21t]:\/home\/root # .\/apanetwork_discover 142.18.1.26 142.18.1.96 &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212; -This script figures out which NIC cards are APA paired.- [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_kadence_starter_templates_imported_post":false,"footnotes":""},"categories":[47,52,39,84],"tags":[],"class_list":["post-574","post","type-post","status-publish","format-standard","hentry","category-hpvm","category-ignite-ux-2","category-scripting","category-serviceguard-2"],"_links":{"self":[{"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts\/574"}],"collection":[{"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=574"}],"version-history":[{"count":2,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts\/574\/revisions"}],"predecessor-version":[{"id":578,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=\/wp\/v2\/posts\/574\/revisions\/578"}],"wp:attachment":[{"href":"http:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=574"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.hpux.ws\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}