blob: de446f2a361b9dd06ccbcc56c6cb6e515b1f2bad [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
14 ./waf install --prefix <path/for/prefix> --sysconfdir <some/other/path>
15
16## Running and Configuring NFD
17
18NFD's runtime settings may be modified via configuration file. After
19installation, a working sample configuration is provided at
20`SYSCONFDIR/ndn/nfd.conf.sample`. At startup, NFD will attempt to
21read the default configuration file location:
22`SYSCONFDIR/ndn/nfd.conf`.
23
24You may also specify an alternative configuration file location
25by running NFD with:
26
27 nfd --config </path/to/nfd.conf>
28
29Once again, note that you may simply copy or rename the provided
30sample configuration and have an **almost** fully configured NFD.
31However, this NFD will be unable to add FIB entries or perform
32other typical operation tasks until you authorize an NDN certificate
33with the appropriate privileges.
34
35## Installing an NDN Certificate for Command Authentication
36
37Many NFD management protocols require signed commands to be processed
38(e.g. FIB modification, Face creation/destructions, etc.). You will
39need an NDN certificate to use any application that issues signed
40commands.
41
42If you do not already have NDN certificate, you can generate one with
43the following commands:
44
45**Generate and install a self-signed identity certificate**:
46
47 ndnsec-keygen /`whoami` | ndnsec-install-cert -
48
49Note that the argument to ndnsec-key will be the identity name of the
50new key (in this case, `/your-username`). Identity names are
51hierarchical NDN names and may have multiple components
52(e.g. `/ndn/ucla/edu/alice`). You may create additional keys and
53identities as you see fit.
54
55**Dump the NDN certificate to a file**:
56
57The following commands assume that you have not modified
58`PREFIX` or `SYSCONFDIR` If you have, please substitute
59`/usr/local/etc` for the appropriate value (the overriden
60`SYSCONFDIR` or `PREFIX/etc` if you changed `PREFIX`).
61
62 sudo mkdir -p /usr/local/etc/ndn/keys
63 ndnsec-cert-dump -i /`whoami` > default.ndncert
64 sudo mv default.ndncert /usr/local/etc/ndn/keys/default.ndncert
65
66## Running NFD with Ethernet Face Support
67
68The ether configuration file section contains settings for Ethernet
69faces and channels. These settings will **NOT** work without root or
70setting the appropriate permissions:
71
72 sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd
73
74You may need to install a package to use setcap:
75
76**Ubuntu:**
77
78 sudo apt-get install libcap2-bin
79
80**Mac OS X:**
81
82 curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
83 tar zxvf ChmodBPF.tar.gz
84 open ChmodBPF/Install\ ChmodBPF.app
85
86or manually:
87
88 sudo chgrp admin /dev/bpf*
89 sudo chmod g+rw /dev/bpf*