{"id":7,"date":"2021-11-01T18:34:02","date_gmt":"2021-11-01T18:34:02","guid":{"rendered":"https:\/\/blog.kevinyohe.dev\/?p=7"},"modified":"2021-11-01T18:34:02","modified_gmt":"2021-11-01T18:34:02","slug":"f5-ltm-bash-script","status":"publish","type":"post","link":"https:\/\/blog.kevinyohe.dev\/?p=7","title":{"rendered":"F5 LTM bash script"},"content":{"rendered":"\n<p>Used when a new service is needed.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">#!\/bin\/bash\nread -p \"What is the name of this Virtual Server ? \" vs\nread -p \"What is the IP for the VIP ? \" vip\nread -p \"What is the IP for the node 1? \" node1_ip\nread -p \"What is the IP for the node 2? \" node2_ip\nread -p \"What is the TCP\/UDP port for this node?\" port\n\nnewvs=$(echo $vs|tr '[a-z]''[A-Z]')\necho -e '\\003\\0014'\necho\necho Here is the config\necho\necho tmsh\necho \"create ltm node $node1_ip { address $node1_ip monitor icmp }\"\necho \"create ltm node $node2_up { address $node2_ip monitor icmp }\"\necho \"create ltm virtual VS-$newvs-$port { members add { $node1_ip:$port { address $node1_ip } $node2_ip:$port { address $node2_ip }} monitor tcp }\"\n...<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Used when a new service is needed. #!\/bin\/bash read -p &#8220;What is the name of this Virtual Server ? &#8221; vs read -p &#8220;What is the IP for the VIP ? &#8221; vip read -p &#8220;What is the IP for the node 1? &#8221; node1_ip read -p &#8220;What is the IP for the node 2?&hellip; <a class=\"more-link\" href=\"https:\/\/blog.kevinyohe.dev\/?p=7\">Continue reading <span class=\"screen-reader-text\">F5 LTM bash script<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"_links":{"self":[{"href":"https:\/\/blog.kevinyohe.dev\/index.php?rest_route=\/wp\/v2\/posts\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.kevinyohe.dev\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kevinyohe.dev\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kevinyohe.dev\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kevinyohe.dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7"}],"version-history":[{"count":1,"href":"https:\/\/blog.kevinyohe.dev\/index.php?rest_route=\/wp\/v2\/posts\/7\/revisions"}],"predecessor-version":[{"id":8,"href":"https:\/\/blog.kevinyohe.dev\/index.php?rest_route=\/wp\/v2\/posts\/7\/revisions\/8"}],"wp:attachment":[{"href":"https:\/\/blog.kevinyohe.dev\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kevinyohe.dev\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kevinyohe.dev\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}