title: Ping to get ip address of a server and find port number
body: <p>I want to get the port number and ip address of a server</p>
  
  <p>For ip address i can </p>
  
  <pre><code>ping the xyz.com and to get the ip address resolved.
  </code></pre>
  
  <p>but how do i  include the port number </p>