Question: is icmp encapsulated in ip packet?
Answer: ICMP is actually a user of the IP protocol--in other words, ICMP messages must be encapsulated within IP packets. However, ICMP is implemented as part of the IP layer. So ICMP processing can be viewed as occurring parallel to, or as part of, IP processing. ... A ping command sends an ICMP echo request to the target host.