Assuming a "standard" datacenter network topology with hosts under a Top-of-Rack Switch, connected to an aggregation layer; I'm wondering if it's possible to send a packet from host rack_1_host_1 to host rack_2_host_1 and track which path it followed.
Conventionally traceroute can do a decent job (specially if something like Paris traceroute is used), but I'd like to know if there exists newer technology (perhaps relying in eBPF) to track the route of a single packet.
The concept I have in mind is something like: rack_1_host_1 sends a "special" packet (let's say a UDP packet on a certain port) to host rack_2_host_1; this packet is recognized by network devices in the path and, as soon as they see this packet (eBPF), they craft a special UDP "I saw this packet" packet and send to the origin of the "ping".
Of course this assumes we have access to run packet filtering on multiple network devices, but would something like this work?
A summary of what I mean:
Normal traceroute:
- rack_1_host_1 → rack_2_host_1 | ECHO | TTL=1
- Top-of-Rack 1 switch_1 → rack_1_host_1 | ICMP timeout
- rack_1_host_1 → rack_2_host_1 | ECHO | TTL=2
- Aggregation switch_5 → rack_1_host_1 | ICMP timeout
- rack_1_host_1 → rack_2_host_1 | ECHO | TTL=3
- Top-of-Rack 2 switch_1 → rack_1_host_1 | ICMP timeout
- rack_1_host_1 → rack_2_host_1 | ECHO | TTL=4
- rack_2_host_1 → rack_1_host_1 | REPLY
Single packet tracing:
- rack_1_host_1 → rack_2_host_1 | ECHO | TTL=32
- Top-of-Rack 1 switch_1 → rack_1_host_1 | "I saw the packet at time=X, TTL 31"
- Aggregation switch_5 → rack_1_host_1 | "I saw the packet at time=X, TTL 30"
- Top-of-Rack 2 switch_1 → rack_1_host_1 | "I saw the packet at time=X, TTL 29"
- rack_2_host_1 → rack_1_host_1 | REPLY
(this would even allow us to estimate "one-way latency" - within the confidence interval of clock synchronization)