Labelling the structure of a packet

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

Labelling the structure of a packet

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. A packet carries the destination IP address. Which part holds it?
A Header
B Trailer
2. Which part of a packet holds the actual data being sent, such as a piece of an email?
A Header
B Payload
3. A packet is labelled 'Packet 3 of 5'. Which part holds the packet number?
A Header
B Payload
4. Which part of a packet marks where the packet ends?
A Header
B Trailer
5. How many fields does a packet header contain in this course?
A Three: destination address, originator's address and packet number
B Two: destination address and payload

Match the Pairs

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

Left columnRight column
1Header: dest 192.168.1.5, from 10.0.0.2, packet 3 ATrailer: END
2Payload: "Hello, are you free?" BThe originator's and destination addresses are header fields. The trailer only marks the end of the packet.
3The trailer comes at the end of the packet and marks where the packet finishes CThe header holds the destination address, the originator's address and the packet number
4The packet number is a header field that lets the destination put packets back in order DThe destination address and packet number are header fields, not payload. The payload holds only the data being sent.
5Payload: dest 192.168.1.5, packet 3 EHeader: packet number = 3 of 8
6Trailer: from 10.0.0.2, dest 192.168.1.5 FThe payload is the actual data being sent, such as part of a message

Definitions

header, payload, trailer

Fill in the Blanks

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

1.
______: dest=10.0.0.5, from=10.0.0.2, num=3 PAYLOAD: "Hi Sam" TRAILER: END
2.
HEADER: dest=10.0.0.5, from=10.0.0.2, num=3 _______: "Hi Sam" TRAILER: END
3.
HEADER: dest=10.0.0.5, from=10.0.0.2, num=3 PAYLOAD: "Hi Sam" _______: END
4.
HEADER: dest=10.0.0.9, ____=10.0.0.4, num=2 PAYLOAD: "Meet at 5" TRAILER: END
5.
HEADER: dest=10.0.0.9, from=10.0.0.4, ___=2 PAYLOAD: "Meet at 5" TRAILER: END

Spot the Error

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

Question 1
A header.destination = 10.0.0.7
B payload.originator = 10.0.0.2
C header.packet_no = 2
D payload = 'Hi Sam'
E trailer = 'END'
Question 2
A HEADER: dest 172.16.0.4
B HEADER: from 172.16.0.9
C PAYLOAD: packet no. 3
D PAYLOAD: Meet at 5
E TRAILER: end marker
Question 3
A HEADER: dest 192.168.1.20
B HEADER: from 192.168.1.8
C HEADER: packet no. 1
D TRAILER: Hello Mia
E TRAILER: end of packet
Question 4
A packet = []
B packet.add(trailer)
C packet.add(payload)
D packet.add(trailer)
Question 5
A payload = 'Lunch at 1'
B trailer = 'END'
C header = [dest, origin, END]

Answer Key

Labelling the structure of a packet
Section A: Quick Questions
Q1
A — Header
Q2
B — Payload
Q3
A — Header
Q4
B — Trailer
Q5
A — Three: destination address, originator's address and packet number
Section B: Match the Pairs
Q1
Header: dest 192.168.1.5, from 10.0.0.2, packet 3 → The header holds the destination address, the originator's address and the packet number
Q2
Payload: "Hello, are you free?" → The payload is the actual data being sent, such as part of a message
Q3
The trailer comes at the end of the packet and marks where the packet finishes → Trailer: END
Q4
The packet number is a header field that lets the destination put packets back in order → Header: packet number = 3 of 8
Q5
Payload: dest 192.168.1.5, packet 3 → The destination address and packet number are header fields, not payload. The payload holds only the data being sent.
Q6
Trailer: from 10.0.0.2, dest 192.168.1.5 → The originator's and destination addresses are header fields. The trailer only marks the end of the packet.
Section C: Definitions
Q1
header, payload, trailer — A packet has a header (destination address, originator's address, packet number), a payload (the data) and a trailer (marks the end). Label each item by the part it belongs to.
Section D: Fill in the Blanks
Q1
HEADER: dest=10.0.0.5, from=10.0.0.2, num=3 PAYLOAD: "Hi Sam" TRAILER: END
Q2
HEADER: dest=10.0.0.5, from=10.0.0.2, num=3 PAYLOAD: "Hi Sam" TRAILER: END
Q3
HEADER: dest=10.0.0.5, from=10.0.0.2, num=3 PAYLOAD: "Hi Sam" TRAILER: END
Q4
HEADER: dest=10.0.0.9, from=10.0.0.4, num=2 PAYLOAD: "Meet at 5" TRAILER: END
Q5
HEADER: dest=10.0.0.9, from=10.0.0.4, num=2 PAYLOAD: "Meet at 5" TRAILER: END
Section E: Spot the Error
Q1
B — The originator's address is one of the three header fields, not part of the payload. It should be header.originator = 10.0.0.2.
Q2
C — The packet number is a header field, used to put packets back in order. It should be labelled HEADER: packet no. 3.
Q3
D — The message data is the payload. The trailer only marks the end of the packet. The line should be PAYLOAD: Hello Mia.
Q4
B — The order of a packet is header, then payload, then trailer. The trailer must come last, so line 2 should add the header.
Q5
C — The third header field is the packet number, not the end marker. The END marker belongs in the trailer. It should be [dest, origin, num].