blob: a41c6d865066f79057d07b06519031e89060fa78 [file] [log] [blame]
David Arjona2e6c8bb2018-11-14 16:27:09 -06001==========================================================
2A beginners guide to installing and testing NLSR on Fedora
3==========================================================
4
5:Authors: David Arjona-Villicaña, Octavio Renteria-Vidales, Ashlesh Gawande
6:Date: November, 2018
7:Abstract: This is an easy to follow guide on how to install and test the NLSR routing protocol for NDN using two Fedora 28 machines. The commands and the paths used in this guide have been tested only in Fedora, although a similar procedure should be used for other linux systems. Specifically, the testing section (§ `5 <#test>`__) is platform independent. Therefore users who have NLSR already installed may skip to this section. Since neither NDN, NLSR nor Fedora are static software developments, it is expected that some commands and features in this guide will change over time. However, this guide is as accurate as it could be at the time it was published.
8
9.. role:: raw-latex(raw)
10 :format: latex
11
12
13.. _intro:
14
151. Introduction
16===============
17
18The following instructions are based on the information provided at the
19Named Data Networking project web page [NDNmain]_.
Davide Pesaventoede59632022-08-26 20:35:44 -040020Before installing NLSR it is necessary to install different libraries and
21programs: ndn-cxx, NFD, ChronoSync [optional], and PSync. This document describes
22the necessary steps to correctly install these programs (§ `2 <#ndncxx>`__,
David Arjona2e6c8bb2018-11-14 16:27:09 -060023`3 <#nfd>`__ and `4 <#nlsr>`__) and a brief guide on how to configure
24and test NLSR using a simple two-node network (§ `5 <#test>`__).
25
26Many of the commands in this guide need to be executed as *root*.
27Starting from Fedora 28, there is no need to set a root user
28[Kolman2018]_. However it is possible to define it,
29using the following command:
30
31::
32
33 $ sudo -i
34
Davide Pesaventoede59632022-08-26 20:35:44 -040035And then using the ``passwd`` command to set up a password. After setting
David Arjona2e6c8bb2018-11-14 16:27:09 -060036up the root user, it is possible to become root by employing the
37following command and providing the root password when prompted:
38
39::
40
41 $ su -
42
Davide Pesaventoede59632022-08-26 20:35:44 -040043Fedora employs the ``dnf`` command to install and verify installed
David Arjona2e6c8bb2018-11-14 16:27:09 -060044packages. The following commands may become useful during the
45installation process and should be executed as root:
46
47- To verify that all installed packages are up to date
48
49 ::
50
51 $ dnf update
52
53- To verify if a package is already installed in the system
54
55 ::
56
57 $ dnf list --installed <package-name>
58
59- To search for information about a package or family of packages (not
60 necessarily installed in the system).
61
62 ::
63
64 $ dnf info <package-name>
65
66- To install a package in the system.
67
68 ::
69
70 $ dnf install <package-name>
71
72It is also a good installation practice to download and install all the
73NDN programs in a common directory. Therefore, it is recommended to
74create a directory at the home directory where all the following
75programs may get installed. The name of this directory is not important.
76However, the following are provided as suggestions: project, NDNproject,
77NDNprograms. Each of the programs in the following sections should be
Davide Pesaventoede59632022-08-26 20:35:44 -040078downloaded to their own directory using the ``git`` command, and then
David Arjona2e6c8bb2018-11-14 16:27:09 -060079compiled in this directory.
80
81.. _ndncxx:
82
832. Installing ndn-cxx
84=====================
85
862.1 Before installing ndn-cxx
87-----------------------------
88
89An updated list of the packages and programs that need to be installed
90before installing ndn-cxx, is provided at [NDN-cxx]_.
Davide Pesaventoede59632022-08-26 20:35:44 -040091This list is also reproduced below with the commands to verify that all
David Arjona2e6c8bb2018-11-14 16:27:09 -060092the packages have been installed in the system. The following commands
93should be run as root:
94
95#. gcc and gcc-c++
96
97 ::
98
99 $ dnf list --installed gcc
100 $ dnf list --installed gcc-c++
101
Davide Pesaventoede59632022-08-26 20:35:44 -0400102#. Python version 3.6 or later
David Arjona2e6c8bb2018-11-14 16:27:09 -0600103
104 ::
105
Davide Pesaventoede59632022-08-26 20:35:44 -0400106 $ python3 -V
David Arjona2e6c8bb2018-11-14 16:27:09 -0600107
Davide Pesaventoede59632022-08-26 20:35:44 -0400108#. SQLite 3.x
David Arjona2e6c8bb2018-11-14 16:27:09 -0600109
110 ::
111
David Arjona2e6c8bb2018-11-14 16:27:09 -0600112 $ dnf list --installed sqlite-devel
113
Davide Pesaventoede59632022-08-26 20:35:44 -0400114#. OpenSSL version 1.1.1 or later
David Arjona2e6c8bb2018-11-14 16:27:09 -0600115
116 ::
117
David Arjona2e6c8bb2018-11-14 16:27:09 -0600118 $ dnf list --installed openssl-devel
119
120#. pkgconf that replaces pkg-config
121
122 ::
123
124 $ dnf list --installed pkgconf*
125
Davide Pesaventoede59632022-08-26 20:35:44 -0400126#. Boost libraries version 1.65.1 or later
David Arjona2e6c8bb2018-11-14 16:27:09 -0600127
128 ::
129
David Arjona2e6c8bb2018-11-14 16:27:09 -0600130 $ dnf list --installed boost-devel
131
Davide Pesaventoede59632022-08-26 20:35:44 -0400132#. git
133
134 ::
135
136 $ dnf list --installed git
137
138#. doxygen (optional)
David Arjona2e6c8bb2018-11-14 16:27:09 -0600139
140 ::
141
142 $ dnf list --installed doxygen
143
Davide Pesaventoede59632022-08-26 20:35:44 -0400144#. graphviz (optional)
David Arjona2e6c8bb2018-11-14 16:27:09 -0600145
146 ::
147
148 $ dnf list --installed graphviz
149
Davide Pesaventoede59632022-08-26 20:35:44 -0400150#. python3-pip (optional)
David Arjona2e6c8bb2018-11-14 16:27:09 -0600151
152 ::
153
Davide Pesaventoede59632022-08-26 20:35:44 -0400154 $ dnf list --installed python3-pip
David Arjona2e6c8bb2018-11-14 16:27:09 -0600155
Davide Pesaventoede59632022-08-26 20:35:44 -0400156#. After verifying that the python3-pip package has been installed, it
157 is necessary to run the following command:
David Arjona2e6c8bb2018-11-14 16:27:09 -0600158
159 ::
160
Davide Pesaventoede59632022-08-26 20:35:44 -0400161 $ pip install sphinx sphinxcontrib-doxylink
David Arjona2e6c8bb2018-11-14 16:27:09 -0600162
1632.2 Downloading and installing ndn-cxx
164--------------------------------------
165
Davide Pesaventoede59632022-08-26 20:35:44 -0400166The ``git`` command allows to download the ndn-cxx library in its own
David Arjona2e6c8bb2018-11-14 16:27:09 -0600167folder, also called *ndn-cxx*. Therefore it is recommended to execute
168this command at the directory created at § `1 <#intro>`__:
169
170::
171
172 $ git clone --depth 1 https://github.com/named-data/ndn-cxx.git
173
174Move to the ndn-cxx directory:
175
176::
177
178 $ cd ndn-cxx
179
180Use the following command to verify that everything is ready to compile.
181If an error message displays, it is necessary to fix it before
182continuing:
183
184::
185
186 $ ./waf configure --with-examples
187
188Compile the ndn-cxx library and install the compiled files at the
Davide Pesaventoede59632022-08-26 20:35:44 -0400189system's directories:
David Arjona2e6c8bb2018-11-14 16:27:09 -0600190
191::
192
193 $ ./waf
194 $ sudo ./waf install
195
1962.3 Configuring ndn-cxx
197-----------------------
198
199The commands in this subsection need to be run as root. First, it is
200necessary to create file *local.conf*, which contains a line with the
201location for the ndn-cxx library:
202
203::
204
205 $ echo /usr/local/lib64 >> /etc/ld.so.conf.d/local.conf
206
207The following command configures the libraries:
208
209::
210
211 $ ldconfig -v | grep ndn
212
213This command should display a line similar to the following:
214
215::
216
217 libndn-cxx.so.0.6.1 -> libndn-cxx.so.0.6.1
218
219Configure the NDN path:
220
221::
222
Davide Pesaventoede59632022-08-26 20:35:44 -0400223 $ echo export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig >> /etc/profile.d/ndn.sh
David Arjona2e6c8bb2018-11-14 16:27:09 -0600224
225After this command has been executed, it is necessary to apply the
226changes by either logging out and back in, and then running the
227following command:
228
229::
230
231 $ printenv | grep PKG
232
233Or by executing the following command:
234
235::
236
237 $ ./etc/profile.d/ndn.sh
238
239For more information and examples about how to compile and configure
240this library, users should read the ndn-cxx guide at
241[NDN-cxx]_.
242
243.. _nfd:
244
2453. Installing NFD
246=================
247
2483.1 Before installing NFD
249-------------------------
250
251An updated list of the packages and programs that need to be installed
252before NFD is provided at [NDNNFD]_. Before installing
253NFD it is necessary to verify that the following packages are installed:
254
Davide Pesaventoede59632022-08-26 20:35:44 -0400255#. pcap library
David Arjona2e6c8bb2018-11-14 16:27:09 -0600256
257 ::
258
David Arjona2e6c8bb2018-11-14 16:27:09 -0600259 $ dnf list --installed libpcap-devel
260
2613.2 Downloading and installing NFD
262----------------------------------
263
Davide Pesaventoede59632022-08-26 20:35:44 -0400264This software is downloaded and installed in a folder called *NFD*, which
David Arjona2e6c8bb2018-11-14 16:27:09 -0600265should be created at the directory defined at § `1 <#intro>`__. The
266following commands need to be run as a regular user:
267
268::
269
270 $ git clone --depth 1 https://github.com/named-data/NFD.git
271 $ cd NFD
272 $ ./waf configure
273
274If the previous command prints an error message saying that waf cannot
275find WebSocket, it is necessary to follow the instructions provided by
Davide Pesaventoede59632022-08-26 20:35:44 -0400276this same output, which tells the user to run the following command:
David Arjona2e6c8bb2018-11-14 16:27:09 -0600277
278::
279
Davide Pesaventoede59632022-08-26 20:35:44 -0400280 $ git submodule update --init
David Arjona2e6c8bb2018-11-14 16:27:09 -0600281
Davide Pesaventoede59632022-08-26 20:35:44 -0400282After executing these instructions, complete the configuration by running
283``./waf configure`` again. Then complete the installation by means of the
284following commands:
David Arjona2e6c8bb2018-11-14 16:27:09 -0600285
286::
287
288 $ ./waf
289 $ sudo ./waf install
290
2913.3 Configuring NFD
292-------------------
293
294Create a configuration file by running the following command as root:
295
296::
297
298 $ cp /usr/local/etc/ndn/nfd.conf.sample /usr/local/etc/ndn/nfd.conf
299
Davide Pesaventoede59632022-08-26 20:35:44 -0400300After the configuration file has been created, NFD's behavior may be
David Arjona2e6c8bb2018-11-14 16:27:09 -0600301changed by modifying this file. Once the configuration file has been
302created, it is recommended to start NFD by using the following command:
303
304::
305
306 $ nfd-start
307
308This command does not properly allow to employ the command window to
309enter new commands; however it displays the NFD logs. Therefore, it is
310recommended to open a new command window. This second window may be used
Davide Pesaventoede59632022-08-26 20:35:44 -0400311to verify NDF's status and then stop NFD by using the following
David Arjona2e6c8bb2018-11-14 16:27:09 -0600312commands:
313
314::
315
316 $ nfd-status
317 $ nfd-stop
318
319.. _nlsr:
320
3214. Installing NLSR
322==================
323
Ashlesh Gawande30d96e42021-03-21 19:15:33 -07003244.1 Installing PSync
325--------------------
326
327Before installing NLSR, it is also necessary to download and install
328PSync. PSync is a synchronization library which allows NLSR to synchronize LSAs
329similar to ChronoSync. More information about PSync may be found at [PSync]_.
330This library may be installed by running the following commands as a regular
331user and at the directory defined at § `1 <#intro>`__:
332
333::
334
335 $ git clone --depth 1 https://github.com/named-data/PSync.git
336 $ cd PSync
337 $ ./waf configure
338 $ ./waf
339 $ sudo ./waf install
340
341The following command needs to be used again to configure the libraries:
342
343::
344
345 $ sudo ldconfig -v | grep -i psync
346
347This command should display a line similar to the following:
348
349::
350
351 libPSync.so.0.1.0 -> libPSync.so.0.1.0
352
3534.2 [Optional] Installing ChronoSync
354------------------------------------
355
356By default NLSR no longer builds with ChronoSync support.
357Since ChronoSync is deprecated, only install it for testing purposes.
David Arjona2e6c8bb2018-11-14 16:27:09 -0600358
359Before installing NLSR, it is necessary to first download and install
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -0500360ChronoSync, which is a synchronization library which allows NLSR routers
361to synchronize Link State Advertisements (LSAs). More information about
362ChronoSync may be found at [Chronosync]_. This library may be
David Arjona2e6c8bb2018-11-14 16:27:09 -0600363installed by running the following commands as a regular user and at the
364directory defined at § `1 <#intro>`__:
365
366::
367
368 $ git clone --depth 1 https://github.com/named-data/ChronoSync.git
369 $ cd ChronoSync
370 $ ./waf configure
371 $ ./waf
372 $ sudo ./waf install
373
374The following command needs to be used again to configure the libraries:
375
376::
377
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -0500378 $ sudo ldconfig -v | grep -i chronosync
David Arjona2e6c8bb2018-11-14 16:27:09 -0600379
380This command should display a line similar to the following:
381
382::
383
384 libChronoSync.so.0.5.0 -> libChronoSync.so.0.5.0
385
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -05003864.3 Downloading and installing NLSR
David Arjona2e6c8bb2018-11-14 16:27:09 -0600387-----------------------------------
388
389NLSR is downloaded and installed in a folder called *NLSR* which should
390be created at the directory defined at § `1 <#intro>`__. The following
391commands need to be run as a regular user:
392
393::
394
395 $ git clone --depth 1 https://github.com/named-data/NLSR.git
396 $ cd NLSR
397 $ ./waf configure
398 $ ./waf
399 $ sudo ./waf install
400
Ashlesh Gawande30d96e42021-03-21 19:15:33 -0700401If ChronoSync support is needed for testing, please configure NLSR with:
402
403::
404
405 $ ./waf configure --with-chronosync
406
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -05004074.4 Configuring NLSR
David Arjona2e6c8bb2018-11-14 16:27:09 -0600408--------------------
409
410Create and configure the following directory by running the following
411commands as root:
412
413::
414
415 $ mkdir /var/lib/nlsr
416 $ chmod 777 /var/lib/nlsr
417
418.. _test:
419
4205. Configuring and Testing NLSR
421===============================
422
423To test NLSR, the first step is to configure the keys and certificates
424that implement a secure communication between the routers. Then it is
425necessary to verify that the computers in the test network are
426connected, that NFD is running and the faces between the computers are
427configured. Finally, the NLSR configuration file has to be edited before
428running NLSR. The following subsections are provided as a guide to
429define and configure a simple computer network between two computers:
430router1 and router2.
431
432.. _security:
433
4345.1 Setting up the security
435---------------------------
436
437Configuring security in an NDN network requires to generate, exchange
438and install, keys and certificates between the root, site, operator and
439router computers that form the network
440[NLSRsecconf]_, [NLSRdevguide]_, although in practice, it
441is possible to keep more than one of these entities in a single machine.
442The following example and *Figure 1* show how to configure security
443for a single router, called Router X. In this example, the root, site,
444operator and Router X are in different computers:
445
446.. figure:: security_comp.png
447 :alt: Security configuration example for Router X.
448 :width: 19cm
449 :align: center
450
451 Fig. 1. Security configuration example for Router X.
452
453
454#. At the root server, generate the root key:
455
456 ::
457
458 $ ndnsec-key-gen /ndn/ > root.key
459
460#. Generate the certificate for the root key at the root server:
461
462 ::
463
464 $ ndnsec-cert-dump -i /ndn/ > root.cert
465
466#. Install the root certificate at the root server:
467
468 ::
469
470 $ ndnsec-cert-install -f root.cert
471
472#. At the site server, generate the site key:
473
474 ::
475
476 $ ndnsec-key-gen /ndn/edu/uaslp > site.key
477
478#. Copy the site key to the root server and generate the certificate for
479 the site server:
480
481 ::
482
483 $ ndnsec-cert-gen -s /ndn/ site.key > site.cert
484
485#. Copy the site certificate to the site server and install it:
486
487 ::
488
489 $ ndnsec-cert-install -f site.cert
490
491#. At the operator server, generate the operator key:
492
493 ::
494
495 $ ndnsec-key-gen /ndn/edu/uaslp/%C1.Operator/op > op.key
496
497#. Copy the operator key to the site server and generate the certificate
498 for the operator server:
499
500 ::
501
502 $ ndnsec-cert-gen -s /ndn/edu/uaslp op.key > op.cert
503
504#. Copy the operator certificate to the operator server and install it:
505
506 ::
507
508 $ ndnsec-cert-install -f op.cert
509
510#. At the router, generate the router key:
511
512 ::
513
514 $ ndnsec-key-gen /ndn/edu/uaslp/%C1.Router/routerX > routerX.key
515
516#. Copy the router key to the operator server and generate the
517 certificate for the router:
518
519 ::
520
521 $ ndnsec-cert-gen -s /ndn/edu/uaslp/%C1.Operator/op routerX.key >
522 routerX.cert
523
524#. Copy the router certificate to the router and install it:
525
526 ::
527
528 $ ndnsec-cert-install -f routerX.cert
529
530In the previous steps, the *%C1.Router* and *%C1.Operator* labels are
531NDN keywords and should not be changed. These labels will be also used
532by the configuration file (§ `5.4 <#configfile>`__)
533
534The following command may be used to verify that the certificates have
535been installed in a computer:
536
537::
538
539 $ ndnsec-list
540
541This guide recommends that one machine functions as the root, site,
542operator and router1, while a different computer only functions as
543router2. *Figure 2* shows this
544configuration. For router1, the twelve steps described before need to be
545executed except for exchanging files between computers. For the router2,
Davide Pesaventoede59632022-08-26 20:35:44 -0400546only steps 10 to 12 are needed to generate this router's certificate.
David Arjona2e6c8bb2018-11-14 16:27:09 -0600547
548Additionally, the following command may be used to print a list and a
Davide Pesaventoede59632022-08-26 20:35:44 -0400549brief description of all the ``ndnsec`` commands:
David Arjona2e6c8bb2018-11-14 16:27:09 -0600550
551::
552
553 $ man ndnsec
554
555
556.. figure:: netwk1.png
557 :alt: Example network.
558 :width: 19cm
559 :align: center
560
561 Fig. 2. Example network.
562
563
5645.2 Configuring the network
565---------------------------
566
567The first step is to configure the physical network. If two computers
568are going to get connected using a single Ethernet cable, it is
569necessary to verify that this cable is a crossover. The other option is
570to employ a switch between two computers that are then connected using
571two regular Ethernet cables.
572
573After the physical network has been assembled, it is necessary to
574configure the network addresses and cards for all the computers in the
575network. It is important to remember that computers that are connected
576to each other should use the same subnetwork address. It is possible to
Davide Pesaventoede59632022-08-26 20:35:44 -0400577verify the network configuration in a Linux computer by means of the
578``ip addr`` command.
David Arjona2e6c8bb2018-11-14 16:27:09 -0600579
580Once the physical network and network cards have been configured, it is
581necessary to verify that the computers can communicate with each other.
Davide Pesaventoede59632022-08-26 20:35:44 -0400582The simplest way to do this is by using the ``ping`` command:
David Arjona2e6c8bb2018-11-14 16:27:09 -0600583
584::
585
586 $ ping <remote-ip-address>
587
5885.3 Starting and configuring NFD
589--------------------------------
590
591To start and configure NFD it is necessary to open two terminal windows.
Davide Pesaventoede59632022-08-26 20:35:44 -0400592The first one will be used to start NFD by means of the ``nfd-start``
David Arjona2e6c8bb2018-11-14 16:27:09 -0600593command. This terminal will also display the logs that NFD generates. By
594default, NFD only generates informational logs (INFO). However, it is
595possible to obtain different levels of verbosity for these logs. These
596levels can be set before NFD starts by editing the
597*/usr/local/etc/ndn/nfd.conf* file. Open this file using a regular text
598editor, read the information provided about logging and then modify the
599*default-level* variable at the *log* section according to the
600instructions provided in the file. Additional information about NFD
601configuration may be found at [NDNNFDusage]_.
602
603The second terminal will be used to monitor the NFD status:
604
605::
606
607 $ nfd-status
608
609Employ the following command to configure each face that a computer uses
610to connect to a neighboring computer:
611
612::
613
614 $ nfdc face create udp4://<remote-ip-address>
615
Davide Pesaventoede59632022-08-26 20:35:44 -0400616The face id may be displayed by running:
David Arjona2e6c8bb2018-11-14 16:27:09 -0600617
618::
619
620 $ nfdc face list
621
622The status of the face may be verified by using the following command:
623
624::
625
626 $ nfdc face show id <face-id>
627
628After finishing NLSR testing, it is necessary to destroy the face before
629stopping NFD. This operation is described at § `5.6 <#turn_off>`__. For
630the two computer network provided as an example (*Figure 2*), it is necessary that both
631machines run NFD and that each one configures a face that connects to
632the other machine.
633
634.. _configfile:
635
6365.4 Setting up the configuration file
637-------------------------------------
638
639Instructions on how to use the configuration file are already provided
Davide Pesaventoede59632022-08-26 20:35:44 -0400640at the NLSR's Router Configuration page [NLSRrtrconf]_.
David Arjona2e6c8bb2018-11-14 16:27:09 -0600641Read the information in this page to understand NLSR router
642configuration. The following text describes the instructions that have
643been modified at the default nlsr.conf file for router1:
644
645::
646
647 ; AT general SECTION:
648 {
649 network /ndn/ ; name of the network
650 site /edu/uaslp ; name of the site
651 router /%C1.Router/router1 ; name of the router: router1
652 }
653
654 ;AT neighbors SECTION:
655 neighbors
656 {
657 neighbor
658 {
659 name /ndn/edu/uaslp/%C1.Router/router2 ; Neighbor router: router2
660 face-uri udp://140.220.80.124 ; face to the neighbor
661 link-cost 30 ; cost of the link
662 }
663 }
664
665 ; AT advertising SECTION:
666 advertising
667 {
668 prefix /ndn/edu/uaslp/office/bldg1 ; Advertising destinations
669 prefix /ndn/edu/uaslp/office/bldg2 ; for router1
670 }
671
672 ; AT security SECTION:
673 security
674 {
675 validator
676 {
677 ...
678 trust-anchor
679 {
680 type file
681 file-name "root.cert" ; root certificate file
682 }
683 }
684
685 prefix-update-validator
686 {
687 ...
688 trust-anchor
689 {
690 type file
691 file-name "site.cert" ; site certificate file
692 }
693 }
694
695 cert-to-publish "root.cert" ; root certificate file
696
697 cert-to-publish "site.cert" ; site certificate file
698
699 cert-to-publish "op.cert" ; operator certificate file
700
701 cert-to-publish "router1.cert" ; router1 certificate file
702 }
703
704The following text shows the modified instructions for router2:
705
706::
707
708 ; AT general SECTION:
709 {
710 network /ndn/ ; name of the network
711 site /edu/uaslp ; name of the site
712 router /%C1.Router/router2 ; name of the router: router2
713 }
714
715 ;AT neighbors SECTION:
716 neighbors
717 {
718 neighbor
719 {
720 name /ndn/edu/uaslp/%C1.Router/router1 ; Neighbor router: router1
721 face-uri udp://140.220.80.121 ; face to the neighbor
722 link-cost 30 ; cost of the link
723 }
724 }
725
726 ; AT advertising SECTION:
727 advertising
728 {
729 prefix /ndn/edu/uaslp/labs/networks ; Advertising destinations
730 prefix /ndn/edu/uaslp/labs/hardware ; for router2
731 }
732
733 ; AT security SECTION:
734 security
735 {
736 validator
737 {
738 ...
739 trust-anchor
740 {
741 type file
742 file-name "root.cert" ; root certificate file
743 } ; this file needs to be copied to
744 } ; router2
745
746 prefix-update-validator
747 {
748 ...
749 trust-anchor
750 {
751 type file
752 file-name "site.cert" ; site certificate file
753 } ; this file needs to be copied to
754 } ; router2
755
756 ...
757 cert-to-publish "router2.cert" ; router2 certificate file
758 }
759
760Notice that files *root.cert* and *site.cert*, which were generated at
761router1, need to be copied to router2. Also notice that the *%C1.Router*
762and *%C1.Operator* keywords employed at § `5.1 <#security>`__ are also
763referenced by these configuration files.
764
765.. _starting_nlsr:
766
7675.5 Starting NLSR
768-----------------
769
770It is recommended to open a third command terminal and run NLSR in this
771window. After the NLSR configuration file has been edited and saved as
772*nlsr.conf*, it is possible to start NLSR by running either of the
773following two commands:
774
775::
776
777 $ nlsr
778 $ nlsr -f <configuration-file>
779
780However, to verify what is NLSR doing, it becomes necessary to employ
Davide Pesaventoede59632022-08-26 20:35:44 -0400781NLSR's logging facility [NLSRstarting]_. A brief
782description on how to use NDN's logging facility may be displayed by
783entering the ``man ndn-log`` command. This guide recommends using one
784of the following two instructions to start NLSR:
David Arjona2e6c8bb2018-11-14 16:27:09 -0600785
786::
787
788 $ export NDN_LOG=nlsr.*=TRACE && nlsr
Davide Pesaventoede59632022-08-26 20:35:44 -0400789 $ export NDN_LOG=nlsr.*=TRACE && nlsr -f <configuration-file>
David Arjona2e6c8bb2018-11-14 16:27:09 -0600790
Davide Pesaventoede59632022-08-26 20:35:44 -0400791The second terminal window may be used to run ``nfd-status`` again and
792it should be possible to verify that the status has changed, specially
793at the FIB and RIB sections of the generated report.
David Arjona2e6c8bb2018-11-14 16:27:09 -0600794
795.. _turn_off:
796
7975.6 Turning everything off
798--------------------------
799
800In order to stop NLSR and NFD, the following sequence of events is
801recommended:
802
803#. Stop NLSR by pressing the Ctrl+C keys at the third terminal window.
804
805#. Destroy the face to the remote computers using either of the
806 following two commands at the second terminal window:
807
808 ::
809
810 $ nfdc face destroy <face-id>
811 $ nfdc face destroy udp4://<remote-ip-address>
812
813#. Stop NFD by entering the following command at the second terminal
814 window:
815
816 ::
817
818 $ nfd-stop
819
Davide Pesaventoede59632022-08-26 20:35:44 -0400820#. The crossover Ethernet cable may be unplugged and the computers'
David Arjona2e6c8bb2018-11-14 16:27:09 -0600821 network configuration restored to its original settings.
822
8235.7 Where to go from here
824-------------------------
825
826Users interested in building and configuring larger networks may want to
827take a look at the NDN Ansible repository
828[NDNAnsible]_. This repository uses Ansible, which is a
829configuration management tool, to manage the official NDN testbed
830deployment [NDNTestbed]_.
831
832
833.. [NDNmain] *Named Data Networking*, http://named-data.net/, March 2018.
834
835.. [Kolman2018] M. Kolman. *Anaconda improvements in Fedora 28*, Fedora Magazine, June 2018.
836
837.. [NDN-cxx] *Getting started with ndn-cxx*, http://named-data.net/doc/ndn-cxx/current/INSTALL.html, April 2018.
838
839.. [NDNNFD] *Getting started with NFD*, http://named-data.net/doc/NFD/current/INSTALL.html, April 2018.
840
841.. [NDNNFDusage] *NFD usage*, http://named-data.net/doc/NFD/current/manpages/nfd.html, May 2018.
842
Davide Pesaventoede59632022-08-26 20:35:44 -0400843.. [Chronosync] Z. Zhu and A. Afanasyev. *Let's ChronoSync: Decentralized dataset state synchronization in Named Data Networking*, in IEEE ICNP, October 2013.
David Arjona2e6c8bb2018-11-14 16:27:09 -0600844
Ashlesh Gawande32ec3fd2018-07-18 13:42:32 -0500845.. [PSync] M. Zhang, V. Lehman, and L. Wang. *Scalable Name-based Data Synchronization for Named Data Networking*, in IEEE INFOCOM, May 2017.
846
David Arjona2e6c8bb2018-11-14 16:27:09 -0600847.. [NLSRsecconf] *NLSR Security Configuration*, http://named-data.net/doc/NLSR/current/SECURITY-CONFIG.html June 2018.
848
Davide Pesaventoede59632022-08-26 20:35:44 -0400849.. [NLSRdevguide] V. Lehman, M. Chowdhury, N. Gordon, A. Gawande. *NLSR Developer's Guide*, University of Memphis, November 2017.
David Arjona2e6c8bb2018-11-14 16:27:09 -0600850
851.. [NLSRrtrconf] *NLSR Router Configuration*, http://named-data.net/doc/NLSR/current/ROUTER-CONFIG.html, April 2018.
852
853.. [NLSRstarting] *Getting Started with NLSR*, http://named-data.net/doc/NLSR/current/GETTING-STARTED.html, May 2018.
854
855.. [NDNAnsible] *NDN Ansible repository*, https://github.com/WU-ARL/NDN_Ansible, October 2018.
856
857.. [NDNTestbed] *NDN Testbed*, https://named-data.net/ndn-testbed/, October 2018.