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