Related course access:IoT Security and Privacy — same laboratory, notebook and completion record.
N03 · Academic orientation
Scope and objectives
Scope of the experiment
Identify which IPv4 address must be resolved on a local link.
The focus of this experiment is to trace ARP requests, replies and cache state for next-hop resolution. Students then distinguish local destination from default-gateway MAC selection, and verify address resolution and identify stale or missing entries. The Concepts view explains the operation before the practical work; the Simulation view is used to examine reference and changed inputs, not to substitute for actual measurements.
Learning objectives
Trace ARP requests, replies and cache state for next-hop resolution.
Distinguish local destination from default-gateway MAC selection.
Verify address resolution and identify stale or missing entries.
Identify the configured inputs (Destination; Neighbor cache; Reply condition) and record the corresponding observed outputs with units where applicable.
Compare the reference calculation or decision with an independent implementation or authorized observation; state any discrepancy and the applicable model boundary.
Expected learning outcomes
On completion, students can trace ARP requests, replies and cache state for next-hop resolution, distinguish local destination from default-gateway MAC selection, and verify address resolution and identify stale or missing entries.
Required deliverables
Submit the derivation or state trace for the named operation, the exact reference and changed configurations, the associated simulator or practical evidence, and a short validation statement addressing verify address resolution and identify stale or missing entries. Separate predicted values from observations.
Prerequisite knowledge and related learning
Review the following catalogue prerequisites before starting. After completion, continue to DHCP address allocation.
The browser instrument and the specified local software or network environment. Use the experiment’s documented topology and distinguish modeled values from actual packet observations.
Begin with a manual prediction, record the baseline, change one independent condition at a time, and compare the resulting trace or measurements with the original prediction. Record observations and uncertainty separately from reference values. Follow the experiment’s specific procedure, safety limits, and acceptance checks.
N03 · learning outcome
Understand the experiment
ARP and next-hop forwarding
Remote IPv4 destination retains IP address; Ethernet destination becomes gateway MAC
Scientific concept map: Destination IP — Local or remote; Route lookup — Next hop; ARP request — Resolve IPv4 next hop; ARP reply — MAC address; Ethernet frame — Next-hop destination.
Scientific foundations and analytical reasoning
ARP resolves an on-link IPv4 next hop to a link-layer address. Routing determines whether that next hop is the destination or a gateway.
Before operating the equipment or executing the program, derive the expected outcome using the required theoretical work in Experiment. Use the diagram to identify the variables and system boundaries.
Scientific theory · Routing before ARP
The routing table selects a destination prefix using longest-prefix matching and determines the next hop. For an IPv4 Ethernet link, ARP maps the chosen on-link next-hop IPv4 address to a MAC address. Requests use local broadcast and replies populate a cache. Remote IP destinations retain their IP destination even when the frame targets the gateway.
Worked example and engineering interpretation
A host at 192.0.2.10/24 reaching 192.0.2.20 resolves the destination; reaching 198.51.100.20 resolves its configured gateway instead. Observe the IP destination and Ethernet destination separately. Cache expiration can trigger another ARP exchange.
Engineering principles · additional worked teaching example
ARP resolves a local next-hop IPv4 address to a link address. For 198.51.100.10/24 with gateway .1, destination 203.0.113.5 uses gateway .1 as ARP target but original destination remains 203.0.113.5 in the IP header.
From theory to experiment
Predict the reference result before operating the workbench; check the actual intermediate state, units and constraints. The existing simulation, implementation and procedure below are distinct sources of evidence.
How to investigate ARP & next-hop resolution
Identify which IPv4 address must be resolved on a local link.
Analytical investigation means collecting an observation, identifying the mechanism, using a calculation or state trace to explain it, and checking your conclusion against evidence. Controlled comparison means changing one independent variable, holding the remaining relevant conditions constant, and measuring a dependent variable against a baseline. Experimental validation means comparing a predicted result to a reproducible observation or assertion; agreement inside a model does not certify hardware. Evidence-based reasoning connects a specific observation to a theoretical rule and states uncertainty, not merely an opinion. Performance characterization records a named metric and its units across conditions; sensitivity analysis changes one parameter across several values. A threat assessment links an asset, threat, consequence and evidence to a mitigation.
Experiment-specific guided practice
Objective: Identify which IPv4 address must be resolved on a local link.
Set Destination = remote; Neighbor cache = miss; Reply condition = none. Observe the calculated results and trace.
Restore the reference values. ARP resolves the next hop on the local link, not the IP of a remote endpoint. The cache is a fixed teaching state; no actual ARP packets are sent.
Reference check:
Model boundary:
Independent task and submission evidence
2. Change Reply condition = missing. Baseline: ARP target 192.0.2.1, resolved. Missing reply with cache miss: unresolved. Restore. Change destination to local: target 192.0.2.20. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.
Before execution write the independent variable and its levels, dependent observation with units where applicable, baseline, controlled variables, measurement method and expected result. For a state machine use state/event/output rather than inventing a numeric metric. Record failures and repeat the baseline. A weak conclusion is “it works”; a supported conclusion names the changed setting, observed value/state, corresponding rule and one limitation.
Trial
Changed setting
Fixed settings
Predicted result
Actual observation / units
Evidence / uncertainty
A: baseline
Reference
Record
Predict
Record
Record
B: one change
Record
Same as A
Predict
Record
Record
A: repeat
Restore
Same as A
Predict
Record
Record
Completion: submit the filled table, relevant simulator screenshot or terminal/notebook output, reasoning with units/assumptions, and one limitation. Preserve the independent assessment questions; this guide does not fill their answers.
Identify which IPv4 address must be resolved on a local link.
ARP resolves the next hop on the local link, not the IP of a remote endpoint. The cache is a fixed teaching state; no actual ARP packets are sent.
Worked engineering reasoning and boundary conditions
Engineering reference configuration: Destination = remote; Neighbor cache = miss; Reply condition = none. In the classroom model, ARP target = 192.0.2.1; Resolution = Resolved; Destination IP = 198.51.100.20. For a remote destination ARP resolves the gateway MAC, not the remote IP. Cache hit bypasses a new request. ARP resolves the next hop on the local link, not the IP of a remote endpoint. The cache is a fixed teaching state; no actual ARP packets are sent.
Use the diagram to follow the calculation or state progression. Keep the teaching configuration separate from the independent exercise values; compare observations with the actual model and implementation.
Concept animation · message sequence
Explore the teaching example independently of the simulator. Each step reveals an operation, data relationship or calculated state. The Simulation view has separate editable inputs.
Step 1 of 4 · Broadcast ARP request for 192.0.2.1
Broadcast ARP request for 192.0.2.1
1. Sensor → Next hop
Broadcast ARP request for 192.0.2.1
Receive ARP reply
1. Sensor → Next hop
Broadcast ARP request for 192.0.2.1
2. Next hop → Sensor
Receive ARP reply
Cache next-hop MAC
1. Sensor → Next hop
Broadcast ARP request for 192.0.2.1
2. Next hop → Sensor
Receive ARP reply
3. Sensor → Next hop
Cache next-hop MAC
Send Ethernet frame to next hop
1. Sensor → Next hop
Broadcast ARP request for 192.0.2.1
2. Next hop → Sensor
Receive ARP reply
3. Sensor → Next hop
Cache next-hop MAC
4. Next hop → Sensor
Send Ethernet frame to next hop
Teaching example only; inspect live calculations or real practical evidence separately.
Recall the concept before revealing its explanation.
0 / 3 revealed
N03 · 01 / 08Which next-hop address is resolved for the remote destination and for a local destination?Reveal explanation
Engineering explanation
Baseline: ARP target 192.0.2.1, resolved. Missing reply with cache miss: unresolved. Restore. Change destination to local: target 192.0.2.20.
N03 · 02 / 08Why does ARP resolve the gateway rather than the remote destination on a routed path?Reveal explanation
Engineering explanation
ARP resolves the next hop on the local link, not the IP of a remote endpoint. The cache is a fixed teaching state; no actual ARP packets are sent.
N03 · 03 / 08What observation confirms recovery after an ARP reply is missing?Reveal explanation
Engineering explanation
Restore the reply and use the same cache-miss condition; the gateway 192.0.2.1 must resolve before remote delivery.
N03 · 04 / 08Why resolve the gateway MAC for a remote IPv4 destination?Reveal explanation
Engineering reasoning
The link-layer frame is addressed to the local next hop, while the IP destination remains the remote host.
N03 · 05 / 08What changes when a cache entry is already available?Reveal explanation
Engineering reasoning
A valid cache entry may remove the need for a new ARP exchange; it does not prove the remote path is reachable.
N03 · 06 / 08A host sends to an IPv4 destination outside its subnet. Select every technically valid statement.
A. Resolve the local next-hop gateway address with ARP.
B. The IP destination can remain the remote endpoint.
C. ARP resolves the remote endpoint's MAC across routers.
D. ARP replaces the packet destination IP with the gateway IP.Reveal explanation
Applied scenario
Correct: A. Resolve the local next-hop gateway address with ARP.; B. The IP destination can remain the remote endpoint.
N03 · 07 / 08In ARP & next-hop resolution, which reference and changed settings are prescribed for Reply condition?Reveal explanation
Controlled configuration
Reply condition: none → missing; hold the remaining settings fixed.
N03 · 08 / 08What expected result distinguishes the reference and changed trials in ARP & next-hop resolution?Reveal explanation
Expected observation
Baseline: ARP target 192.0.2.1, resolved. Missing reply with cache miss: unresolved. Restore. Change destination to local: target 192.0.2.20.
Interactive networking and security instrument
Loading experiment-specific apparatus…Previous model / additional reference tools
Simulation task
Identify which IPv4 address must be resolved on a local link.
Explore the model using its own controls. Record a prediction before changing a condition. Compare the reference with a changed condition, then use the Experiment tab for the procedure, acceptance criteria and notebook. Model outputs and physical observations must remain separate.
Interactive engineering workbenchN03 · Existing model
Interactive computational experiment
Configure and observe
Model-linked protocol trace
Animated ARP & next-hop resolution
Change the controls above; the trace and numerical summary update from the computed model results. Animation timing is for learning, not measured protocol latency.
Recent trace eventsInspect numerical or encoded protocol details
Readout from the original computational model; not physical measurements.
Loading instrument…
Awaiting model display.
Experimental instrumentation · A/B
Compare two model conditions
Capture a baseline, change one experimental condition, run the model if required and capture the comparison. Snapshots contain visible controls and display text, not physical sensor readings. Review before exporting.
Ask Dr. Mohammad locally, or prepare an experiment-aware prompt for ChatGPT, Gemini or Claude. The external providers open in their own tabs; nothing is automatically submitted.
Public course objective, displayed commands, source excerpts and procedure. Private assessment content is not collected.
Prepare a contextual AI prompt
0 characters
Common secret and email patterns are redacted on preparation; this is not a comprehensive privacy filter. Review the entire editable prompt, including student work and unpublished research, before sharing. The providers apply their own accounts, privacy settings and limits.
Prepare → review → copy & open your selected provider → paste and submit there.
Independent theoretical exercises
Before the simulation or practical, solve both experiment-specific tasks. List the given inputs, show the intermediate calculation or state trace, identify the expected observation, and state a limitation. Show formulas and intermediate calculations where relevant, or draw the requested state/sequence diagram. These are independent classroom fixtures; where they differ from the reference configuration below, do not treat them as measured values. Compare your predictions with the corresponding experiment afterwards.
01 · Predict and derive using the given inputs
For host 192.0.2.10/24 gateway .1, compare destination .20 and 198.51.100.20. Identify ARP target and IP destination.
Engineering method — ARP resolves a local next-hop IPv4 address to a link address. For 198.51.100.10/24 with gateway .1, destination 203.0.113.5 uses gateway .1 as ARP target but original destination remains 203.0.113.5 in the IP header. Apply this method to the assigned values independently; compare your reasoning with the relevant simulator or practical implementation.
02 · Compare or justify using evidence
Draw Ethernet and IP destination fields for a remote packet. Explain cache hit, miss and no-reply outcomes.
Engineering method — ARP resolves a local next-hop IPv4 address to a link address. For 198.51.100.10/24 with gateway .1, destination 203.0.113.5 uses gateway .1 as ARP target but original destination remains 203.0.113.5 in the IP header. Apply this method to the assigned values independently; compare your reasoning with the relevant simulator or practical implementation.
03 · Routing analysis
Routing analysis · Independent work
Host 192.0.2.130/26 gateway .129, destinations .190 and .200. Which address is resolved for each?
Routing analysis — ARP resolves a local next-hop IPv4 address to a link address. For 198.51.100.10/24 with gateway .1, destination 203.0.113.5 uses gateway .1 as ARP target but original destination remains 203.0.113.5 in the IP header. Apply this method to the assigned values independently; compare your reasoning with the relevant simulator or practical implementation.
Work is saved locally when browser storage is available. Export it for submission; no remote upload or automatic grade is assigned.
Expanded independent theoretical exercise bank
Progress from calculation and interpretation to diagnosis and controlled engineering design. Complete the questions without opening the simulation first; show intermediate steps.
Intermediate · Explain a changed-input result
Independent theoretical exercise · N03-01
Use the reference configuration (Destination = remote; Neighbor cache = miss; Reply condition = none), but change Destination = local. The model reports ARP target = 192.0.2.20. Explain the governing rule and assumptions that make this output plausible; identify an independent verification method.
Intermediate · Interpret a state transition
Independent theoretical exercise · N03-02
The reference model reports ARP target: 192.0.2.1. Under Destination = local it reports 192.0.2.20. Explain which configured condition changed and what the two outputs establish, and what they do not establish.
Intermediate · Interpret a technical trace
Independent theoretical exercise · N03-03
For Reply condition = missing, the model supplies this excerpt from Calculated trace:
Item · Value · Explanation
Step 1 · Broadcast ARP request for 192.0.2.1 ·
Step 2 · No ARP reply ·
Step 3 · Cannot resolve next hop ·
Count rows whose Value value is exactly “Broadcast ARP request for 192.0.2.1”, and identify the displayed row numbers. Explain what the count describes.
Advanced · Reverse reasoning
Independent theoretical exercise · N03-04
An observation is Resolution = Unresolved. Candidate A uses Destination = remote; Neighbor cache = miss; Reply condition = none. Candidate B changes the listed settings (Reply condition = missing) and keeps the remaining settings fixed. Which is consistent with the observation? If both can explain it, say what additional evidence is required.
Advanced · Diagnose a reported mismatch
Independent theoretical exercise · N03-05
A student configures Reply condition = missing while preserving all other reference settings, but copies the reference report of Resolution = Resolved. Evaluate whether the report is justified. Identify the first configuration/output check to perform.
Challenging · Design a controlled verification
Independent theoretical exercise · N03-06
Design a controlled comparison for ARP & next-hop resolution using reference Destination = remote; Neighbor cache = miss; Reply condition = none and test Destination = local. Specify the changed setting(s), measured metric ARP target, controls, repetitions, an acceptance check and what evidence can distinguish an actual implementation from the model.
Step-by-step experimental procedure
Identify which IPv4 address must be resolved on a local link.
1 · Reference workbench configuration
Use the named reference workbench and its reference inputs. Additional live instruments may have different controls; use the matching instrument. Record virtual and practical results separately.
Destinationremote
Neighbor cachemiss
Reply conditionnone
2 · Perform the investigation in order
Set Destination = remote; Neighbor cache = miss; Reply condition = none. Observe the calculated results and trace.
Restore the reference values. ARP resolves the next hop on the local link, not the IP of a remote endpoint. The cache is a fixed teaching state; no actual ARP packets are sent.
3 · Compare controlled trials
Trial
Independent change
Expected check
Observation
Reference
Use reference inputs above
Baseline: ARP target 192.0.2.1, resolved. Missing reply with cache miss: unresolved. Restore. Change destination to local: target 192.0.2.20.
Record actual result
Controlled change
Reply condition = missing
Baseline: ARP target 192.0.2.1, resolved. Missing reply with cache miss: unresolved. Restore. Change destination to local: target 192.0.2.20.
Record actual result
4 · Analyze and report
ARP resolves the next hop on the local link, not the IP of a remote endpoint. The cache is a fixed teaching state; no actual ARP packets are sent.
Required evidence: Record the arp & next-hop resolution comparison and justify the changed outcome from the calculated trace.
Model boundary: ARP resolves the next hop on the local link, not the IP of a remote endpoint. The cache is a fixed teaching state; no actual ARP packets are sent.
Controlled investigation · reproducible evidence
Method. Use the existing reference workbench configuration and the named controlled changes below. A controlled variable stays fixed while the independent variable is intentionally changed; the dependent variable is the resulting observed output. First predict each trial from the Concepts page. Run the baseline, then change only the specified setting and record the outcome. For deterministic traces one execution per case and a repeated verification are sufficient; for timing or stochastic measurements repeat at least five times, recording each run, median and range. Reset to the reference state between independent comparisons.
Trial
Independent change
Dependent observation
Reference
Use reference inputs above
Record actual outcome and units
Controlled change
Reply condition = missing
Record actual outcome and units
Evidence: attach the completed comparison table, one trace or screenshot per condition, and actual practical terminal/hardware evidence where applicable. Explain any prediction mismatch and distinguish modeled behavior from measured results.
Restore reference and enter your prediction. Select Save baseline.
Apply controlled change. Inspect metrics and protocol details. Compare the results with the following verification conditions.
✓ Expected: Baseline: ARP target 192.0.2.1, resolved. Missing reply with cache miss: unresolved. Restore. Change destination to local: target 192.0.2.20.
Restore reference. Confirm the same baseline results, then vary one field at a time. Record the changed configuration and explain any difference.
Export both baseline and changed evidence before leaving. Do not infer physical execution from model output.
Model-only experiment
No shell command or external service is required. Use the computational experiment above. Do not interpret its values as live network measurements.
Experimental notebook
Record your own results. Values are not prefilled or independently verified.
Record, discuss & verify
Notebook imports use the related core lab P37 and retain N03 in the method and attachment. The supplemental labs do not change the core prerequisite graph or graded completion counters.
Download this notebook and open Google Colab. Select File → Upload notebook and choose the downloaded .ipynb.
Read the Markdown instructions before each executable cell. Use a Python runtime, run cells from top to bottom, and resolve imports if necessary.
Perform the baseline and controlled changes. Save the notebook with actual outputs and your written interpretation.
Execution scope: Default computational cells passed isolated local Python execution; physical equipment and live services require separate verification.
01Instructions · Markdown
# N03 · ARP & next-hop resolution
**PSUT IoT Engineering Studio — Dr. Mohammad Alja’afreh**
## 1. Scientific objective
Identify which IPv4 address must be resolved on a local link.
Complete the analytical worksheet in the portal first. Record your predictions before running this notebook. This notebook is a bounded local computational investigation; use the portal’s separate WSL, hardware or Remix procedure for real interfaces.
02Instructions · Markdown
## Experiment-specific preparation
Identify which IPv4 address must be resolved on a local link.
**Reference procedure (use the matching simulator/WSL tool where named, not an unrelated service):**
1. Set Destination = remote; Neighbor cache = miss; Reply condition = none. Observe the calculated results and trace.
2. Change Reply condition = missing. Baseline: ARP target 192.0.2.1, resolved. Missing reply with cache miss: unresolved. Restore. Change destination to local: target 192.0.2.20.
3. Restore the reference values. ARP resolves the next hop on the local link, not the IP of a remote endpoint. The cache is a fixed teaching state; no actual ARP packets are sent.
**Evidence:**
**Boundary:**
03Instructions · Markdown
## 2. Reference configuration and investigation
1. Set Destination = remote; Neighbor cache = miss; Reply condition = none. Observe the calculated results and trace.
2. Change Reply condition = missing. Baseline: ARP target 192.0.2.1, resolved. Missing reply with cache miss: unresolved. Restore. Change destination to local: target 192.0.2.20.
3. Restore the reference values. ARP resolves the next hop on the local link, not the IP of a remote endpoint. The cache is a fixed teaching state; no actual ARP packets are sent.
Run cells in order; do not substitute model results for physical measurements.
04Instructions · Markdown
## 3. Decide whether ARP resolves the peer or gateway.
05Python · executable cell
PYTHON · Code cell
# =====================================================================
# N03 | Code cell 01 | ARP & next-hop resolution
# Purpose: 3. Decide whether ARP resolves the peer or gateway.
# Inputs: the explicit fixture/settings below and any preceding cell state.
# Output: inspect printed values, returned records or assertions; record evidence.
# =====================================================================
import ipaddress as ip
# Set network for the next computation or reference condition.
network=ip.ip_network("192.0.2.0/24")
# Define the reusable operation next hop; keep its logic separate from the trial.
def next_hop(dst):return dst if ip.ip_address(dst) in network else "192.0.2.1"
# Check the expected invariant so a mismatch fails visibly instead of appearing successful.
assert next_hop("192.0.2.20")=="192.0.2.20"
# Check the expected invariant so a mismatch fails visibly instead of appearing successful.
assert next_hop("198.51.100.20")=="192.0.2.1"
# =====================================================================
# N03 | Code cell 02 | ARP & next-hop resolution
# Purpose: 4. Compare cache and reply conditions.
# Inputs: the explicit fixture/settings below and any preceding cell state.
# Output: inspect printed values, returned records or assertions; record evidence.
# =====================================================================
# Repeat the same operation for each configured input so observations are comparable.
for cached,reply in [(True,False),(False,True),(False,False)]:
print(cached,reply,"resolved",cached or reply)
## Experimental analysis and submission
1. Record the reference input, predicted output and actual result.
2. Modify one independent variable and run the relevant cells again.
3. Explain the result using the theory and identify model limitations.
4. Save the notebook with outputs and retain the separate theoretical worksheet.
**Your derivation and conclusion:**
(Complete independently.)
09Instructions · Markdown
## Guided reasoning and evidence
A controlled comparison changes one independent input while keeping the other relevant inputs fixed; the dependent variable is the recorded output. Use this lab’s reference condition above.
**Independent task:** 2. Change Reply condition = missing. Baseline: ARP target 192.0.2.1, resolved. Missing reply with cache miss: unresolved. Restore. Change destination to local: target 192.0.2.20. Record the named input, prediction, actual output and one limitation; restore the original condition and repeat.
| Trial | Input/configuration | Prediction | Observation | Evidence / limitation |
|---|---|---|---|---|
| A | Reference | | | |
| B | Changed input | | | |
| A repeat | Reference | | | |
A conclusion is supported only when it cites the recorded values or observed states and explains them with the experiment theory.
Shared research workbenches · network designer & advanced studiesConcurrent-device simulation & Monte Carlo research