Different application layer protocols listen to specific ports. When you visit a website, for example, the HTTP request from your computer to access it is sent to TCP port 80 on the remote host. Your computer’s source port is an arbitrary, ephemeral port. The server processes the request and returns data to your computer. Data is destined to the previous port, where your web browser (probably Chrome), is available and waiting.
What about ICMP How is ICMP different from HTTP? ICMP uses the identifier field, not TCP, to match segments. HTTP uses TCP, but ICMP uses ICMP to determine which running process should get incoming replies. All pings that originate from the same strike of an ENTER key use the exact same identifier value. This is incremented for subsequent requests. A ping generates five ICMP requests per default. Each request increments the sequence number field to match its reply.
Each of the sequence number and identifier fields is 2 bytes. Below is a sample Echo request and Echo reply header.