1.2 Introducing the datagram
When data, such as a picture, movie or a document is sent over the internet, it is not sent as a single chunk. Instead it is split up into small, uniformly sized blocks called ‘datagrams’, also sometimes called ‘packets’.
Imagine that you have a large book that you want to post to a friend, but you only have small envelopes. One way to post the book is to tear it into a number of pieces, placing each piece in a different envelope. Each envelope is addressed to the recipient. It makes sense to label each envelope with a number to tell your friend where the pages belong in the whole book. When the envelopes are put in the postal system they may all travel through the same sorting offices and arrive on the same day, or they might take different routes and arrive on different days. However, your friend should be able to recreate the book when they receive all the envelopes.
A number of different datagrams are used by data travelling over the internet, but they all have a similar structure. One envelope and its contents correspond to a single datagram. The envelope (which is called the ‘header’) contains the sender and recipient’s addresses, a unique number, a date stamp and some error correction information, while the contents (called the ‘payload’) contains the actual information being delivered.