Configuration File Format » History » Version 1
A K M Mahmudul Hoque, 05/05/2014 08:30 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 | ; the router section contains the setting of network, site name |
||
| 8 | ; and router name which all together makes router-prefix |
||
| 9 | |||
| 10 | router |
||
| 11 | { |
||
| 12 | network |
||
| 13 | { |
||
| 14 | name /ndn ; name prefix of the network router belongs to |
||
| 15 | } ; must be in ndn URI format |
||
| 16 | |||
| 17 | site-name |
||
| 18 | { |
||
| 19 | name /memphis.edu ; name prefix of the site name router belongs to |
||
| 20 | } ; must be in ndn URI format |
||
| 21 | |||
| 22 | router-name |
||
| 23 | { |
||
| 24 | name /cs/pollux ; name prefix of the router |
||
| 25 | } ; must be in ndn URI format |
||
| 26 | } |
||
| 27 | |||
| 28 | ; the hello section describes the configuration settings for NLSR hello protocol |
||
| 29 | |||
| 30 | hello |
||
| 31 | { |
||
| 32 | ; neighbor command is used to configure router's neighbor. Each neighbor will need |
||
| 33 | ; one block of neighbor command |
||
| 34 | |||
| 35 | neighbor |
||
| 36 | { |
||
| 37 | name /ndn/memphis.edu/cs/castor ; name prefix of the neighbor router consists |
||
| 38 | ; of network, site-name and router-name |
||
| 39 | |||
| 40 | host cs.castor.memphis.edu ; hostname or ip address of neighbor router |
||
| 41 | link-cost 20.6 ; cost of the connecting link to neighbor |
||
| 42 | } |
||
| 43 | |||
| 44 | ; interest-retry command is used to configure the interval of hello interest and number |
||
| 45 | ; of retry interests before a router gives up in case of interest timed out |
||
| 46 | |||
| 47 | interest-retry |
||
| 48 | { |
||
| 49 | number 3 ; interest retry number in integer. Default value 3 |
||
| 50 | ; valid values 1-10 |
||
| 51 | |||
| 52 | interval 10 ; interest sending interval in seconds. Default value 1 |
||
| 53 | ; valid values 1-15 |
||
| 54 | } |
||
| 55 | } |
||
| 56 | |||
| 57 | ; the synchronization section contains all the configuration settings for router's update |
||
| 58 | ; synchronization with neighbors in the network |
||
| 59 | |||
| 60 | synchronization |
||
| 61 | { |
||
| 62 | ; |
||
| 63 | |||
| 64 | sync-prefix |
||
| 65 | { |
||
| 66 | name /ndn/nlsr/sync ; |
||
| 67 | } |
||
| 68 | |||
| 69 | lsa-refresh-time |
||
| 70 | { |
||
| 71 | seconds 1800 ; |
||
| 72 | } |
||
| 73 | } |
||
| 74 | |||
| 75 | ; the face_system section defines what faces and channels are created |
||
| 76 | face_system |
||
| 77 | { |
||
| 78 | ; the unix section contains settings of UNIX stream faces and channels |
||
| 79 | unix |
||
| 80 | { |
||
| 81 | listen yes ; set to 'no' to disable UNIX stream listener, default 'yes' |
||
| 82 | path /var/run/nfd.sock ; UNIX stream listener path |
||
| 83 | } |
||
| 84 | |||
| 85 | ; the tcp section contains settings of TCP faces and channels |
||
| 86 | tcp |
||
| 87 | { |
||
| 88 | listen yes ; set to 'no' to disable TCP listener, default 'yes' |
||
| 89 | port 6363 ; TCP listener port number |
||
| 90 | } |
||
| 91 | |||
| 92 | ; the udp section contains settings of UDP faces and channels |
||
| 93 | udp |
||
| 94 | { |
||
| 95 | port 6363 ; UDP unicast port number |
||
| 96 | idle_timeout 30 ; idle time (seconds) before closing a UDP unicast face |
||
| 97 | keep_alive_interval 25; interval (seconds) between keep-alive refreshes |
||
| 98 | |||
| 99 | ; NFD creates one UDP multicast face per NIC |
||
| 100 | mcast yes ; set to 'no' to disable UDP multicast, default 'yes' |
||
| 101 | mcast_port 56363 ; UDP multicast port number |
||
| 102 | mcast_group 224.0.23.170 ; UDP multicast group (IPv4 only) |
||
| 103 | } |
||
| 104 | |||
| 105 | ; the ether section contains settings of Ethernet faces and channels |
||
| 106 | ether |
||
| 107 | { |
||
| 108 | ; NFD creates one Ethernet multicast face per NIC |
||
| 109 | mcast yes ; set to 'no' to disable Ethernet multicast, default 'yes' |
||
| 110 | mcast_group 01:00:5E:00:17:AA ; Ethernet multicast group |
||
| 111 | } |
||
| 112 | } |