tree: 080215d377e0a7e8e5184c1cadadae0ae6e4fb3e [path history] [tgz]
  1. __init__.py
  2. linkfail.sh
  3. ping.sh
  4. pingserver.sh
  5. README.md
  6. start.sh
  7. stop.sh
  8. test_linkfail.py
test_linkfail/README.md

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

  1. start NFD, set strategy for root namespace
  2. 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)
  3. run ping server on B, run ping client on A
  4. after 5s: fail link A-B
  5. after 5s: recover link A-B
  6. after 5s: fail link A-C
  7. after 5s: recover link A-C
  8. after 5s: stop ping client
  9. 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.