blob: 908ad7be11892da6393845d43d1e02bd04ff43b3 [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
10}
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060011
Steve DiBenedettobf6a93d2014-03-21 14:03:02 -060012log
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 Afanasyev885a85b2014-04-12 21:01:13 -070028 default_level INFO
Steve DiBenedettobf6a93d2014-03-21 14:03:02 -060029
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 DiBenedetto3a4f83d2014-06-02 14:58:54 -060044; The tables section configures the CS, PIT, FIB, Strategy Choice, and Measurements
45tables
46{
47
48 ; ContentStore size limit in number of packets
49 ; default is 65536, about 500MB with 8KB packet size
50 cs_max_packets 65536
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070051
52 ; Set the forwarding strategy for the specified prefixes:
53 ; <prefix> <strategy>
54 strategy_choice
55 {
56 / /localhost/nfd/strategy/best-route
57 /localhost /localhost/nfd/strategy/broadcast
58 /localhost/nfd /localhost/nfd/strategy/best-route
59 /ndn/broadcast /localhost/nfd/strategy/broadcast
60 }
Steve DiBenedetto3a4f83d2014-06-02 14:58:54 -060061}
62
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060063; The face_system section defines what faces and channels are created.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060064face_system
65{
Steve DiBenedettodbcb1a12014-11-17 11:04:21 -070066 ; The unix section contains settings of Unix stream faces and channels.
67 ; Unix channel is always listening; delete unix section to disable
68 ; Unix stream faces and channels.
Steve DiBenedetto158f73f2014-12-22 14:46:12 -070069 ;
70 ; The ndn-cxx library expects unix:///var/run/nfd.sock
71 ; to be used as the default transport option. Please change
72 ; the "transport" field in client.conf to an appropriate tcp4 FaceUri
73 ; if you need to disable unix sockets.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060074 unix
75 {
Steve DiBenedettodbcb1a12014-11-17 11:04:21 -070076 path /var/run/nfd.sock ; Unix stream listener path
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060077 }
78
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060079 ; The tcp section contains settings of TCP faces and channels.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060080 tcp
81 {
82 listen yes ; set to 'no' to disable TCP listener, default 'yes'
83 port 6363 ; TCP listener port number
Steve DiBenedetto95152872014-04-11 12:40:59 -060084 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
85 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060086 }
87
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060088 ; The udp section contains settings of UDP faces and channels.
Steve DiBenedetto95152872014-04-11 12:40:59 -060089 ; UDP channel is always listening; delete udp section to disable UDP
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060090 udp
91 {
92 port 6363 ; UDP unicast port number
Steve DiBenedetto95152872014-04-11 12:40:59 -060093 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
94 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060095 idle_timeout 600 ; idle time (seconds) before closing a UDP unicast face
96 keep_alive_interval 25; interval (seconds) between keep-alive refreshes
97
Alexander Afanasyev885a85b2014-04-12 21:01:13 -070098 ; UDP multicast settings
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060099 ; NFD creates one UDP multicast face per NIC
Giulio Grassi6d7176d2014-04-16 16:08:48 +0200100 ;
101 ; In multi-homed Linux machines these settings will NOT work without
102 ; root or settings the appropriate permissions:
103 ;
104 ; sudo setcap cap_net_raw=eip /full/path/nfd
105 ;
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700106 mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
107 mcast_port 56363 ; UDP multicast port number
108 mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only)
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600109 }
110
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600111 ; The ether section contains settings of Ethernet faces and channels.
112 ; These settings will NOT work without root or setting the appropriate
113 ; permissions:
114 ;
115 ; sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd
116 ;
117 ; You may need to install a package to use setcap:
118 ;
119 ; **Ubuntu:**
120 ;
121 ; sudo apt-get install libcap2-bin
122 ;
123 ; **Mac OS X:**
124 ;
125 ; curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
126 ; tar zxvf ChmodBPF.tar.gz
127 ; open ChmodBPF/Install\ ChmodBPF.app
128 ;
129 ; or manually:
130 ;
131 ; sudo chgrp admin /dev/bpf*
132 ; sudo chmod g+rw /dev/bpf*
133
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700134 @IF_HAVE_LIBPCAP@ether
135 @IF_HAVE_LIBPCAP@{
136 @IF_HAVE_LIBPCAP@ ; Ethernet multicast settings
137 @IF_HAVE_LIBPCAP@ ; NFD creates one Ethernet multicast face per NIC
138 @IF_HAVE_LIBPCAP@
139 @IF_HAVE_LIBPCAP@ mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
140 @IF_HAVE_LIBPCAP@ mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
141 @IF_HAVE_LIBPCAP@}
Wentao Shang53df1632014-04-21 12:01:32 -0700142
143 ; The websocket section contains settings of WebSocket faces and channels.
144
145 @IF_HAVE_WEBSOCKET@websocket
146 @IF_HAVE_WEBSOCKET@{
147 @IF_HAVE_WEBSOCKET@ listen yes ; set to 'no' to disable WebSocket listener, default 'yes'
148 @IF_HAVE_WEBSOCKET@ port 9696 ; WebSocket listener port number
149 @IF_HAVE_WEBSOCKET@ enable_v4 yes ; set to 'no' to disable listening on IPv4 socket, default 'yes'
150 @IF_HAVE_WEBSOCKET@ enable_v6 yes ; set to 'no' to disable listening on IPv6 socket, default 'yes'
151 @IF_HAVE_WEBSOCKET@}
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600152}
153
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600154; The authorizations section grants privileges to authorized keys.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600155authorizations
156{
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600157 ; An authorize section grants privileges to a NDN certificate.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600158 authorize
159 {
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600160 ; If you do not already have NDN certificate, you can generate
161 ; one with the following commands.
162 ;
163 ; 1. Generate and install a self-signed identity certificate:
164 ;
165 ; ndnsec-keygen /`whoami` | ndnsec-install-cert -
166 ;
167 ; Note that the argument to ndnsec-key will be the identity name of the
168 ; new key (in this case, /your-username). Identities are hierarchical NDN
169 ; names and may have multiple components (e.g. `/ndn/ucla/edu/alice`).
170 ; You may create additional keys and identities as you see fit.
171 ;
172 ; 2. Dump the NDN certificate to a file:
173 ;
174 ; sudo mkdir -p @SYSCONFDIR@/ndn/keys/
175 ; ndnsec-cert-dump -i /`whoami` > default.ndncert
176 ; sudo mv default.ndncert @SYSCONFDIR@/ndn/keys/default.ndncert
177 ;
178 ; The "certfile" field below specifies the default key directory for
179 ; your machine. You may move your newly created key to the location it
180 ; specifies or path.
181
Yingdi Yuc8f214c2014-04-29 20:39:37 -0700182 ; certfile keys/default.ndncert ; NDN identity certificate file
183 certfile any ; "any" authorizes command interests signed under any certificate,
184 ; i.e., no actual validation.
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600185 privileges ; set of privileges granted to this identity
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600186 {
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600187 faces
188 fib
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600189 strategy-choice
190 }
191 }
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600192
193 ; You may have multiple authorize sections that specify additional
194 ; certificates and their privileges.
195
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700196 ; authorize
197 ; {
198 ; certfile keys/this_cert_does_not_exist.ndncert
199 ; authorize
200 ; privileges
201 ; {
202 ; faces
203 ; }
204 ; }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600205}
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700206
Yingdi Yue5224e92014-04-29 18:04:02 -0700207rib
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700208{
Yingdi Yue5224e92014-04-29 18:04:02 -0700209 ; The following localhost_security allows anyone to register routing entries in local RIB
210 localhost_security
211 {
212 trust-anchor
213 {
214 type any
215 }
216 }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700217
Yingdi Yue5224e92014-04-29 18:04:02 -0700218 ; localhop_security should be enabled when NFD runs on a hub.
219 ; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing.
220 ; localhop_security
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700221 ; {
Yingdi Yue5224e92014-04-29 18:04:02 -0700222 ; ; This section defines the trust model for NFD RIB Management. It consists of rules and
223 ; ; trust-anchors, which are briefly defined in this file. For more information refer to
224 ; ; manpage of ndn-validator.conf:
225 ; ;
226 ; ; man ndn-validator.conf
227 ; ;
228 ; ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the
229 ; ; root of certification chain (e.g., NDN testbed root certificate) or an existing
230 ; ; default system certificate `default.ndncert`.
231 ; ;
232 ; ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the
233 ; ; rules defined here. A rule can be broken into two parts: matching & checking. A packet
234 ; ; will be matched against rules from the first to the last until a matched rule is
235 ; ; encountered. The matched rule will be used to check the packet. If a packet does not
236 ; ; match any rule, it will be treated as invalid. The matching part of a rule consists
237 ; ; of `for` and `filter` sections. They collectively define which packets can be checked
238 ; ; with this rule. `for` defines packet type (data or interest) and `filter` defines
239 ; ; conditions on other properties of a packet. Right now, you can only define conditions
240 ; ; on packet name, and you can only specify ONLY ONE filter for packet name. The
241 ; ; checking part of a rule consists of `checker`, which defines the conditions that a
242 ; ; VALID packet MUST have. See comments in checker section for more details.
243 ;
244 ; rule
245 ; {
246 ; id "NRD Prefix Registration Command Rule"
247 ; for interest ; rule for Interests (to validate CommandInterests)
248 ; filter
249 ; {
250 ; type name ; condition on interest name (w/o signature)
Yingdi Yu676a55a2014-06-18 21:09:09 -0700251 ; regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<>$ ; prefix before
252 ; ; timestamp
Yingdi Yue5224e92014-04-29 18:04:02 -0700253 ; }
254 ; checker
255 ; {
256 ; type customized
257 ; sig-type rsa-sha256 ; interest must have a rsa-sha256 signature
258 ; key-locator
259 ; {
260 ; type name ; key locator must be the certificate name of the
261 ; ; signing key
262 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT>$
263 ; }
264 ; }
265 ; }
266 ; rule
267 ; {
268 ; id "NDN Testbed Hierarchy Rule"
269 ; for data ; rule for Data (to validate NDN certificates)
270 ; filter
271 ; {
272 ; type name ; condition on data name
273 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$
274 ; }
275 ; checker
276 ; {
277 ; type hierarchical ; the certificate name of the signing key and
278 ; ; the data name must follow the hierarchical model
279 ; sig-type rsa-sha256 ; data must have a rsa-sha256 signature
280 ; }
281 ; }
282 ; trust-anchor
283 ; {
284 ; type file
285 ; file-name keys/default.ndncert ; the file name, by default this file should be placed in the
286 ; ; same folder as this config file.
287 ; }
288 ; ; trust-anchor ; Can be repeated multiple times to specify multiple trust anchors
289 ; ; {
290 ; ; type file
291 ; ; file-name keys/ndn-testbed.ndncert
292 ; ; }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700293 ; }
Yanbiao Lic17de832014-11-21 17:51:45 -0800294
Yanbiao Lib9d439d2014-12-11 16:12:32 -0800295 ; The following localhop_security should be enabled when NFD runs on a hub,
296 ; which accepts all remote registrations and is a short-term solution.
297 ; localhop_security
298 ; {
299 ; trust-anchor
300 ; {
301 ; type any
302 ; }
303 ; }
304
Yanbiao Lic17de832014-11-21 17:51:45 -0800305 remote_register
306 {
307 cost 15 ; forwarding cost of prefix registered on remote router
308 timeout 10000 ; timeout (in milliseconds) of remote prefix registration command
309 retry 0 ; maximum number of retries for each remote prefix registration command
310
311 refresh_interval 300 ; interval (in seconds) before refreshing the registration
312 ; This setting should be less than face_system.udp.idle_time,
313 ; so that the face is kept alive on the remote router.
314 }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700315}