I know datagrams from upper layers are converted to those of lower layers by adding metadata, but I cannot seem to find this information anywhere. Which one of the below is correct?
- A single TCP segment is always converted to a single IP packet by adding IP header, which is in turn converted to a single Ethernet frame by adding Ethernet header (and footer). In other word, a datagram of an upper layer is converted to the payload of the datagram of the lower layer as a whole.
- The network software groups all datagrams of an upper layer as a a bundle of binary (eg: 3 IP packets of size 1000, 800, and 1200 bytes to a bundle of 3000 bytes) then cut that bundle anywhere it feels best to make the payloads for datagrams of lower layer (e.g: to 2 Ethernet frames with payload of 1500 bytes each). The receiving device can always get 3 original IP packets from 2 Ethernet frames.