Packet payload

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Packet payload

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which part of a packet carries the actual data being sent?
A The header
B The payload
2. What does the payload of a packet contain?
A A piece of the file or message being sent
B The destination address and packet number
3. Is the packet header part of the payload?
A No, the header is not payload
B Yes, the header is part of the payload
4. A 5 MB photo is split into packets. What does the payload of one packet hold?
A A small piece of the photo's data
B The whole photo every time
5. Which of these is NOT payload?
A A piece of an email message
B The packet trailer

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1payload APacket 3: payload = "Hello, how are"
2payload = piece of file BA payload holds only a small piece of the file. A large file is split across many packets, each with its own payload.
3The payload is the actual data, such as part of an email, carried inside one packet CThe part of a packet that carries the actual data being sent
4The header and trailer are not the payload because they only help deliver the packet Dheader: dest=192.168.1.5, packet no=3 | payload: data
5payload = destination IP address and packet number EThe destination address and packet number belong in the header, not the payload. The payload is the actual data being sent.
6payload = the whole 5 MB file in one packet FThe payload holds just one piece of a larger file or message, not the whole thing

Definitions

payload

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
packet = header + _______ + trailer
2.
_______ = "piece of a file"
3.
OUTPUT packet._______
4.
headerIsPayload = _____
5.
packet = header + payload + _______

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A payload ← destination address
B header ← destination, number
C trailer ← end of packet
Question 2
A SET payload TO dest_address
B SET header TO addresses
C SET trailer TO end_marker
Question 3
A packet.header = dest, src, no
B packet.payload = 'Hel'
C packet.trailer = file_data
Question 4
A PACKET 3 OF 10
B PAYLOAD = packet number 3
C HEADER = dest, source, number
D TRAILER = end of packet
Question 5
A IF packet arrives THEN
B read header
C read payload
D store trailer in the file
E ENDIF

Answer Key

Packet payload
Section A: Quick Questions
Q1
B — The payload
Q2
A — A piece of the file or message being sent
Q3
A — No, the header is not payload
Q4
A — A small piece of the photo's data
Q5
B — The packet trailer
Section B: Match the Pairs
Q1
payload → The part of a packet that carries the actual data being sent
Q2
payload = piece of file → The payload holds just one piece of a larger file or message, not the whole thing
Q3
The payload is the actual data, such as part of an email, carried inside one packet → Packet 3: payload = "Hello, how are"
Q4
The header and trailer are not the payload because they only help deliver the packet → header: dest=192.168.1.5, packet no=3 | payload: data
Q5
payload = destination IP address and packet number → The destination address and packet number belong in the header, not the payload. The payload is the actual data being sent.
Q6
payload = the whole 5 MB file in one packet → A payload holds only a small piece of the file. A large file is split across many packets, each with its own payload.
Section C: Definitions
Q1
payload — The part of a packet that carries the actual data being sent, such as a piece of a file or message. The header and trailer are not payload.
Section D: Fill in the Blanks
Q1
packet = header + payload + trailer
Q2
payload = "piece of a file"
Q3
OUTPUT packet.payload
Q4
headerIsPayload = False
Q5
packet = header + payload + trailer
Section E: Spot the Error
Q1
A — The payload carries a piece of the actual file or message. The destination address belongs in the header, so this line should be: payload ← piece of the file.
Q2
A — The payload holds the data being sent, such as a part of a file. Addresses are in the header, so this line should be: SET payload TO file_part.
Q3
C — The trailer only marks the end of the packet. The file data is carried in the payload, so this line should be: packet.trailer = end_marker.
Q4
B — The packet number is stored in the header. The payload carries part of the message, so this line should be: PAYLOAD = part of the message.
Q5
D — The file is rebuilt from the payloads. The trailer is not file data, so this line should be: store payload in the file.