Course: Internet Architecture and Technologies

Source: Fulvio Risso, Exercises on Packet Sniffing and Traffic Analysis, 17 September 2017, 56 pages.

Study date: 19 October 2026. Deadline: none supplied.

Status: guided explanations of Exercises 1-18 completed, including source-solution counts where fixed. These are paraphrased study walkthroughs, not independently completed assessment answers or an exhaustive reproduction of every MAC-address table. Private progress is in Inbox.

Method and assumptions (PDF pages 6-12)

Identify the requested traffic, resolve names if necessary, select the route using longest prefix matching, resolve the local next-hop MAC using ARP, and follow request and response separately. Only then filter by sniffer location and count frames.

The exercises generally start with empty client DNS and device ARP caches. DNS has the required answer without contacting additional servers; routers have suitable routes unless the topology/configuration prevents delivery. Use four Echo Requests and four Replies where specified by the source solutions, not as a universal ping default. Stable switches omit flooding exceptions. Cache, retry and redirect behavior follow the workbook’s simplified model.

Exercise index

ExerciseQuestion PDF page(s)Solution PDF page(s)Main topic
11434Local ping
21535Routed ping, two sniffers
31636-37ARP learning across successive commands
41738Disconnection and ARP expiry
51839Local DNS followed by local ping
619-2040Card mode and capture visibility
72141Switched version of local DNS/ping
82242-43Two IP subnets on shared Ethernet
92344Local DNS, Internet ping target
102445-46Two routers and Redirect
112547No usable DNS route
122648Alternative route through Internet
132749-50Wrong DNS mask, working return detour
142851Wrong DNS mask, unreachable gateway
152952Wrong client mask, unanswered ARP
163053-54Ping ignores HTTP proxy
173155HTTP through cached proxy
183256Diagnose failed web access

Exercises 1-2: direct versus routed ping

1: local target

H1 130.192.16.1/24 pings H2 130.192.16.2/24. No DNS or router is needed. H1 discovers H2’s MAC using one ARP Request/Reply pair, then exchanges four ping pairs: 2 + 8 = 10 frames at H1’s sniffer.

2: target across one router

Follow the diagram and solution’s target 130.192.17.2; page 15’s prose instead prints 130.192.11.2, an apparent typo. H1’s gateway is .16.254; H2’s is .17.254. They are separate router interfaces on separate Ethernet networks.

OrderSnifferTransmission
1-2AH1 ARPs for gateway; router replies
3AEcho Request: H1 MAC -> router’s left MAC; IP H1 -> H2
4-5BRouter ARPs for H2; H2 replies
6BForwarded Request: router’s right MAC -> H2 MAC; IP H1 -> H2
7BEcho Reply: H2 MAC -> router’s right MAC; IP H2 -> H1
8AForwarded Reply: router’s left MAC -> H1 MAC; IP H2 -> H1

H1 resolves only its gateway’s MAC. The router independently resolves H2’s. Each side learns the needed return mapping through ARP; no extra return ARP is required. Repeat the four ICMP transmissions for the other three pings. Each sniffer captures 2 ARP + 8 ICMP = 10, or 20 across both. For one ping only, each captures four frames, eight across both. Echo Reply already is the return journey. The source’s final repetition row is misnumbered; four initial ARP frames plus sixteen ICMP link transmissions gives 20.

Exercises 3-4: caches and disconnection

3: H1 pings H2, then H3 pings H1

All three share Ethernet and a /24. These are two separate commands, not H1 initiating a second conversation with H3. Under the workbook’s target-only ARP learning model, H3 does not cache H1 merely from hearing H1 ask for H2. H3 later ARPs for H1, H1 replies, then they exchange four ping pairs. Each command generates ten frames: 20 total, all involving H1 and visible on its cable even if a switch were used.

The source also presents an alternative overhearing-cache model: H3 already knows H1 and sends its Request first; H1 then ARPs for H3 before replying. Under the source’s rule that ordinary IP packets do not create new ARP mappings, the order differs but the total is still 20. Do not generalize either model to every modern OS.

4: H2 disconnects during continuous ping

Initially Requests and Replies alternate. After disconnection, H1 can keep transmitting Requests using its cached mapping, but no Replies arrive. After the entry becomes unusable in the source model, ARP Requests replace successful delivery attempts; no ARP Reply arrives. Exact timing/retries and application behavior depend on implementation, so there is no fixed count. Page 38’s statement that Echo Request is no longer present is an apparent typo for Echo Reply, as confirmed by its trace.

