blob: dc46009e9ead75a3715880c03c17ae6a4b8383c3 [file] [log] [blame] [view]
Alexander Afanasyeva1417002014-01-21 20:29:55 -08001NFD - Named Data Networking Forwarding Daemon
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -06002==============================================================
Alexander Afanasyeva1417002014-01-21 20:29:55 -08003
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -06004## Default Paths
Alexander Afanasyeva1417002014-01-21 20:29:55 -08005
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -06006This README uses `SYSCONFDIR` when referring to the default locations of
7various NFD configuration files. By default, `SYSCONFDIR` is set to
8`/usr/local/etc`. If you override `PREFIX`, then `SYSCONFDIR` will
9default to `PREFIX/etc`.
10
11You may override `SYSCONFDIR` and `PREFIX` by specifying their
12corresponding options during installation:
13
Alexander Afanasyevc1d6a6b2014-04-08 18:04:57 -070014 ./waf configure --prefix <path/for/prefix> --sysconfdir <some/other/path>
15
16Refer to `INSTALL.md` for more detailed instructions on how to compile
17and install NFD.
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060018
19## Running and Configuring NFD
20
21NFD's runtime settings may be modified via configuration file. After
22installation, a working sample configuration is provided at
23`SYSCONFDIR/ndn/nfd.conf.sample`. At startup, NFD will attempt to
24read the default configuration file location:
25`SYSCONFDIR/ndn/nfd.conf`.
26
27You may also specify an alternative configuration file location
28by running NFD with:
29
30 nfd --config </path/to/nfd.conf>
31
32Once again, note that you may simply copy or rename the provided
33sample configuration and have an **almost** fully configured NFD.
34However, this NFD will be unable to add FIB entries or perform
35other typical operation tasks until you authorize an NDN certificate
36with the appropriate privileges.
37
38## Installing an NDN Certificate for Command Authentication
39
40Many NFD management protocols require signed commands to be processed
41(e.g. FIB modification, Face creation/destructions, etc.). You will
42need an NDN certificate to use any application that issues signed
43commands.
44
45If you do not already have NDN certificate, you can generate one with
46the following commands:
47
48**Generate and install a self-signed identity certificate**:
49
50 ndnsec-keygen /`whoami` | ndnsec-install-cert -
51
52Note that the argument to ndnsec-key will be the identity name of the
53new key (in this case, `/your-username`). Identity names are
54hierarchical NDN names and may have multiple components
55(e.g. `/ndn/ucla/edu/alice`). You may create additional keys and
56identities as you see fit.
57
58**Dump the NDN certificate to a file**:
59
60The following commands assume that you have not modified
61`PREFIX` or `SYSCONFDIR` If you have, please substitute
62`/usr/local/etc` for the appropriate value (the overriden
63`SYSCONFDIR` or `PREFIX/etc` if you changed `PREFIX`).
64
65 sudo mkdir -p /usr/local/etc/ndn/keys
66 ndnsec-cert-dump -i /`whoami` > default.ndncert
67 sudo mv default.ndncert /usr/local/etc/ndn/keys/default.ndncert
68
69## Running NFD with Ethernet Face Support
70
71The ether configuration file section contains settings for Ethernet
72faces and channels. These settings will **NOT** work without root or
73setting the appropriate permissions:
74
75 sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd
76
77You may need to install a package to use setcap:
78
79**Ubuntu:**
80
81 sudo apt-get install libcap2-bin
82
83**Mac OS X:**
84
85 curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
86 tar zxvf ChmodBPF.tar.gz
87 open ChmodBPF/Install\ ChmodBPF.app
88
89or manually:
90
91 sudo chgrp admin /dev/bpf*
92 sudo chmod g+rw /dev/bpf*
Giulio Grassi6d7176d2014-04-16 16:08:48 +020093
94## UDP multicast support in multi-homed Linux machines
95
96The UDP configuration file section contains settings for unicast and multicast UDP
97faces. If the Linux box is equipped with multiple network interfaces with multicast
98capabilities, the settings for multicast faces will **NOT** work without root
99or setting the appropriate permissions:
100
101 sudo setcap cap_net_raw=eip /full/path/nfd