tree: 659bc1f4db6767dbdac140204d35d13aeea328ef [path history] [tgz]
  1. __init__.py
  2. autoconfig-test.named-data.net.db
  3. hub-discovery-test.sh
  4. named-data.net.db
  5. named.conf.local
  6. README.md
  7. test-B-stage1.sh
  8. test-D-stage2.sh
  9. test-D-stage3.sh
  10. test_hub_discovery.py
test_hub_discovery/README.md

Test Case - Hub discovery test scenario

Topology

B---A---R---D

A,B,D are NDN hosts. R is an IP router and is not NDN host; R does not forward multicast packets.

Script is invoked on host A. It can control other hosts via ssh

multi-host.conf defines: IP4_A1, IP4_B1, IP4_D1

Description

The script test hub discovery procedure. In case of a failure, the detailed log can be found under: test_hub_discovery/log/hub_discovery.log

Initialize ndn-autoconfig-server and dns records on host A:

  1. start NFD.
  2. start ndn-autoconfig-server, set FaceUri to udp4://10.63.18.1
  3. start bind to serve these records
    • _ndn._udp.autoconfig-test.named-data.net => 10.63.18.2
    • _ndn._udp.autoconfig-test.tmp._homehub._autoconf.named-data.net => 10.63.18.3

Test stage 1: multicast discovery

On host B:

  1. invoke ndnsec-keygen /tmp/autoconfig-test | ndnsec-install-cert -
  2. in /etc/resolv.conf, set DNS Server to A's IP address on A-B link,
  3. set DNS search domain to autoconfig-test-none.named-data.net
  4. start NFD.
  5. invoke ndn-autoconfig
  6. execute nfdc face list,
    • search output for 10.63.18.1, fail if not found.
    • search output for 10.63.18.2, fail if found.
    • search output for 10.63.18.3, fail if found.
  7. stop NFD.

Test stage 2: DNS query with default suffix

On host D:

  1. invoke ndnsec-keygen /tmp/autoconfig-test | ndnsec-install-cert -
  2. in /etc/resolv.conf, set DNS Server to A's IP address on A-R link,
  3. set DNS search domain to autoconfig-test.named-data.net
  4. start NFD
  5. invoke ndn-autoconfig
  6. execute nfdc face list,
    • search output for 10.63.18.1, fail if found.
    • search output for 10.63.18.2, fail if not found.
    • search output for 10.63.18.3, fail if found.
  7. stop NFD.

Test stage 3: find home router

On host D:

  1. in /etc/resolv.conf, set DNS Server to A's IP address on A-R link,
  2. set DNS search domain to autoconfig-test-none.named-data.net
  3. start NFD
  4. invoke ndn-autoconfig
  5. execute nfdc face list,
    • search output for 10.63.18.1, fail if found.
    • search output for 10.63.18.2, fail if found.
    • search output for 10.63.18.3, fail if not found.
  6. stop NFD.

Return value

PASS of all stages finished successfully.