Exercises 5-7: DNS and visibility

5: local DNS and local target

H1 resolves www.polito.it to local H2. Count two ARP frames for DNS, two DNS frames, two ARP frames for H2 and eight ICMP frames: 14. DNS returns an IP, not a MAC. The gateway is unused.

6: what reaches H2’s card and software?

Shared Ethernet delivers all transmitted frames on the medium to attached stations. Normal card mode filters incoming unicast for other devices; promiscuous mode passes it to software. Both accept broadcasts. H2’s incoming relevant traffic is the ARP broadcast for DNS, the ARP broadcast for H2 and H2’s Echo Request. H2 itself sends its ARP Reply and Echo Reply.

The supplied eight-frame trace contains only one ping pair. Of those, three incoming frames pass H2’s normal filter; counting its two outgoing frames gives five capture records. If extended to four pings with the same preparation, that becomes 1 + 2 + 8 = 11. The DNS ARP Reply and DNS Query/Answer between H1 and DNS are filtered in normal mode. A promiscuous capture can see the other traffic delivered by the shared medium; recording transmitted frames is distinct from receiving them through the card filter.

7: switched version of Exercise 5

Still 14 at H1’s cable: all those frames originate from or return to H1. A switch does not remove traffic involving the capturing host. An uninvolved host would see the two ARP broadcasts but not the known-unicast DNS/ping exchanges under the workbook assumptions.

Exercises 8-9: which destination needs routing?

8: routed DNS, direct ping

H1 .16.1/24, H2 .16.2/24, DNS .17.253/24 share one Ethernet medium. The router has .16.254 and .17.254 on that LAN-facing interface. Query and answer each pass through the router. The DNS preparation/delivery contributes eight frames: two ARP pairs plus two Query transmissions and two Answer transmissions. ARP for H2 adds two; four direct ping pairs add eight: 18 at the shared-LAN sniffer. IP subnet membership and Ethernet attachment are separate concepts.

9: direct DNS, routed ping

DNS .16.253 is local; it returns remote target 32.10.1.3. Two ARP frames for DNS + two DNS frames + two ARP frames for gateway + eight ICMP frames = 14 at H1’s switched connection. The router’s Internet-side transmissions never cross this sniffer.

Exercise 10: two routers and a Redirect

Shared Ethernet contains H1 .16.1/24, R1 .16.254/24 plus .17.1/24, DNS .17.253/24 and R2 .17.254/24. H1 uses R1; DNS uses R2. R2 connects to the Internet.

Query:  H1 -> R1 -> DNS
Answer: DNS -> R2 -> R1 -> H1
Redirect: R2 -> DNS, recommending R1 (.17.1) for reaching H1

R2 still forwards the current Answer. If DNS accepts the Redirect, future packets for H1 can go directly to R1; its default for other destinations remains R2. H1 cannot use this shortcut to R2 under the configured subnet model, since R2 is outside H1’s /24.

Four ARP pairs (H1-R1, R1-DNS, DNS-R2, R2-R1) give eight frames. Query has two local transmissions, Answer three, Redirect one: 14 before ping. Each ping contributes H1->R1, R1->R2, R2->R1 and R1->H1 on the shared LAN: four times four = sixteen. Total 30.

Exercises 11-12: absent versus alternative route

11: no path to DNS

R1 now has only its .16 LAN address. Its private network has no route connecting it to R2/DNS. H1-R1 ARP pair, DNS Query H1->R1, ICMP Network Unreachable R1->H1: four frames in the source sequence. Name resolution fails; ping never starts.

12: Internet provides a path

Both routers connect to the Internet with suitable routes. Query follows H1->R1->Internet->R2->DNS; Answer reverses it. Shared-LAN capture: H1-R1 ARP pair (2), H1->R1 Query (1), R2-DNS ARP pair (2), R2->DNS Query (1), DNS->R2 and R1->H1 Answer transmissions (2), and four H1-side ping pairs (8): 16. Internet transmissions are outside the capture.

Exercises 13-15: wrong masks

13: DNS /25, reachable gateway

