Cisco interview question

How does ping work internally?