web analytics

How the Receiving Host Identifies the Correct Receiving Application

This chapter closes with a discussion that pulls several concepts together from several chapters
in Part I of this book. The concept revolves around the process by which a host, when
receiving any message over any network, can decide which of its many application programs
should process the received data.

As an example, consider host A shown on the left side of Figure 5-14. The host happens
to have three different web browser windows open, each using a unique TCP port. Host A
also has an email client and a chat window open, both of which use TCP. Both the email
and chat applications use a unique TCP port number on host A as well (1027 and 1028) as
shown in the figure.
Free CISCO CCNA Routing and Switching ICND1 Study Guide
Figure 5-14 Dilemma: How Host A Chooses the App That Should Receive This Data

This chapter has shown several examples of how Transport layer protocols use the destination
port number field in the TCP or UDP header to identify the receiving application. For
instance, if the destination TCP port value in Figure 5-15 is 1024, host A will know that the
data is meant for the first of the three web browser windows.

Before a receiving host can even examine the TCP or UDP header, and find the destination
port field, it must first process the outer headers in the message. If the incoming message
is an Ethernet frame, that encapsulates an IPv4 packet, the headers look like the details in
Figure 5-15.
Free CISCO CCNA Routing and Switching ICND1 Study Guide
Figure 5-15 Three Key Fields with Which to Identify the Next Header

The receiving host needs to look at multiple fields, one per header, to identify the next
header or field in the received message. For instance, host A uses an Ethernet NIC to connect
to the network, so the received message is an Ethernet frame. As first shown back in
Figure 2-16 in Chapter 2, “Fundamentals of Ethernet LANs,” the Ethernet Type field identifies
the type of header that follows the Ethernet header—in this case, with a value of hex
0800, an IPv4 header.

The IPv4 header has a similar field called the IP Protocol field. The IPv4 Protocol field has a
standard list of values that identify the next header, with decimal 6 used for TCP and decimal
17 used for UDP. In this case, the value of 6 identifies the TCP header that follows the
IPv4 header. Once the receiving host realizes a TCP header exists, it can process the destination
port field to determine which local application process should receive the data.

Subscribe To Get

Latest IT certification News 

Help You Pass Any IT Exam