Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 1 | Getting started with NFD |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 2 | ======================== |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 3 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 4 | Supported platforms |
| 5 | ------------------- |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 6 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 7 | NFD is built against a continuous integration system and has been tested on the |
| 8 | following platforms: |
| 9 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 10 | - Ubuntu 18.04 (amd64, armhf, i386) |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 11 | - Ubuntu 20.04 (amd64) |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 12 | - macOS 10.13 |
| 13 | - macOS 10.14 |
| 14 | - macOS 10.15 |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 15 | - CentOS 8 |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 16 | |
| 17 | NFD is known to work on the following platforms, although they are not officially |
| 18 | supported: |
| 19 | |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 20 | - Debian 10 (Buster) |
| 21 | - Fedora >= 29 |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 22 | - Gentoo Linux |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 23 | - Raspbian >= 2019-06-20 (Buster) |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 24 | |
| 25 | .. _Install NFD on Ubuntu Linux using the NDN PPA repository: |
| 26 | |
| 27 | Install NFD on Ubuntu Linux using the NDN PPA repository |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 28 | -------------------------------------------------------- |
| 29 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 30 | NFD binaries and related tools for supported versions of Ubuntu can be installed using |
| 31 | PPA packages from the **named-data** repository. First, you will need to add the |
| 32 | ``named-data/ppa`` repository to the binary package sources and update the list of |
| 33 | available packages. |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 34 | |
Alexander Afanasyev | 84dd4ca | 2017-10-15 14:56:08 -0400 | [diff] [blame] | 35 | Preliminary steps if you have not used PPA packages before |
| 36 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 37 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 38 | To simplify adding new PPA repositories, Ubuntu provides the ``add-apt-repository`` tool, |
Davide Pesavento | cc7bee7 | 2016-04-22 02:21:13 +0200 | [diff] [blame] | 39 | which is not installed by default on some systems. |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 40 | |
| 41 | :: |
| 42 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 43 | sudo apt install software-properties-common |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 44 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 45 | Adding the NDN PPA |
| 46 | ~~~~~~~~~~~~~~~~~~ |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 47 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 48 | After installing ``add-apt-repository``, run the following commands to add the `NDN PPA |
| 49 | repository`_:: |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 50 | |
| 51 | sudo add-apt-repository ppa:named-data/ppa |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 52 | sudo apt update |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 53 | |
| 54 | Installing NFD and other NDN packages |
| 55 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 56 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 57 | After you have added the `NDN PPA repository`_, NFD and other NDN packages can be easily |
| 58 | installed either using ``apt``, as shown below, or any other compatible package manager. |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 59 | |
| 60 | :: |
| 61 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 62 | sudo apt install nfd |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 63 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 64 | For the list of available packages, refer to the `NDN PPA repository`_ page. |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 65 | |
| 66 | .. _NDN PPA repository: https://launchpad.net/~named-data/+archive/ppa |
| 67 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 68 | Building from source |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 69 | -------------------- |
| 70 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 71 | Downloading from git |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 72 | ~~~~~~~~~~~~~~~~~~~~ |
| 73 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 74 | The first step is to obtain the source code for NFD and its main dependency, the |
| 75 | *ndn-cxx* library. If you do not want a development version of NFD, make sure you |
Eric Newberry | 3dc9fd0 | 2020-10-01 10:47:04 -0700 | [diff] [blame] | 76 | checkout the correct release tag (e.g., ``*-0.7.1``) from both repositories. |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 77 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 78 | .. code-block:: sh |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 79 | |
| 80 | # Download ndn-cxx |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 81 | git clone https://github.com/named-data/ndn-cxx.git |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 82 | |
| 83 | # Download NFD |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 84 | git clone --recursive https://github.com/named-data/NFD.git |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 85 | |
Alexander Afanasyev | 84dd4ca | 2017-10-15 14:56:08 -0400 | [diff] [blame] | 86 | .. note:: |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 87 | While we strive to ensure that the latest version (git master branch) of NFD and ndn-cxx |
| 88 | always compiles and works properly, we cannot guarantee that there will be no issues. |
| 89 | If this is discovered to be the case, please use matching released versions (git tag or |
| 90 | tarball) of NFD and ndn-cxx instead. |
Alexander Afanasyev | 84dd4ca | 2017-10-15 14:56:08 -0400 | [diff] [blame] | 91 | |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 92 | Prerequisites |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 93 | ~~~~~~~~~~~~~ |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 94 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 95 | Install the `ndn-cxx library <https://named-data.net/doc/ndn-cxx/current/INSTALL.html>`__ |
| 96 | and its prerequisites. |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 97 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 98 | On Linux, NFD needs the following dependencies to enable optional features: |
Junxiao Shi | e5e1e25 | 2014-12-13 22:07:35 -0700 | [diff] [blame] | 99 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 100 | - On **Ubuntu**: |
| 101 | |
| 102 | .. code-block:: sh |
Junxiao Shi | e5e1e25 | 2014-12-13 22:07:35 -0700 | [diff] [blame] | 103 | |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 104 | sudo apt install libpcap-dev libsystemd-dev |
| 105 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 106 | - On **CentOS** and **Fedora**: |
| 107 | |
| 108 | .. code-block:: sh |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 109 | |
Davide Pesavento | 9ab43e6 | 2020-12-27 20:07:25 -0500 | [diff] [blame^] | 110 | sudo dnf config-manager --enable powertools # on CentOS only |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 111 | sudo dnf install libpcap-devel systemd-devel |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 112 | |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 113 | Build |
| 114 | ~~~~~ |
| 115 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 116 | The following commands can be used to build and install NFD from source: |
| 117 | |
| 118 | .. code-block:: sh |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 119 | |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 120 | ./waf configure # on CentOS, add --without-pch |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 121 | ./waf |
| 122 | sudo ./waf install |
| 123 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 124 | If you have installed ndn-cxx and/or any other dependencies into a non-standard path, |
| 125 | you may need to modify the ``PKG_CONFIG_PATH`` environment variable before running |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 126 | ``./waf configure``. For example: |
| 127 | |
| 128 | .. code-block:: sh |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 129 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 130 | export PKG_CONFIG_PATH="/custom/lib/pkgconfig:$PKG_CONFIG_PATH" |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 131 | ./waf configure |
| 132 | ./waf |
| 133 | sudo ./waf install |
| 134 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 135 | Refer to ``./waf --help`` for more options that can be used during the ``configure`` stage. |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 136 | |
Alexander Afanasyev | 508411e | 2014-12-16 13:27:59 -0800 | [diff] [blame] | 137 | .. note:: |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 138 | If you are working on a source repository that has been compiled before, and you have |
| 139 | upgraded one of the dependencies, please execute ``./waf distclean`` to clear object files |
| 140 | and start over. |
Alexander Afanasyev | 508411e | 2014-12-16 13:27:59 -0800 | [diff] [blame] | 141 | |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 142 | Debug symbols |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 143 | ~~~~~~~~~~~~~ |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 144 | |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 145 | The default compiler flags include debug symbols in binaries. This should provide |
| 146 | more meaningful debugging information if NFD or other tools happen to crash. |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 147 | |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 148 | If this is not desired, the default flags can be overridden to disable debug symbols. |
| 149 | The following example shows how to completely disable debug symbols and configure |
| 150 | NFD to be installed into ``/usr`` with configuration in the ``/etc`` directory. |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 151 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 152 | .. code-block:: sh |
Alexander Afanasyev | 2618153 | 2014-05-07 23:38:51 -0700 | [diff] [blame] | 153 | |
| 154 | CXXFLAGS="-O2" ./waf configure --prefix=/usr --sysconfdir=/etc |
| 155 | ./waf |
| 156 | sudo ./waf install |
| 157 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 158 | For Ubuntu PPA packages, debug symbols are available in ``*-dbg`` packages. |
Alexander Afanasyev | 84dd4ca | 2017-10-15 14:56:08 -0400 | [diff] [blame] | 159 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 160 | Customizing the compiler |
| 161 | ~~~~~~~~~~~~~~~~~~~~~~~~ |
Alexander Afanasyev | 7c10b3b | 2015-01-20 12:24:27 -0800 | [diff] [blame] | 162 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 163 | To build NFD with a different compiler (rather than the platform default), set the |
| 164 | ``CXX`` environment variable to point to the compiler binary. For example, to build |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 165 | with clang on Linux, use the following: |
| 166 | |
| 167 | .. code-block:: sh |
Alexander Afanasyev | 7c10b3b | 2015-01-20 12:24:27 -0800 | [diff] [blame] | 168 | |
Eric Newberry | 81a9a86 | 2016-12-27 22:59:27 -0700 | [diff] [blame] | 169 | CXX=clang++ ./waf configure |
Alexander Afanasyev | 7c10b3b | 2015-01-20 12:24:27 -0800 | [diff] [blame] | 170 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 171 | Building the documentation |
| 172 | ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 173 | |
Davide Pesavento | 9f6a7d9 | 2020-10-06 15:21:48 -0400 | [diff] [blame] | 174 | Tutorials and API documentation can be built using the following commands: |
| 175 | |
| 176 | .. code-block:: sh |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 177 | |
| 178 | # Full set of documentation (tutorials + API) in build/docs |
| 179 | ./waf docs |
| 180 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 181 | # Only tutorials in build/docs |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 182 | ./waf sphinx |
| 183 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 184 | # Only API docs in build/docs/doxygen |
| 185 | ./waf doxygen |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 186 | |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 187 | If ``sphinx-build`` is detected during ``./waf configure``, manpages will automatically |
| 188 | be built and installed during the normal build process (i.e., during ``./waf`` and |
| 189 | ``./waf install``). By default, manpages will be installed into ``${PREFIX}/share/man`` |
| 190 | (the default value for ``PREFIX`` is ``/usr/local``). This location can be changed |
| 191 | during the ``./waf configure`` stage using the ``--prefix``, ``--datarootdir``, or |
| 192 | ``--mandir`` options. |
Alexander Afanasyev | 284257b | 2014-04-11 14:16:51 -0700 | [diff] [blame] | 193 | |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 194 | For further details, please refer to ``./waf --help``. |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 195 | |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 196 | Initial configuration |
| 197 | --------------------- |
| 198 | |
| 199 | .. note:: |
| 200 | If you have installed NFD from binary packages, the package manager has already |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 201 | installed a working configuration and you can safely skip this section. |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 202 | |
| 203 | General |
| 204 | ~~~~~~~ |
| 205 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 206 | After installing NFD from source, you need to create a proper configuration file. |
| 207 | If the default installation directories were used with ``./waf configure``, this |
| 208 | can be accomplished by simply copying the sample configuration file as follows:: |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 209 | |
| 210 | sudo cp /usr/local/etc/ndn/nfd.conf.sample /usr/local/etc/ndn/nfd.conf |
| 211 | |
| 212 | NFD Security |
| 213 | ~~~~~~~~~~~~ |
| 214 | |
| 215 | NFD provides mechanisms to enable strict authorization for all management commands. In |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 216 | particular, one can authorize only specific public keys to create new faces or change the |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 217 | forwarding strategy for specific namespaces. For more information about how to generate |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 218 | public/private key pairs, generate self-signed certificates, and use them to authorize |
| 219 | NFD management commands, refer to the :ref:`How do I configure NFD security` FAQ question. |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 220 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 221 | In the sample configuration file, all security mechanisms are disabled for local clients, |
| 222 | effectively allowing anybody on the local machine to issue NFD management commands. |
| 223 | |
| 224 | .. note:: |
| 225 | The sample configuration file is intended only for demo purposes and should NOT be |
| 226 | used in production environments. |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 227 | |
| 228 | Running |
| 229 | ------- |
| 230 | |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 231 | Starting |
| 232 | ~~~~~~~~ |
| 233 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 234 | If you have installed NFD from source, it is recommended to start NFD with the |
| 235 | ``nfd-start`` script:: |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 236 | |
| 237 | nfd-start |
| 238 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 239 | On macOS, this command may ask for your keychain password or ask "nfd wants to sign using |
| 240 | key [xyz] in your keychain". Enter your keychain password and click "Always Allow". |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 241 | |
| 242 | Later, you can stop NFD with ``nfd-stop`` or by simply killing the ``nfd`` process. |
| 243 | |
Davide Pesavento | 2849fd4 | 2019-01-03 18:30:05 -0500 | [diff] [blame] | 244 | If you have installed NFD using a package manager, you can start and stop NFD using the |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 245 | operating system's service manager, such as ``systemctl`` or ``launchctl``. |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 246 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 247 | Connecting to remote forwarders |
| 248 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 249 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 250 | To create a UDP tunnel to a remote instance of NFD, execute the following command |
| 251 | in a terminal:: |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 252 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 253 | nfdc face create udp://<other-host> |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 254 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 255 | where ``<other-host>`` is the name or IP address of the other host (e.g., |
| 256 | ``udp://ndn.example.net``). If successful, this will print something like:: |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 257 | |
Junxiao Shi | 849e12a | 2017-08-02 00:14:57 +0000 | [diff] [blame] | 258 | face-created id=308 local=udp4://10.0.2.15:6363 remote=udp4://131.179.196.46:6363 persistency=persistent |
| 259 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 260 | To add a route ``/ndn`` toward this remote forwarder, execute the following command |
| 261 | in a terminal:: |
Junxiao Shi | 849e12a | 2017-08-02 00:14:57 +0000 | [diff] [blame] | 262 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 263 | nfdc route add /ndn udp://<other-host> |
Junxiao Shi | 849e12a | 2017-08-02 00:14:57 +0000 | [diff] [blame] | 264 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 265 | This will print:: |
Junxiao Shi | 849e12a | 2017-08-02 00:14:57 +0000 | [diff] [blame] | 266 | |
| 267 | route-add-accepted prefix=/ndn nexthop=308 origin=static cost=0 flags=child-inherit expires=never |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 268 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 269 | This indicates that NFD will forward all Interests that start with ``/ndn`` through the |
| 270 | face to the other host. This forwards Interests to the other host, but does not provide |
| 271 | a "back route" for the other host to forward Interests to you. For this, you can rely on |
| 272 | the "automatic prefix propagation" feature of NFD or use the ``nfdc`` command on the other |
| 273 | host to add the route. |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 274 | |
| 275 | Playing with NFD |
| 276 | ---------------- |
| 277 | |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 278 | After you have installed, configured, and started NFD, you can demonstrate the features |
| 279 | of NDN using the following applications and libraries. |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 280 | |
| 281 | Sample applications: |
| 282 | |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 283 | + `Simple examples using the ndn-cxx library <https://named-data.net/doc/ndn-cxx/current/examples.html>`__ |
Davide Pesavento | 69857c3 | 2020-04-05 16:36:26 -0400 | [diff] [blame] | 284 | + `Introductory examples of NDN-CCL |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 285 | <https://redmine.named-data.net/projects/application-development-documentation-guides/wiki/Step-By-Step_-_Common_Client_Libraries>`__ |
Steve DiBenedetto | 62a9394 | 2014-08-24 17:13:52 -0600 | [diff] [blame] | 286 | |
| 287 | Real applications and libraries: |
| 288 | |
Davide Pesavento | 1752159 | 2020-05-14 19:01:32 -0400 | [diff] [blame] | 289 | + `ndn-tools - Essential NDN command-line tools <https://github.com/named-data/ndn-tools>`__ |
| 290 | + `ndn-traffic-generator - Traffic generator for NDN <https://github.com/named-data/ndn-traffic-generator>`__ |
| 291 | + `ChronoSync - Sync library for multi-user real-time applications <https://github.com/named-data/ChronoSync>`__ |
| 292 | + `PSync - Partial and full synchronization library <https://github.com/named-data/PSync>`__ |