Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 1 | FAQ |
| 2 | === |
| 3 | |
| 4 | How to change default paths? |
| 5 | ---------------------------- |
| 6 | |
| 7 | Paths to where NFD is installed can be configured during ``./waf |
| 8 | configure``: |
| 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 | |
| 28 | How to run NFD on Raspberry Pi? |
| 29 | ------------------------------- |
| 30 | |
| 31 | To run NFD on the Raspberry Pi, you need to either enable IPv6 support |
| 32 | in Raspberry Pi or disable IPv6 support in NFD. |
| 33 | |
| 34 | To enable IPv6 in Raspberry Pi: |
| 35 | |
| 36 | :: |
| 37 | |
| 38 | sudo modprobe ipv6 |
| 39 | |
| 40 | To disable IPv6 in NFD, replace ``enable_v6 yes`` with ``enable_v6 no`` |
| 41 | in ``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 | |
| 69 | How to run NFD as non-root user? |
| 70 | -------------------------------- |
| 71 | |
Steve DiBenedetto | 24b9a64 | 2014-04-07 15:45:39 -0600 | [diff] [blame] | 72 | How to configure automatic dropping of privileges? |
| 73 | ++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 74 | |
| 75 | NFD can be configured to drop privileges whenever possible. You can specify a user and/or |
| 76 | group for NFD to change its *effective* user/group ID to in the ``general`` section of the |
| 77 | configuration file. For example: |
| 78 | |
| 79 | :: |
| 80 | |
| 81 | general |
| 82 | { |
| 83 | user nobody |
| 84 | group nogroup |
| 85 | } |
| 86 | |
| 87 | will configure NFD to drop its effective user and group IDs to ``nobody`` and ``nogroup``, |
| 88 | respectively. |
| 89 | |
| 90 | .. note:: |
| 91 | |
| 92 | **IMPORTANT:** NFD may regain elevated permissions as needed during normal |
| 93 | execution. Dropping privileges in this manner should not be considered a security |
| 94 | mechanism (a compromised NFD that was started as root can trivially return to |
| 95 | root). However, reducing privileges may limit any damaged caused by well intentioned, |
| 96 | but buggy, code. |
| 97 | |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 98 | |
| 99 | How to enable Ethernet Face Support? |
| 100 | ++++++++++++++++++++++++++++++++++++ |
| 101 | |
| 102 | The ``ether`` configuration file section contains settings for Ethernet faces and |
| 103 | channels. These settings will **NOT** work without root or setting the appropriate |
| 104 | permissions: |
| 105 | |
| 106 | :: |
| 107 | |
| 108 | sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd |
| 109 | |
| 110 | You may need to install a package to use setcap: |
| 111 | |
| 112 | **Ubuntu:** |
| 113 | |
| 114 | :: |
| 115 | |
| 116 | sudo apt-get install libcap2-bin |
| 117 | |
| 118 | **Mac OS X:** |
| 119 | |
| 120 | :: |
| 121 | |
| 122 | curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz |
| 123 | tar zxvf ChmodBPF.tar.gz |
| 124 | open ChmodBPF/Install\ ChmodBPF.app |
| 125 | |
| 126 | or manually: |
| 127 | |
| 128 | :: |
| 129 | |
| 130 | sudo chgrp admin /dev/bpf* |
| 131 | sudo chmod g+rw /dev/bpf* |
| 132 | |
| 133 | How to enable UDP multicast support in multi-homed Linux machines |
| 134 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 135 | |
| 136 | The UDP configuration file section contains settings for unicast and multicast UDP |
| 137 | faces. If the Linux box is equipped with multiple network interfaces with multicast |
| 138 | capabilities, the settings for multicast faces will **NOT** work without root |
| 139 | or setting the appropriate permissions: |
| 140 | |
| 141 | :: |
| 142 | |
| 143 | sudo setcap cap_net_raw=eip /full/path/nfd |
| 144 | |
| 145 | .. _How to configure NFD security: |
| 146 | |
| 147 | How to configure NFD security? |
| 148 | ------------------------------ |
| 149 | |
| 150 | .. note:: Sample configuration file of NFD allow any user to manage faces, FIB, RIB, and |
| 151 | StrategyChoice. The following description can be used to restrict certain operations |
| 152 | to certain users. |
| 153 | |
| 154 | More extensive documentation about NFD's security and options to configure trust model |
| 155 | for NFD is currently in preparation. |
| 156 | |
| 157 | Many NFD management protocols require signed commands to be processed |
| 158 | (e.g. FIB modification, Face creation/destructions, etc.). You will need |
| 159 | an NDN certificate to use any application that issues signed commands. |
| 160 | |
| 161 | If you do not already have NDN certificate, you can generate one with |
| 162 | the following commands: |
| 163 | |
| 164 | **Generate and install a self-signed identity certificate**: |
| 165 | |
| 166 | :: |
| 167 | |
| 168 | ndnsec-keygen /`whoami` | ndnsec-install-cert - |
| 169 | |
| 170 | Note that the argument to ndnsec-key will be the identity name of the |
| 171 | new key (in this case, ``/your-username``). Identity names are |
| 172 | hierarchical NDN names and may have multiple components (e.g. |
| 173 | ``/ndn/ucla/edu/alice``). You may create additional keys and identities |
| 174 | as you see fit. |
| 175 | |
| 176 | **Dump the NDN certificate to a file**: |
| 177 | |
| 178 | The following commands assume that you have not modified ``PREFIX`` or |
| 179 | ``SYSCONFDIR`` If you have, please substitute ``/usr/local/etc`` for the |
| 180 | appropriate value (the overriden ``SYSCONFDIR`` or ``PREFIX/etc`` if you |
| 181 | changed ``PREFIX``). |
| 182 | |
| 183 | :: |
| 184 | |
| 185 | sudo mkdir -p /usr/local/etc/ndn/keys |
| 186 | ndnsec-cert-dump -i /`whoami` > default.ndncert |
| 187 | sudo mv default.ndncert /usr/local/etc/ndn/keys/default.ndncert |
| 188 | |
| 189 | .. _How to start using NDN MacPorts repository on OSX: |
| 190 | |
| 191 | How to start using NDN MacPorts repository on OSX? |
| 192 | -------------------------------------------------- |
| 193 | |
| 194 | OSX users have an opportunity to seamlessly install and run NFD and other related |
| 195 | applications via `MacPorts <https://www.macports.org/>`_. If you are not using MacPorts |
| 196 | yet, go to `MacPorts website <https://www.macports.org/install.php>`_ and download and |
| 197 | install the MacPorts package. |
| 198 | |
| 199 | NFD and related ports are not part of the official MacPorts repository and in order to use |
| 200 | it, you need to add NDN MacPorts repository to the local configuration. In particular, |
| 201 | you will need to modify the list of source URLs for MacPorts. For example, if your |
| 202 | MacPorts are installed in ``/opt/local``, add the following line |
| 203 | `/opt/local/etc/macports/sources.conf` before or after the default port repository: |
| 204 | |
| 205 | :: |
| 206 | |
| 207 | rsync://macports.named-data.net/macports/ |
| 208 | |
| 209 | After this step, you can use ``sudo port selfupdate`` to fetch updated port definitions. |
| 210 | |
| 211 | The following command will install NFD using MacPorts: |
| 212 | |
| 213 | :: |
| 214 | |
| 215 | sudo port install nfd |
| 216 | |
| 217 | .. note:: |
| 218 | You have to have XCode installed on your machine. For latest versions of OSX (Lion or |
| 219 | Mountain Lion) you can install it from AppStore for free, for older versions you have to |
| 220 | go to developer.apple.com and download old version of XCode that is appropriate for your |
| 221 | system. |
| 222 | |
| 223 | |
| 224 | One of the advantages of using MacPorts is that you can easily upgrade NFD and other |
| 225 | packages to the most recent version available. The following commands will do this job: |
| 226 | |
| 227 | :: |
| 228 | |
| 229 | sudo port selfupdate |
| 230 | sudo port upgrade nfd |
| 231 | |
| 232 | .. _How to start using NDN PPA repository on Ubuntu Linux: |
| 233 | |
| 234 | How to start using NDN PPA repository on Ubuntu Linux? |
| 235 | ------------------------------------------------------ |
| 236 | |
| 237 | NFD binaries and related tools for Ubuntu 12.04, 13.10, and 14.04 can be installed using |
| 238 | PPA packages from named-data repository. First, you will need to add ``named-data/ppa`` |
Alexander Afanasyev | 47fc940 | 2014-05-09 18:13:43 -0700 | [diff] [blame] | 239 | repository to binary package sources and update list of available packages. |
| 240 | |
| 241 | Preliminary steps if you haven't used PPA packages before |
| 242 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 243 | |
| 244 | To simplify adding new PPA repositories, Ubuntu provides ``add-apt-repository`` tool, which |
| 245 | is not installed by default on some platforms. |
| 246 | |
| 247 | On Ubuntu **12.04**: |
| 248 | |
| 249 | :: |
| 250 | |
| 251 | sudo apt-get install python-software-properties |
| 252 | |
| 253 | On Ubuntu **13.10** and **14.04**: |
| 254 | |
| 255 | :: |
| 256 | |
| 257 | sudo apt-get install software-properties-common |
| 258 | |
| 259 | |
| 260 | Adding NDN PPA |
| 261 | ++++++++++++++ |
| 262 | |
| 263 | After installing ``add-apt-repository``, run the following command to add `NDN PPA repository`_. |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 264 | |
| 265 | :: |
| 266 | |
| 267 | sudo add-apt-repository ppa:named-data/ppa |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 268 | sudo apt-get update |
| 269 | |
Alexander Afanasyev | 47fc940 | 2014-05-09 18:13:43 -0700 | [diff] [blame] | 270 | Installing NFD and other NDN packages |
| 271 | +++++++++++++++++++++++++++++++++++++ |
| 272 | |
| 273 | After you have added `NDN PPA repository`_, NFD and other NDN packages can be easily |
| 274 | installed in a standard way, i.e., either using ``apt-get`` as shown below or using any |
| 275 | other package manager, such as Synaptic Package Manager: |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 276 | |
| 277 | :: |
| 278 | |
| 279 | sudo apt-get install nfd |
| 280 | |
Alexander Afanasyev | 47fc940 | 2014-05-09 18:13:43 -0700 | [diff] [blame] | 281 | For the list of available packages, refer to `NDN PPA repository`_ homepage. |
| 282 | |
| 283 | .. _NDN PPA repository: https://launchpad.net/~named-data/+archive/ppa |
Alexander Afanasyev | 84e2977 | 2014-07-02 15:24:31 -0700 | [diff] [blame^] | 284 | |
| 285 | |
| 286 | .. _How to start using NDN Overlay on Gentoo Linux: |
| 287 | |
| 288 | How to start using NDN Overlay on Gentoo Linux? |
| 289 | ----------------------------------------------- |
| 290 | |
| 291 | If you want to install NFD and other packages using Portage on Gentoo Linux, you can start |
| 292 | using NDN Overlay. |
| 293 | |
| 294 | Simply checkout `NDN Overlay <https://github.com/Pesa/ndn-overlay>`_ repository to some |
| 295 | location add the checkout path to ``PORTDIR_OVERLAY`` in ``/etc/portage/make.conf``: |
| 296 | |
| 297 | :: |
| 298 | |
| 299 | cd /some/path |
| 300 | git clone https://github.com/Pesa/ndn-overlay.git |
| 301 | |
| 302 | # and then add /some/path/ndn-overlay to PORTDIR_OVERLAY in /etc/portage/make.conf |
| 303 | |
| 304 | Afterwards, you will be able to install ``nfd`` using standard mechanisms. |