H1 .16.1/24 sees DNS .16.253/25 as local, but DNS sees H1 as remote. Gateway .16.254 is inside DNS’s /25, so Query goes directly H1->DNS while Answer goes DNS->router->H1. On H1’s switched link: H1-DNS ARP pair (2), Query (1), DNS’s ARP broadcast for router (1), router-H1 ARP pair (2), forwarded Answer (1), H1-H2 ARP pair (2), eight ICMP frames = 17. Router’s unicast ARP Reply to DNS and DNS->router Answer exist but are not visible there.

14: DNS /25, gateway moved to .16.100

Gateway is outside DNS’s configured .128/25 network. H1 still resolves DNS’s MAC and sends its Query directly, but DNS cannot send the Answer through its configured gateway under the workbook model. Capture starts with two ARP frames and a Query, followed by Query retries. No fixed total, and no ping. Source retry counts are examples rather than universal behavior.

15: H1’s /23 incorrectly includes a physically remote DNS

H1 .16.81/23 believes .17.2 is local. Its ARP Requests for DNS cannot cross the router to the other Ethernet network, so they go unanswered. No DNS Query is sent, and no ping follows. Repeated ARP only; no fixed total. Intended correction: H1 /24, which selects gateway .16.1 for DNS.

Exercises 16-17: proxy configured versus proxy used

16: ping ignores the HTTP proxy

H1 172.16.64.11/24 uses R2 .64.1; R1 has .64.2/24 and .10.1/24. DNS .10.2/24 uses gateway .10.1. Thus DNS is reachable through R1’s second interface. Query initially follows H1->R2->R1->DNS, and R2 redirects H1 to R1 for DNS. Answer returns through R1. DNS resolves the target to local H2 .64.6; ping then goes directly to H2.

At H1’s shared-LAN sniffer: H1-R2 ARP pair (2), Query H1->R2 (1), Redirect R2->H1 (1), R2-R1 ARP pair (2), forwarded Query R2->R1 (1), R1-H1 ARP pair (2), Answer R1->H1 (1), H1-H2 ARP pair (2), eight ICMP frames = 20. ARP and forwarding on DNS’s separate network are not captured. There is no HTTP or TCP traffic caused by this ping.

17: browser uses the HTTP proxy

H1 opens the supplied plain-HTTP URL using configured proxy 172.16.15.3. R2’s other interface is .15.1/24, so the proxy is reachable. Proxy cache contains the page. Client needs no DNS lookup of the website in this explicit-proxy model.

Initial capture orderMessage
1-2ARP Request/Reply for R2
3-5TCP SYN, SYN-ACK, ACK between H1 and proxy
6HTTP GET naming the requested website
7Proxy TCP ACK
8HTTP Response, 200 OK, page data
9Client TCP ACK
Further framesAdditional response segments/acknowledgments as needed

IP destination is the proxy; Ethernet destination on H1’s cable is R2. R2-proxy ARP happens on another network and is invisible here. No fixed total, because response size is unspecified. The exact separate-ACK sequence is the source’s illustrative model.

Exercise 18: diagnose failed web access

The topology repeats Exercise 15’s bad H1 /23. Unanswered ARP for DNS prevents a DNS Query, so neither TCP nor HTTP begins. Correct the intended mask to /24.

When the full topology is unknown, inspect local configuration, test DNS resolution, test connectivity with ping/traceroute where useful, and capture traffic to locate the first missing stage. Consider name-resolution errors, unreachable gateways/routes and inactive HTTP services rather than assuming every browser failure has the same cause. Page 32’s prose and diagram differ on the requested hostname, and page 56 has an apparent 130.19 typo; neither changes the mask diagnosis.

Source and qualifications

Fulvio Risso, Exercises on Packet Sniffing and Traffic Analysis, 17 September 2017, 56 pages. Source: local 01e - Packet Sniffing and Traffic Analysis.pdf in Downloads. PDF page order is used. Workbook-derived explanations retain CC BY-NC-SA 3.0 attribution and licensing: https://creativecommons.org/licenses/by-nc-sa/3.0/. Original PDF and figures remain local. Plain-language analogies and qualifications are added study explanations.

Counts follow the printed solution traces after correcting the Exercise 2 repetition numbering. Workbook-specific cache/redirect behavior and the direct-next-hop restriction are retained as exercise assumptions. The 2017 descriptions of operating-system defaults are not presented as current verified platform documentation.