Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 1 | ndn-autoconfig |
| 2 | ============== |
| 3 | |
| 4 | Synopsis |
| 5 | -------- |
| 6 | |
| 7 | :: |
| 8 | |
| 9 | ndn-autoconfig |
| 10 | |
| 11 | |
| 12 | NDN hub discovery procedure |
| 13 | --------------------------- |
| 14 | |
| 15 | 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/>`_. |
| 16 | |
| 17 | Overview |
| 18 | ^^^^^^^^ |
| 19 | |
| 20 | This procedure contains three methods to discover a NDN router: |
| 21 | |
| 22 | 1. Look for a local NDN router by multicast. |
| 23 | This is useful in a home or small office network. |
| 24 | |
| 25 | 2. Look for a local NDN router by DNS query with default suffix. |
| 26 | This allows network administrator to configure a NDN router for a large enterprise network. |
| 27 | |
| 28 | 3. Connect to the home NDN router according to user certificate. |
| 29 | This ensures connectivity from anywhere. |
| 30 | |
| 31 | Stage 1: multicast discovery |
| 32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 33 | |
| 34 | Request |
| 35 | +++++++ |
| 36 | |
| 37 | The end host sends an Interest over a multicast face. |
| 38 | |
| 39 | Interest Name is ``/localhop/ndn-autoconf/hub``. |
| 40 | |
| 41 | Response |
| 42 | ++++++++ |
| 43 | |
| 44 | A producer app on the HUB answer this Interest with a Data packet that contains a TLV-encoded `Uri` block. |
| 45 | The value of this block is the URI for the HUB, preferrably a UDP tunnel. |
| 46 | |
| 47 | Stage 2: DNS query with default suffix |
| 48 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 49 | |
| 50 | Request |
| 51 | +++++++ |
| 52 | |
| 53 | The end host sends a DNS query that is equivalent to this command:: |
| 54 | |
| 55 | dig +search +short +cmd +tries=2 +ndots=10 _ndn._udp srv |
| 56 | |
| 57 | Response |
| 58 | ++++++++ |
| 59 | |
| 60 | The DNS server should answer with an SRV record that contains the hostname and UDP port number of the NDN router. |
| 61 | |
| 62 | Stage 3: find home router |
| 63 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 64 | |
| 65 | This stage assumes that user has configured default certificate using `<http://ndncert.named-data.net/>`_ as described in `Certification Architecture <http://redmine.named-data.net/attachments/download/23/CertificationArchitecture.pptx>`_. |
| 66 | |
| 67 | Request |
| 68 | +++++++ |
| 69 | |
| 70 | The end host loads the default user identity (eg. ``/ndn/edu/ucla/cs/afanasev``), and converts it to DNS format. |
| 71 | |
| 72 | 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:: |
| 73 | |
| 74 | _ndn._udp.afanasev.cs.ucla.edu.ndn._homehub._autoconf.named-data.net |
| 75 | |
| 76 | Response |
| 77 | ++++++++ |
| 78 | |
| 79 | 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. |
| 80 | |
| 81 | Client procedure |
| 82 | ---------------- |
| 83 | |
| 84 | Stage 1 |
| 85 | ^^^^^^^ |
| 86 | |
| 87 | Send a multicast discovery Interest. |
| 88 | |
| 89 | If this Interest is answered, connect to the HUB and terminate auto-discovery. |
| 90 | |
| 91 | Stage 2 |
| 92 | ^^^^^^^ |
| 93 | |
| 94 | Send a DNS query with default suffix. |
| 95 | |
| 96 | If this query is answered, connect to the HUB and terminate auto-discovery. |
| 97 | |
| 98 | Stage 3 |
| 99 | ^^^^^^^ |
| 100 | |
| 101 | * Load default user identity, and convert it to DNS format; if either fails, the auto-discovery fails. |
| 102 | |
| 103 | * Send a DNS query to find home HUB. |
| 104 | If this query is answered, connect to the home HUB and terminate auto-discovery. Otherwise, the auto-discovery fails. |