title: How To Ping using a specific Network Interface (or a specific source IP Address)?
body: <p>According to this link: <a href="https://stackoverflow.com/questions/3483875/using-system-net-networkinformation-is-there-a-way-to-bind-a-ping-to-a-specific">using System.Net.NetworkInformation, is there a way to bind a ping to a specific interface?</a> the ICMP cannot be bound to a Network Interface (unlike socket based stuff): </p>
  
  <blockquote>
    <p>ICMP is not socket based. The ping will be sent to the appropriate port based on the routing table.<a href="https://stackoverflow.com/editing-help">https://stackoverflow.com/editing-help</a></p>
  </blockquote>
  
  <p>But I can't see any proper way for getting the information about the "pinger". At least, in a shell command I could specify the source IP Address but not when I'm using the Ping class.</p>
  
  <p>I tried to perform programmatically some traceroutes to get which IP Addresses are involved in the Ping route but I did not get the IP Address of the Network Interface (I guess it comes from the fact I cannot set the TTL to 0).</p>
  
  <p>Any idea about how figure out which Network Interface is used for a certain ping?
  (or a way to specify which Network Interface to use for pinging).</p>