blob: b436c61b561c8b7422587cb83d0f07b6f6f37927 [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
Stumble62b19a62015-08-03 10:17:45 -070041After connecting to an NDN router, two prefixes will be automatically registered:
42
43- /ndn
44- /localhop/nfd --- this to inform RIB manager that there is connectivity to the hub
45
Alexander Afanasyev49272f72014-04-06 21:49:46 -070046Stage 1: multicast discovery
47^^^^^^^^^^^^^^^^^^^^^^^^^^^^
48
49Request
50+++++++
51
52The end host sends an Interest over a multicast face.
53
54Interest Name is ``/localhop/ndn-autoconf/hub``.
55
56Response
57++++++++
58
hilata6ee6e072014-04-20 17:10:18 -050059A producer app on the HUB answer this Interest with a Data packet that contains a
60TLV-encoded `Uri` block. The value of this block is the URI for the HUB, preferrably a
61UDP tunnel.
Alexander Afanasyev49272f72014-04-06 21:49:46 -070062
63Stage 2: DNS query with default suffix
64^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
65
66Request
67+++++++
68
69The end host sends a DNS query that is equivalent to this command::
70
71 dig +search +short +cmd +tries=2 +ndots=10 _ndn._udp srv
72
73Response
74++++++++
75
hilata6ee6e072014-04-20 17:10:18 -050076The DNS server should answer with an SRV record that contains the hostname and UDP port
77number of the NDN router.
Alexander Afanasyev49272f72014-04-06 21:49:46 -070078
79Stage 3: find home router
80^^^^^^^^^^^^^^^^^^^^^^^^^
81
hilata6ee6e072014-04-20 17:10:18 -050082This stage assumes that user has configured default certificate using
83`<http://ndncert.named-data.net/>`_ as described in `Certification Architecture
84<http://redmine.named-data.net/attachments/download/23/CertificationArchitecture.pptx>`_.
Alexander Afanasyev49272f72014-04-06 21:49:46 -070085
86Request
87+++++++
88
hilata6ee6e072014-04-20 17:10:18 -050089The end host loads the default user identity (eg. ``/ndn/edu/ucla/cs/afanasev``), and
90converts it to DNS format.
Alexander Afanasyev49272f72014-04-06 21:49:46 -070091
hilata6ee6e072014-04-20 17:10:18 -050092The end host sends a DNS query for an SRV record of name ``_ndn._udp.`` + user identity in
93DNS format + ``_homehub._autoconf.named-data.net``. For example::
Alexander Afanasyev49272f72014-04-06 21:49:46 -070094
95 _ndn._udp.afanasev.cs.ucla.edu.ndn._homehub._autoconf.named-data.net
96
97Response
98++++++++
99
hilata6ee6e072014-04-20 17:10:18 -0500100The DNS server should answer with an SRV record that contains the hostname and UDP port
101number of the home NDN router of this user's site.
Alexander Afanasyev49272f72014-04-06 21:49:46 -0700102
103Client procedure
104----------------
105
106Stage 1
107^^^^^^^
108
109Send a multicast discovery Interest.
110
111If this Interest is answered, connect to the HUB and terminate auto-discovery.
112
113Stage 2
114^^^^^^^
115
116Send a DNS query with default suffix.
117
118If this query is answered, connect to the HUB and terminate auto-discovery.
119
120Stage 3
121^^^^^^^
122
hilata6ee6e072014-04-20 17:10:18 -0500123* Load default user identity, and convert it to DNS format; if either fails, the
124 auto-discovery fails.
Alexander Afanasyev49272f72014-04-06 21:49:46 -0700125
126* Send a DNS query to find home HUB.
hilata6ee6e072014-04-20 17:10:18 -0500127 If this query is answered, connect to the home HUB and terminate auto-discovery.
128 Otherwise, the auto-discovery fails.
129
130
131See also
132--------
133
134:ref:`ndn-autoconfig-server`