Configuration File Format » History » Version 27
Lan Wang, 09/19/2014 04:41 AM
| 1 | 1 | A K M Mahmudul Hoque | ## Configuration File Format |
|---|---|---|---|
| 2 | |||
| 3 | NLSR is configured using an [INFO file](http://www.boost.org/doc/libs/1_42_0/doc/html/boost_propertytree/parsers.html#boost_propertytree.parsers.info_parser). |
||
| 4 | |||
| 5 | ## Example configuration |
||
| 6 | |||
| 7 | 16 | A K M Mahmudul Hoque | ; the general section contains all the general settings for router |
| 8 | |||
| 9 | general |
||
| 10 | { |
||
| 11 | 17 | A K M Mahmudul Hoque | ; mandatory configuration command section network, site and router |
| 12 | |||
| 13 | 26 | A K M Mahmudul Hoque | network /ndn ; name of the network the router belongs to in ndn URI format |
| 14 | site /edu/memphis ; name of the site the router belongs to in ndn URI format |
||
| 15 | router /%C1.Router/cs/pollux ; name of the network the router belongs to in ndn URI format |
||
| 16 | 17 | A K M Mahmudul Hoque | |
| 17 | 16 | A K M Mahmudul Hoque | ; lsa-refresh-time is the time in seconds, after which router will refresh its LSAs |
| 18 | 8 | A K M Mahmudul Hoque | |
| 19 | 9 | A K M Mahmudul Hoque | lsa-refresh-time 1800 ; default value 1800. Valid values 240-7200 |
| 20 | |||
| 21 | ; log-level is to set the levels of log for NLSR |
||
| 22 | 1 | A K M Mahmudul Hoque | |
| 23 | log-level INFO ; default value INFO, valid value DEBUG, INFO |
||
| 24 | } |
||
| 25 | |||
| 26 | 18 | A K M Mahmudul Hoque | ; the neighbors section contains the configuration for router's neighbors and hello's behavior |
| 27 | |||
| 28 | neighbors |
||
| 29 | 1 | A K M Mahmudul Hoque | { |
| 30 | 20 | A K M Mahmudul Hoque | ; in case hello interest timed out, router will try 'hello-retries' times at 'hello-time-out' |
| 31 | 18 | A K M Mahmudul Hoque | ; seconds interval before giving up for any neighbors (deciding link is down) |
| 32 | 16 | A K M Mahmudul Hoque | |
| 33 | 18 | A K M Mahmudul Hoque | hello-retries 3 ; interest retries number in integer. Default value 3 |
| 34 | 16 | A K M Mahmudul Hoque | ; valid values 1-10 |
| 35 | 1 | A K M Mahmudul Hoque | |
| 36 | 25 | Lan Wang | hello-timeout 1 ; interest time out value for hello interest. Default |
| 37 | 20 | A K M Mahmudul Hoque | ; value 1, Valid values 1-15 |
| 38 | |||
| 39 | hello-interval 60 ; hello interest sending interval in seconds. Default value 60 |
||
| 40 | ; valid values 30-90 |
||
| 41 | 9 | A K M Mahmudul Hoque | ; neighbor command is used to configure router's neighbor. Each neighbor will need |
| 42 | 1 | A K M Mahmudul Hoque | ; one block of neighbor command |
| 43 | 9 | A K M Mahmudul Hoque | |
| 44 | 1 | A K M Mahmudul Hoque | neighbor |
| 45 | { |
||
| 46 | 12 | A K M Mahmudul Hoque | name /ndn/memphis.edu/cs/castor ; name prefix of the neighbor router consists |
| 47 | ; of network, site-name and router-name |
||
| 48 | 1 | A K M Mahmudul Hoque | |
| 49 | 22 | A K M Mahmudul Hoque | face-uri udp://castor.cs.memphis.edu ; face Uri of the face connected to the neighbor |
| 50 | 25 | Lan Wang | link-cost 20 ; cost of the connecting link to neighbor |
| 51 | 1 | A K M Mahmudul Hoque | } |
| 52 | } |
||
| 53 | |||
| 54 | ; the hyperbolic section contains the configuration settings of enabling a router to calculate |
||
| 55 | 3 | A K M Mahmudul Hoque | ; routing table using [hyperbolic routing table calculation](http://arxiv.org/abs/0805.1266) method |
| 56 | |||
| 57 | hyperbolic |
||
| 58 | { |
||
| 59 | 9 | A K M Mahmudul Hoque | ; commands in this section follows a strict order |
| 60 | 2 | A K M Mahmudul Hoque | ; the switch is used to set hyperbolic routing calculation in NLSR |
| 61 | 1 | A K M Mahmudul Hoque | |
| 62 | 9 | A K M Mahmudul Hoque | state off ; default value 'off', set value 'on' to enable hyperbolic routing table |
| 63 | 4 | A K M Mahmudul Hoque | ; calculation which turns link state routing 'off'. set value to 'dry-run" |
| 64 | 9 | A K M Mahmudul Hoque | ; to test hyperbolic routing and compare with link state routing. |
| 65 | |||
| 66 | 1 | A K M Mahmudul Hoque | |
| 67 | 9 | A K M Mahmudul Hoque | radius 123.456 ; radius of the router in hyperbolic coordinate system |
| 68 | angle 1.45 ; angle of the router in hyperbolic coordinate system |
||
| 69 | 5 | A K M Mahmudul Hoque | } |
| 70 | 1 | A K M Mahmudul Hoque | |
| 71 | |||
| 72 | 23 | Lan Wang | ; the fib section is used to configure parameters related to FIB computation |
| 73 | 1 | A K M Mahmudul Hoque | |
| 74 | fib |
||
| 75 | { |
||
| 76 | 23 | Lan Wang | ; the max-faces-per-prefix is used to limit the number of faces for each name prefix |
| 77 | 1 | A K M Mahmudul Hoque | ; by NLSR in ndn FIB |
| 78 | |||
| 79 | max-faces-per-prefix 3 ; default value 0. Valid value 0-60. By default (value 0) NLSR adds |
||
| 80 | ; all available faces for each reachable name prefixes in NDN FIB |
||
| 81 | 14 | A K M Mahmudul Hoque | |
| 82 | } |
||
| 83 | 15 | A K M Mahmudul Hoque | |
| 84 | 14 | A K M Mahmudul Hoque | ; the advertising section contains the configuration settings of the name prefixes |
| 85 | ; hosted by this router |
||
| 86 | |||
| 87 | advertising |
||
| 88 | { |
||
| 89 | 25 | Lan Wang | ; to advertise name prefixes owned by or directly reachable by the router, |
| 90 | 21 | A K M Mahmudul Hoque | ; configure one block of prefix configuration command for every name |
| 91 | 1 | A K M Mahmudul Hoque | |
| 92 | prefix /ndn/edu/memphis/cs/netlab ; name in ndn URI format |
||
| 93 | prefix /ndn/edu/memphis/sports/basketball |
||
| 94 | 26 | A K M Mahmudul Hoque | } |
| 95 | |||
| 96 | security |
||
| 97 | { |
||
| 98 | validator |
||
| 99 | { |
||
| 100 | rule |
||
| 101 | { |
||
| 102 | id "NSLR Hello Rule" |
||
| 103 | for data |
||
| 104 | filter |
||
| 105 | { |
||
| 106 | type name |
||
| 107 | regex ^[^<NLSR><INFO>]*<NLSR><INFO><><>$ |
||
| 108 | } |
||
| 109 | checker |
||
| 110 | { |
||
| 111 | type customized |
||
| 112 | sig-type rsa-sha256 |
||
| 113 | key-locator |
||
| 114 | { |
||
| 115 | type name |
||
| 116 | hyper-relation |
||
| 117 | { |
||
| 118 | k-regex ^([^<KEY><NLSR>]*)<NLSR><KEY><ksk-.*><ID-CERT>$ |
||
| 119 | k-expand \\1 |
||
| 120 | h-relation equal |
||
| 121 | p-regex ^([^<NLSR><INFO>]*)<NLSR><INFO><><>$ |
||
| 122 | p-expand \\1 |
||
| 123 | } |
||
| 124 | } |
||
| 125 | } |
||
| 126 | } |
||
| 127 | |||
| 128 | rule |
||
| 129 | { |
||
| 130 | id "NSLR LSA Rule" |
||
| 131 | for data |
||
| 132 | filter |
||
| 133 | { |
||
| 134 | type name |
||
| 135 | regex ^[^<NLSR><LSA>]*<NLSR><LSA> |
||
| 136 | } |
||
| 137 | checker |
||
| 138 | { |
||
| 139 | type customized |
||
| 140 | sig-type rsa-sha256 |
||
| 141 | key-locator |
||
| 142 | { |
||
| 143 | type name |
||
| 144 | hyper-relation |
||
| 145 | { |
||
| 146 | k-regex ^([^<KEY><NLSR>]*)<NLSR><KEY><ksk-.*><ID-CERT>$ |
||
| 147 | k-expand \\1 |
||
| 148 | h-relation equal |
||
| 149 | p-regex ^([^<NLSR><LSA>]*)<NLSR><LSA>(<>*)<><><>$ |
||
| 150 | p-expand \\1\\2 |
||
| 151 | } |
||
| 152 | } |
||
| 153 | } |
||
| 154 | } |
||
| 155 | |||
| 156 | rule |
||
| 157 | { |
||
| 158 | id "NSLR Hierarchy Exception Rule" |
||
| 159 | for data |
||
| 160 | filter |
||
| 161 | { |
||
| 162 | type name |
||
| 163 | regex ^[^<KEY><%C1.Router>]*<%C1.Router>[^<KEY><NLSR>]*<KEY><ksk-.*><ID-CERT><>$ |
||
| 164 | } |
||
| 165 | checker |
||
| 166 | { |
||
| 167 | type customized |
||
| 168 | sig-type rsa-sha256 |
||
| 169 | key-locator |
||
| 170 | { |
||
| 171 | type name |
||
| 172 | hyper-relation |
||
| 173 | { |
||
| 174 | k-regex ^([^<KEY><%C1.Operator>]*)<%C1.Operator>[^<KEY>]*<KEY><ksk-.*><ID-CERT>$ |
||
| 175 | k-expand \\1 |
||
| 176 | h-relation equal |
||
| 177 | p-regex ^([^<KEY><%C1.Router>]*)<%C1.Router>[^<KEY>]*<KEY><ksk-.*><ID-CERT><>$ |
||
| 178 | p-expand \\1 |
||
| 179 | } |
||
| 180 | } |
||
| 181 | } |
||
| 182 | } |
||
| 183 | |||
| 184 | rule |
||
| 185 | { |
||
| 186 | id "NSLR Hierarchical Rule" |
||
| 187 | for data |
||
| 188 | filter |
||
| 189 | { |
||
| 190 | type name |
||
| 191 | regex ^[^<KEY>]*<KEY><ksk-.*><ID-CERT><>$ |
||
| 192 | } |
||
| 193 | checker |
||
| 194 | { |
||
| 195 | type hierarchical |
||
| 196 | sig-type rsa-sha256 |
||
| 197 | } |
||
| 198 | } |
||
| 199 | |||
| 200 | trust-anchor |
||
| 201 | { |
||
| 202 | type file |
||
| 203 | file-name "root.cert" |
||
| 204 | } |
||
| 205 | } |
||
| 206 | ; cert-to-publish "root.cert" ; optional, a file containing the root certificate. only the router |
||
| 207 | ; that is designated to publish root cert needs to specify this |
||
| 208 | 27 | Lan Wang | ; cert-to-publish "site.cert" ; optional, a file containing the site certificate. only the router |
| 209 | 26 | A K M Mahmudul Hoque | ; that is designated to publish site cert need to specify this |
| 210 | 27 | Lan Wang | ; cert-to-publish "operator.cert" ; optional, a file containing the operator certificate. only the |
| 211 | 26 | A K M Mahmudul Hoque | ; router that is designated to publish operator cert need to |
| 212 | ; specify this |
||
| 213 | cert-to-publish "router.cert" ; required, a file containing the router certificate. |
||
| 214 | 5 | A K M Mahmudul Hoque | } |