107k views
0 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

5 votes

Answer:

The network layer in Host B will refer to the 8-bit protocol field in the IP datagram.

Step-by-step explanation:

The TCP segment is sent encapsulated in an IP datagram from Host A to Host B. When Host B receives it, the network layer will pass the segment to the correct transport layer protocol by looking at the 8-bit protocol field in the IP datagram. It contains the information that which transport layer protocol should Host B pass the segment to.

User Yasin
by
3.5k points