blob: bb4d8393da4920541b3919af5ef161e37beb3250 [file] [log] [blame]
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -06001; The general section contains settings of nfd process.
Steve DiBenedetto24b9a642014-04-07 15:45:39 -06002general
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
Vince Lehmanee7c8442015-07-16 16:42:19 -050010
11 ; The router_name section specifies the name components used
12 ; to build this router's name. The router name is constructed
13 ; using the configuration options in the following manner:
14 ; /<network>/<site>/<%C1.Router>/<router>
15
16 ; router_name
17 ; {
18 ; network ndn ; the network to which this router belongs
19 ; site edu/site ; the site to which this router belongs
20 ; router router/name ; name used to uniquely identify this router under the site
21 ; }
Steve DiBenedetto24b9a642014-04-07 15:45:39 -060022}
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060023
Steve DiBenedettobf6a93d2014-03-21 14:03:02 -060024log
25{
26 ; default_level specifies the logging level for modules
27 ; that are not explicitly named. All debugging levels
28 ; listed above the selected value are enabled.
29 ;
30 ; Valid values:
31 ;
32 ; NONE ; no messages
33 ; ERROR ; error messages
34 ; WARN ; warning messages
35 ; INFO ; informational messages (default)
36 ; DEBUG ; debugging messages
37 ; TRACE ; trace messages (most verbose)
38 ; ALL ; all messages
39
Alexander Afanasyev885a85b2014-04-12 21:01:13 -070040 default_level INFO
Steve DiBenedettobf6a93d2014-03-21 14:03:02 -060041
42 ; You may override default_level by assigning a logging level
43 ; to the desired module name. Module names can be found in two ways:
44 ;
45 ; Run:
46 ; nfd --modules
47 ;
48 ; Or look for NFD_LOG_INIT(<module name>) statements in .cpp files
49 ;
50 ; Example module-level settings:
51 ;
52 ; FibManager DEBUG
53 ; Forwarder INFO
54}
55
Steve DiBenedetto3a4f83d2014-06-02 14:58:54 -060056; The tables section configures the CS, PIT, FIB, Strategy Choice, and Measurements
57tables
58{
59
60 ; ContentStore size limit in number of packets
61 ; default is 65536, about 500MB with 8KB packet size
62 cs_max_packets 65536
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070063
64 ; Set the forwarding strategy for the specified prefixes:
65 ; <prefix> <strategy>
66 strategy_choice
67 {
68 / /localhost/nfd/strategy/best-route
69 /localhost /localhost/nfd/strategy/broadcast
70 /localhost/nfd /localhost/nfd/strategy/best-route
71 /ndn/broadcast /localhost/nfd/strategy/broadcast
72 }
Steve DiBenedetto3a4f83d2014-06-02 14:58:54 -060073}
74
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060075; The face_system section defines what faces and channels are created.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060076face_system
77{
Steve DiBenedettodbcb1a12014-11-17 11:04:21 -070078 ; The unix section contains settings of Unix stream faces and channels.
79 ; Unix channel is always listening; delete unix section to disable
80 ; Unix stream faces and channels.
Steve DiBenedetto158f73f2014-12-22 14:46:12 -070081 ;
82 ; The ndn-cxx library expects unix:///var/run/nfd.sock
83 ; to be used as the default transport option. Please change
84 ; the "transport" field in client.conf to an appropriate tcp4 FaceUri
85 ; if you need to disable unix sockets.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060086 unix
87 {
Steve DiBenedettodbcb1a12014-11-17 11:04:21 -070088 path /var/run/nfd.sock ; Unix stream listener path
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060089 }
90
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060091 ; The tcp section contains settings of TCP faces and channels.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060092 tcp
93 {
94 listen yes ; set to 'no' to disable TCP listener, default 'yes'
95 port 6363 ; TCP listener port number
Steve DiBenedetto95152872014-04-11 12:40:59 -060096 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
97 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060098 }
99
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600100 ; The udp section contains settings of UDP faces and channels.
Steve DiBenedetto95152872014-04-11 12:40:59 -0600101 ; UDP channel is always listening; delete udp section to disable UDP
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600102 udp
103 {
104 port 6363 ; UDP unicast port number
Steve DiBenedetto95152872014-04-11 12:40:59 -0600105 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
106 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Chengyu Fanaddecff2015-02-10 14:09:01 -0700107
108 ; idle time (seconds) before closing a UDP unicast face, the actual timeout would be
109 ; anywhere within [idle_timeout, 2*idle_timeout), default is 600
110 idle_timeout 600
111
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600112 keep_alive_interval 25; interval (seconds) between keep-alive refreshes
113
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700114 ; UDP multicast settings
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600115 ; NFD creates one UDP multicast face per NIC
Giulio Grassi6d7176d2014-04-16 16:08:48 +0200116 ;
117 ; In multi-homed Linux machines these settings will NOT work without
118 ; root or settings the appropriate permissions:
119 ;
120 ; sudo setcap cap_net_raw=eip /full/path/nfd
121 ;
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700122 mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
123 mcast_port 56363 ; UDP multicast port number
124 mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only)
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600125 }
126
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600127 ; The ether section contains settings of Ethernet faces and channels.
128 ; These settings will NOT work without root or setting the appropriate
129 ; permissions:
130 ;
131 ; sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd
132 ;
133 ; You may need to install a package to use setcap:
134 ;
135 ; **Ubuntu:**
136 ;
137 ; sudo apt-get install libcap2-bin
138 ;
139 ; **Mac OS X:**
140 ;
141 ; curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
142 ; tar zxvf ChmodBPF.tar.gz
143 ; open ChmodBPF/Install\ ChmodBPF.app
144 ;
145 ; or manually:
146 ;
147 ; sudo chgrp admin /dev/bpf*
148 ; sudo chmod g+rw /dev/bpf*
149
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700150 @IF_HAVE_LIBPCAP@ether
151 @IF_HAVE_LIBPCAP@{
152 @IF_HAVE_LIBPCAP@ ; Ethernet multicast settings
153 @IF_HAVE_LIBPCAP@ ; NFD creates one Ethernet multicast face per NIC
154 @IF_HAVE_LIBPCAP@
155 @IF_HAVE_LIBPCAP@ mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
156 @IF_HAVE_LIBPCAP@ mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
157 @IF_HAVE_LIBPCAP@}
Wentao Shang53df1632014-04-21 12:01:32 -0700158
159 ; The websocket section contains settings of WebSocket faces and channels.
160
161 @IF_HAVE_WEBSOCKET@websocket
162 @IF_HAVE_WEBSOCKET@{
163 @IF_HAVE_WEBSOCKET@ listen yes ; set to 'no' to disable WebSocket listener, default 'yes'
164 @IF_HAVE_WEBSOCKET@ port 9696 ; WebSocket listener port number
165 @IF_HAVE_WEBSOCKET@ enable_v4 yes ; set to 'no' to disable listening on IPv4 socket, default 'yes'
166 @IF_HAVE_WEBSOCKET@ enable_v6 yes ; set to 'no' to disable listening on IPv6 socket, default 'yes'
167 @IF_HAVE_WEBSOCKET@}
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600168}
169
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600170; The authorizations section grants privileges to authorized keys.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600171authorizations
172{
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600173 ; An authorize section grants privileges to a NDN certificate.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600174 authorize
175 {
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600176 ; If you do not already have NDN certificate, you can generate
177 ; one with the following commands.
178 ;
179 ; 1. Generate and install a self-signed identity certificate:
180 ;
181 ; ndnsec-keygen /`whoami` | ndnsec-install-cert -
182 ;
183 ; Note that the argument to ndnsec-key will be the identity name of the
184 ; new key (in this case, /your-username). Identities are hierarchical NDN
185 ; names and may have multiple components (e.g. `/ndn/ucla/edu/alice`).
186 ; You may create additional keys and identities as you see fit.
187 ;
188 ; 2. Dump the NDN certificate to a file:
189 ;
190 ; sudo mkdir -p @SYSCONFDIR@/ndn/keys/
191 ; ndnsec-cert-dump -i /`whoami` > default.ndncert
192 ; sudo mv default.ndncert @SYSCONFDIR@/ndn/keys/default.ndncert
193 ;
194 ; The "certfile" field below specifies the default key directory for
195 ; your machine. You may move your newly created key to the location it
196 ; specifies or path.
197
Yingdi Yuc8f214c2014-04-29 20:39:37 -0700198 ; certfile keys/default.ndncert ; NDN identity certificate file
199 certfile any ; "any" authorizes command interests signed under any certificate,
200 ; i.e., no actual validation.
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600201 privileges ; set of privileges granted to this identity
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600202 {
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600203 faces
204 fib
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600205 strategy-choice
206 }
207 }
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600208
209 ; You may have multiple authorize sections that specify additional
210 ; certificates and their privileges.
211
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700212 ; authorize
213 ; {
214 ; certfile keys/this_cert_does_not_exist.ndncert
215 ; authorize
216 ; privileges
217 ; {
218 ; faces
219 ; }
220 ; }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600221}
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700222
Yingdi Yue5224e92014-04-29 18:04:02 -0700223rib
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700224{
Yingdi Yue5224e92014-04-29 18:04:02 -0700225 ; The following localhost_security allows anyone to register routing entries in local RIB
226 localhost_security
227 {
228 trust-anchor
229 {
230 type any
231 }
232 }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700233
Yingdi Yue5224e92014-04-29 18:04:02 -0700234 ; localhop_security should be enabled when NFD runs on a hub.
235 ; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing.
236 ; localhop_security
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700237 ; {
Yingdi Yue5224e92014-04-29 18:04:02 -0700238 ; ; This section defines the trust model for NFD RIB Management. It consists of rules and
239 ; ; trust-anchors, which are briefly defined in this file. For more information refer to
240 ; ; manpage of ndn-validator.conf:
241 ; ;
242 ; ; man ndn-validator.conf
243 ; ;
244 ; ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the
245 ; ; root of certification chain (e.g., NDN testbed root certificate) or an existing
246 ; ; default system certificate `default.ndncert`.
247 ; ;
248 ; ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the
249 ; ; rules defined here. A rule can be broken into two parts: matching & checking. A packet
250 ; ; will be matched against rules from the first to the last until a matched rule is
251 ; ; encountered. The matched rule will be used to check the packet. If a packet does not
252 ; ; match any rule, it will be treated as invalid. The matching part of a rule consists
253 ; ; of `for` and `filter` sections. They collectively define which packets can be checked
254 ; ; with this rule. `for` defines packet type (data or interest) and `filter` defines
255 ; ; conditions on other properties of a packet. Right now, you can only define conditions
256 ; ; on packet name, and you can only specify ONLY ONE filter for packet name. The
257 ; ; checking part of a rule consists of `checker`, which defines the conditions that a
258 ; ; VALID packet MUST have. See comments in checker section for more details.
259 ;
260 ; rule
261 ; {
262 ; id "NRD Prefix Registration Command Rule"
263 ; for interest ; rule for Interests (to validate CommandInterests)
264 ; filter
265 ; {
266 ; type name ; condition on interest name (w/o signature)
Yingdi Yu676a55a2014-06-18 21:09:09 -0700267 ; regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<>$ ; prefix before
268 ; ; timestamp
Yingdi Yue5224e92014-04-29 18:04:02 -0700269 ; }
270 ; checker
271 ; {
272 ; type customized
273 ; sig-type rsa-sha256 ; interest must have a rsa-sha256 signature
274 ; key-locator
275 ; {
276 ; type name ; key locator must be the certificate name of the
277 ; ; signing key
278 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT>$
279 ; }
280 ; }
281 ; }
282 ; rule
283 ; {
284 ; id "NDN Testbed Hierarchy Rule"
285 ; for data ; rule for Data (to validate NDN certificates)
286 ; filter
287 ; {
288 ; type name ; condition on data name
289 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$
290 ; }
291 ; checker
292 ; {
293 ; type hierarchical ; the certificate name of the signing key and
294 ; ; the data name must follow the hierarchical model
295 ; sig-type rsa-sha256 ; data must have a rsa-sha256 signature
296 ; }
297 ; }
298 ; trust-anchor
299 ; {
300 ; type file
301 ; file-name keys/default.ndncert ; the file name, by default this file should be placed in the
302 ; ; same folder as this config file.
303 ; }
304 ; ; trust-anchor ; Can be repeated multiple times to specify multiple trust anchors
305 ; ; {
306 ; ; type file
307 ; ; file-name keys/ndn-testbed.ndncert
308 ; ; }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700309 ; }
Yanbiao Lic17de832014-11-21 17:51:45 -0800310
Yanbiao Lib9d439d2014-12-11 16:12:32 -0800311 ; The following localhop_security should be enabled when NFD runs on a hub,
312 ; which accepts all remote registrations and is a short-term solution.
313 ; localhop_security
314 ; {
315 ; trust-anchor
316 ; {
317 ; type any
318 ; }
319 ; }
320
Yanbiao Lic17de832014-11-21 17:51:45 -0800321 remote_register
322 {
323 cost 15 ; forwarding cost of prefix registered on remote router
324 timeout 10000 ; timeout (in milliseconds) of remote prefix registration command
325 retry 0 ; maximum number of retries for each remote prefix registration command
326
327 refresh_interval 300 ; interval (in seconds) before refreshing the registration
328 ; This setting should be less than face_system.udp.idle_time,
329 ; so that the face is kept alive on the remote router.
330 }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700331}