title: script to ping a 'router' from pinging a single hostname
body: <p>I am trying to write a script where it will prompt you for a <em>hostname</em>, say <code>222012-DC01</code> from this it will resolve the <em>ip address</em> from <em>dns</em> via <code>ping</code> or <code>nslookup</code>. </p>
  
  <p>It should then modify the <em>ip address</em> to ping the router for that site. If the <em>ip address</em> was <code>10.123.2.1</code> it should ping <code>10.123.1.1</code> for the router for that site.</p>
  
  <p>The script should give you an output of <strong>server offline</strong> or <strong>router offline</strong>.</p>
  
  <p>Work in an enviroment looking after several hundred sites, we take ownership of servers but not network incidents such as a router failure.</p>
  
  <p>Your help is much appreciated...</p>