Destination address in a packet header

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

Destination address in a packet header

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. What does the destination address in a packet header identify?
A The device that sent the packet
B The device the packet must be delivered to
2. Which part of a packet holds the destination address?
A The header
B The payload
3. Which part of a router's job uses the destination address?
A Reading it to choose where to send the packet next
B Changing it to the router's own address
4. What type of address is usually used as the destination address?
A A packet number
B An IP address
5. Which statement is correct?
A Every packet in a message carries the destination address in its header
B Only the first packet in a message carries the destination address

Match the Pairs

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

Left columnRight column
1destination address AA header field giving the IP address of the receiving device
2destination: 192.168.1.20 BThe destination address is the address of the device receiving the packet, not the sender. The sender's address is the originator's address.
3Routers read the destination address in the header to choose where to send the packet next CThe address in a packet header of the device the packet must be delivered to
4The destination address is an IP address identifying the device the packet must reach Drouter reads header.destination
5header.destination = IP address of sender EThe destination address is stored in the packet header, not the payload. The payload holds the data being sent.
6destination address is stored in the payload Fheader.destination = IP address of receiver

Definitions

destination address

Fill in the Blanks

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

1.
packet.___________ = "203.0.113.8"
2.
OUTPUT packet.___________
3.
IF packet.destination = myIP THEN ______(packet) ENDIF
4.
IF packet.destination _ myIP THEN accept(packet) ENDIF
5.
_______(packet, packet.destination)

Spot the Error

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

Question 1
A dest ← packet.source
B router reads dest
C router sends packet onward
Question 2
A packet.source ← 10.0.0.4
B packet.destination ← 10.0.0.4
C SEND packet TO router
Question 3
A router receives packet
B dest ← packet.payload
C route ← choose path to dest
Question 4
A dest ← packet.destination
B next ← lookup(dest)
C SEND packet TO packet.source
Question 5
A IF packet.destination = myIP
B THEN keep packet
C ELSE discard packet

Answer Key

Destination address in a packet header
Section A: Quick Questions
Q1
B — The device the packet must be delivered to
Q2
A — The header
Q3
A — Reading it to choose where to send the packet next
Q4
B — An IP address
Q5
A — Every packet in a message carries the destination address in its header
Section B: Match the Pairs
Q1
destination address → The address in a packet header of the device the packet must be delivered to
Q2
destination: 192.168.1.20 → A header field giving the IP address of the receiving device
Q3
Routers read the destination address in the header to choose where to send the packet next → router reads header.destination
Q4
The destination address is an IP address identifying the device the packet must reach → header.destination = IP address of receiver
Q5
header.destination = IP address of sender → The destination address is the address of the device receiving the packet, not the sender. The sender's address is the originator's address.
Q6
destination address is stored in the payload → The destination address is stored in the packet header, not the payload. The payload holds the data being sent.
Section C: Definitions
Q1
destination address — The address in a packet header of the device the packet must be delivered to. Routers read it to choose where to send the packet. It is usually an IP address.
Section D: Fill in the Blanks
Q1
packet.destination = "203.0.113.8"
Q2
OUTPUT packet.destination
Q3
IF packet.destination = myIP THEN accept(packet) ENDIF
Q4
IF packet.destination = myIP THEN accept(packet) ENDIF
Q5
forward(packet, packet.destination)
Section E: Spot the Error
Q1
A — The router needs the device the packet must be delivered to. That is the destination address, packet.destination, not the source (originator) address.
Q2
B — 10.0.0.4 is the sender's address from line 1. The destination address must be the address of the receiving device, such as 10.0.0.9.
Q3
B — The payload is the data being carried. The router must read the destination address from the header, packet.destination, to choose where to send the packet.
Q4
C — The router uses the destination address to look up the next hop and sends the packet there. Sending it to the source would return it to the sender.
Q5
C — If the destination address is not this device's IP address, the packet is meant for another device. It must be forwarded towards that device, not discarded.