blob: 210ecbaef2cf78746ffd26dd66558ee986efefd4 [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
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -070035 ; nrd --modules
Steve DiBenedettobf6a93d2014-03-21 14:03:02 -060036 ;
37 ; Or look for NFD_LOG_INIT(<module name>) statements in .cpp files
38 ;
39 ; Example module-level settings:
40 ;
41 ; FibManager DEBUG
42 ; Forwarder INFO
43}
44
Steve DiBenedetto3a4f83d2014-06-02 14:58:54 -060045; The tables section configures the CS, PIT, FIB, Strategy Choice, and Measurements
46tables
47{
48
49 ; ContentStore size limit in number of packets
50 ; default is 65536, about 500MB with 8KB packet size
51 cs_max_packets 65536
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070052
53 ; Set the forwarding strategy for the specified prefixes:
54 ; <prefix> <strategy>
55 strategy_choice
56 {
57 / /localhost/nfd/strategy/best-route
58 /localhost /localhost/nfd/strategy/broadcast
59 /localhost/nfd /localhost/nfd/strategy/best-route
60 /ndn/broadcast /localhost/nfd/strategy/broadcast
61 }
Steve DiBenedetto3a4f83d2014-06-02 14:58:54 -060062}
63
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060064; The face_system section defines what faces and channels are created.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060065face_system
66{
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060067 ; The unix section contains settings of UNIX stream faces and channels.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060068 unix
69 {
70 listen yes ; set to 'no' to disable UNIX stream listener, default 'yes'
71 path /var/run/nfd.sock ; UNIX stream listener path
72 }
73
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060074 ; The tcp section contains settings of TCP faces and channels.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060075 tcp
76 {
77 listen yes ; set to 'no' to disable TCP listener, default 'yes'
78 port 6363 ; TCP listener port number
Steve DiBenedetto95152872014-04-11 12:40:59 -060079 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
80 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060081 }
82
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060083 ; The udp section contains settings of UDP faces and channels.
Steve DiBenedetto95152872014-04-11 12:40:59 -060084 ; UDP channel is always listening; delete udp section to disable UDP
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060085 udp
86 {
87 port 6363 ; UDP unicast port number
Steve DiBenedetto95152872014-04-11 12:40:59 -060088 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
89 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060090 idle_timeout 600 ; idle time (seconds) before closing a UDP unicast face
91 keep_alive_interval 25; interval (seconds) between keep-alive refreshes
92
Alexander Afanasyev885a85b2014-04-12 21:01:13 -070093 ; UDP multicast settings
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060094 ; NFD creates one UDP multicast face per NIC
Giulio Grassi6d7176d2014-04-16 16:08:48 +020095 ;
96 ; In multi-homed Linux machines these settings will NOT work without
97 ; root or settings the appropriate permissions:
98 ;
99 ; sudo setcap cap_net_raw=eip /full/path/nfd
100 ;
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700101 mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
102 mcast_port 56363 ; UDP multicast port number
103 mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only)
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600104 }
105
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600106 ; The ether section contains settings of Ethernet faces and channels.
107 ; These settings will NOT work without root or setting the appropriate
108 ; permissions:
109 ;
110 ; sudo setcap cap_net_raw,cap_net_admin=eip /full/path/nfd
111 ;
112 ; You may need to install a package to use setcap:
113 ;
114 ; **Ubuntu:**
115 ;
116 ; sudo apt-get install libcap2-bin
117 ;
118 ; **Mac OS X:**
119 ;
120 ; curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
121 ; tar zxvf ChmodBPF.tar.gz
122 ; open ChmodBPF/Install\ ChmodBPF.app
123 ;
124 ; or manually:
125 ;
126 ; sudo chgrp admin /dev/bpf*
127 ; sudo chmod g+rw /dev/bpf*
128
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700129 @IF_HAVE_LIBPCAP@ether
130 @IF_HAVE_LIBPCAP@{
131 @IF_HAVE_LIBPCAP@ ; Ethernet multicast settings
132 @IF_HAVE_LIBPCAP@ ; NFD creates one Ethernet multicast face per NIC
133 @IF_HAVE_LIBPCAP@
134 @IF_HAVE_LIBPCAP@ mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
135 @IF_HAVE_LIBPCAP@ mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
136 @IF_HAVE_LIBPCAP@}
Wentao Shang53df1632014-04-21 12:01:32 -0700137
138 ; The websocket section contains settings of WebSocket faces and channels.
139
140 @IF_HAVE_WEBSOCKET@websocket
141 @IF_HAVE_WEBSOCKET@{
142 @IF_HAVE_WEBSOCKET@ listen yes ; set to 'no' to disable WebSocket listener, default 'yes'
143 @IF_HAVE_WEBSOCKET@ port 9696 ; WebSocket listener port number
144 @IF_HAVE_WEBSOCKET@ enable_v4 yes ; set to 'no' to disable listening on IPv4 socket, default 'yes'
145 @IF_HAVE_WEBSOCKET@ enable_v6 yes ; set to 'no' to disable listening on IPv6 socket, default 'yes'
146 @IF_HAVE_WEBSOCKET@}
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600147}
148
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600149; The authorizations section grants privileges to authorized keys.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600150authorizations
151{
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600152 ; An authorize section grants privileges to a NDN certificate.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600153 authorize
154 {
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600155 ; If you do not already have NDN certificate, you can generate
156 ; one with the following commands.
157 ;
158 ; 1. Generate and install a self-signed identity certificate:
159 ;
160 ; ndnsec-keygen /`whoami` | ndnsec-install-cert -
161 ;
162 ; Note that the argument to ndnsec-key will be the identity name of the
163 ; new key (in this case, /your-username). Identities are hierarchical NDN
164 ; names and may have multiple components (e.g. `/ndn/ucla/edu/alice`).
165 ; You may create additional keys and identities as you see fit.
166 ;
167 ; 2. Dump the NDN certificate to a file:
168 ;
169 ; sudo mkdir -p @SYSCONFDIR@/ndn/keys/
170 ; ndnsec-cert-dump -i /`whoami` > default.ndncert
171 ; sudo mv default.ndncert @SYSCONFDIR@/ndn/keys/default.ndncert
172 ;
173 ; The "certfile" field below specifies the default key directory for
174 ; your machine. You may move your newly created key to the location it
175 ; specifies or path.
176
Yingdi Yuc8f214c2014-04-29 20:39:37 -0700177 ; certfile keys/default.ndncert ; NDN identity certificate file
178 certfile any ; "any" authorizes command interests signed under any certificate,
179 ; i.e., no actual validation.
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600180 privileges ; set of privileges granted to this identity
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600181 {
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600182 faces
183 fib
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600184 strategy-choice
185 }
186 }
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600187
188 ; You may have multiple authorize sections that specify additional
189 ; certificates and their privileges.
190
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700191 ; authorize
192 ; {
193 ; certfile keys/this_cert_does_not_exist.ndncert
194 ; authorize
195 ; privileges
196 ; {
197 ; faces
198 ; }
199 ; }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600200}
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700201
Yingdi Yue5224e92014-04-29 18:04:02 -0700202rib
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700203{
Yingdi Yue5224e92014-04-29 18:04:02 -0700204 ; The following localhost_security allows anyone to register routing entries in local RIB
205 localhost_security
206 {
207 trust-anchor
208 {
209 type any
210 }
211 }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700212
Yingdi Yue5224e92014-04-29 18:04:02 -0700213 ; localhop_security should be enabled when NFD runs on a hub.
214 ; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing.
215 ; localhop_security
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700216 ; {
Yingdi Yue5224e92014-04-29 18:04:02 -0700217 ; ; This section defines the trust model for NFD RIB Management. It consists of rules and
218 ; ; trust-anchors, which are briefly defined in this file. For more information refer to
219 ; ; manpage of ndn-validator.conf:
220 ; ;
221 ; ; man ndn-validator.conf
222 ; ;
223 ; ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the
224 ; ; root of certification chain (e.g., NDN testbed root certificate) or an existing
225 ; ; default system certificate `default.ndncert`.
226 ; ;
227 ; ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the
228 ; ; rules defined here. A rule can be broken into two parts: matching & checking. A packet
229 ; ; will be matched against rules from the first to the last until a matched rule is
230 ; ; encountered. The matched rule will be used to check the packet. If a packet does not
231 ; ; match any rule, it will be treated as invalid. The matching part of a rule consists
232 ; ; of `for` and `filter` sections. They collectively define which packets can be checked
233 ; ; with this rule. `for` defines packet type (data or interest) and `filter` defines
234 ; ; conditions on other properties of a packet. Right now, you can only define conditions
235 ; ; on packet name, and you can only specify ONLY ONE filter for packet name. The
236 ; ; checking part of a rule consists of `checker`, which defines the conditions that a
237 ; ; VALID packet MUST have. See comments in checker section for more details.
238 ;
239 ; rule
240 ; {
241 ; id "NRD Prefix Registration Command Rule"
242 ; for interest ; rule for Interests (to validate CommandInterests)
243 ; filter
244 ; {
245 ; type name ; condition on interest name (w/o signature)
Yingdi Yu676a55a2014-06-18 21:09:09 -0700246 ; regex ^[<localhop><localhost>]<nfd><rib>[<register><unregister>]<>$ ; prefix before
247 ; ; timestamp
Yingdi Yue5224e92014-04-29 18:04:02 -0700248 ; }
249 ; checker
250 ; {
251 ; type customized
252 ; sig-type rsa-sha256 ; interest must have a rsa-sha256 signature
253 ; key-locator
254 ; {
255 ; type name ; key locator must be the certificate name of the
256 ; ; signing key
257 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT>$
258 ; }
259 ; }
260 ; }
261 ; rule
262 ; {
263 ; id "NDN Testbed Hierarchy Rule"
264 ; for data ; rule for Data (to validate NDN certificates)
265 ; filter
266 ; {
267 ; type name ; condition on data name
268 ; regex ^[^<KEY>]*<KEY><>*<ksk-.*><ID-CERT><>$
269 ; }
270 ; checker
271 ; {
272 ; type hierarchical ; the certificate name of the signing key and
273 ; ; the data name must follow the hierarchical model
274 ; sig-type rsa-sha256 ; data must have a rsa-sha256 signature
275 ; }
276 ; }
277 ; trust-anchor
278 ; {
279 ; type file
280 ; file-name keys/default.ndncert ; the file name, by default this file should be placed in the
281 ; ; same folder as this config file.
282 ; }
283 ; ; trust-anchor ; Can be repeated multiple times to specify multiple trust anchors
284 ; ; {
285 ; ; type file
286 ; ; file-name keys/ndn-testbed.ndncert
287 ; ; }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700288 ; }
289}