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 | |
Alexander Afanasyev | 5c47597 | 2015-12-20 16:16:56 -0800 | [diff] [blame^] | 11 | ndn-autoconfig [options] |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 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 | |
Alexander Afanasyev | 5c47597 | 2015-12-20 16:16:56 -0800 | [diff] [blame^] | 18 | Options |
| 19 | ------- |
| 20 | |
| 21 | ``-h`` or ``--help`` |
| 22 | Print usage information. |
| 23 | |
| 24 | ``-d`` or ``--daemon`` |
| 25 | Run ndn-autoconfig in daemon mode, detecting network change events and re-running |
| 26 | auto-discovery procedure. In addition, the auto-discovery procedure is unconditionally |
| 27 | re-run every hour. |
| 28 | |
| 29 | NOTE: if connection to NFD fails, the daemon will be terminated. |
| 30 | |
| 31 | ``-c [FILE]`` or ``--config=[FILE]`` |
| 32 | Use the specified configuration file. If `enabled = true` is not specified in the |
| 33 | configuration file, no actions will be performed. |
| 34 | |
| 35 | ``-V`` or ``--version`` |
| 36 | Print version information. |
| 37 | |
hilata | 6ee6e07 | 2014-04-20 17:10:18 -0500 | [diff] [blame] | 38 | .. _NDN hub discovery procedure: |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 39 | |
| 40 | NDN hub discovery procedure |
| 41 | --------------------------- |
| 42 | |
hilata | 6ee6e07 | 2014-04-20 17:10:18 -0500 | [diff] [blame] | 43 | When an end host starts up, or detects a change in its network environment, it MAY use |
| 44 | this procedure to discover a local or home NDN router, in order to gain connectivity to |
| 45 | `the NDN research testbed <http://named-data.net/ndn-testbed/>`_. |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 46 | |
| 47 | Overview |
| 48 | ^^^^^^^^ |
| 49 | |
| 50 | This procedure contains three methods to discover a NDN router: |
| 51 | |
| 52 | 1. Look for a local NDN router by multicast. |
| 53 | This is useful in a home or small office network. |
| 54 | |
| 55 | 2. Look for a local NDN router by DNS query with default suffix. |
hilata | 6ee6e07 | 2014-04-20 17:10:18 -0500 | [diff] [blame] | 56 | 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] | 57 | |
| 58 | 3. Connect to the home NDN router according to user certificate. |
| 59 | This ensures connectivity from anywhere. |
| 60 | |
Stumble | 62b19a6 | 2015-08-03 10:17:45 -0700 | [diff] [blame] | 61 | After connecting to an NDN router, two prefixes will be automatically registered: |
| 62 | |
Alexander Afanasyev | 5c47597 | 2015-12-20 16:16:56 -0800 | [diff] [blame^] | 63 | - ``/ndn`` |
| 64 | - ``/localhop/nfd`` --- this to inform RIB manager that there is connectivity to the hub |
Stumble | 62b19a6 | 2015-08-03 10:17:45 -0700 | [diff] [blame] | 65 | |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 66 | Stage 1: multicast discovery |
| 67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 68 | |
| 69 | Request |
| 70 | +++++++ |
| 71 | |
| 72 | The end host sends an Interest over a multicast face. |
| 73 | |
| 74 | Interest Name is ``/localhop/ndn-autoconf/hub``. |
| 75 | |
| 76 | Response |
| 77 | ++++++++ |
| 78 | |
hilata | 6ee6e07 | 2014-04-20 17:10:18 -0500 | [diff] [blame] | 79 | A producer app on the HUB answer this Interest with a Data packet that contains a |
| 80 | TLV-encoded `Uri` block. The value of this block is the URI for the HUB, preferrably a |
| 81 | UDP tunnel. |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 82 | |
| 83 | Stage 2: DNS query with default suffix |
| 84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 85 | |
| 86 | Request |
| 87 | +++++++ |
| 88 | |
| 89 | The end host sends a DNS query that is equivalent to this command:: |
| 90 | |
| 91 | dig +search +short +cmd +tries=2 +ndots=10 _ndn._udp srv |
| 92 | |
| 93 | Response |
| 94 | ++++++++ |
| 95 | |
hilata | 6ee6e07 | 2014-04-20 17:10:18 -0500 | [diff] [blame] | 96 | The DNS server should answer with an SRV record that contains the hostname and UDP port |
| 97 | number of the NDN router. |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 98 | |
| 99 | Stage 3: find home router |
| 100 | ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 101 | |
hilata | 6ee6e07 | 2014-04-20 17:10:18 -0500 | [diff] [blame] | 102 | This stage assumes that user has configured default certificate using |
| 103 | `<http://ndncert.named-data.net/>`_ as described in `Certification Architecture |
| 104 | <http://redmine.named-data.net/attachments/download/23/CertificationArchitecture.pptx>`_. |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 105 | |
| 106 | Request |
| 107 | +++++++ |
| 108 | |
hilata | 6ee6e07 | 2014-04-20 17:10:18 -0500 | [diff] [blame] | 109 | The end host loads the default user identity (eg. ``/ndn/edu/ucla/cs/afanasev``), and |
| 110 | converts it to DNS format. |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 111 | |
hilata | 6ee6e07 | 2014-04-20 17:10:18 -0500 | [diff] [blame] | 112 | The end host sends a DNS query for an SRV record of name ``_ndn._udp.`` + user identity in |
| 113 | DNS format + ``_homehub._autoconf.named-data.net``. For example:: |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 114 | |
| 115 | _ndn._udp.afanasev.cs.ucla.edu.ndn._homehub._autoconf.named-data.net |
| 116 | |
| 117 | Response |
| 118 | ++++++++ |
| 119 | |
hilata | 6ee6e07 | 2014-04-20 17:10:18 -0500 | [diff] [blame] | 120 | The DNS server should answer with an SRV record that contains the hostname and UDP port |
| 121 | number of the home NDN router of this user's site. |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 122 | |
| 123 | Client procedure |
| 124 | ---------------- |
| 125 | |
| 126 | Stage 1 |
| 127 | ^^^^^^^ |
| 128 | |
| 129 | Send a multicast discovery Interest. |
| 130 | |
| 131 | If this Interest is answered, connect to the HUB and terminate auto-discovery. |
| 132 | |
| 133 | Stage 2 |
| 134 | ^^^^^^^ |
| 135 | |
| 136 | Send a DNS query with default suffix. |
| 137 | |
| 138 | If this query is answered, connect to the HUB and terminate auto-discovery. |
| 139 | |
| 140 | Stage 3 |
| 141 | ^^^^^^^ |
| 142 | |
hilata | 6ee6e07 | 2014-04-20 17:10:18 -0500 | [diff] [blame] | 143 | * Load default user identity, and convert it to DNS format; if either fails, the |
| 144 | auto-discovery fails. |
Alexander Afanasyev | 49272f7 | 2014-04-06 21:49:46 -0700 | [diff] [blame] | 145 | |
| 146 | * Send a DNS query to find home HUB. |
hilata | 6ee6e07 | 2014-04-20 17:10:18 -0500 | [diff] [blame] | 147 | If this query is answered, connect to the home HUB and terminate auto-discovery. |
| 148 | Otherwise, the auto-discovery fails. |
| 149 | |
| 150 | |
| 151 | See also |
| 152 | -------- |
| 153 | |
Alexander Afanasyev | 5c47597 | 2015-12-20 16:16:56 -0800 | [diff] [blame^] | 154 | :ref:`ndn-autoconfig-server`, :doc:`ndn-autoconfig.conf` |