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:
- start NFD.
- start
ndn-autoconfig-server
, set FaceUri to udp4://10.63.18.1 - 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:
- invoke
ndnsec-keygen /tmp/autoconfig-test | ndnsec-install-cert -
- in /etc/resolv.conf, set DNS Server to A's IP address on A-B link,
- set DNS search domain to autoconfig-test-none.named-data.net
- start NFD.
- invoke
ndn-autoconfig
- 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.
- stop NFD.
Test stage 2: DNS query with default suffix
On host D:
- invoke
ndnsec-keygen /tmp/autoconfig-test | ndnsec-install-cert -
- in /etc/resolv.conf, set DNS Server to A's IP address on A-R link,
- set DNS search domain to autoconfig-test.named-data.net
- start NFD
- invoke
ndn-autoconfig
- 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.
- stop NFD.
Test stage 3: find home router
On host D:
- in /etc/resolv.conf, set DNS Server to A's IP address on A-R link,
- set DNS search domain to autoconfig-test-none.named-data.net
- start NFD
- invoke
ndn-autoconfig
- 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.
- stop NFD.
Return value
PASS of all stages finished successfully.