16.3k views
4 votes
Suppose Host A sends Host B a TCP segment encapsulated in an IP datagram. When Host B receives the datagram, how does the network layer in Host B know it should pass the segment (that is, the payload of the datagram) to TCP rather than to UDP or to some other upper-layer protocol?

1 Answer

3 votes

Answer:

The 8-bit protocol field in the IP datagram contains information about which transport layer protocol the destination host should pass the segment to.

Step-by-step explanation:

If host A sends a message to host B a TCP segment encapsulated in an IP datagram, for the network layer in Host B to know which transport layer protocol to pass the segment to, there is always an 8-bit protocol field available in the IP datagram with the necessary information of which of the transport layer protocol that the segment should be passed to by the destination host.

User Ala Eddine JEBALI
by
5.7k points