Suppose datagrams are limited to 1500 bytes (including header) between source Host A and destination Host B. Assuming a 20 byte IP header, how many datagrams would be required to send an MP3 consisting of 5 million bytes.
Try an answer before revealing the guidance below.
Key Concepts
- Datagram limit
- IP header overhead
- Payload per datagram
- Ceiling division
Answer Approach
- Subtract the IP header to get the payload per datagram.
- Divide the file size by the payload size.
- Round up to a whole number of datagrams.
- State whether a transport header is also counted.
Full Answer
Answer status: Draft answer (unofficial). Revision notes, not an official marking scheme.
Each datagram carries 1500 − 20 = 1480 bytes of payload. 5,000,000 / 1480 = 3378.4, so 3379 datagrams are needed. (If a 20-byte TCP header is also counted in each datagram, each carries 1460 bytes of MP3 data and 3425 datagrams are needed; the question only mentions the IP header.)
Datagrams = ⌈file size / (1500 − 20)⌉Shortcuts: K concepts · A approach · F answer · R reviewed · B bookmark · ← / → previous / next