#
# The lispd LISP daemon configuration file
#
# You can can copy this file to /etc/lispd.conf or explicitly specify its path
# on the lispd command line:
#     lispd -f /path/to/lispd.conf
#


# General configuration
#
#   router-mode: on  -> LISP routing capabilities enabled: xTR
#                off -> LISP mobile node
#   debug: Specify the amount of debugging information lispd will print. On
#     production systems, with a stable configuration this should be set to
#     0. When experimenting, debugging issues, or preparing useful bug
#     reports, the value should be raised gradually. When reporting bugs,
#     developers may ask a specific value to be configured and logs be sent.
#     [0..3]
#   log-file: Specify log file used in daemon mode. If it is not specified,  
#     messages are written in syslog file
#   map-request-retries: The number of additional Map-Requests to send if the
#     first one times out. The non-configurable timeout value is 2 seconds.

router-mode            = off
debug                  = 3
log-file               = /var/log/lispd.log 
map-request-retries    = 2

# RLOC Probing configuration.
#
#   rloc-probe-interval: interval at which periodic RLOC probes are sent
#     (seconds). A value of 0 disables RLOC Probing
#   rloc-probe-retries: RLOC Probe retries before setting the locator with
#     status down. [0..5]
#   rloc-probe-retries-interval: interval at which RLOC probes retries are
#     sent (seconds) [1..#rloc-probe-interval]

rloc-probing {
    rloc-probe-interval             = 30
    rloc-probe-retries              = 2
    rloc-probe-retries-interval     = 5
}

# NAT Traversal configuration. 
#
#   nat_aware: check if the node is behind NAT
#
# Limitation of version 0.4.1 when nat_aware is enabled: 
#   - Only one interface is supported.
#   - Only one Map-Server and one Map-Resolver

nat-traversal {
        nat_aware   = off
}

# Map-Resolver configuration.
# Encapsulated Map-Requests are sent to these Map-Resolvers. You can define
# several Map-Resolvers. Encapsulated Map-Request messages will be sent to
# only to the first one (for now).
# If no Map-Resolver is configured, DDT Client mode is enabled automatically
#
#   address: IPv4 or IPv6 address or FQDN name of the Map-Resolver  

map-resolver = {
        2001:4c08:2016:2064::2
}

# DDT Client section.
# DDT configuration has prefernece over map-resolver configuration
#
#   ddt-client [on/off]: Obtain the mapping from EIDs to RLOCs through the DDT tree

ddt-client  = on

# DDT Encapsulated Map-Requests are sent to these ddt root node. You can define
# several ddt-root-node. DDT Encapsulated Map-Request messages will be sent to the
# ddt-root-node with higher priority (lowest value).
#
#   address: IPv4 or IPv6 address of the DDT root node
#   priority [0..255]: DDT root nodes with lower values are more preferable.
#   weight [0..255]: Not yet implemented

#ddt-root-node {
#        address     = <IPv4 or IPv6 address or FQDN name>
#        priority    = 1
#        weight      = 100
#}

# Some LISP beta-network (lisp4.net/lisp6.net) DDT root nodes

ddt-root-node {
        address     = 84.88.16.10
        priority    = 1
        weight      = 100
}

ddt-root-node {
        address     = 2001:40B0:1::F0F2
        priority    = 1
        weight      = 100
}

# Current LISP beta-network (lisp4.net/lisp6.net) DDT root nodes:
# IPv4: 
#      - csuc-ddt.rloc.lisp4.net: 84.88.16.10
#      - arin-ddt.rloc.lisp4.net: 192.149.252.136
#      - ripe-ddt.rloc.lisp4.net: 193.0.0.170
#      - vxnet-ddt.rloc.lisp4.net: 199.119.73.8
# IPv6:
#      - csuc-ddt.rloc.lisp6.net: 2001:40B0:1::F0F2
#      - arin-ddt.rloc.lisp6.net: 2001:500:4:12::5
#      - ripe-ddt.rloc.lisp6.net: 2001:610:240:5:193::170


