blob: bf7d9ea8d24c40daf32cd7689737ee560ca3415b [file] [log] [blame]
Philipp Molla1033342021-06-14 09:34:21 +02001; The general section contains global settings for the 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 ;
Davide Pesaventoa3148082018-04-12 18:21:54 -040036 ; Or look for NFD_LOG_INIT(<module name>) statements in source files.
37 ; Note that the "nfd." prefix can be omitted.
Steve DiBenedettobf6a93d2014-03-21 14:03:02 -060038 ;
39 ; Example module-level settings:
40 ;
41 ; FibManager DEBUG
42 ; Forwarder INFO
43}
44
Philipp Molla1033342021-06-14 09:34:21 +020045; The forwarder section contains settings that affect the core forwarding behavior of nfd.
46forwarder
47{
48 ; Specify the HopLimit that is added to incoming Interests without a HopLimit element.
49 ; A value of 0 disables adding the HopLimit.
50 ; Must be between 0 and 255. The default is 0.
51 default_hop_limit 0
52}
53
Steve DiBenedetto3a4f83d2014-06-02 14:58:54 -060054; The tables section configures the CS, PIT, FIB, Strategy Choice, and Measurements
55tables
56{
Philipp Molla1033342021-06-14 09:34:21 +020057 ; Content Store capacity limit in number of packets.
58 ; The default is 65536, equivalent to about 500MB with 8KB packet size.
Steve DiBenedetto3a4f83d2014-06-02 14:58:54 -060059 cs_max_packets 65536
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070060
Philipp Molla1033342021-06-14 09:34:21 +020061 ; Content Store replacement policy.
Junxiao Shib4a5acd2016-12-07 19:59:18 +000062 ; Available policies are: priority_fifo, lru
Chavoosh Ghasemi32e76092018-09-10 14:51:33 -070063 cs_policy lru
Junxiao Shib4a5acd2016-12-07 19:59:18 +000064
Junxiao Shi9685cc52016-08-29 12:47:05 +000065 ; Set a policy to decide whether to cache or drop unsolicited Data.
66 ; Available policies are: drop-all, admit-local, admit-network, admit-all
Junxiao Shi88f5f732016-09-03 07:11:37 +000067 cs_unsolicited_policy drop-all
Junxiao Shi9685cc52016-08-29 12:47:05 +000068
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070069 ; Set the forwarding strategy for the specified prefixes:
70 ; <prefix> <strategy>
71 strategy_choice
72 {
73 / /localhost/nfd/strategy/best-route
Junxiao Shi67ba8d22015-08-21 21:21:28 -070074 /localhost /localhost/nfd/strategy/multicast
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070075 /localhost/nfd /localhost/nfd/strategy/best-route
Junxiao Shi67ba8d22015-08-21 21:21:28 -070076 /ndn/broadcast /localhost/nfd/strategy/multicast
Steve DiBenedettoc0640f52014-11-03 15:55:43 -070077 }
Vince Lehman63ab1bb2015-09-04 17:06:58 -050078
79 ; Declare network region names
80 ; These are used for mobility support. An Interest carrying a Link object is
81 ; assumed to have reached the producer region if any delegation name in the
82 ; Link object is a prefix of any region name.
83 network_region
84 {
85 ; /example/region1
86 ; /example/region2
87 }
Steve DiBenedetto3a4f83d2014-06-02 14:58:54 -060088}
89
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -060090; The face_system section defines what faces and channels are created.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -060091face_system
92{
Eric Newberry0c841642018-01-17 15:01:00 -070093 ; This section contains options that apply to multiple face protocols.
94 general
95 {
Eric Newberry17d18492018-02-10 22:50:06 -070096 enable_congestion_marking yes ; set to 'no' to disable congestion marking on supported faces, default 'yes'
Eric Newberry0c841642018-01-17 15:01:00 -070097 }
98
Davide Pesavento494a9552018-02-04 22:16:05 -050099 ; The unix section contains settings for Unix stream faces and channels.
Davide Pesavento46afec42017-05-28 14:28:47 -0400100 ; A Unix channel is always listening; delete the unix section to disable
Steve DiBenedettodbcb1a12014-11-17 11:04:21 -0700101 ; Unix stream faces and channels.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600102 unix
103 {
Davide Pesavento4c957712024-01-01 15:40:06 -0500104 ; The default transport is 'unix:///run/nfd/nfd.sock' (on Linux) or 'unix:///var/run/nfd/nfd.sock' (on
105 ; other platforms). This should match the 'transport' field in client.conf for ndn-cxx. If you wish
106 ; to use TCP instead of Unix sockets with ndn-cxx, change 'transport' to an appropriate TCP FaceUri.
Eric Newberry22974902020-04-06 23:41:00 -0700107 path @UNIX_SOCKET_PATH@ ; Unix stream listener path
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600108 }
109
Davide Pesavento494a9552018-02-04 22:16:05 -0500110 ; The tcp section contains settings for TCP faces and channels.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600111 tcp
112 {
113 listen yes ; set to 'no' to disable TCP listener, default 'yes'
114 port 6363 ; TCP listener port number
Steve DiBenedetto95152872014-04-11 12:40:59 -0600115 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
116 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Alexander Afanasyevded17422018-04-03 19:00:23 -0400117
118 ; A TCP face has local scope if the local and remote IP addresses match the whitelist but not the blacklist
119 local
120 {
121 whitelist
122 {
123 subnet 127.0.0.0/8
124 subnet ::1/128
125 }
126 blacklist
127 {
128 }
129 }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600130 }
131
Davide Pesavento494a9552018-02-04 22:16:05 -0500132 ; The udp section contains settings for UDP faces and channels.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600133 udp
134 {
Davide Pesavento46afec42017-05-28 14:28:47 -0400135 ; UDP unicast settings.
Davide Pesavento494a9552018-02-04 22:16:05 -0500136 listen yes ; set to 'no' to disable UDP listener, default 'yes'
137 port 6363 ; UDP listener port number
Steve DiBenedetto95152872014-04-11 12:40:59 -0600138 enable_v4 yes ; set to 'no' to disable IPv4 channels, default 'yes'
139 enable_v6 yes ; set to 'no' to disable IPv6 channels, default 'yes'
Chengyu Fanaddecff2015-02-10 14:09:01 -0700140
Davide Pesavento46afec42017-05-28 14:28:47 -0400141 ; Time (in seconds) before closing an idle UDP unicast face.
142 ; The actual timeout will occur anytime between idle_timeout and 2*idle_timeout.
143 ; The default is 600 (10 minutes).
Chengyu Fanaddecff2015-02-10 14:09:01 -0700144 idle_timeout 600
145
Junxiao Shia6286a92021-02-23 06:43:52 -0700146 ; Maximum payload size for outgoing packets on unicast faces, used in NDNLPv2 fragmentation.
147 ; This must be between 64 and 8800. The default is 8800.
148 ; This value excludes IPv4/IPv6/UDP headers. On an Ethernet link of MTU=1500, setting this
149 ; to 1452 would leave enough room for IP+UDP headers and prevent IP fragmentation.
150 ; This option is not changable during runtime configuration reload, but the MTU of an
151 ; individual face can be updated via NFD Management Protocol or the 'nfdc' tool.
152 unicast_mtu 8800
153
Davide Pesavento46afec42017-05-28 14:28:47 -0400154 ; UDP multicast settings.
155 ; By default, NFD creates one UDP multicast face per NIC.
Giulio Grassi6d7176d2014-04-16 16:08:48 +0200156 ;
157 ; In multi-homed Linux machines these settings will NOT work without
Davide Pesavento46afec42017-05-28 14:28:47 -0400158 ; root or setting the appropriate permissions:
Giulio Grassi6d7176d2014-04-16 16:08:48 +0200159 ;
Davide Pesavento46afec42017-05-28 14:28:47 -0400160 ; sudo setcap cap_net_raw=eip /path/to/nfd
Giulio Grassi6d7176d2014-04-16 16:08:48 +0200161 ;
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700162 mcast yes ; set to 'no' to disable UDP multicast, default 'yes'
Md Ashiqur Rahman8ce09032018-01-14 22:43:13 -0500163 mcast_group 224.0.23.170 ; UDP multicast group (IPv4)
164 mcast_port 56363 ; UDP multicast port number (IPv4)
165 mcast_group_v6 ff02::1234 ; UDP multicast group (IPv6)
166 mcast_port_v6 56363 ; UDP multicast port number (IPv6)
Davide Pesavento46afec42017-05-28 14:28:47 -0400167 mcast_ad_hoc no ; set to 'yes' to make all UDP multicast faces "ad hoc", default 'no'
Junxiao Shic31080d2017-01-24 15:10:12 +0000168
169 ; Whitelist and blacklist can contain, in no particular order:
Davide Pesavento46afec42017-05-28 14:28:47 -0400170 ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0')
Alexander Afanasyev3bdc1de2018-04-03 17:33:31 -0400171 ; - MAC addresses (e.g., 'ether 85:3b:4d:d3:5f:c2')
172 ; - IPv4 subnets (e.g., 'subnet 192.0.2.0/24')
173 ; - IPv6 subnets (e.g., 'subnet 2001:db8::/32')
Davide Pesavento46afec42017-05-28 14:28:47 -0400174 ; - a single asterisk ('*') that matches all interfaces
175 ; By default, all interfaces are whitelisted.
Junxiao Shic31080d2017-01-24 15:10:12 +0000176 whitelist
177 {
178 *
179 }
180 blacklist
181 {
182 }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600183 }
184
Davide Pesavento494a9552018-02-04 22:16:05 -0500185 ; The ether section contains settings for Ethernet faces and channels.
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600186 ; These settings will NOT work without root or setting the appropriate
187 ; permissions:
188 ;
Davide Pesavento46afec42017-05-28 14:28:47 -0400189 ; sudo setcap cap_net_raw,cap_net_admin=eip /path/to/nfd
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600190 ;
191 ; You may need to install a package to use setcap:
192 ;
193 ; **Ubuntu:**
194 ;
Davide Pesavento69857c32020-04-05 16:36:26 -0400195 ; sudo apt install libcap2-bin
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600196 ;
197 ; **Mac OS X:**
198 ;
199 ; curl https://bugs.wireshark.org/bugzilla/attachment.cgi?id=3373 -o ChmodBPF.tar.gz
200 ; tar zxvf ChmodBPF.tar.gz
201 ; open ChmodBPF/Install\ ChmodBPF.app
202 ;
203 ; or manually:
204 ;
205 ; sudo chgrp admin /dev/bpf*
206 ; sudo chmod g+rw /dev/bpf*
susmit91e1d7c2016-10-03 16:16:57 -0600207 ;
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700208 @IF_HAVE_LIBPCAP@ether
209 @IF_HAVE_LIBPCAP@{
Davide Pesavento46afec42017-05-28 14:28:47 -0400210 @IF_HAVE_LIBPCAP@ ; Ethernet unicast settings.
211 @IF_HAVE_LIBPCAP@ listen yes ; set to 'no' to disable Ethernet listener, default 'yes'
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700212 @IF_HAVE_LIBPCAP@
Davide Pesavento46afec42017-05-28 14:28:47 -0400213 @IF_HAVE_LIBPCAP@ ; Time (in seconds) before closing an idle Ethernet unicast face.
214 @IF_HAVE_LIBPCAP@ ; The actual timeout will occur anytime between idle_timeout and 2*idle_timeout.
215 @IF_HAVE_LIBPCAP@ ; The default is 600 (10 minutes).
216 @IF_HAVE_LIBPCAP@ idle_timeout 600
217 @IF_HAVE_LIBPCAP@
218 @IF_HAVE_LIBPCAP@ ; Ethernet multicast settings.
219 @IF_HAVE_LIBPCAP@ ; By default, NFD creates one Ethernet multicast face per NIC.
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700220 @IF_HAVE_LIBPCAP@ mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes'
221 @IF_HAVE_LIBPCAP@ mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group
Davide Pesavento46afec42017-05-28 14:28:47 -0400222 @IF_HAVE_LIBPCAP@ mcast_ad_hoc no ; set to 'yes' to make all Ethernet multicast faces "ad hoc", default 'no'
susmit91e1d7c2016-10-03 16:16:57 -0600223 @IF_HAVE_LIBPCAP@
Junxiao Shic31080d2017-01-24 15:10:12 +0000224 @IF_HAVE_LIBPCAP@ ; Whitelist and blacklist can contain, in no particular order:
Davide Pesavento46afec42017-05-28 14:28:47 -0400225 @IF_HAVE_LIBPCAP@ ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0')
Alexander Afanasyev3bdc1de2018-04-03 17:33:31 -0400226 @IF_HAVE_LIBPCAP@ ; - MAC addresses (e.g., 'ether 85:3b:4d:d3:5f:c2')
227 @IF_HAVE_LIBPCAP@ ; - IPv4 subnets (e.g., 'subnet 192.0.2.0/24')
228 @IF_HAVE_LIBPCAP@ ; - IPv6 subnets (e.g., 'subnet 2001:db8::/32')
Davide Pesavento46afec42017-05-28 14:28:47 -0400229 @IF_HAVE_LIBPCAP@ ; - a single asterisk ('*') that matches all interfaces
230 @IF_HAVE_LIBPCAP@ ; By default, all interfaces are whitelisted.
susmit91e1d7c2016-10-03 16:16:57 -0600231 @IF_HAVE_LIBPCAP@ whitelist
232 @IF_HAVE_LIBPCAP@ {
233 @IF_HAVE_LIBPCAP@ *
234 @IF_HAVE_LIBPCAP@ }
235 @IF_HAVE_LIBPCAP@ blacklist
236 @IF_HAVE_LIBPCAP@ {
237 @IF_HAVE_LIBPCAP@ }
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700238 @IF_HAVE_LIBPCAP@}
Wentao Shang53df1632014-04-21 12:01:32 -0700239
Davide Pesavento494a9552018-02-04 22:16:05 -0500240 ; The websocket section contains settings for WebSocket faces and channels.
Wentao Shang53df1632014-04-21 12:01:32 -0700241 @IF_HAVE_WEBSOCKET@websocket
242 @IF_HAVE_WEBSOCKET@{
243 @IF_HAVE_WEBSOCKET@ listen yes ; set to 'no' to disable WebSocket listener, default 'yes'
244 @IF_HAVE_WEBSOCKET@ port 9696 ; WebSocket listener port number
245 @IF_HAVE_WEBSOCKET@ enable_v4 yes ; set to 'no' to disable listening on IPv4 socket, default 'yes'
246 @IF_HAVE_WEBSOCKET@ enable_v6 yes ; set to 'no' to disable listening on IPv6 socket, default 'yes'
247 @IF_HAVE_WEBSOCKET@}
Junxiao Shieef49a92018-11-10 12:19:36 +0000248
249 ; The netdev_bound section defines faces bound to netdevices.
250 netdev_bound
251 {
252 ; A rule consists of a whitelist, a blacklist, and a set of remote FaceUris, and will cause the
253 ; creation of zero or more faces bound to netdevices. One face will be created per accepted
254 ; netdev per remote. There can be any number of rules in the netdev_bound section.
255
256 ; rule
257 ; {
258 ; ; Remote FaceUri to which the netdev-bound faces will connect.
259 ; ; Rule can contain multiple remotes. One face will be created for each remote.
260 ; ; All FaceUris must be in canonical form. Currently only udp4 and udp6 are supported.
261 ; remote udp4://192.0.2.1:6363
262 ;
263 ; ; Whitelist and blacklist can contain, in no particular order:
264 ; ; - interface names, including wildcard patterns (e.g., 'ifname eth0', 'ifname en*', 'ifname wlp?s0')
265 ; ; - MAC addresses (e.g., 'ether 85:3b:4d:d3:5f:c2')
266 ; ; - IPv4 subnets (e.g., 'subnet 192.0.2.0/24')
267 ; ; - IPv6 subnets (e.g., 'subnet 2001:db8::/32')
268 ; ; - a single asterisk ('*') that matches all interfaces
269 ; ; By default, all interfaces are whitelisted.
270 ; whitelist
271 ; {
272 ; *
273 ; }
274 ; blacklist
275 ; {
276 ; }
277 ; }
278 }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600279}
280
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600281; The authorizations section grants privileges to authorized keys.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600282authorizations
283{
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600284 ; An authorize section grants privileges to a NDN certificate.
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600285 authorize
286 {
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600287 ; If you do not already have NDN certificate, you can generate
288 ; one with the following commands.
289 ;
290 ; 1. Generate and install a self-signed identity certificate:
291 ;
Davide Pesaventod69070e2021-06-04 18:50:52 -0400292 ; ndnsec key-gen /$(whoami) | ndnsec cert-install -
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600293 ;
Davide Pesaventod69070e2021-06-04 18:50:52 -0400294 ; Note that the argument to 'ndnsec key-gen' will be the identity name of
295 ; the new key (in this case, /your-username). Identities are hierarchical
296 ; NDN names and may have multiple components (e.g., /ndn/ucla/edu/alice).
297 ; You may create additional keys and identities as needed.
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600298 ;
Davide Pesaventod69070e2021-06-04 18:50:52 -0400299 ; 2. Export the certificate to a file:
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600300 ;
Davide Pesaventod69070e2021-06-04 18:50:52 -0400301 ; ndnsec cert-dump -i /$(whoami) > default.ndncert
302 ; sudo mkdir -p @SYSCONFDIR@/ndn/keys
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600303 ; sudo mv default.ndncert @SYSCONFDIR@/ndn/keys/default.ndncert
304 ;
Davide Pesavento4c957712024-01-01 15:40:06 -0500305 ; The 'certfile' field below specifies the default key directory for
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600306 ; your machine. You may move your newly created key to the location it
307 ; specifies or path.
308
Yingdi Yuc8f214c2014-04-29 20:39:37 -0700309 ; certfile keys/default.ndncert ; NDN identity certificate file
Davide Pesavento4c957712024-01-01 15:40:06 -0500310 certfile any ; 'any' authorizes command interests signed under any certificate,
Yingdi Yuc8f214c2014-04-29 20:39:37 -0700311 ; i.e., no actual validation.
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600312 privileges ; set of privileges granted to this identity
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600313 {
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600314 faces
315 fib
Junxiao Shic9b5e012018-02-07 15:04:18 +0000316 cs
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600317 strategy-choice
318 }
319 }
Steve DiBenedetto1a3c6732014-03-13 06:44:05 -0600320
321 ; You may have multiple authorize sections that specify additional
322 ; certificates and their privileges.
323
Alexander Afanasyev885a85b2014-04-12 21:01:13 -0700324 ; authorize
325 ; {
326 ; certfile keys/this_cert_does_not_exist.ndncert
327 ; authorize
328 ; privileges
329 ; {
330 ; faces
331 ; }
332 ; }
Steve DiBenedetto84da5bf2014-03-11 14:51:29 -0600333}
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700334
Yingdi Yue5224e92014-04-29 18:04:02 -0700335rib
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700336{
Yingdi Yue5224e92014-04-29 18:04:02 -0700337 ; The following localhost_security allows anyone to register routing entries in local RIB
338 localhost_security
339 {
340 trust-anchor
341 {
342 type any
343 }
344 }
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700345
Yingdi Yue5224e92014-04-29 18:04:02 -0700346 ; localhop_security should be enabled when NFD runs on a hub.
347 ; "/localhop/nfd/fib" command prefix will be disabled when localhop_security section is missing.
348 ; localhop_security
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700349 ; {
Yingdi Yue5224e92014-04-29 18:04:02 -0700350 ; ; This section defines the trust model for NFD RIB Management. It consists of rules and
351 ; ; trust-anchors, which are briefly defined in this file. For more information refer to
Chavoosh Ghasemi60b7d512017-08-10 17:17:46 -0700352 ; ; validator configuration file format documentation:
Yingdi Yue5224e92014-04-29 18:04:02 -0700353 ; ;
Davide Pesaventobf4c1312023-02-23 20:32:01 -0500354 ; ; https://docs.named-data.net/ndn-cxx/current/tutorials/security-validator-config.html
Yingdi Yue5224e92014-04-29 18:04:02 -0700355 ; ;
356 ; ; A trust-anchor is a pre-trusted certificate. This can be any certificate that is the
357 ; ; root of certification chain (e.g., NDN testbed root certificate) or an existing
358 ; ; default system certificate `default.ndncert`.
359 ; ;
360 ; ; A rule defines conditions a valid packet MUST have. A packet must satisfy one of the
361 ; ; rules defined here. A rule can be broken into two parts: matching & checking. A packet
362 ; ; will be matched against rules from the first to the last until a matched rule is
363 ; ; encountered. The matched rule will be used to check the packet. If a packet does not
364 ; ; match any rule, it will be treated as invalid. The matching part of a rule consists
365 ; ; of `for` and `filter` sections. They collectively define which packets can be checked
366 ; ; with this rule. `for` defines packet type (data or interest) and `filter` defines
367 ; ; conditions on other properties of a packet. Right now, you can only define conditions
368 ; ; on packet name, and you can only specify ONLY ONE filter for packet name. The
369 ; ; checking part of a rule consists of `checker`, which defines the conditions that a
370 ; ; VALID packet MUST have. See comments in checker section for more details.
371 ;
372 ; rule
373 ; {
Junxiao Shi6aecc502021-02-07 13:11:56 -0700374 ; id "RIB Command Interest"
375 ; for interest
Alexander Afanasyev5e02c042021-12-21 14:47:32 -0500376 ; ; match Commmand Interest name (either in v0.3 or v0.2 format)
Yingdi Yue5224e92014-04-29 18:04:02 -0700377 ; filter
378 ; {
Junxiao Shi6aecc502021-02-07 13:11:56 -0700379 ; type name
Alexander Afanasyev5e02c042021-12-21 14:47:32 -0500380 ; regex ^<localhop><nfd><rib>[<register><unregister>]<>{1,3}$
Yingdi Yue5224e92014-04-29 18:04:02 -0700381 ; }
382 ; checker
383 ; {
384 ; type customized
Junxiao Shi6aecc502021-02-07 13:11:56 -0700385 ; sig-type ecdsa-sha256
386 ; ; KeyLocator must be either a key name or a certificate name
Yingdi Yue5224e92014-04-29 18:04:02 -0700387 ; key-locator
388 ; {
Junxiao Shi6aecc502021-02-07 13:11:56 -0700389 ; type name
390 ; regex ^<>*<KEY><>{1,3}$
Yingdi Yue5224e92014-04-29 18:04:02 -0700391 ; }
392 ; }
393 ; }
394 ; rule
395 ; {
Junxiao Shi6aecc502021-02-07 13:11:56 -0700396 ; id "NDN Testbed Certificate Hierarchy"
397 ; for data
398 ; ; match certificate name only
Yingdi Yue5224e92014-04-29 18:04:02 -0700399 ; filter
400 ; {
Junxiao Shi6aecc502021-02-07 13:11:56 -0700401 ; type name
402 ; regex ^<>*<KEY><>{3}$
Yingdi Yue5224e92014-04-29 18:04:02 -0700403 ; }
404 ; checker
405 ; {
Junxiao Shi6aecc502021-02-07 13:11:56 -0700406 ; type customized
407 ; sig-type ecdsa-sha256
408 ; key-locator
409 ; {
410 ; type name
411 ; ; issuer subject name must be a prefix of issued certificate name
412 ; hyper-relation
413 ; {
414 ; k-regex ^(<>*)<KEY><>{1,3}$
415 ; k-expand \\1
416 ; h-relation is-prefix-of
417 ; p-regex ^(<>*)$
418 ; p-expand \\1
419 ; }
420 ; }
Yingdi Yue5224e92014-04-29 18:04:02 -0700421 ; }
422 ; }
423 ; trust-anchor
424 ; {
425 ; type file
Junxiao Shi6aecc502021-02-07 13:11:56 -0700426 ; ; certificate path, relative to this config file
427 ; file-name keys/default.ndncert
Yingdi Yue5224e92014-04-29 18:04:02 -0700428 ; }
Junxiao Shi6aecc502021-02-07 13:11:56 -0700429 ; ; trust-anchor entry may be repeated to specify multiple trust anchors
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700430 ; }
Yanbiao Lic17de832014-11-21 17:51:45 -0800431
Yanbiao Lib9d439d2014-12-11 16:12:32 -0800432 ; The following localhop_security should be enabled when NFD runs on a hub,
433 ; which accepts all remote registrations and is a short-term solution.
434 ; localhop_security
435 ; {
436 ; trust-anchor
437 ; {
438 ; type any
439 ; }
440 ; }
441
Teng Liang18c2b292019-10-18 14:31:04 -0700442 ; The following prefix_announcement_validation accepts any prefix announcement
443 prefix_announcement_validation
444 {
445 trust-anchor
446 {
447 type any
448 }
449 }
450
Yanbiao Lid7c96362015-01-30 23:58:24 -0800451 auto_prefix_propagate
Yanbiao Lic17de832014-11-21 17:51:45 -0800452 {
453 cost 15 ; forwarding cost of prefix registered on remote router
Yanbiao Lid7c96362015-01-30 23:58:24 -0800454 timeout 10000 ; timeout (in milliseconds) of prefix registration command for propagation
Yanbiao Lic17de832014-11-21 17:51:45 -0800455
Yanbiao Lid7c96362015-01-30 23:58:24 -0800456 refresh_interval 300 ; interval (in seconds) before refreshing the propagation
Yanbiao Lic17de832014-11-21 17:51:45 -0800457 ; This setting should be less than face_system.udp.idle_time,
458 ; so that the face is kept alive on the remote router.
Yanbiao Lid7c96362015-01-30 23:58:24 -0800459
460 base_retry_wait 50 ; base wait time (in seconds) before retrying propagation
461 max_retry_wait 3600 ; maximum wait time (in seconds) before retrying propagation
462 ; for consequent retries, the wait time before each retry is calculated based on the back-off
463 ; policy. Initially, the wait time is set to base_retry_wait, then it will be doubled for every
464 ; retry unless beyond the max_retry_wait, in which case max_retry_wait is set as the wait time.
Yanbiao Lic17de832014-11-21 17:51:45 -0800465 }
Nick Gordon9fcf1232017-03-10 22:30:20 +0000466
467 ; If enabled, routes registered with origin=client (typically from auto_prefix_propagate)
468 ; will be readvertised into local NLSR daemon.
469 readvertise_nlsr no
Alexander Afanasyev89cf5e02014-04-17 12:08:57 -0700470}