Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 1 | ; The general section contains settings of nfd process. |
Steve DiBenedetto | 24b9a64 | 2014-04-07 15:45:39 -0600 | [diff] [blame] | 2 | general |
| 3 | { |
| 4 | ; Specify a user and/or group for NFD to drop privileges to |
| 5 | ; when not performing privileged tasks. NFD does not drop |
| 6 | ; privileges by default. |
| 7 | |
| 8 | ; user ndn-user |
| 9 | ; group ndn-user |
| 10 | } |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 11 | |
Steve DiBenedetto | bf6a93d | 2014-03-21 14:03:02 -0600 | [diff] [blame] | 12 | log |
| 13 | { |
| 14 | ; default_level specifies the logging level for modules |
| 15 | ; that are not explicitly named. All debugging levels |
| 16 | ; listed above the selected value are enabled. |
| 17 | ; |
| 18 | ; Valid values: |
| 19 | ; |
| 20 | ; NONE ; no messages |
| 21 | ; ERROR ; error messages |
| 22 | ; WARN ; warning messages |
| 23 | ; INFO ; informational messages (default) |
| 24 | ; DEBUG ; debugging messages |
| 25 | ; TRACE ; trace messages (most verbose) |
| 26 | ; ALL ; all messages |
| 27 | |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 28 | default_level INFO |
Steve DiBenedetto | bf6a93d | 2014-03-21 14:03:02 -0600 | [diff] [blame] | 29 | |
| 30 | ; You may override default_level by assigning a logging level |
| 31 | ; to the desired module name. Module names can be found in two ways: |
| 32 | ; |
| 33 | ; Run: |
| 34 | ; nfd --modules |
| 35 | ; |
| 36 | ; Or look for NFD_LOG_INIT(<module name>) statements in .cpp files |
| 37 | ; |
| 38 | ; Example module-level settings: |
| 39 | ; |
| 40 | ; FibManager DEBUG |
| 41 | ; Forwarder INFO |
| 42 | } |
| 43 | |
Steve DiBenedetto | 3a4f83d | 2014-06-02 14:58:54 -0600 | [diff] [blame] | 44 | ; The tables section configures the CS, PIT, FIB, Strategy Choice, and Measurements |
| 45 | tables |
| 46 | { |
Steve DiBenedetto | 3a4f83d | 2014-06-02 14:58:54 -0600 | [diff] [blame] | 47 | ; ContentStore size limit in number of packets |
| 48 | ; default is 65536, about 500MB with 8KB packet size |
| 49 | cs_max_packets 65536 |
Steve DiBenedetto | c0640f5 | 2014-11-03 15:55:43 -0700 | [diff] [blame] | 50 | |
Junxiao Shi | b4a5acd | 2016-12-07 19:59:18 +0000 | [diff] [blame] | 51 | ; Set the CS replacement policy. |
| 52 | ; Available policies are: priority_fifo, lru |
| 53 | cs_policy priority_fifo |
| 54 | |
Junxiao Shi | 9685cc5 | 2016-08-29 12:47:05 +0000 | [diff] [blame] | 55 | ; Set a policy to decide whether to cache or drop unsolicited Data. |
| 56 | ; Available policies are: drop-all, admit-local, admit-network, admit-all |
Junxiao Shi | 88f5f73 | 2016-09-03 07:11:37 +0000 | [diff] [blame] | 57 | cs_unsolicited_policy drop-all |
Junxiao Shi | 9685cc5 | 2016-08-29 12:47:05 +0000 | [diff] [blame] | 58 | |
Steve DiBenedetto | c0640f5 | 2014-11-03 15:55:43 -0700 | [diff] [blame] | 59 | ; Set the forwarding strategy for the specified prefixes: |
| 60 | ; <prefix> <strategy> |
| 61 | strategy_choice |
| 62 | { |
| 63 | / /localhost/nfd/strategy/best-route |
Junxiao Shi | 67ba8d2 | 2015-08-21 21:21:28 -0700 | [diff] [blame] | 64 | /localhost /localhost/nfd/strategy/multicast |
Steve DiBenedetto | c0640f5 | 2014-11-03 15:55:43 -0700 | [diff] [blame] | 65 | /localhost/nfd /localhost/nfd/strategy/best-route |
Junxiao Shi | 67ba8d2 | 2015-08-21 21:21:28 -0700 | [diff] [blame] | 66 | /ndn/broadcast /localhost/nfd/strategy/multicast |
Steve DiBenedetto | c0640f5 | 2014-11-03 15:55:43 -0700 | [diff] [blame] | 67 | } |
Vince Lehman | 63ab1bb | 2015-09-04 17:06:58 -0500 | [diff] [blame] | 68 | |
| 69 | ; Declare network region names |
| 70 | ; These are used for mobility support. An Interest carrying a Link object is |
| 71 | ; assumed to have reached the producer region if any delegation name in the |
| 72 | ; Link object is a prefix of any region name. |
| 73 | network_region |
| 74 | { |
| 75 | ; /example/region1 |
| 76 | ; /example/region2 |
| 77 | } |
Steve DiBenedetto | 3a4f83d | 2014-06-02 14:58:54 -0600 | [diff] [blame] | 78 | } |
| 79 | |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 80 | ; The face_system section defines what faces and channels are created. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 81 | face_system |
| 82 | { |
Eric Newberry | 0c84164 | 2018-01-17 15:01:00 -0700 | [diff] [blame] | 83 | ; This section contains options that apply to multiple face protocols. |
| 84 | general |
| 85 | { |
Eric Newberry | 17d1849 | 2018-02-10 22:50:06 -0700 | [diff] [blame] | 86 | enable_congestion_marking yes ; set to 'no' to disable congestion marking on supported faces, default 'yes' |
Eric Newberry | 0c84164 | 2018-01-17 15:01:00 -0700 | [diff] [blame] | 87 | } |
| 88 | |
Davide Pesavento | 494a955 | 2018-02-04 22:16:05 -0500 | [diff] [blame] | 89 | ; The unix section contains settings for Unix stream faces and channels. |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 90 | ; A Unix channel is always listening; delete the unix section to disable |
Steve DiBenedetto | dbcb1a1 | 2014-11-17 11:04:21 -0700 | [diff] [blame] | 91 | ; Unix stream faces and channels. |
Steve DiBenedetto | 158f73f | 2014-12-22 14:46:12 -0700 | [diff] [blame] | 92 | ; |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 93 | ; The ndn-cxx library expects unix:///var/run/nfd.sock to be used as |
| 94 | ; the default transport option. Please change the "transport" field |
| 95 | ; in client.conf to an appropriate tcp4 FaceUri if you want to |
| 96 | ; disable Unix sockets and use TCP instead. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 97 | unix |
| 98 | { |
Steve DiBenedetto | dbcb1a1 | 2014-11-17 11:04:21 -0700 | [diff] [blame] | 99 | path /var/run/nfd.sock ; Unix stream listener path |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 100 | } |
| 101 | |
Davide Pesavento | 494a955 | 2018-02-04 22:16:05 -0500 | [diff] [blame] | 102 | ; The tcp section contains settings for TCP faces and channels. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 103 | tcp |
| 104 | { |
| 105 | listen yes ; set to 'no' to disable TCP listener, default 'yes' |
| 106 | port 6363 ; TCP listener port number |
Steve DiBenedetto | 9515287 | 2014-04-11 12:40:59 -0600 | [diff] [blame] | 107 | enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes' |
| 108 | enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes' |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 109 | } |
| 110 | |
Davide Pesavento | 494a955 | 2018-02-04 22:16:05 -0500 | [diff] [blame] | 111 | ; The udp section contains settings for UDP faces and channels. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 112 | udp |
| 113 | { |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 114 | ; UDP unicast settings. |
Davide Pesavento | 494a955 | 2018-02-04 22:16:05 -0500 | [diff] [blame] | 115 | listen yes ; set to 'no' to disable UDP listener, default 'yes' |
| 116 | port 6363 ; UDP listener port number |
Steve DiBenedetto | 9515287 | 2014-04-11 12:40:59 -0600 | [diff] [blame] | 117 | enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes' |
| 118 | enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes' |
Chengyu Fan | addecff | 2015-02-10 14:09:01 -0700 | [diff] [blame] | 119 | |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 120 | ; Time (in seconds) before closing an idle UDP unicast face. |
| 121 | ; The actual timeout will occur anytime between idle_timeout and 2*idle_timeout. |
| 122 | ; The default is 600 (10 minutes). |
Chengyu Fan | addecff | 2015-02-10 14:09:01 -0700 | [diff] [blame] | 123 | idle_timeout 600 |
| 124 | |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 125 | ; UDP multicast settings. |
| 126 | ; By default, NFD creates one UDP multicast face per NIC. |
Giulio Grassi | 6d7176d | 2014-04-16 16:08:48 +0200 | [diff] [blame] | 127 | ; |
| 128 | ; In multi-homed Linux machines these settings will NOT work without |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 129 | ; root or setting the appropriate permissions: |
Giulio Grassi | 6d7176d | 2014-04-16 16:08:48 +0200 | [diff] [blame] | 130 | ; |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 131 | ; sudo setcap cap_net_raw=eip /path/to/nfd |
Giulio Grassi | 6d7176d | 2014-04-16 16:08:48 +0200 | [diff] [blame] | 132 | ; |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 133 | mcast yes ; set to 'no' to disable UDP multicast, default 'yes' |
Md Ashiqur Rahman | 8ce0903 | 2018-01-14 22:43:13 -0500 | [diff] [blame] | 134 | mcast_group 224.0.23.170 ; UDP multicast group (IPv4) |
| 135 | mcast_port 56363 ; UDP multicast port number (IPv4) |
| 136 | mcast_group_v6 ff02::1234 ; UDP multicast group (IPv6) |
| 137 | mcast_port_v6 56363 ; UDP multicast port number (IPv6) |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 138 | mcast_ad_hoc no ; set to 'yes' to make all UDP multicast faces "ad hoc", default 'no' |
Junxiao Shi | c31080d | 2017-01-24 15:10:12 +0000 | [diff] [blame] | 139 | |
| 140 | ; Whitelist and blacklist can contain, in no particular order: |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 141 | ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0') |
| 142 | ; - mac addresses (e.g., 'ether 85:3b:4d:d3:5f:c2') |
| 143 | ; - subnets (e.g., 'subnet 192.0.2.0/24', note that only IPv4 is supported here) |
| 144 | ; - a single asterisk ('*') that matches all interfaces |
| 145 | ; By default, all interfaces are whitelisted. |
Junxiao Shi | c31080d | 2017-01-24 15:10:12 +0000 | [diff] [blame] | 146 | whitelist |
| 147 | { |
| 148 | * |
| 149 | } |
| 150 | blacklist |
| 151 | { |
| 152 | } |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 153 | } |
| 154 | |
Davide Pesavento | 494a955 | 2018-02-04 22:16:05 -0500 | [diff] [blame] | 155 | ; The ether section contains settings for Ethernet faces and channels. |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 156 | ; These settings will NOT work without root or setting the appropriate |
| 157 | ; permissions: |
| 158 | ; |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 159 | ; sudo setcap cap_net_raw,cap_net_admin=eip /path/to/nfd |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 160 | ; |
| 161 | ; You may need to install a package to use setcap: |
| 162 | ; |
| 163 | ; **Ubuntu:** |
| 164 | ; |
| 165 | ; sudo apt-get install libcap2-bin |
| 166 | ; |
| 167 | ; **Mac OS X:** |
| 168 | ; |
| 169 | ; curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz |
| 170 | ; tar zxvf ChmodBPF.tar.gz |
| 171 | ; open ChmodBPF/Install\ ChmodBPF.app |
| 172 | ; |
| 173 | ; or manually: |
| 174 | ; |
| 175 | ; sudo chgrp admin /dev/bpf* |
| 176 | ; sudo chmod g+rw /dev/bpf* |
susmit | 91e1d7c | 2016-10-03 16:16:57 -0600 | [diff] [blame] | 177 | ; |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 178 | @IF_HAVE_LIBPCAP@ether |
| 179 | @IF_HAVE_LIBPCAP@{ |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 180 | @IF_HAVE_LIBPCAP@ ; Ethernet unicast settings. |
| 181 | @IF_HAVE_LIBPCAP@ listen yes ; set to 'no' to disable Ethernet listener, default 'yes' |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 182 | @IF_HAVE_LIBPCAP@ |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 183 | @IF_HAVE_LIBPCAP@ ; Time (in seconds) before closing an idle Ethernet unicast face. |
| 184 | @IF_HAVE_LIBPCAP@ ; The actual timeout will occur anytime between idle_timeout and 2*idle_timeout. |
| 185 | @IF_HAVE_LIBPCAP@ ; The default is 600 (10 minutes). |
| 186 | @IF_HAVE_LIBPCAP@ idle_timeout 600 |
| 187 | @IF_HAVE_LIBPCAP@ |
| 188 | @IF_HAVE_LIBPCAP@ ; Ethernet multicast settings. |
| 189 | @IF_HAVE_LIBPCAP@ ; By default, NFD creates one Ethernet multicast face per NIC. |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 190 | @IF_HAVE_LIBPCAP@ mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes' |
| 191 | @IF_HAVE_LIBPCAP@ mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 192 | @IF_HAVE_LIBPCAP@ mcast_ad_hoc no ; set to 'yes' to make all Ethernet multicast faces "ad hoc", default 'no' |
susmit | 91e1d7c | 2016-10-03 16:16:57 -0600 | [diff] [blame] | 193 | @IF_HAVE_LIBPCAP@ |
Junxiao Shi | c31080d | 2017-01-24 15:10:12 +0000 | [diff] [blame] | 194 | @IF_HAVE_LIBPCAP@ ; Whitelist and blacklist can contain, in no particular order: |
Davide Pesavento | 46afec4 | 2017-05-28 14:28:47 -0400 | [diff] [blame] | 195 | @IF_HAVE_LIBPCAP@ ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0') |
| 196 | @IF_HAVE_LIBPCAP@ ; - mac addresses (e.g., 'ether 85:3b:4d:d3:5f:c2') |
| 197 | @IF_HAVE_LIBPCAP@ ; - subnets (e.g., 'subnet 192.0.2.0/24', note that only IPv4 is supported here) |
| 198 | @IF_HAVE_LIBPCAP@ ; - a single asterisk ('*') that matches all interfaces |
| 199 | @IF_HAVE_LIBPCAP@ ; By default, all interfaces are whitelisted. |
susmit | 91e1d7c | 2016-10-03 16:16:57 -0600 | [diff] [blame] | 200 | @IF_HAVE_LIBPCAP@ whitelist |
| 201 | @IF_HAVE_LIBPCAP@ { |
| 202 | @IF_HAVE_LIBPCAP@ * |
| 203 | @IF_HAVE_LIBPCAP@ } |
| 204 | @IF_HAVE_LIBPCAP@ blacklist |
| 205 | @IF_HAVE_LIBPCAP@ { |
| 206 | @IF_HAVE_LIBPCAP@ } |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 207 | @IF_HAVE_LIBPCAP@} |
Wentao Shang | 53df163 | 2014-04-21 12:01:32 -0700 | [diff] [blame] | 208 | |
Davide Pesavento | 494a955 | 2018-02-04 22:16:05 -0500 | [diff] [blame] | 209 | ; The websocket section contains settings for WebSocket faces and channels. |
Wentao Shang | 53df163 | 2014-04-21 12:01:32 -0700 | [diff] [blame] | 210 | @IF_HAVE_WEBSOCKET@websocket |
| 211 | @IF_HAVE_WEBSOCKET@{ |
| 212 | @IF_HAVE_WEBSOCKET@ listen yes ; set to 'no' to disable WebSocket listener, default 'yes' |
| 213 | @IF_HAVE_WEBSOCKET@ port 9696 ; WebSocket listener port number |
| 214 | @IF_HAVE_WEBSOCKET@ enable_v4 yes ; set to 'no' to disable listening on IPv4 socket, default 'yes' |
| 215 | @IF_HAVE_WEBSOCKET@ enable_v6 yes ; set to 'no' to disable listening on IPv6 socket, default 'yes' |
| 216 | @IF_HAVE_WEBSOCKET@} |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 217 | } |
| 218 | |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 219 | ; The authorizations section grants privileges to authorized keys. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 220 | authorizations |
| 221 | { |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 222 | ; An authorize section grants privileges to a NDN certificate. |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 223 | authorize |
| 224 | { |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 225 | ; If you do not already have NDN certificate, you can generate |
| 226 | ; one with the following commands. |
| 227 | ; |
| 228 | ; 1. Generate and install a self-signed identity certificate: |
| 229 | ; |
| 230 | ; ndnsec-keygen /`whoami` | ndnsec-install-cert - |
| 231 | ; |
| 232 | ; Note that the argument to ndnsec-key will be the identity name of the |
| 233 | ; new key (in this case, /your-username). Identities are hierarchical NDN |
| 234 | ; names and may have multiple components (e.g. `/ndn/ucla/edu/alice`). |
| 235 | ; You may create additional keys and identities as you see fit. |
| 236 | ; |
| 237 | ; 2. Dump the NDN certificate to a file: |
| 238 | ; |
| 239 | ; sudo mkdir -p @SYSCONFDIR@/ndn/keys/ |
| 240 | ; ndnsec-cert-dump -i /`whoami` > default.ndncert |
| 241 | ; sudo mv default.ndncert @SYSCONFDIR@/ndn/keys/default.ndncert |
| 242 | ; |
| 243 | ; The "certfile" field below specifies the default key directory for |
| 244 | ; your machine. You may move your newly created key to the location it |
| 245 | ; specifies or path. |
| 246 | |
Yingdi Yu | c8f214c | 2014-04-29 20:39:37 -0700 | [diff] [blame] | 247 | ; certfile keys/default.ndncert ; NDN identity certificate file |
| 248 | certfile any ; "any" authorizes command interests signed under any certificate, |
| 249 | ; i.e., no actual validation. |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 250 | privileges ; set of privileges granted to this identity |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 251 | { |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 252 | faces |
| 253 | fib |
Junxiao Shi | c9b5e01 | 2018-02-07 15:04:18 +0000 | [diff] [blame] | 254 | cs |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 255 | strategy-choice |
| 256 | } |
| 257 | } |
Steve DiBenedetto | 1a3c673 | 2014-03-13 06:44:05 -0600 | [diff] [blame] | 258 | |
| 259 | ; You may have multiple authorize sections that specify additional |
| 260 | ; certificates and their privileges. |
| 261 | |
Alexander Afanasyev | 885a85b | 2014-04-12 21:01:13 -0700 | [diff] [blame] | 262 | ; authorize |
| 263 | ; { |
| 264 | ; certfile keys/this_cert_does_not_exist.ndncert |
| 265 | ; authorize |
| 266 | ; privileges |
| 267 | ; { |
| 268 | ; faces |
| 269 | ; } |
| 270 | ; } |
Steve DiBenedetto | 84da5bf | 2014-03-11 14:51:29 -0600 | [diff] [blame] | 271 | } |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 272 | |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 273 | rib |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 274 | { |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 275 | ; The following localhost_security allows anyone to register routing entries in local RIB |
| 276 | localhost_security |
| 277 | { |
| 278 | trust-anchor |
| 279 | { |
| 280 | type any |
| 281 | } |
| 282 | } |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 283 | |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 284 | ; localhop_security should be enabled when NFD runs on a hub. |
| 285 | ; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing. |
| 286 | ; localhop_security |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 287 | ; { |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 288 | ; ; This section defines the trust model for NFD RIB Management. It consists of rules and |
| 289 | ; ; trust-anchors, which are briefly defined in this file. For more information refer to |
Chavoosh Ghasemi | 60b7d51 | 2017-08-10 17:17:46 -0700 | [diff] [blame] | 290 | ; ; validator configuration file format documentation: |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 291 | ; ; |
Chavoosh Ghasemi | 60b7d51 | 2017-08-10 17:17:46 -0700 | [diff] [blame] | 292 | ; ; https://named-data.net/doc/ndn-cxx/current/tutorials/security-validator-config.html |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 293 | ; ; |
| 294 | ; ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the |
| 295 | ; ; root of certification chain (e.g., NDN testbed root certificate) or an existing |
| 296 | ; ; default system certificate `default.ndncert`. |
| 297 | ; ; |
| 298 | ; ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the |
| 299 | ; ; rules defined here. A rule can be broken into two parts: matching & checking. A packet |
| 300 | ; ; will be matched against rules from the first to the last until a matched rule is |
| 301 | ; ; encountered. The matched rule will be used to check the packet. If a packet does not |
| 302 | ; ; match any rule, it will be treated as invalid. The matching part of a rule consists |
| 303 | ; ; of `for` and `filter` sections. They collectively define which packets can be checked |
| 304 | ; ; with this rule. `for` defines packet type (data or interest) and `filter` defines |
| 305 | ; ; conditions on other properties of a packet. Right now, you can only define conditions |
| 306 | ; ; on packet name, and you can only specify ONLY ONE filter for packet name. The |
| 307 | ; ; checking part of a rule consists of `checker`, which defines the conditions that a |
| 308 | ; ; VALID packet MUST have. See comments in checker section for more details. |
| 309 | ; |
| 310 | ; rule |
| 311 | ; { |
Alexander Afanasyev | 38fb251 | 2017-09-15 13:07:42 -0400 | [diff] [blame] | 312 | ; id "RIB Registration Command Rule" |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 313 | ; for interest ; rule for Interests (to validate CommandInterests) |
| 314 | ; filter |
| 315 | ; { |
Alexander Afanasyev | 38fb251 | 2017-09-15 13:07:42 -0400 | [diff] [blame] | 316 | ; type name ; condition on interest name (w/o SignatureInfo/SignatureValue) |
| 317 | ; regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<><><>$ |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 318 | ; } |
| 319 | ; checker |
| 320 | ; { |
| 321 | ; type customized |
| 322 | ; sig-type rsa-sha256 ; interest must have a rsa-sha256 signature |
| 323 | ; key-locator |
| 324 | ; { |
| 325 | ; type name ; key locator must be the certificate name of the |
| 326 | ; ; signing key |
Alexander Afanasyev | 38fb251 | 2017-09-15 13:07:42 -0400 | [diff] [blame] | 327 | ; regex ^<>*<KEY><>$ |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 328 | ; } |
| 329 | ; } |
| 330 | ; } |
| 331 | ; rule |
| 332 | ; { |
| 333 | ; id "NDN Testbed Hierarchy Rule" |
| 334 | ; for data ; rule for Data (to validate NDN certificates) |
| 335 | ; filter |
| 336 | ; { |
| 337 | ; type name ; condition on data name |
Alexander Afanasyev | 38fb251 | 2017-09-15 13:07:42 -0400 | [diff] [blame] | 338 | ; regex ^<>*<KEY><><><>$ |
Yingdi Yu | e5224e9 | 2014-04-29 18:04:02 -0700 | [diff] [blame] | 339 | ; } |
| 340 | ; checker |
| 341 | ; { |
| 342 | ; type hierarchical ; the certificate name of the signing key and |
| 343 | ; ; the data name must follow the hierarchical model |
| 344 | ; sig-type rsa-sha256 ; data must have a rsa-sha256 signature |
| 345 | ; } |
| 346 | ; } |
| 347 | ; trust-anchor |
| 348 | ; { |
| 349 | ; type file |
| 350 | ; file-name keys/default.ndncert ; the file name, by default this file should be placed in the |
| 351 | ; ; same folder as this config file. |
| 352 | ; } |
| 353 | ; ; trust-anchor ; Can be repeated multiple times to specify multiple trust anchors |
| 354 | ; ; { |
| 355 | ; ; type file |
| 356 | ; ; file-name keys/ndn-testbed.ndncert |
| 357 | ; ; } |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 358 | ; } |
Yanbiao Li | c17de83 | 2014-11-21 17:51:45 -0800 | [diff] [blame] | 359 | |
Yanbiao Li | b9d439d | 2014-12-11 16:12:32 -0800 | [diff] [blame] | 360 | ; The following localhop_security should be enabled when NFD runs on a hub, |
| 361 | ; which accepts all remote registrations and is a short-term solution. |
| 362 | ; localhop_security |
| 363 | ; { |
| 364 | ; trust-anchor |
| 365 | ; { |
| 366 | ; type any |
| 367 | ; } |
| 368 | ; } |
| 369 | |
Yanbiao Li | d7c9636 | 2015-01-30 23:58:24 -0800 | [diff] [blame] | 370 | auto_prefix_propagate |
Yanbiao Li | c17de83 | 2014-11-21 17:51:45 -0800 | [diff] [blame] | 371 | { |
| 372 | cost 15 ; forwarding cost of prefix registered on remote router |
Yanbiao Li | d7c9636 | 2015-01-30 23:58:24 -0800 | [diff] [blame] | 373 | timeout 10000 ; timeout (in milliseconds) of prefix registration command for propagation |
Yanbiao Li | c17de83 | 2014-11-21 17:51:45 -0800 | [diff] [blame] | 374 | |
Yanbiao Li | d7c9636 | 2015-01-30 23:58:24 -0800 | [diff] [blame] | 375 | refresh_interval 300 ; interval (in seconds) before refreshing the propagation |
Yanbiao Li | c17de83 | 2014-11-21 17:51:45 -0800 | [diff] [blame] | 376 | ; This setting should be less than face_system.udp.idle_time, |
| 377 | ; so that the face is kept alive on the remote router. |
Yanbiao Li | d7c9636 | 2015-01-30 23:58:24 -0800 | [diff] [blame] | 378 | |
| 379 | base_retry_wait 50 ; base wait time (in seconds) before retrying propagation |
| 380 | max_retry_wait 3600 ; maximum wait time (in seconds) before retrying propagation |
| 381 | ; for consequent retries, the wait time before each retry is calculated based on the back-off |
| 382 | ; policy. Initially, the wait time is set to base_retry_wait, then it will be doubled for every |
| 383 | ; retry unless beyond the max_retry_wait, in which case max_retry_wait is set as the wait time. |
Yanbiao Li | c17de83 | 2014-11-21 17:51:45 -0800 | [diff] [blame] | 384 | } |
Nick Gordon | 9fcf123 | 2017-03-10 22:30:20 +0000 | [diff] [blame] | 385 | |
| 386 | ; If enabled, routes registered with origin=client (typically from auto_prefix_propagate) |
| 387 | ; will be readvertised into local NLSR daemon. |
| 388 | readvertise_nlsr no |
Alexander Afanasyev | 89cf5e0 | 2014-04-17 12:08:57 -0700 | [diff] [blame] | 389 | } |