Alexander Afanasyev | a141700 | 2014-01-21 20:29:55 -0800 | [diff] [blame] | 1 | NFD - Named Data Networking Forwarding Daemon |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame^] | 2 | ============================================================== |
Alexander Afanasyev | a141700 | 2014-01-21 20:29:55 -0800 | [diff] [blame] | 3 | |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame^] | 4 | ## Default Paths |
Alexander Afanasyev | a141700 | 2014-01-21 20:29:55 -0800 | [diff] [blame] | 5 | |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame^] | 6 | This README uses `SYSCONFDIR` when referring to the default locations of |
| 7 | various NFD configuration files. By default, `SYSCONFDIR` is set to |
| 8 | `/usr/local/etc`. If you override `PREFIX`, then `SYSCONFDIR` will |
| 9 | default to `PREFIX/etc`. |
| 10 | |
| 11 | You may override `SYSCONFDIR` and `PREFIX` by specifying their |
| 12 | corresponding options during installation: |
| 13 | |
| 14 | ./waf install --prefix <path/for/prefix> --sysconfdir <some/other/path> |
| 15 | |
| 16 | ## Running and Configuring NFD |
| 17 | |
| 18 | NFD's runtime settings may be modified via configuration file. After |
| 19 | installation, a working sample configuration is provided at |
| 20 | `SYSCONFDIR/ndn/nfd.conf.sample`. At startup, NFD will attempt to |
| 21 | read the default configuration file location: |
| 22 | `SYSCONFDIR/ndn/nfd.conf`. |
| 23 | |
| 24 | You may also specify an alternative configuration file location |
| 25 | by running NFD with: |
| 26 | |
| 27 | nfd --config </path/to/nfd.conf> |
| 28 | |
| 29 | Once again, note that you may simply copy or rename the provided |
| 30 | sample configuration and have an **almost** fully configured NFD. |
| 31 | However, this NFD will be unable to add FIB entries or perform |
| 32 | other typical operation tasks until you authorize an NDN certificate |
| 33 | with the appropriate privileges. |
| 34 | |
| 35 | ## Installing an NDN Certificate for Command Authentication |
| 36 | |
| 37 | Many NFD management protocols require signed commands to be processed |
| 38 | (e.g. FIB modification, Face creation/destructions, etc.). You will |
| 39 | need an NDN certificate to use any application that issues signed |
| 40 | commands. |
| 41 | |
| 42 | If you do not already have NDN certificate, you can generate one with |
| 43 | the following commands: |
| 44 | |
| 45 | **Generate and install a self-signed identity certificate**: |
| 46 | |
| 47 | ndnsec-keygen /`whoami` | ndnsec-install-cert - |
| 48 | |
| 49 | Note that the argument to ndnsec-key will be the identity name of the |
| 50 | new key (in this case, `/your-username`). Identity names are |
| 51 | hierarchical NDN names and may have multiple components |
| 52 | (e.g. `/ndn/ucla/edu/alice`). You may create additional keys and |
| 53 | identities as you see fit. |
| 54 | |
| 55 | **Dump the NDN certificate to a file**: |
| 56 | |
| 57 | The 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 | |
| 68 | The ether configuration file section contains settings for Ethernet |
| 69 | faces and channels. These settings will **NOT** work without root or |
| 70 | setting the appropriate permissions: |
| 71 | |
| 72 | sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd |
| 73 | |
| 74 | You 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 | |
| 86 | or manually: |
| 87 | |
| 88 | sudo chgrp admin /dev/bpf* |
| 89 | sudo chmod g+rw /dev/bpf* |