Project

General

Profile

HubDiscovery » History » Version 7

Alex Afanasyev, 03/05/2014 08:55 AM

1 3 Junxiao Shi
# NDN hub discovery procedure
2 1 Alex Afanasyev
3 3 Junxiao Shi
When an end host starts up, or detects a change in its network environment, it MAY use this procedure to discover a local or home NDN router, in order to gain connectivity to [the NDN research testbed](http://named-data.net/ndn-testbed/).
4 1 Alex Afanasyev
5 3 Junxiao Shi
## Overview
6 1 Alex Afanasyev
7 3 Junxiao Shi
This procedure contains three methods to discover a NDN router:
8 1 Alex Afanasyev
9 3 Junxiao Shi
1.  Look for a local NDN router by multicast.  
10
    This is useful in a home or small office network.
11
2.  Look for a local NDN router by DNS query with default suffix.  
12
    This allows network administrator to configure a NDN router for a large enterprise network.
13
3.  Connect to the home NDN router according to user certificate.  
14
    This ensures connectivity from anywhere.
15 1 Alex Afanasyev
16 3 Junxiao Shi
## Stage 1: multicast discovery
17 1 Alex Afanasyev
18 3 Junxiao Shi
### Request
19 1 Alex Afanasyev
20 3 Junxiao Shi
The end host sends an Interest over a multicast face.
21 1 Alex Afanasyev
22 3 Junxiao Shi
Interest Name is `/localhop/ndn-autoconf/hub`.
23 1 Alex Afanasyev
24 3 Junxiao Shi
### Response
25 1 Alex Afanasyev
26 3 Junxiao Shi
A producer app on the HUB answer this Interest with a Data packet that contains TLV-encoded `Uri` block.
27
The value of this block is the URI for the HUB, preferrably a UDP tunnel.
28 1 Alex Afanasyev
29 3 Junxiao Shi
## Stage 2: DNS query with default suffix
30 1 Alex Afanasyev
31 3 Junxiao Shi
### Request
32 1 Alex Afanasyev
33 3 Junxiao Shi
The end host sends a DNS query that is equivalent to this command:
34
35
    dig +search +short +cmd +tries=2 +ndots=10 _ndn._udp srv
36
37
### Response
38
39
The DNS server should answer with an SRV record that contains the hostname and UDP port number of the NDN router.
40
41
## Stage 3: find home router
42
43 4 Alex Afanasyev
This stage assumes that user has configured default certificate using http://ndncert.named-data.net/ as described in http://redmine.named-data.net/attachments/download/23/CertificationArchitecture.pptx
44
45 3 Junxiao Shi
### Request
46 1 Alex Afanasyev
47 4 Alex Afanasyev
The end host loads the default user identity (e.g., ``/ndn/edu/ucla/cs/afanasev``) and converts it to DNS format (see https://github.com/named-data/ndnx/blob/master/csrc/util/ndn-name-dnsifier.py as a reference implemenation).
48 1 Alex Afanasyev
49 5 Alex Afanasyev
(To get default identity: ``KeyChain::getDefaultIdentity()`` method in ndn-cpp-dev library.)
50
51 4 Alex Afanasyev
If either loading default user identity or converting to DNS format, the phase finishes with error code.
52
53 6 Alex Afanasyev
The end host sends a DNS query for an SRV record of name `_ndn._udp.` + user identity in DNS format + `_homehub._autoconf.named-data.net`. For example
54
55 7 Alex Afanasyev
    _ndn._udp.afanasev.cs.ucla.edu.ndn._homehub._autoconf.named-data.net
56 3 Junxiao Shi
57
### Response
58
59
The DNS server should answer with an SRV record that contains the hostname and UDP port number of the home NDN router of this user's site.
60
61
## Client procedure
62
63
1.  Send a multicast discovery Interest.
64
    If this Interest got answered, connect to the HUB and abort these steps.
65
2.  Send a DNS query with default suffix.
66
    If this query got answered, connect to the HUB and abort these steps.
67
3.  Extract the site-specific part from the default certificate of the user; fail if this cannot complete.
68
    Send a DNS query to find home HUB.
69
    If this query got answered, connect to the home HUB. Otherwise, fail.