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?
Try an answer before revealing the guidance below.
Key Concepts
- IPv4 Protocol field
- IPv6 Next Header
- Demultiplexing
- TCP protocol number
Answer Approach
- Identify the network-layer header field that names the next protocol.
- State the value for TCP and contrast UDP.
- Note the equivalent IPv6 field.
Full Answer
Answer status: Draft answer (unofficial). Revision notes, not an official marking scheme.
The IP header identifies the encapsulated upper-layer protocol. In IPv4 this is the Protocol field; in IPv6 it is the Next Header field. A value of 6 denotes TCP, so the host passes the payload to TCP rather than UDP, whose protocol number is 17.
Shortcuts: K concepts · A approach · F answer · R reviewed · B bookmark · ← / → previous / next