# Map-Server configuration.
# Map-Registers are sent to this Map-Server. You can define several
# Map-Servers. Map-Register messages will be sent to all of them.
#
#   address: IPv4 or IPv6 address of the Map-Server
#   key-type: Only 1 supported (HMAC-SHA-1-96)
#   key: password to authenticate with the Map-Server
#   proxy-reply [on/off]: Configure Map-Server to Map-Reply on behalf of the xTR

map-server {
        address     = 2001:4c08:2016:2064::2
        key-type    = 1
        key         = xxxxxx
        proxy-reply = on
}

# IPv4/IPv6 EID of the node.
# One database-mapping structure is defined for each interface with RLOCs
# associated to this EID
#
#   eid-prefix: EID prefix (IPvX/mask) of the mapping 
#   interface: interface containing the RLOCs associated to this mapping 
#   priority_vX [0..255]: Priority for the IPvX RLOC of the interface. Locators
#     with lower values are more preferable. This is used for both incoming
#     policy announcements and outcoming traffic policy management. (A value
#     of -1  means that IPvX address of that interface is not used)
#   weight [0..255]: When priorities are the same for multiple RLOCs, the Weight
#     indicates how to balance unicast traffic between them.
#
# See Section 6.2 of RFC6839 for a detailed discussion of priority and weight
# usage:
# http://tools.ietf.org/html/rfc6830#section-6.2

database-mapping {
         eid-prefix     = 2610:D0:21A0::1/48
         interface      = wlan0
         priority_v4    = 1             # Priority of IPv4 locator of <interface_name> for this EID
         weight_v4      = 100           # Weight of IPv4 locator of <interface_name> for this EID
         priority_v6    = 1             # Priority of IPv6 locator of <interface_name> for this EID
         weight_v6      = 100           # Weight of IPv6 locator of <interface_name> for this EID
}

# Proxy-ETR configuration.
# Packets addressed to non-LISP sites will be encapsulated to this Proxy-ETR
# You can define several Proxy-ETR blocks. Traffic will be balanced according
# to priority and weight. you can try to use of the Proxy-ITRs from the bottom
# of this file, since they typically support Proxy-ETR functionality as well
# (if their name contains 'pxtr'). Try the one with the lowest latency (ping)
#
#   priority [0..255]: Proxy-ETR with lower values are more preferable.
#   weight [0..255]: When priorities are the same for multiple Proxy-ETRs,
#     the Weight indicates how to balance unicast traffic between them.

proxy-etr {
        address     = 2001:4f8:3:d::60
        priority    = 1
        weight      = 100
}

# List of PITRs to SMR on handover.
# Unless you know what you're doing, you should just use the preconfigured
# blocks at the end of this file.
#
#   address: IPv4 or IPv6 address or FQDN name of the Proxy-ITR
#
#proxy-itrs = {
#       2001:4f8:3:d::60
#}

# Current LISP beta-network (lisp4.net/lisp6.net) PITR addresses.
# Unless you know what you're doing, leave the following block
# uncommented.

# LISP beta-network PITRs
proxy-itrs = {
        69.31.31.98,                    # eqx-ash-pxtr
        149.20.48.60,                   # isc-pxtr
        198.6.255.37,                   # asp-pxtr
        173.36.193.25,                  # sjc-pxtr
        129.250.1.63,                   # ntt-amer-pxtr
        217.8.98.33,                    # intouch-pxtr-1
        217.8.98.35,                    # intouch-pxtr-2
        193.162.145.46,                 # tdc-pxtr
        158.38.1.92,                    # uninett-pxtr
        203.181.249.172,                # apan-pxtr
        202.51.247.10,                   # sg-nus-pxtr
        2001:590::451f:1f62,            # eqx-ash-pxtr
        2001:4f8:3:d::60,               # isc-pxtr
        2001:418:4:1:deaf:bebe::10d,    # asp-pxtr
        2001:418:0:1000::613,           # ntt-amer-pxtr
        2001:200:e000:17::17,           # intouch-pxtr-1
        2001:67C:21B4:108::b,           # intouch-pxtr-2
        2001:6c8:41:100:0:2:1:c,        # tdc-pxtr
        2001:700:0:52E::4,              # uninett-pxtr
        2001:67C:21B4:107::b            # apan-pxtr
}
