blob: 8e56435cab3a32ca21dc4e31ba8352ae51f6e90a [file] [log] [blame]
hilata6ee6e072014-04-20 17:10:18 -05001.. _ndn-autoconfig:
2
Alexander Afanasyev49272f72014-04-06 21:49:46 -07003ndn-autoconfig
4==============
5
hilata6ee6e072014-04-20 17:10:18 -05006Usage
7-----
Alexander Afanasyev49272f72014-04-06 21:49:46 -07008
9::
10
11 ndn-autoconfig
12
hilata6ee6e072014-04-20 17:10:18 -050013Description
14-----------
15
16Client tool to run :ref:`NDN hub discovery procedure`.
17
18.. _NDN hub discovery procedure:
Alexander Afanasyev49272f72014-04-06 21:49:46 -070019
20NDN hub discovery procedure
21---------------------------
22
hilata6ee6e072014-04-20 17:10:18 -050023When an end host starts up, or detects a change in its network environment, it MAY use
24this 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 Afanasyev49272f72014-04-06 21:49:46 -070026
27Overview
28^^^^^^^^
29
30This procedure contains three methods to discover a NDN router:
31
321. Look for a local NDN router by multicast.
33 This is useful in a home or small office network.
34
352. Look for a local NDN router by DNS query with default suffix.
hilata6ee6e072014-04-20 17:10:18 -050036 This allows network administrator to configure a NDN router in a large enterprise network.
Alexander Afanasyev49272f72014-04-06 21:49:46 -070037
383. Connect to the home NDN router according to user certificate.
39 This ensures connectivity from anywhere.
40
41Stage 1: multicast discovery
42^^^^^^^^^^^^^^^^^^^^^^^^^^^^
43
44Request
45+++++++
46
47The end host sends an Interest over a multicast face.
48
49Interest Name is ``/localhop/ndn-autoconf/hub``.
50
51Response
52++++++++
53
hilata6ee6e072014-04-20 17:10:18 -050054A producer app on the HUB answer this Interest with a Data packet that contains a
55TLV-encoded `Uri` block. The value of this block is the URI for the HUB, preferrably a
56UDP tunnel.
Alexander Afanasyev49272f72014-04-06 21:49:46 -070057
58Stage 2: DNS query with default suffix
59^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60
61Request
62+++++++
63
64The 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
68Response
69++++++++
70
hilata6ee6e072014-04-20 17:10:18 -050071The DNS server should answer with an SRV record that contains the hostname and UDP port
72number of the NDN router.
Alexander Afanasyev49272f72014-04-06 21:49:46 -070073
74Stage 3: find home router
75^^^^^^^^^^^^^^^^^^^^^^^^^
76
hilata6ee6e072014-04-20 17:10:18 -050077This 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 Afanasyev49272f72014-04-06 21:49:46 -070080
81Request
82+++++++
83
hilata6ee6e072014-04-20 17:10:18 -050084The end host loads the default user identity (eg. ``/ndn/edu/ucla/cs/afanasev``), and
85converts it to DNS format.
Alexander Afanasyev49272f72014-04-06 21:49:46 -070086
hilata6ee6e072014-04-20 17:10:18 -050087The end host sends a DNS query for an SRV record of name ``_ndn._udp.`` + user identity in
88DNS format + ``_homehub._autoconf.named-data.net``. For example::
Alexander Afanasyev49272f72014-04-06 21:49:46 -070089
90 _ndn._udp.afanasev.cs.ucla.edu.ndn._homehub._autoconf.named-data.net
91
92Response
93++++++++
94
hilata6ee6e072014-04-20 17:10:18 -050095The DNS server should answer with an SRV record that contains the hostname and UDP port
96number of the home NDN router of this user's site.
Alexander Afanasyev49272f72014-04-06 21:49:46 -070097
98Client procedure
99----------------
100
101Stage 1
102^^^^^^^
103
104Send a multicast discovery Interest.
105
106If this Interest is answered, connect to the HUB and terminate auto-discovery.
107
108Stage 2
109^^^^^^^
110
111Send a DNS query with default suffix.
112
113If this query is answered, connect to the HUB and terminate auto-discovery.
114
115Stage 3
116^^^^^^^
117
hilata6ee6e072014-04-20 17:10:18 -0500118* Load default user identity, and convert it to DNS format; if either fails, the
119 auto-discovery fails.
Alexander Afanasyev49272f72014-04-06 21:49:46 -0700120
121* Send a DNS query to find home HUB.
hilata6ee6e072014-04-20 17:10:18 -0500122 If this query is answered, connect to the home HUB and terminate auto-discovery.
123 Otherwise, the auto-discovery fails.
124
125
126See also
127--------
128
129:ref:`ndn-autoconfig-server`