Project

General

Profile

Configuration File Format

NLSR is configured using an INFO file.

Example configuration

; the general section contains all the general settings for router

general
{
; mandatory configuration command section network, site and router

    network /ndn                    ; name of the network the router belongs to in ndn URI format
    site /edu/memphis               ; name of the site the router belongs to in ndn URI format
    router /%C1.Router/cs/pollux    ; name of the network the router belongs to in ndn URI format

; lsa-refresh-time is the time in seconds, after which router will refresh its LSAs

    lsa-refresh-time 1800      ; default value 1800. Valid values 240-7200

; log-level is to set the levels of log for NLSR

    log-level  INFO            ; default value INFO, valid value DEBUG, INFO
}

; the neighbors section contains the configuration for router's neighbors and hello's behavior

neighbors
{
; in case hello interest timed out, router will try 'hello-retries' times at 'hello-time-out' 
; seconds interval before giving up for any neighbors (deciding link is down)     

   hello-retries 3                     ; interest retries number in integer. Default value 3
                                       ; valid values 1-10

   hello-timeout 1                     ; interest time out value for hello interest. Default
                                       ; value 1, Valid values 1-15

   hello-interval  60                  ; hello interest sending interval in seconds. Default value 60
                                       ; valid values 30-90
; neighbor command is used to configure router's neighbor. Each neighbor will need
; one block of neighbor command

   neighbor
   {
       name /ndn/memphis.edu/cs/castor        ; name prefix of the neighbor router consists
                                              ; of network, site-name and router-name

       face-uri  udp://castor.cs.memphis.edu  ; face Uri of the face connected to the neighbor
       link-cost 20                           ; cost of the connecting link to neighbor
   }
}

; the hyperbolic section contains the configuration settings of enabling a router to calculate
; routing table using [hyperbolic routing table calculation](http://arxiv.org/abs/0805.1266) method

hyperbolic
{
; commands in this section follows a strict order
; the switch is used to set hyperbolic routing calculation in NLSR

    state off              ; default value 'off', set value 'on' to enable hyperbolic routing table 
                           ; calculation which turns link state routing 'off'. set value to 'dry-run"
                           ; to test hyperbolic routing and compare with link state routing.


    radius   123.456       ; radius of the router in hyperbolic coordinate system
    angle    1.45          ; angle of the router in hyperbolic coordinate system
}


; the fib section is used to configure parameters related to FIB computation

fib
{
; the max-faces-per-prefix is used to limit the number of faces for each name prefix
; by NLSR in ndn FIB

    max-faces-per-prefix 3   ; default value 0. Valid value 0-60. By default (value 0) NLSR adds
                             ; all available faces for each reachable name prefixes in NDN FIB

}

; the advertising section contains the configuration settings of the name prefixes 
; hosted by this router

advertising
{
; to advertise name prefixes owned by or directly reachable by the router,
; configure one block of prefix configuration command for every name

    prefix /ndn/edu/memphis/cs/netlab           ; name in ndn URI format
    prefix /ndn/edu/memphis/sports/basketball 
}

security
{
  validator
  {
    rule
    {
      id "NSLR Hello Rule"
      for data
      filter
      {
        type name
        regex ^[^<NLSR><INFO>]*<NLSR><INFO><><>$
      }
      checker
      {
        type customized
        sig-type rsa-sha256
        key-locator
        {
          type name
          hyper-relation
          {
            k-regex ^([^<KEY><NLSR>]*)<NLSR><KEY><ksk-.*><ID-CERT>$
            k-expand \\1
            h-relation equal
            p-regex ^([^<NLSR><INFO>]*)<NLSR><INFO><><>$
            p-expand \\1
          }
        }
      }
    }

    rule
    {
      id "NSLR LSA Rule"
      for data
      filter
      {
        type name
        regex ^[^<NLSR><LSA>]*<NLSR><LSA>
      }
      checker
      {
        type customized
        sig-type rsa-sha256
        key-locator
        {
          type name
          hyper-relation
          {
            k-regex ^([^<KEY><NLSR>]*)<NLSR><KEY><ksk-.*><ID-CERT>$
            k-expand \\1
            h-relation equal
            p-regex ^([^<NLSR><LSA>]*)<NLSR><LSA>(<>*)<><><>$
            p-expand \\1\\2
          }
        }
      }
    }

    rule
    {
      id "NSLR Hierarchy Exception Rule"
      for data
      filter
      {
        type name
        regex ^[^<KEY><%C1.Router>]*<%C1.Router>[^<KEY><NLSR>]*<KEY><ksk-.*><ID-CERT><>$
      }
      checker
      {
        type customized
        sig-type rsa-sha256
        key-locator
        {
          type name
          hyper-relation
          {
         k-regex ^([^<KEY><%C1.Operator>]*)<%C1.Operator>[^<KEY>]*<KEY><ksk-.*><ID-CERT>$
             k-expand \\1
             h-relation equal
             p-regex ^([^<KEY><%C1.Router>]*)<%C1.Router>[^<KEY>]*<KEY><ksk-.*><ID-CERT><>$
             p-expand \\1
          }
        }
      }
    }

    rule
    {
      id "NSLR Hierarchical Rule"
      for data
      filter
      {
        type name
        regex ^[^<KEY>]*<KEY><ksk-.*><ID-CERT><>$
      }
      checker
      {
        type hierarchical
        sig-type rsa-sha256
      }
    }

    trust-anchor
    {
      type file
      file-name "root.cert"
    }
  }
  ; cert-to-publish "root.cert"  ; optional, a file containing the root certificate. only the router
                                 ; that is designated to publish root cert needs to specify this
  ; cert-to-publish "site.cert"  ; optional, a file containing the site certificate. only the router
                                 ; that is designated to publish site cert need to specify this
  ; cert-to-publish "operator.cert" ; optional, a file containing the operator certificate. only the
                                    ; router that is designated to publish operator cert need to
                                    ; specify this
  cert-to-publish "router.cert"  ; required, a file containing the router certificate.
}