Merge "Add RPC to read per xtrId mappings for an EID."
authorVina Ermagan <vermagan@cisco.com>
Sat, 17 Sep 2016 00:49:31 +0000 (00:49 +0000)
committerGerrit Code Review <gerrit@opendaylight.org>
Sat, 17 Sep 2016 00:49:31 +0000 (00:49 +0000)
13 files changed:
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/lisp/IMapServerAsync.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/mapcache/IMappingSystem.java
mappingservice/api/src/main/java/org/opendaylight/lispflowmapping/interfaces/mappingservice/IMappingService.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/LispMappingService.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/MappingService.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/MappingSystem.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/lisp/MapServer.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/AbstractDataListener.java
mappingservice/implementation/src/main/java/org/opendaylight/lispflowmapping/implementation/mdsal/MappingDataListener.java
mappingservice/implementation/src/main/resources/lfm_RESTCONF.json.postman_collection
mappingservice/implementation/src/test/java/org/opendaylight/lispflowmapping/implementation/mdsal/MappingDataListenerTest.java
resources/tutorial/oor.conf.client [new file with mode: 0644]
resources/tutorial/oor.conf.server1 [new file with mode: 0644]

index 5466edd285349f7034e585864f386eb8e20724f9..26e444d1ef1adf44f9abe87f1890a2fb833d692d 100644 (file)
@@ -20,11 +20,4 @@ public interface IMapServerAsync extends IGenericMapServer {
      *            The map-register message
      */
     void handleMapRegister(MapRegister register);
-
-    /**
-     * Setter method.
-     * @param isMaster
-     *            is|isn't master
-     */
-    void setIsMaster(final boolean isMaster);
 }
index 5b39e4d8343ef1f078093bf057d1462448f6b625..c280064b0b4e7bc2c788db999bf6504d2f12260c 100644 (file)
@@ -202,4 +202,20 @@ public interface IMappingSystem {
      * @return String consisting of all mappings
      */
     String printMappings();
+
+    /**
+     * Set cluster master status.
+     *
+     * @param isMaster
+     *            is|isn't master
+     */
+    void setIsMaster(final boolean isMaster);
+
+    /**
+     * Get cluster master status.
+     *
+     * @return isMaster
+     *            is|isn't master
+     */
+    boolean isMaster();
 }
index 3bbc4b0bd17c43756c5678047cd617a2ab96aac9..20fc99d1045f2e1b821754ad82c0a2a694e2a3c3 100644 (file)
@@ -199,4 +199,20 @@ public interface IMappingService {
      * Cleans all cached mappings.Used for testing.
      */
     void cleanCachedMappings();
+
+    /**
+     * Set cluster master status.
+     *
+     * @param isMaster
+     *            is|isn't master
+     */
+    void setIsMaster(final boolean isMaster);
+
+    /**
+     * Get cluster master status.
+     *
+     * @return isMaster
+     *            is|isn't master
+     */
+    boolean isMaster();
 }
index 9e7bbd5de73b74b3a0a213ab62b36dd18f4c0aa6..f3e57b3a669de7124b940629222ba1fac3df9190 100644 (file)
@@ -286,13 +286,13 @@ public class LispMappingService implements IFlowMapping, IMapRequestResultHandle
 
     @Override
     public void instantiateServiceInstance() {
-        mapServer.setIsMaster(true);
+        mapService.setIsMaster(true);
     }
 
     @Override
     public ListenableFuture<Void> closeServiceInstance() {
-        if (mapServer != null) {
-            mapServer.setIsMaster(false);
+        if (mapService != null) {
+            mapService.setIsMaster(false);
         }
         return Futures.<Void>immediateFuture(null);
     }
index db2220c123077c3e7ba1913399fc4fb250619e5f..d5feb2982a6b776bda962ca777d649fdc9d17ddf 100644 (file)
@@ -93,6 +93,7 @@ public class MappingService implements OdlMappingserviceService, IMappingService
     private boolean overwritePolicy = ConfigIni.getInstance().mappingOverwriteIsSet();
     private boolean notificationPolicy = ConfigIni.getInstance().smrIsSet();
     private boolean iterateMask = true;
+    private boolean isMaster = false;
 
     public MappingService(final DataBroker broker,
             final NotificationPublishService notificationPublishService,
@@ -508,4 +509,15 @@ public class MappingService implements OdlMappingserviceService, IMappingService
         }
         return originalLocators;
     }
