Link Failure test scenario
This scenario tests whether a forwarding strategy can react to link failures.
Three forwarding strategies are tested:
- NCC strategy
- Multicast strategy
- Best Route strategy: expected failure
Topology
/-----\
A B
\--C--/
Steps
- start NFD, set strategy for root namespace
- setup RIB entries on hosts: C has a route toward B (cost=10), A has a route toward B (cost=10) and a route toward C (cost=20)
- run ping server on B, run ping client on A
- after 5s: fail link A-B
- after 5s: recover link A-B
- after 5s: fail link A-C
- after 5s: recover link A-C
- after 5s: stop ping client
- analyze ping client logs, fail the test case if there is any loss, or RTT is over 100ms for any sequence number
To inject a link failure, this test scenario invokes iptables
to drop UDP packets on the port number used by the tunnel. We don't destroy the face via nfdc
, because that would cause the nexthop record to be removed from FIB entries, which can be detected by the strategy, and the reaction would be different from a temporary link failure.