blob: 6004e858d1161c20c720a22ae8e41c61b42b9ad2 [file] [log] [blame]
Alexander Afanasyev26181532014-05-07 23:38:51 -07001FAQ
2===
3
4How to change default paths?
5----------------------------
6
7Paths to where NFD is installed can be configured during ``./waf
8configure``:
9
10- Installation prefix (default ``/usr/local``):
11
12 ::
13
14 ./waf configure --prefix=/usr
15
16- Location of NFD configuration file (default: ``${prefix}/etc``):
17
18 ::
19
20 ./waf configure --prefix=/usr --sysconfdir=/etc
21
22- Location of manpages (default: ``${prefix}/share/man``)
23
24 ::
25
26 ./waf configure --prefix=/usr --sysconfdir=/etc --mandir=/usr/share/man
27
28How to run NFD on Raspberry Pi?
29-------------------------------
30
31To run NFD on the Raspberry Pi, you need to either enable IPv6 support
32in Raspberry Pi or disable IPv6 support in NFD.
33
34To enable IPv6 in Raspberry Pi:
35
36::
37
38 sudo modprobe ipv6
39
40To disable IPv6 in NFD, replace ``enable_v6 yes`` with ``enable_v6 no``
41in ``tcp`` and ``udp`` sections of ``/usr/local/etc/ndn/nfd.conf``:
42
43::
44
45 ...
46 tcp
47 {
48 listen yes
49 port 6363
50 enable_v4 yes
51 enable_v6 no
52 }
53
54 udp
55 {
56 port 6363
57 enable_v4 yes
58 enable_v6 no
59 idle_timeout 600
60 keep_alive_interval 25
61
62 mcast yes
63 mcast_port 56363
64 mcast_group 224.0.23.170
65 }
66 ...
67
68
69How to run NFD as non-root user?
70--------------------------------
71
72
73How to enable Ethernet Face Support?
74++++++++++++++++++++++++++++++++++++
75
76The ``ether`` configuration file section contains settings for Ethernet faces and
77channels. These settings will **NOT** work without root or setting the appropriate
78permissions:
79
80::
81
82 sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd
83
84You may need to install a package to use setcap:
85
86**Ubuntu:**
87
88::
89
90 sudo apt-get install libcap2-bin
91
92**Mac OS X:**
93
94::
95
96 curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
97 tar zxvf ChmodBPF.tar.gz
98 open ChmodBPF/Install\ ChmodBPF.app
99
100or manually:
101
102::
103
104 sudo chgrp admin /dev/bpf*
105 sudo chmod g+rw /dev/bpf*
106
107How to enable UDP multicast support in multi-homed Linux machines
108+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
109
110The UDP configuration file section contains settings for unicast and multicast UDP
111faces. If the Linux box is equipped with multiple network interfaces with multicast
112capabilities, the settings for multicast faces will **NOT** work without root
113or setting the appropriate permissions:
114
115::
116
117 sudo setcap cap_net_raw=eip /full/path/nfd
118
119.. _How to configure NFD security:
120
121How to configure NFD security?
122------------------------------
123
124.. note:: Sample configuration file of NFD allow any user to manage faces, FIB, RIB, and
125 StrategyChoice. The following description can be used to restrict certain operations
126 to certain users.
127
128 More extensive documentation about NFD's security and options to configure trust model
129 for NFD is currently in preparation.
130
131Many NFD management protocols require signed commands to be processed
132(e.g. FIB modification, Face creation/destructions, etc.). You will need
133an NDN certificate to use any application that issues signed commands.
134
135If you do not already have NDN certificate, you can generate one with
136the following commands:
137
138**Generate and install a self-signed identity certificate**:
139
140::
141
142 ndnsec-keygen /`whoami` | ndnsec-install-cert -
143
144Note that the argument to ndnsec-key will be the identity name of the
145new key (in this case, ``/your-username``). Identity names are
146hierarchical NDN names and may have multiple components (e.g.
147``/ndn/ucla/edu/alice``). You may create additional keys and identities
148as you see fit.
149
150**Dump the NDN certificate to a file**:
151
152The following commands assume that you have not modified ``PREFIX`` or
153``SYSCONFDIR`` If you have, please substitute ``/usr/local/etc`` for the
154appropriate value (the overriden ``SYSCONFDIR`` or ``PREFIX/etc`` if you
155changed ``PREFIX``).
156
157::
158
159 sudo mkdir -p /usr/local/etc/ndn/keys
160 ndnsec-cert-dump -i /`whoami` > default.ndncert
161 sudo mv default.ndncert /usr/local/etc/ndn/keys/default.ndncert
162
163.. _How to start using NDN MacPorts repository on OSX:
164
165How to start using NDN MacPorts repository on OSX?
166--------------------------------------------------
167
168OSX users have an opportunity to seamlessly install and run NFD and other related
169applications via `MacPorts <https://www.macports.org/>`_. If you are not using MacPorts
170yet, go to `MacPorts website <https://www.macports.org/install.php>`_ and download and
171install the MacPorts package.
172
173NFD and related ports are not part of the official MacPorts repository and in order to use
174it, you need to add NDN MacPorts repository to the local configuration. In particular,
175you will need to modify the list of source URLs for MacPorts. For example, if your
176MacPorts are installed in ``/opt/local``, add the following line
177`/opt/local/etc/macports/sources.conf` before or after the default port repository:
178
179::
180
181 rsync://macports.named-data.net/macports/
182
183After this step, you can use ``sudo port selfupdate`` to fetch updated port definitions.
184
185The following command will install NFD using MacPorts:
186
187::
188
189 sudo port install nfd
190
191.. note::
192 You have to have XCode installed on your machine. For latest versions of OSX (Lion or
193 Mountain Lion) you can install it from AppStore for free, for older versions you have to
194 go to developer.apple.com and download old version of XCode that is appropriate for your
195 system.
196
197
198One of the advantages of using MacPorts is that you can easily upgrade NFD and other
199packages to the most recent version available. The following commands will do this job:
200
201::
202
203 sudo port selfupdate
204 sudo port upgrade nfd
205
206.. _How to start using NDN PPA repository on Ubuntu Linux:
207
208How to start using NDN PPA repository on Ubuntu Linux?
209------------------------------------------------------
210
211NFD binaries and related tools for Ubuntu 12.04, 13.10, and 14.04 can be installed using
212PPA packages from named-data repository. First, you will need to add ``named-data/ppa``
213repository to binary package sources and update list of available packages:
214
215::
216
217 sudo add-apt-repository ppa:named-data/ppa
218
219 # if you do not have add-apt-repository command installed:
220 sudo apt-get install python-software-properties
221 sudo apt-get update
222
223After that, NFD can be easily installed in a standard way, i.e., either using ``apt-get`` as shown
224below or using any other package manager (e.g., Synaptic Package Manager):
225
226::
227
228 sudo apt-get install nfd
229
230For the list of available packages, refer to `NDN PPA repository
231<https://launchpad.net/~named-data/+archive/ppa>`_.