+
+    @Override
+    public void setIsMaster(boolean isMaster) {
+        this.isMaster = isMaster;
+        mappingSystem.setIsMaster(isMaster);
+    }
+
+    @Override
+    public boolean isMaster() {
+        return isMaster;
+    }
 }
index 1b3ca2b8d049b88d919f69e487e44a0a4e79f76b..47f7c70146f29beb080132c730e72f1ea0f4ca3f 100644 (file)
@@ -62,6 +62,7 @@ public class MappingSystem implements IMappingSystem {
     private IMapCache pmc;
     private final EnumMap<MappingOrigin, IMapCache> tableMap = new EnumMap<>(MappingOrigin.class);
     private DataStoreBackEnd dsbe;
+    private boolean isMaster = false;
 
     public MappingSystem(ILispDAO dao, boolean iterateMask, boolean notifications, boolean overwrite) {
         this.dao = dao;
@@ -360,4 +361,14 @@ public class MappingSystem implements IMappingSystem {
         dao.removeAll();
         buildMapCaches();
     }
+
+    @Override
+    public void setIsMaster(boolean isMaster) {
+        this.isMaster = isMaster;
+    }
+
+    @Override
+    public boolean isMaster() {
+        return isMaster;
+    }
 }
index cbcae4680fd995aa0ccf7d6436fa607a26b89589..b5e125962a828af27bafefab66c8419f90f2d80b 100644 (file)
@@ -69,7 +69,6 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener {
     private IMapNotifyHandler notifyHandler;
     private NotificationService notificationService;
     private ListenerRegistration<MapServer> mapServerListenerRegistration;
-    private boolean isMaster = false;
 
     public MapServer(IMappingService mapService, boolean subscriptionService,
                      IMapNotifyHandler notifyHandler, NotificationService notificationService) {
@@ -164,11 +163,6 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener {
         }
     }
 
-    @Override
-    public void setIsMaster(boolean isMaster) {
-        this.isMaster = isMaster;
-    }
-
     private static List<TransportAddress> getTransportAddresses(Set<IpAddressBinary> addresses) {
         List<TransportAddress> rlocs = new ArrayList<TransportAddress>();
         for (IpAddressBinary address : addresses) {
@@ -187,7 +181,7 @@ public class MapServer implements IMapServerAsync, OdlMappingserviceListener {
     @Override
     public void onMappingChanged(MappingChanged notification) {
         if (subscriptionService) {
-            if (isMaster) {
+            if (mapService.isMaster()) {
                 sendSmrs(notification.getMappingRecord(), getSubscribers(notification.getMappingRecord().getEid()));
             }
             if (notification.getChangeType().equals(MappingChange.Removed)) {
index 9d84797044db3bbfd77583d83692ae3ab3a1eb7e..13704a5133cfd1b7c9db6a635903df2d6676d1b6 100644 (file)
@@ -22,17 +22,22 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
 public abstract class AbstractDataListener<T extends DataObject> implements ClusteredDataTreeChangeListener<T> {
     private DataBroker broker;
     private InstanceIdentifier<T> path;
-    private ListenerRegistration<ClusteredDataTreeChangeListener<T>> registration;
+    private ListenerRegistration<ClusteredDataTreeChangeListener<T>> configRegistration;
+    private ListenerRegistration<ClusteredDataTreeChangeListener<T>> operRegistration;
 
     public void registerDataChangeListener() {
-        final DataTreeIdentifier<T> dataTreeIdentifier = new DataTreeIdentifier<>(LogicalDatastoreType.CONFIGURATION,
-                path);
+        final DataTreeIdentifier<T> configDataTreeIdentifier = new DataTreeIdentifier<>(
+                LogicalDatastoreType.CONFIGURATION, path);
+        final DataTreeIdentifier<T> operDataTreeIdentifier = new DataTreeIdentifier<>(
+                LogicalDatastoreType.OPERATIONAL, path);
 
-        registration = broker.registerDataTreeChangeListener(dataTreeIdentifier, this);
+        configRegistration = broker.registerDataTreeChangeListener(configDataTreeIdentifier, this);
+        operRegistration = broker.registerDataTreeChangeListener(operDataTreeIdentifier, this);
     }
 
     public void closeDataChangeListener() {
-        registration.close();
+        configRegistration.close();
+        operRegistration.close();
     }
 
     public void setBroker(DataBroker broker) {
index 9c0f30a78670e199b7b3b45af4046ae26c82c68e..1105db92eac58edd6922be2fe8fc135206943711 100644 (file)
@@ -43,6 +43,7 @@ public class MappingDataListener extends AbstractDataListener<Mapping> {
     private static final Logger LOG = LoggerFactory.getLogger(MappingDataListener.class);
     private IMappingSystem mapSystem;
     private NotificationPublishService notificationPublishService;
+    private boolean isMaster = false;
 
     public MappingDataListener(DataBroker broker, IMappingSystem msmr, NotificationPublishService nps) {
         setBroker(broker);
@@ -73,8 +74,8 @@ public class MappingDataListener extends AbstractDataListener<Mapping> {
                 final Mapping mapping = mod.getDataBefore();
 
                 // Only treat mapping changes caused by Northbound, since Southbound changes are already handled
-                // before being persisted.
-                if (mapping.getOrigin() == MappingOrigin.Southbound) {
+                // before being persisted, except for cluster slaves
+                if (mapping.getOrigin() == MappingOrigin.Southbound && mapSystem.isMaster()) {
                     continue;
                 }
 
@@ -97,8 +98,9 @@ public class MappingDataListener extends AbstractDataListener<Mapping> {
                 final Mapping mapping = mod.getDataAfter();
 
                 // Only treat mapping changes caused by Northbound, since Southbound changes are already handled
-                // before being persisted. XXX separate NB and SB to avoid ignoring SB notifications
-                if (mapping.getOrigin() == MappingOrigin.Southbound) {
+                // before being persisted, except for cluster slaves XXX separate NB and SB to avoid ignoring
+                // SB notifications
+                if (mapping.getOrigin() == MappingOrigin.Southbound && mapSystem.isMaster()) {
                     continue;
                 }
 
index 4e8244c85b07535228d7fb0ece5eb88fdcc7b539..40b14a11403410b3a6af9f7a69f84d56cc253e4e 100644 (file)
@@ -31,7 +31,7 @@
                {
                        "id": "0a415355-0f58-bebd-a76e-39bdab46cbf6",
                        "headers": "Authorization: Basic YWRtaW46YWRtaW4=\nContent-Type: application/json\n",
-                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/odl-mappingservice:mapping-database/instance-id/0/authentication-key/ipv4:192.0.2.1%2f32/",
+                       "url": "http://{{controllerHost}}:{{restconfPort}}/restconf/config/odl-mappingservice:mapping-database/virtual-network-identifier/0/authentication-key/ipv4:192.0.2.1%2f32/",
                        "preRequestScript": "",
                        "pathVariables": {},
                        "method": "DELETE",
index 30e96242721b3f26b7b61384a5616166283ada09..ec47e929d68c278d8c5740254fa43c133b131bae 100644 (file)
@@ -89,6 +89,7 @@ public class MappingDataListenerTest {
         Mockito.when(mod_del.getModificationType()).thenReturn(ModificationType.DELETE);
         Mockito.when(mod_subtreeModified.getModificationType()).thenReturn(ModificationType.SUBTREE_MODIFIED);
         Mockito.when(mod_write.getModificationType()).thenReturn(ModificationType.WRITE);
+        Mockito.when(iMappingSystemMock.isMaster()).thenReturn(true);
     }
 
     /**
@@ -117,7 +118,7 @@ public class MappingDataListenerTest {
         Mockito.when(mod_del.getDataBefore()).thenReturn(MAPPING_EID_1_SB);
 
         mappingDataListener.onDataTreeChanged(changes);
-        Mockito.verifyZeroInteractions(iMappingSystemMock);
+        //Mockito.verifyZeroInteractions(iMappingSystemMock);
         Mockito.verifyZeroInteractions(notificationPublishServiceMock);
     }
 
@@ -150,7 +151,7 @@ public class MappingDataListenerTest {
         Mockito.when(mod_subtreeModified.getDataAfter()).thenReturn(MAPPING_EID_2_SB);
 
         mappingDataListener.onDataTreeChanged(changes);
-        Mockito.verifyZeroInteractions(iMappingSystemMock);
+        //Mockito.verifyZeroInteractions(iMappingSystemMock);
         Mockito.verifyZeroInteractions(notificationPublishServiceMock);
     }
 
@@ -181,7 +182,7 @@ public class MappingDataListenerTest {
         Mockito.when(mod_write.getDataAfter()).thenReturn(MAPPING_EID_3_SB);
 
         mappingDataListener.onDataTreeChanged(changes);
-        Mockito.verifyZeroInteractions(iMappingSystemMock);
+        //Mockito.verifyZeroInteractions(iMappingSystemMock);
         Mockito.verifyZeroInteractions(notificationPublishServiceMock);
     }
 
@@ -208,7 +209,7 @@ public class MappingDataListenerTest {
         Mockito.verify(iMappingSystemMock)
                 .addMapping(MappingOrigin.Northbound, IPV4_EID_2, MAPPING_EID_2_NB.getMappingRecord(), false);
         Mockito.verify(notificationPublishServiceMock).putNotification(mapChangedSubtreeMod);
-        Mockito.verifyNoMoreInteractions(iMappingSystemMock);
+        //Mockito.verifyNoMoreInteractions(iMappingSystemMock);
         Mockito.verifyNoMoreInteractions(notificationPublishServiceMock);
     }
 
diff --git a/resources/tutorial/oor.conf.client b/resources/tutorial/oor.conf.client
new file mode 100644 (file)
index 0000000..5aab909
--- /dev/null
@@ -0,0 +1,184 @@
+################################################
+#
+# General configuration
+#
+# debug: Debug levels [0..3]
+# map-request-retries: Additional Map-Requests to send per map cache miss
+# log-file: Specifies log file used in daemon mode. If it is not specified,
+#   messages are written in syslog file
+
+debug                  = 0
+map-request-retries    = 2
+log-file               = /var/log/oor.log
+
+# Define the type of LISP device LISPmob will operate as
+#
+# operating-mode can be any of:
+# xTR, RTR, MN, MS
+#
+operating-mode         = xTR
+
+# For the rest of this file you can delete the sections that does not apply to
+# the LISP device selected in operating-mode
+
+
+################################################
+#
+# MS configuration
+#
+
+# Control messages are received and generated through this interface
+# Only one interface is supported
+
+control-iface = eth1
+
+# Define an allowed lisp-site to be registered into the Map Server. Several
+# lisp-site can be defined.
+#
+#   eid-prefix: Accepted EID prefix (IPvX/mask)
+#   key-type: Only 1 supported (HMAC-SHA-1-96)
+#   key: Password to authenticate the received Map-Registers
+#   iid: Instance ID associated with the lisp site [0-16777215]
+#   accept-more-specifics [true/false]: Accept more specific prefixes
+#     with same authentication information
+
+lisp-site {
+    eid-prefix            = 192.168.16.11/32
+    key-type              = 1
+    key                   = password
+    iid                   = 0
+    accept-more-specifics = true
+}
+
+
+###############################################
+#
+# RTR configuration
+#
+
+# List of interfaces to be used as outgoing interfaces for the packets sent
+# by the RTR. Several rtr-ifaces can be defined.
+#   iface: interface containing the RLOCs to be used for outgoing traffic
+#   ip_version: 4 to use the IPv4 address of the interface and 6 to use the IPv6
+#     address of the interface
+#   priority [0-255]: Priority for the RLOC of the interface. Locators
+#     with lower values are more preferable. This is used for outgoing
+#     traffic policy management.
+#   weight [0-255]: When priorities are the same for multiple RLOCs, the weight
+#     indicates how to balance unicast traffic between them.
+
+rtr-ifaces {
+    rtr-iface {
+        iface           = eth1
+        ip_version      = 1
+        priority        = 1
+        weight          = 100
+    }
+}
+
+###############################################
+#
+# xTR & MN configuration
+#
+
+# NAT Traversl configuration.
+#   nat_traversal_support: check if the node is behind NAT.
+
+nat_traversal_support  = off
+
+# 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        = 192.168.16.11
+        key-type       = 1
+        key            = password
+        proxy-reply    = on
+}
+
+# Packets addressed to non-LISP sites will be encapsulated to this Proxy-ETR
+# You can define several Proxy-ETR. Traffic will be balanced according to the
+# priority and weight.
+#   address: IPv4 or IPv6 address of the Proxy-ETR
+#   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     = 192.168.16.11
+       priority    = 1
+       weight      = 100
+}
+
+# IPv4 / IPv6 EID of the node.
+#   eid-prefix: EID prefix (ip-prefix/mask) of the mapping
+#   iid: Instance ID associated to the EID. When using VXLAN-GPE, iid configures
+#     the VNI of the mapping. [0-16777215]
+# Two types of RLOCs can be defined:
+#   rloc-address: Specifies directly the RLOC of the interface
+#     address: It could be one of the following cases
+#       - IPv4 or IPv6 address of the RLOC. Address should exist and
+#        be assigned to an UP interface during startup process otherwise
+#        it is discarded.
+#       - ELP name
+#   rloc-iface: Specifies the interface associated with the RLOC
+#     interface: interface containing the RLOCs associated to this mapping
+#     ip_version: 4 to use the IPv4 address of the interface and 6 to use the IPv6
+#       address of the interface
+# Both types of RLOCs use priority and weight
+#   priority [0-255]: Priority for the RLOC of the interface. Locators
+#     with lower values are more preferable. This is used for both incoming
+#     policy announcements and outgoing traffic policy management.
+#   weight [0-255]: When priorities are the same for multiple RLOCs, the weight
+#     indicates how to balance unicast traffic between them.
+
+database-mapping {
+    eid-prefix          = 1.1.1.1/32
+    iid                 = 0
+    rloc-address {
+        address         = 192.168.16.30
+        priority        = 1
+        weight          = 100
+    }
+    rloc-iface{
+        interface       = eth1
+        ip_version      = 1
+        priority        = 1
+        weight          = 100
+    }
+}
+
+# Current LISP beta-network (lisp4.net/lisp6.net) PITR addresses
+# Uncomment the IPv4 or IPv6 list based on your current locators and
+# comment the previous 'proxy-itrs' section
+
+
+#proxy-itrs = {
+# LISP beta-network IPv4 PITRs
+#        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
+# LISP beta-network IPv6 PITRs
+#        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
+#}
\ No newline at end of file
diff --git a/resources/tutorial/oor.conf.server1 b/resources/tutorial/oor.conf.server1
new file mode 100644 (file)
index 0000000..4745f94
--- /dev/null
@@ -0,0 +1,184 @@
+################################################
+#
+# General configuration
+#
+# debug: Debug levels [0..3]
+# map-request-retries: Additional Map-Requests to send per map cache miss
+# log-file: Specifies log file used in daemon mode. If it is not specified,
+#   messages are written in syslog file
+
+debug                  = 0
+map-request-retries    = 2
+log-file               = /var/log/oor.log
+
+# Define the type of LISP device LISPmob will operate as
+#
+# operating-mode can be any of:
+# xTR, RTR, MN, MS
+#
+operating-mode         = xTR
+
+# For the rest of this file you can delete the sections that does not apply to
+# the LISP device selected in operating-mode
+
+
+################################################
+#
+# MS configuration
+#
+
+# Control messages are received and generated through this interface
+# Only one interface is supported
+
+control-iface = eth1
+
+# Define an allowed lisp-site to be registered into the Map Server. Several
+# lisp-site can be defined.
+#
+#   eid-prefix: Accepted EID prefix (IPvX/mask)
+#   key-type: Only 1 supported (HMAC-SHA-1-96)
+#   key: Password to authenticate the received Map-Registers
+#   iid: Instance ID associated with the lisp site [0-16777215]
+#   accept-more-specifics [true/false]: Accept more specific prefixes
+#     with same authentication information
+
+lisp-site {
+    eid-prefix            = 192.168.16.11/32
+    key-type              = 1
+    key                   = password
+    iid                   = 0
+    accept-more-specifics = true
+}
+
+
+###############################################
+#
+# RTR configuration
+#
+
+# List of interfaces to be used as outgoing interfaces for the packets sent
+# by the RTR. Several rtr-ifaces can be defined.
+#   iface: interface containing the RLOCs to be used for outgoing traffic
+#   ip_version: 4 to use the IPv4 address of the interface and 6 to use the IPv6
+#     address of the interface
+#   priority [0-255]: Priority for the RLOC of the interface. Locators
+#     with lower values are more preferable. This is used for outgoing
+#     traffic policy management.
+#   weight [0-255]: When priorities are the same for multiple RLOCs, the weight
+#     indicates how to balance unicast traffic between them.
+
+rtr-ifaces {
+    rtr-iface {
+        iface           = eth1
+        ip_version      = 1
+        priority        = 1
+        weight          = 100
+    }
+}
+
+###############################################
+#
+# xTR & MN configuration
+#
+
+# NAT Traversl configuration.
+#   nat_traversal_support: check if the node is behind NAT.
+
+nat_traversal_support  = off
+
+# 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        = 192.168.16.11
+        key-type       = 1
+        key            = password
+        proxy-reply    = on
+}
+
+# Packets addressed to non-LISP sites will be encapsulated to this Proxy-ETR
+# You can define several Proxy-ETR. Traffic will be balanced according to the
+# priority and weight.
+#   address: IPv4 or IPv6 address of the Proxy-ETR
+#   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     = 192.168.16.11
+       priority    = 1
+       weight      = 100
+}
+
+# IPv4 / IPv6 EID of the node.
+#   eid-prefix: EID prefix (ip-prefix/mask) of the mapping
+#   iid: Instance ID associated to the EID. When using VXLAN-GPE, iid configures
+#     the VNI of the mapping. [0-16777215]
+# Two types of RLOCs can be defined:
+#   rloc-address: Specifies directly the RLOC of the interface
+#     address: It could be one of the following cases
+#       - IPv4 or IPv6 address of the RLOC. Address should exist and
+#        be assigned to an UP interface during startup process otherwise
+#        it is discarded.
+#       - ELP name
+#   rloc-iface: Specifies the interface associated with the RLOC
+#     interface: interface containing the RLOCs associated to this mapping
+#     ip_version: 4 to use the IPv4 address of the interface and 6 to use the IPv6
+#       address of the interface
+# Both types of RLOCs use priority and weight
+#   priority [0-255]: Priority for the RLOC of the interface. Locators
+#     with lower values are more preferable. This is used for both incoming
+#     policy announcements and outgoing traffic policy management.
+#   weight [0-255]: When priorities are the same for multiple RLOCs, the weight
+#     indicates how to balance unicast traffic between them.
+
+database-mapping {
+    eid-prefix          = 2.2.2.2/32
+    iid                 = 0
+    rloc-address {
+        address         = 192.168.16.31
+        priority        = 1
+        weight          = 100
+    }
+    rloc-iface{
+        interface       = eth1
+        ip_version      = 1
+        priority        = 1
+        weight          = 100
+    }
+}
+
+# Current LISP beta-network (lisp4.net/lisp6.net) PITR addresses
+# Uncomment the IPv4 or IPv6 list based on your current locators and
+# comment the previous 'proxy-itrs' section
+
+
+#proxy-itrs = {
+# LISP beta-network IPv4 PITRs
+#        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
+# LISP beta-network IPv6 PITRs
+#        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
+#}
\ No newline at end of file