171k views
1 vote
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 something else?

User Ludyem
by
6.0k points

1 Answer

1 vote

Answer: Looking into IP header, for a specific field, that identifies TCP as the transport protocol to be used.

Step-by-step explanation:

In the IP Header, there is a field (of 8 bits wide) , called Protocol in the IPv4 version, and Next header in IPv6, that contains a hexadecimal number that identifies the transport protocol to be used.

For instance, if the segment should be passed to TCP, the Protocol Field must be filled with 0x06 = 00000110.

User Berk Kurkcuoglu
by
6.9k points