diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0c3626b2f576dae2135de2030c01ada133aa89d7..095e542dfa8c5eca947a2931e6a9348aef70d838 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -35,12 +35,13 @@ include:
   - local: '/src/ztp/.gitlab-ci.yml'
   - local: '/src/policy/.gitlab-ci.yml'
   - local: '/src/forecaster/.gitlab-ci.yml'
-  #- local: '/src/webui/.gitlab-ci.yml'
+  - local: '/src/webui/.gitlab-ci.yml'
   #- local: '/src/l3_distributedattackdetector/.gitlab-ci.yml'
   #- local: '/src/l3_centralizedattackdetector/.gitlab-ci.yml'
   #- local: '/src/l3_attackmitigator/.gitlab-ci.yml'
-  #- local: '/src/slice/.gitlab-ci.yml'
+  - local: '/src/slice/.gitlab-ci.yml'
   #- local: '/src/interdomain/.gitlab-ci.yml'
   - local: '/src/pathcomp/.gitlab-ci.yml'
   #- local: '/src/dlt/.gitlab-ci.yml'
   - local: '/src/load_generator/.gitlab-ci.yml'
+  - local: '/src/bgpls_speaker/.gitlab-ci.yml'
diff --git a/manifests/bgpls_speakerservice.yaml b/manifests/bgpls_speakerservice.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..aa985d13ea81ad5f5aafdee4b62ca1c54915e527
--- /dev/null
+++ b/manifests/bgpls_speakerservice.yaml
@@ -0,0 +1,72 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: bgpls-speakerservice
+spec:
+  selector:
+    matchLabels:
+      app: bgpls-speakerservice
+  replicas: 1
+  template:
+    metadata:
+      labels:
+        app: bgpls-speakerservice
+    spec:
+      terminationGracePeriodSeconds: 5
+      containers:
+      - name: server
+        image: localhost:32000/tfs/bgpls_speaker:dev
+        imagePullPolicy: Always
+        ports:
+        - containerPort: 20030
+        - containerPort: 9192
+        env:
+        - name: LOG_LEVEL
+          value: "INFO"
+        readinessProbe:
+          exec:
+            command: ["/bin/grpc_health_probe", "-addr=:20030"]
+        livenessProbe:
+          exec:
+            command: ["/bin/grpc_health_probe", "-addr=:20030"]
+        resources:
+          requests:
+            cpu: 250m
+            memory: 128Mi
+          limits:
+            cpu: 1000m
+            memory: 1024Mi
+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: bgpls-speakerservice
+  labels:
+    app: bgpls-speakerservice
+spec:
+  type: ClusterIP
+  selector:
+    app: bgpls-speakerservice
+  ports:
+  - name: grpc
+    protocol: TCP
+    port: 20030
+    targetPort: 20030
+  - name: metrics
+    protocol: TCP
+    port: 9192
+    targetPort: 9192
diff --git a/my_deploy.sh b/my_deploy.sh
index 0fcb51f90509732452620126c9062597a17735ed..0c5ba03c5b9f63038a622f44ab2dfaaf1e7e6ada 100755
--- a/my_deploy.sh
+++ b/my_deploy.sh
@@ -25,6 +25,9 @@ export TFS_COMPONENTS="context device pathcomp service slice nbi webui load_gene
 # Uncomment to activate Monitoring
 #export TFS_COMPONENTS="${TFS_COMPONENTS} monitoring"
 
+# Uncomment to activate bgpls_speaker
+#export TFS_COMPONENTS="${TFS_COMPONENTS} bgpls_speaker"
+
 # Uncomment to activate ZTP
 #export TFS_COMPONENTS="${TFS_COMPONENTS} ztp"
 
diff --git a/proto/bgpls.proto b/proto/bgpls.proto
new file mode 100644
index 0000000000000000000000000000000000000000..9b6f1efab8e3fbd2d913d1b44ac87b78bf46d6eb
--- /dev/null
+++ b/proto/bgpls.proto
@@ -0,0 +1,70 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+package bgpls;
+
+import "context.proto";
+
+service BgplsService {
+  rpc ListDiscoveredDevices (context.Empty  ) returns (DiscoveredDeviceList) {}
+  rpc ListDiscoveredLinks   (context.Empty  ) returns (DiscoveredLinkList  ) {}
+  rpc AddBgplsSpeaker       (BgplsSpeaker   ) returns (BgplsSpeakerId      ) {}
+  rpc ListBgplsSpeakers     (context.Empty  ) returns (BgplsSpeakerList    ) {}
+  rpc DisconnectFromSpeaker (BgplsSpeaker   ) returns (context.Empty       ) {}
+  rpc GetSpeakerInfoFromId  (BgplsSpeakerId ) returns (BgplsSpeaker        ) {}
+  rpc NotifyAddNodeToContext(NodeDescriptors) returns (context.Empty       ) {}
+}
+
+message DiscoveredDevice {
+  string nodeName = 1;
+  string ip = 2;
+  string igpID = 3;
+  string learntFrom = 4;
+}
+
+message DiscoveredDeviceList {
+  repeated DiscoveredDevice discovereddevices = 1;
+}
+
+message DiscoveredLinkList{
+  repeated DiscoveredLink discoveredlinks = 1;
+}
+
+message DiscoveredLink{
+  NodeDescriptors local  = 1;
+	NodeDescriptors remote = 2;
+  string learntFrom      = 3;
+  string local_ipv4      = 4;
+  string remote_ipv4     = 5;
+}
+
+message NodeDescriptors{
+	string asNumber = 1;
+	string igp_id   = 2;
+  string nodeName = 3;
+}
+
+message BgplsSpeaker{
+  string address  = 1;
+  string port     = 2;
+  string asNumber = 3;
+}
+message BgplsSpeakerId{
+  uint32 id = 1;
+}
+
+message BgplsSpeakerList{
+  repeated BgplsSpeakerId speakers = 1;
+}
diff --git a/scripts/show_logs_bgp.sh b/scripts/show_logs_bgp.sh
new file mode 100755
index 0000000000000000000000000000000000000000..29e8fa60c4768d1a0638556f9b68d4ab63dc9c22
--- /dev/null
+++ b/scripts/show_logs_bgp.sh
@@ -0,0 +1,27 @@
+#!/bin/bash
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+########################################################################################################################
+# Define your deployment settings here
+########################################################################################################################
+
+# If not already set, set the name of the Kubernetes namespace to deploy to.
+export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"}
+
+########################################################################################################################
+# Automated steps start here
+########################################################################################################################
+
+kubectl --namespace $TFS_K8S_NAMESPACE logs deployment/bgpls_speakerservice -c server
diff --git a/src/bgpls_speaker/.gitlab-ci.yml b/src/bgpls_speaker/.gitlab-ci.yml
new file mode 100644
index 0000000000000000000000000000000000000000..68b04f8e7d12812c3d19a269a00d5337874d7762
--- /dev/null
+++ b/src/bgpls_speaker/.gitlab-ci.yml
@@ -0,0 +1,105 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Build, tag, and push the Docker image to the GitLab Docker registry
+build bgpls_speaker:
+  variables:
+    IMAGE_NAME: 'bgpls_speaker' # name of the microservice
+    IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
+  stage: build
+  before_script:
+    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
+  script:
+    - docker build -t "$IMAGE_NAME:$IMAGE_TAG" -f ./src/$IMAGE_NAME/Dockerfile .
+    - docker tag "$IMAGE_NAME:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
+    - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
+  after_script:
+    - docker images --filter="dangling=true" --quiet | xargs -r docker rmi
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
+    - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
+    - changes:
+      - src/common/**/*.py
+      - proto/*.proto
+      - src/$IMAGE_NAME/**/*.{py,in,yml}
+      - src/$IMAGE_NAME/Dockerfile
+      - src/$IMAGE_NAME/tests/*.py
+      - manifests/${IMAGE_NAME}service.yaml
+      - .gitlab-ci.yml
+
+# Apply unit test to the component
+unit_test bgpls_speaker:
+  variables:
+    IMAGE_NAME: 'bgpls_speaker' # name of the microservice
+    IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
+  stage: unit_test
+  needs:
+    - build bgpls_speaker
+  before_script:
+    - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
+    - if docker network list | grep teraflowbridge; then echo "teraflowbridge is already created"; else docker network create --driver=bridge teraflowbridge; fi
+    - if docker container ls | grep $IMAGE_NAME; then docker rm -f $IMAGE_NAME; else echo "$IMAGE_NAME image is not in the system"; fi
+  script:
+    - docker pull "$CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG"
+    - docker run --name $IMAGE_NAME -d -p 20030:20030  -v "$PWD/src/$IMAGE_NAME/tests:/opt/results" --network=teraflowbridge $CI_REGISTRY_IMAGE/$IMAGE_NAME:$IMAGE_TAG
+    - sleep 5
+    - docker ps -a
+    - docker logs $IMAGE_NAME
+    - docker exec -i $IMAGE_NAME bash -c "coverage run -m pytest --log-level=INFO --verbose $IMAGE_NAME/tests/test_unitary.py --junitxml=/opt/results/${IMAGE_NAME}_report.xml"
+    - docker exec -i $IMAGE_NAME bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing"
+  coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
+  after_script:
+    - docker rm -f $IMAGE_NAME
+    - docker network rm teraflowbridge
+  rules:
+    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
+    - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
+    - changes:
+      - src/common/**/*.py
+      - proto/*.proto
+      - src/$IMAGE_NAME/**/*.{py,in,yml}
+      - src/$IMAGE_NAME/Dockerfile
+      - src/$IMAGE_NAME/tests/*.py
+      - manifests/${IMAGE_NAME}service.yaml
+      - .gitlab-ci.yml
+  artifacts:
+      when: always
+      reports:
+        junit: src/$IMAGE_NAME/tests/${IMAGE_NAME}_report.xml
+
+## Deployment of the service in Kubernetes Cluster
+#deploy bgpls_speaker:
+#  variables:
+#    IMAGE_NAME: 'bgpls_speaker' # name of the microservice
+#    IMAGE_TAG: 'latest' # tag of the container image (production, development, etc)
+#  stage: deploy
+#  needs:
+#    - unit test bgpls_speaker
+#    # - integ_test execute
+#  script:
+#    - 'sed -i "s/$IMAGE_NAME:.*/$IMAGE_NAME:$IMAGE_TAG/" manifests/${IMAGE_NAME}service.yaml'
+#    - kubectl version
+#    - kubectl get all
+#    - kubectl apply -f "manifests/${IMAGE_NAME}service.yaml"
+#    - kubectl get all
+#  # environment:
+#  #   name: test
+#  #   url: https://example.com
+#  #   kubernetes:
+#  #     namespace: test
+#  rules:
+#    - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && ($CI_MERGE_REQUEST_TARGET_BRANCH_NAME == "develop" || $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH)'
+#      when: manual    
+#    - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "develop"'
+#      when: manual
diff --git a/src/bgpls_speaker/Config.py b/src/bgpls_speaker/Config.py
new file mode 100644
index 0000000000000000000000000000000000000000..38d04994fb0fa1951fb465bc127eb72659dc2eaf
--- /dev/null
+++ b/src/bgpls_speaker/Config.py
@@ -0,0 +1,13 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/src/bgpls_speaker/Dockerfile b/src/bgpls_speaker/Dockerfile
new file mode 100644
index 0000000000000000000000000000000000000000..87463943af647188791e5d162b2af416df867285
--- /dev/null
+++ b/src/bgpls_speaker/Dockerfile
@@ -0,0 +1,110 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#
+# Maven install stage
+#
+# ----------------------------------------------
+# FROM alpine/git:latest AS repo
+
+# WORKDIR /usr/src/app
+# RUN git clone https://github.com/telefonicaid/netphony-network-protocols.git .
+
+FROM maven:3.8.8-eclipse-temurin-17 AS build
+
+WORKDIR /
+COPY src/bgpls_speaker/service/java/netphony-topology/ netphony-topology/
+COPY src/bgpls_speaker/service/java/netphony-topology/pom.xml netphony-topology/pom.xml
+
+WORKDIR /netphony-topology/
+RUN mvn clean compile -DskipTests -X
+RUN mvn package assembly:single -P bgp-ls-speaker -DskipTests
+WORKDIR /netphony-topology/target/
+# ENTRYPOINT [ "ls" ,"-a"]
+# -------------------------------------------
+# jar created in  /netphony-topology/target/bgp-ls-speaker-jar-with-dependencies.jar
+
+#
+# Stage 2
+#
+
+FROM python:3.9-slim
+
+
+# Install dependencies
+RUN apt-get --yes --quiet --quiet update && \
+    apt-get --yes --quiet --quiet install wget g++ && \
+    rm -rf /var/lib/apt/lists/*
+
+# Set Python to show logs as they occur
+ENV PYTHONUNBUFFERED=0
+
+# Download the gRPC health probe
+RUN GRPC_HEALTH_PROBE_VERSION=v0.2.0 && \
+    wget -qO/bin/grpc_health_probe https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/${GRPC_HEALTH_PROBE_VERSION}/grpc_health_probe-linux-amd64 && \
+    chmod +x /bin/grpc_health_probe
+
+# Get generic Python packages
+RUN python3 -m pip install --upgrade pip
+RUN python3 -m pip install --upgrade setuptools wheel
+RUN python3 -m pip install --upgrade pip-tools
+
+# Install OpenJDK-11
+RUN apt-get update && \
+    apt-get install -y openjdk-17-jre && \
+    apt-get clean;
+
+# Get common Python packages
+# Note: this step enables sharing the previous Docker build steps among all the Python components
+WORKDIR /var/teraflow
+COPY common_requirements.in common_requirements.in
+RUN pip-compile --quiet --output-file=common_requirements.txt common_requirements.in
+RUN python3 -m pip install -r common_requirements.txt
+
+# Add common files into working directory
+WORKDIR /var/teraflow/common
+COPY src/common/. ./
+RUN rm -rf proto
+
+# Create proto sub-folder, copy .proto files, and generate Python code
+RUN mkdir -p /var/teraflow/common/proto
+WORKDIR /var/teraflow/common/proto
+RUN touch __init__.py
+COPY proto/*.proto ./
+RUN python3 -m grpc_tools.protoc -I=. --python_out=. --grpc_python_out=. *.proto
+RUN rm *.proto
+RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
+
+# Create component sub-folders, get specific Python packages
+RUN mkdir -p /var/teraflow/bgpls_speaker
+WORKDIR /var/teraflow/bgpls_speaker
+COPY src/bgpls_speaker/requirements.in requirements.in
+RUN pip-compile --quiet --output-file=requirements.txt requirements.in
+RUN python3 -m pip install -r requirements.txt
+
+# Java module necessary config files
+WORKDIR /var/teraflow/bgpls_speaker
+RUN mkdir -p /java
+COPY src/bgpls_speaker/service/java/* /java/ 
+COPY --from=build /netphony-topology/target/bgp-ls-speaker-jar-with-dependencies.jar /var/teraflow/bgpls_speaker/service/java/bgp_ls.jar
+
+# Add component files into working directory
+WORKDIR /var/teraflow
+COPY src/context/__init__.py context/__init__.py
+COPY src/context/client/. context/client/
+COPY src/bgpls_speaker/. bgpls_speaker/
+
+# Start the service
+ENTRYPOINT ["python", "-m", "bgpls_speaker.service"]
+# ENTRYPOINT [ "ls","-R" ]
\ No newline at end of file
diff --git a/src/bgpls_speaker/__init__.py b/src/bgpls_speaker/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..38d04994fb0fa1951fb465bc127eb72659dc2eaf
--- /dev/null
+++ b/src/bgpls_speaker/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/src/bgpls_speaker/client/BgplsClient.py b/src/bgpls_speaker/client/BgplsClient.py
new file mode 100644
index 0000000000000000000000000000000000000000..dc8ecf4ecaa10076e673e42069c5d8c2033cd309
--- /dev/null
+++ b/src/bgpls_speaker/client/BgplsClient.py
@@ -0,0 +1,91 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import grpc, logging
+from common.Constants import ServiceNameEnum
+from common.Settings import get_service_host, get_service_port_grpc
+from common.proto.context_pb2 import Empty, Service, ServiceId
+from common.proto.service_pb2_grpc import ServiceServiceStub
+from common.proto.bgpls_pb2_grpc import BgplsServiceStub
+from common.proto.bgpls_pb2 import BgplsSpeaker, DiscoveredDeviceList,DiscoveredLinkList,BgplsSpeakerId, NodeDescriptors
+from common.tools.client.RetryDecorator import retry, delay_exponential
+from common.tools.grpc.Tools import grpc_message_to_json_string
+
+LOGGER = logging.getLogger(__name__)
+MAX_RETRIES = 15
+DELAY_FUNCTION = delay_exponential(initial=0.01, increment=2.0, maximum=5.0)
+RETRY_DECORATOR = retry(max_retries=MAX_RETRIES, delay_function=DELAY_FUNCTION, prepare_method_name='connect')
+
+class BgplsClient:
+    def __init__(self, host=None, port=None):
+        if not host: host = get_service_host(ServiceNameEnum.BGPLS)
+        if not port: port = get_service_port_grpc(ServiceNameEnum.BGPLS)
+        self.endpoint = '{:s}:{:s}'.format(str(host), str(port))
+        LOGGER.info('Creating channel to {:s}...'.format(str(self.endpoint)))
+        self.channel = None
+        self.stub = None
+        self.connect()
+        LOGGER.info('Channel created')
+
+    def connect(self):
+        self.channel = grpc.insecure_channel(self.endpoint)
+        self.stub = BgplsServiceStub(self.channel)
+
+    def close(self):
+        if self.channel is not None: self.channel.close()
+        self.channel = None
+        self.stub = None
+
+    @RETRY_DECORATOR
+    def ListDiscoveredDevices(self, request: Empty) -> DiscoveredDeviceList:
+        LOGGER.info('ListDiscoveredDevices request: {:s}'.format(grpc_message_to_json_string(request)))
+        response = self.stub.ListDiscoveredDevices(request)
+        LOGGER.info('ListDiscoveredDevices result: {:s}'.format(grpc_message_to_json_string(response)))
+        return response    
+    @RETRY_DECORATOR
+    def ListDiscoveredLinks(self, request: Empty) -> DiscoveredLinkList:
+        LOGGER.info('ListDiscoveredDevices request: {:s}'.format(grpc_message_to_json_string(request)))
+        response = self.stub.ListDiscoveredLinks(request)
+        LOGGER.info('ListDiscoveredDevices result: {:s}'.format(grpc_message_to_json_string(response)))
+        return response
+    @RETRY_DECORATOR
+    def AddBgplsSpeaker(self, request: BgplsSpeaker) -> str:
+        LOGGER.info('AddBgplsSpeaker request: {:s}'.format(grpc_message_to_json_string(request)))
+        response = self.stub.AddBgplsSpeaker(request)
+        LOGGER.info('AddBgplsSpeaker result: {:s}'.format(grpc_message_to_json_string(response)))
+        return response    
+    @RETRY_DECORATOR
+    def ListBgplsSpeakers(self, request: Empty) -> BgplsSpeakerId:
+        LOGGER.info('ListBgplsSpeakers request: {:s}'.format(grpc_message_to_json_string(request)))
+        response = self.stub.ListBgplsSpeakers(request)
+        LOGGER.info('ListBgplsSpeakers result: {:s}'.format(grpc_message_to_json_string(response)))
+        return response
+    @RETRY_DECORATOR
+    def DisconnectFromSpeaker(self, request: BgplsSpeaker) -> bool:
+        LOGGER.info('DisconnectFromSpeaker request: {:s}'.format(grpc_message_to_json_string(request)))
+        response = self.stub.DisconnectFromSpeaker(request)
+        LOGGER.info('DisconnectFromSpeaker result: {:s}'.format(grpc_message_to_json_string(response)))
+        return response
+    @RETRY_DECORATOR
+    def GetSpeakerInfoFromId(self, request: BgplsSpeakerId) -> BgplsSpeaker:
+        LOGGER.info('GetSpeakerInfoFromId request: {:s}'.format(grpc_message_to_json_string(request)))
+        response = self.stub.GetSpeakerInfoFromId(request)
+        LOGGER.info('GetSpeakerInfoFromId result: {:s}'.format(grpc_message_to_json_string(response)))
+        return response
+    @RETRY_DECORATOR
+    def NotifyAddNodeToContext(self, request: NodeDescriptors) -> str:
+        LOGGER.info('NotifyAddNodeToContext request: {:s}'.format(grpc_message_to_json_string(request)))
+        response = self.stub.NotifyAddNodeToContext(request)
+        LOGGER.info('NotifyAddNodeToContext result: {:s}'.format(grpc_message_to_json_string(response)))
+        return response
diff --git a/src/bgpls_speaker/client/__init__.py b/src/bgpls_speaker/client/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..38d04994fb0fa1951fb465bc127eb72659dc2eaf
--- /dev/null
+++ b/src/bgpls_speaker/client/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/src/bgpls_speaker/quick_deploy.sh b/src/bgpls_speaker/quick_deploy.sh
new file mode 100644
index 0000000000000000000000000000000000000000..7276f3287d6523d35ce99362963c6f45dfde911c
--- /dev/null
+++ b/src/bgpls_speaker/quick_deploy.sh
@@ -0,0 +1,438 @@
+#!/bin/bash
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+########################################################################################################################
+# Read deployment settings
+########################################################################################################################
+
+
+# ----- TeraFlowSDN ------------------------------------------------------------
+
+# If not already set, set the URL of the Docker registry where the images will be uploaded to.
+# By default, assume internal MicroK8s registry is used.
+export TFS_REGISTRY_IMAGES=${TFS_REGISTRY_IMAGES:-"http://localhost:32000/tfs/"}
+
+# If not already set, set the list of components, separated by spaces, you want to build images for, and deploy.
+# By default, only basic components are deployed
+export TFS_COMPONENTS=${TFS_COMPONENTS:-"context device pathcomp service slice nbi webui load_generator bgpls_speaker"}
+
+# If not already set, set the tag you want to use for your images.
+export TFS_IMAGE_TAG=${TFS_IMAGE_TAG:-"dev"}
+
+# If not already set, set the name of the Kubernetes namespace to deploy TFS to.
+export TFS_K8S_NAMESPACE=${TFS_K8S_NAMESPACE:-"tfs"}
+
+# If not already set, set additional manifest files to be applied after the deployment
+export TFS_EXTRA_MANIFESTS=${TFS_EXTRA_MANIFESTS:-""}
+
+# If not already set, set the new Grafana admin password
+export TFS_GRAFANA_PASSWORD=${TFS_GRAFANA_PASSWORD:-"admin123+"}
+
+# If not already set, disable skip-build flag to rebuild the Docker images.
+# If TFS_SKIP_BUILD is "YES", the containers are not rebuilt-retagged-repushed and existing ones are used.
+export TFS_SKIP_BUILD=${TFS_SKIP_BUILD:-"YES"}
+
+# If TFS_SKIP_BUILD is "YES", select the containers to be build
+# Any other container will use previous docker images
+export TFS_QUICK_COMPONENTS="bgpls_speaker"
+
+# ----- CockroachDB ------------------------------------------------------------
+
+# If not already set, set the namespace where CockroackDB will be deployed.
+export CRDB_NAMESPACE=${CRDB_NAMESPACE:-"crdb"}
+
+# If not already set, set the database username to be used by Context.
+export CRDB_USERNAME=${CRDB_USERNAME:-"tfs"}
+
+# If not already set, set the database user's password to be used by Context.
+export CRDB_PASSWORD=${CRDB_PASSWORD:-"tfs123"}
+
+# If not already set, set the database name to be used by Context.
+export CRDB_DATABASE=${CRDB_DATABASE:-"tfs"}
+
+
+# ----- NATS -------------------------------------------------------------------
+
+# If not already set, set the namespace where NATS will be deployed.
+export NATS_NAMESPACE=${NATS_NAMESPACE:-"nats"}
+
+
+# ----- QuestDB ----------------------------------------------------------------
+
+# If not already set, set the namespace where QuestDB will be deployed.
+export QDB_NAMESPACE=${QDB_NAMESPACE:-"qdb"}
+
+# If not already set, set the database username to be used for QuestDB.
+export QDB_USERNAME=${QDB_USERNAME:-"admin"}
+
+# If not already set, set the database user's password to be used for QuestDB.
+export QDB_PASSWORD=${QDB_PASSWORD:-"quest"}
+
+# If not already set, set the table name to be used by Monitoring for KPIs.
+export QDB_TABLE_MONITORING_KPIS=${QDB_TABLE_MONITORING_KPIS:-"tfs_monitoring_kpis"}
+
+# If not already set, set the table name to be used by Slice for plotting groups.
+export QDB_TABLE_SLICE_GROUPS=${QDB_TABLE_SLICE_GROUPS:-"tfs_slice_groups"}
+
+
+########################################################################################################################
+# Automated steps start here
+########################################################################################################################
+
+# Constants
+GITLAB_REPO_URL="labs.etsi.org:5050/tfs/controller"
+TMP_FOLDER="./tmp"
+
+# Create a tmp folder for files modified during the deployment
+TMP_MANIFESTS_FOLDER="$TMP_FOLDER/manifests"
+mkdir -p $TMP_MANIFESTS_FOLDER
+TMP_LOGS_FOLDER="$TMP_FOLDER/logs"
+mkdir -p $TMP_LOGS_FOLDER
+
+echo "Deleting and Creating a new namespace..."
+kubectl delete namespace $TFS_K8S_NAMESPACE --ignore-not-found
+kubectl create namespace $TFS_K8S_NAMESPACE
+printf "\n"
+
+echo "Create secret with CockroachDB data"
+CRDB_SQL_PORT=$(kubectl --namespace ${CRDB_NAMESPACE} get service cockroachdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}')
+kubectl create secret generic crdb-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \
+    --from-literal=CRDB_NAMESPACE=${CRDB_NAMESPACE} \
+    --from-literal=CRDB_SQL_PORT=${CRDB_SQL_PORT} \
+    --from-literal=CRDB_DATABASE=${CRDB_DATABASE} \
+    --from-literal=CRDB_USERNAME=${CRDB_USERNAME} \
+    --from-literal=CRDB_PASSWORD=${CRDB_PASSWORD} \
+    --from-literal=CRDB_SSLMODE=require
+printf "\n"
+
+echo "Create secret with NATS data"
+NATS_CLIENT_PORT=$(kubectl --namespace ${NATS_NAMESPACE} get service nats -o 'jsonpath={.spec.ports[?(@.name=="client")].port}')
+kubectl create secret generic nats-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \
+    --from-literal=NATS_NAMESPACE=${NATS_NAMESPACE} \
+    --from-literal=NATS_CLIENT_PORT=${NATS_CLIENT_PORT}
+printf "\n"
+
+echo "Create secret with QuestDB data"
+QDB_HTTP_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="http")].port}')
+QDB_ILP_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="ilp")].port}')
+QDB_SQL_PORT=$(kubectl --namespace ${QDB_NAMESPACE} get service questdb-public -o 'jsonpath={.spec.ports[?(@.name=="sql")].port}')
+METRICSDB_HOSTNAME="questdb-public.${QDB_NAMESPACE}.svc.cluster.local"
+kubectl create secret generic qdb-data --namespace ${TFS_K8S_NAMESPACE} --type='Opaque' \
+    --from-literal=QDB_NAMESPACE=${QDB_NAMESPACE} \
+    --from-literal=METRICSDB_HOSTNAME=${METRICSDB_HOSTNAME} \
+    --from-literal=METRICSDB_REST_PORT=${QDB_HTTP_PORT} \
+    --from-literal=METRICSDB_ILP_PORT=${QDB_ILP_PORT} \
+    --from-literal=METRICSDB_SQL_PORT=${QDB_SQL_PORT} \
+    --from-literal=METRICSDB_TABLE_MONITORING_KPIS=${QDB_TABLE_MONITORING_KPIS} \
+    --from-literal=METRICSDB_TABLE_SLICE_GROUPS=${QDB_TABLE_SLICE_GROUPS} \
+    --from-literal=METRICSDB_USERNAME=${QDB_USERNAME} \
+    --from-literal=METRICSDB_PASSWORD=${QDB_PASSWORD}
+printf "\n"
+
+echo "Deploying components and collecting environment variables..."
+ENV_VARS_SCRIPT=tfs_runtime_env_vars.sh
+echo "# Environment variables for TeraFlowSDN deployment" > $ENV_VARS_SCRIPT
+PYTHONPATH=$(pwd)/src
+echo "export PYTHONPATH=${PYTHONPATH}" >> $ENV_VARS_SCRIPT
+
+for COMPONENT in $TFS_COMPONENTS; do
+    echo "Processing '$COMPONENT' component..."
+
+    if [ "$TFS_SKIP_BUILD" != "YES" ]; then
+        echo "  Building Docker image..."
+        BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}.log"
+
+        if [ "$COMPONENT" == "automation" ] || [ "$COMPONENT" == "policy" ]; then
+            docker build -t "$COMPONENT:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/Dockerfile ./src/"$COMPONENT"/ > "$BUILD_LOG"
+        elif [ "$COMPONENT" == "pathcomp" ]; then
+            BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-frontend.log"
+            docker build -t "$COMPONENT-frontend:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/frontend/Dockerfile . > "$BUILD_LOG"
+
+            BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-backend.log"
+            docker build -t "$COMPONENT-backend:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/backend/Dockerfile . > "$BUILD_LOG"
+            # next command is redundant, but helpful to keep cache updated between rebuilds
+            IMAGE_NAME="$COMPONENT-backend:$TFS_IMAGE_TAG-builder"
+            docker build -t "$IMAGE_NAME" --target builder -f ./src/"$COMPONENT"/backend/Dockerfile . >> "$BUILD_LOG"
+        elif [ "$COMPONENT" == "dlt" ]; then
+            BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-connector.log"
+            docker build -t "$COMPONENT-connector:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/connector/Dockerfile . > "$BUILD_LOG"
+
+            BUILD_LOG="$TMP_LOGS_FOLDER/build_${COMPONENT}-gateway.log"
+            docker build -t "$COMPONENT-gateway:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/gateway/Dockerfile . > "$BUILD_LOG"
+        else
+            docker build -t "$COMPONENT:$TFS_IMAGE_TAG" -f ./src/"$COMPONENT"/Dockerfile . > "$BUILD_LOG"
+        fi
+
+        echo "  Pushing Docker image to '$TFS_REGISTRY_IMAGES'..."
+
+        if [ "$COMPONENT" == "pathcomp" ]; then
+            IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-frontend:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
+
+            TAG_LOG="$TMP_LOGS_FOLDER/tag_${COMPONENT}-frontend.log"
+            docker tag "$COMPONENT-frontend:$TFS_IMAGE_TAG" "$IMAGE_URL" > "$TAG_LOG"
+
+            PUSH_LOG="$TMP_LOGS_FOLDER/push_${COMPONENT}-frontend.log"
+            docker push "$IMAGE_URL" > "$PUSH_LOG"
+
+            IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-backend:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
+
+            TAG_LOG="$TMP_LOGS_FOLDER/tag_${COMPONENT}-backend.log"
+            docker tag "$COMPONENT-backend:$TFS_IMAGE_TAG" "$IMAGE_URL" > "$TAG_LOG"
+
+            PUSH_LOG="$TMP_LOGS_FOLDER/push_${COMPONENT}-backend.log"
+            docker push "$IMAGE_URL" > "$PUSH_LOG"
+        elif [ "$COMPONENT" == "dlt" ]; then
+            IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-connector:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
+
+            TAG_LOG="$TMP_LOGS_FOLDER/tag_${COMPONENT}-connector.log"
+            docker tag "$COMPONENT-connector:$TFS_IMAGE_TAG" "$IMAGE_URL" > "$TAG_LOG"
+
+            PUSH_LOG="$TMP_LOGS_FOLDER/push_${COMPONENT}-connector.log"
+            docker push "$IMAGE_URL" > "$PUSH_LOG"
+
+            IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-gateway:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
+
+            TAG_LOG="$TMP_LOGS_FOLDER/tag_${COMPONENT}-gateway.log"
+            docker tag "$COMPONENT-gateway:$TFS_IMAGE_TAG" "$IMAGE_URL" > "$TAG_LOG"
+
+            PUSH_LOG="$TMP_LOGS_FOLDER/push_${COMPONENT}-gateway.log"
+            docker push "$IMAGE_URL" > "$PUSH_LOG"
+        else
+            IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
+
+            TAG_LOG="$TMP_LOGS_FOLDER/tag_${COMPONENT}.log"
+            docker tag "$COMPONENT:$TFS_IMAGE_TAG" "$IMAGE_URL" > "$TAG_LOG"
+
+            PUSH_LOG="$TMP_LOGS_FOLDER/push_${COMPONENT}.log"
+            docker push "$IMAGE_URL" > "$PUSH_LOG"
+        fi
+    else 
+        for QUICK_COMPONENT in $TFS_QUICK_COMPONENTS; do
+            if [ "$COMPONENT" == "$QUICK_COMPONENT" ]; then
+                
+                echo "  Building Docker image..."
+                BUILD_LOG="$TMP_LOGS_FOLDER/build_${QUICK_COMPONENT}.log"
+
+                docker build -t "$QUICK_COMPONENT:$TFS_IMAGE_TAG" -f ./src/"$QUICK_COMPONENT"/Dockerfile . > "$BUILD_LOG"
+                echo "  Pushing Docker image to '$TFS_REGISTRY_IMAGES'..."
+
+                
+
+                IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$QUICK_COMPONENT:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
+
+                TAG_LOG="$TMP_LOGS_FOLDER/tag_${QUICK_COMPONENT}.log"
+                docker tag "$QUICK_COMPONENT:$TFS_IMAGE_TAG" "$IMAGE_URL" > "$TAG_LOG"
+
+                PUSH_LOG="$TMP_LOGS_FOLDER/push_${QUICK_COMPONENT}.log"
+                docker push "$IMAGE_URL" > "$PUSH_LOG"
+            fi
+        done
+    fi
+
+    echo "  Adapting '$COMPONENT' manifest file..."
+    MANIFEST="$TMP_MANIFESTS_FOLDER/${COMPONENT}service.yaml"
+    cp ./manifests/"${COMPONENT}"service.yaml "$MANIFEST"
+
+    if [ "$COMPONENT" == "pathcomp" ]; then
+        IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-frontend:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
+        VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}-frontend:" "$MANIFEST" | cut -d ":" -f4)
+        sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-frontend:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
+
+        IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-backend:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
+        VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}-backend:" "$MANIFEST" | cut -d ":" -f4)
+        sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-backend:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
+    elif [ "$COMPONENT" == "dlt" ]; then
+        IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-connector:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
+        VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}-connector:" "$MANIFEST" | cut -d ":" -f4)
+        sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-connector:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
+
+        IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT-gateway:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
+        VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}-gateway:" "$MANIFEST" | cut -d ":" -f4)
+        sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT-gateway:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
+    else
+        IMAGE_URL=$(echo "$TFS_REGISTRY_IMAGES/$COMPONENT:$TFS_IMAGE_TAG" | sed 's,//,/,g' | sed 's,http:/,,g')
+        VERSION=$(grep -i "${GITLAB_REPO_URL}/${COMPONENT}:" "$MANIFEST" | cut -d ":" -f4)
+        sed -E -i "s#image: $GITLAB_REPO_URL/$COMPONENT:${VERSION}#image: $IMAGE_URL#g" "$MANIFEST"
+    fi
+
+    sed -E -i "s#imagePullPolicy: .*#imagePullPolicy: Always#g" "$MANIFEST"
+
+    # TODO: harmonize names of the monitoring component
+
+    echo "  Deploying '$COMPONENT' component to Kubernetes..."
+    DEPLOY_LOG="$TMP_LOGS_FOLDER/deploy_${COMPONENT}.log"
+    kubectl --namespace $TFS_K8S_NAMESPACE apply -f "$MANIFEST" > "$DEPLOY_LOG"
+    COMPONENT_OBJNAME=$(echo "${COMPONENT}" | sed "s/\_/-/")
+    #kubectl --namespace $TFS_K8S_NAMESPACE scale deployment --replicas=0 ${COMPONENT_OBJNAME}service >> "$DEPLOY_LOG"
+    #kubectl --namespace $TFS_K8S_NAMESPACE scale deployment --replicas=1 ${COMPONENT_OBJNAME}service >> "$DEPLOY_LOG"
+
+    echo "  Collecting env-vars for '$COMPONENT' component..."
+
+    SERVICE_DATA=$(kubectl get service ${COMPONENT_OBJNAME}service --namespace $TFS_K8S_NAMESPACE -o json)
+    if [ -z "${SERVICE_DATA}" ]; then continue; fi
+
+    # Env vars for service's host address
+    SERVICE_HOST=$(echo ${SERVICE_DATA} | jq -r '.spec.clusterIP')
+    if [ -z "${SERVICE_HOST}" ]; then continue; fi
+    ENVVAR_HOST=$(echo "${COMPONENT}service_SERVICE_HOST" | tr '[:lower:]' '[:upper:]')
+    echo "export ${ENVVAR_HOST}=${SERVICE_HOST}" >> $ENV_VARS_SCRIPT
+
+    # Env vars for service's 'grpc' port (if any)
+    SERVICE_PORT_GRPC=$(echo ${SERVICE_DATA} | jq -r '.spec.ports[] | select(.name=="grpc") | .port')
+    if [ -n "${SERVICE_PORT_GRPC}" ]; then
+        ENVVAR_PORT_GRPC=$(echo "${COMPONENT}service_SERVICE_PORT_GRPC" | tr '[:lower:]' '[:upper:]')
+        echo "export ${ENVVAR_PORT_GRPC}=${SERVICE_PORT_GRPC}" >> $ENV_VARS_SCRIPT
+    fi
+
+    # Env vars for service's 'http' port (if any)
+    SERVICE_PORT_HTTP=$(echo ${SERVICE_DATA} | jq -r '.spec.ports[] | select(.name=="http") | .port')
+    if [ -n "${SERVICE_PORT_HTTP}" ]; then
+        ENVVAR_PORT_HTTP=$(echo "${COMPONENT}service_SERVICE_PORT_HTTP" | tr '[:lower:]' '[:upper:]')
+        echo "export ${ENVVAR_PORT_HTTP}=${SERVICE_PORT_HTTP}" >> $ENV_VARS_SCRIPT
+    fi
+
+    printf "\n"
+done
+
+echo "Deploying extra manifests..."
+for EXTRA_MANIFEST in $TFS_EXTRA_MANIFESTS; do
+    echo "Processing manifest '$EXTRA_MANIFEST'..."
+    if [[ "$EXTRA_MANIFEST" == *"servicemonitor"* ]]; then
+        kubectl apply -f $EXTRA_MANIFEST
+    else
+        kubectl --namespace $TFS_K8S_NAMESPACE apply -f $EXTRA_MANIFEST
+    fi
+    printf "\n"
+done
+printf "\n"
+
+for COMPONENT in $TFS_COMPONENTS; do
+    echo "Waiting for '$COMPONENT' component..."
+    COMPONENT_OBJNAME=$(echo "${COMPONENT}" | sed "s/\_/-/")
+    kubectl wait --namespace $TFS_K8S_NAMESPACE \
+        --for='condition=available' --timeout=300s deployment/${COMPONENT_OBJNAME}service
+    printf "\n"
+done
+
+if [[ "$TFS_COMPONENTS" == *"webui"* ]] && [[ "$TFS_COMPONENTS" == *"monitoring"* ]]; then
+    echo "Configuring WebUI DataStores and Dashboards..."
+    sleep 5
+
+    # Exposed through the ingress controller "tfs-ingress"
+    GRAFANA_URL="127.0.0.1:80/grafana"
+
+    # Default Grafana credentials
+    GRAFANA_USERNAME="admin"
+    GRAFANA_PASSWORD="admin"
+
+    # Configure Grafana Admin Password
+    # Ref: https://grafana.com/docs/grafana/latest/http_api/user/#change-password
+    GRAFANA_URL_DEFAULT="http://${GRAFANA_USERNAME}:${GRAFANA_PASSWORD}@${GRAFANA_URL}"
+
+    echo ">> Updating Grafana 'admin' password..."
+    curl -X PUT -H "Content-Type: application/json" -d '{
+        "oldPassword": "'${GRAFANA_PASSWORD}'",
+        "newPassword": "'${TFS_GRAFANA_PASSWORD}'",
+        "confirmNew" : "'${TFS_GRAFANA_PASSWORD}'"
+    }' ${GRAFANA_URL_DEFAULT}/api/user/password
+    echo
+    echo
+
+    # Updated Grafana API URL
+    GRAFANA_URL_UPDATED="http://${GRAFANA_USERNAME}:${TFS_GRAFANA_PASSWORD}@${GRAFANA_URL}"
+    echo "export GRAFANA_URL_UPDATED=${GRAFANA_URL_UPDATED}" >> $ENV_VARS_SCRIPT
+
+    echo ">> Installing Scatter Plot plugin..."
+    curl -X POST -H "Content-Type: application/json" -H "Content-Length: 0" \
+        ${GRAFANA_URL_UPDATED}/api/plugins/michaeldmoore-scatter-panel/install
+    echo
+
+    # Ref: https://grafana.com/docs/grafana/latest/http_api/data_source/
+    QDB_HOST_PORT="${METRICSDB_HOSTNAME}:${QDB_SQL_PORT}"
+    echo ">> Creating datasources..."
+    curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
+        "access"   : "proxy",
+        "type"     : "postgres",
+        "name"     : "questdb-mon-kpi",
+        "url"      : "'${QDB_HOST_PORT}'",
+        "database" : "'${QDB_TABLE_MONITORING_KPIS}'",
+        "user"     : "'${QDB_USERNAME}'",
+        "basicAuth": false,
+        "isDefault": true,
+        "jsonData" : {
+            "sslmode"               : "disable",
+            "postgresVersion"       : 1100,
+            "maxOpenConns"          : 0,
+            "maxIdleConns"          : 2,
+            "connMaxLifetime"       : 14400,
+            "tlsAuth"               : false,
+            "tlsAuthWithCACert"     : false,
+            "timescaledb"           : false,
+            "tlsConfigurationMethod": "file-path",
+            "tlsSkipVerify"         : true
+        },
+        "secureJsonData": {"password": "'${QDB_PASSWORD}'"}
+    }' ${GRAFANA_URL_UPDATED}/api/datasources
+    echo
+
+    curl -X POST -H "Content-Type: application/json" -H "Accept: application/json" -d '{
+        "access"   : "proxy",
+        "type"     : "postgres",
+        "name"     : "questdb-slc-grp",
+        "url"      : "'${QDB_HOST_PORT}'",
+        "database" : "'${QDB_TABLE_SLICE_GROUPS}'",
+        "user"     : "'${QDB_USERNAME}'",
+        "basicAuth": false,
+        "isDefault": false,
+        "jsonData" : {
+            "sslmode"               : "disable",
+            "postgresVersion"       : 1100,
+            "maxOpenConns"          : 0,
+            "maxIdleConns"          : 2,
+            "connMaxLifetime"       : 14400,
+            "tlsAuth"               : false,
+            "tlsAuthWithCACert"     : false,
+            "timescaledb"           : false,
+            "tlsConfigurationMethod": "file-path",
+            "tlsSkipVerify"         : true
+        },
+        "secureJsonData": {"password": "'${QDB_PASSWORD}'"}
+    }' ${GRAFANA_URL_UPDATED}/api/datasources
+    printf "\n\n"
+
+    echo ">> Creating dashboards..."
+    # Ref: https://grafana.com/docs/grafana/latest/http_api/dashboard/
+    curl -X POST -H "Content-Type: application/json" -d '@src/webui/grafana_db_mon_kpis_psql.json' \
+        ${GRAFANA_URL_UPDATED}/api/dashboards/db
+    echo
+
+    curl -X POST -H "Content-Type: application/json" -d '@src/webui/grafana_db_slc_grps_psql.json' \
+        ${GRAFANA_URL_UPDATED}/api/dashboards/db
+    printf "\n\n"
+
+    echo ">> Staring dashboards..."
+    DASHBOARD_URL="${GRAFANA_URL_UPDATED}/api/dashboards/uid/tfs-l3-monit"
+    DASHBOARD_ID=$(curl -s "${DASHBOARD_URL}" | jq '.dashboard.id')
+    curl -X POST ${GRAFANA_URL_UPDATED}/api/user/stars/dashboard/${DASHBOARD_ID}
+    echo
+
+    DASHBOARD_URL="${GRAFANA_URL_UPDATED}/api/dashboards/uid/tfs-slice-grps"
+    DASHBOARD_ID=$(curl -s "${DASHBOARD_URL}" | jq '.dashboard.id')
+    curl -X POST ${GRAFANA_URL_UPDATED}/api/user/stars/dashboard/${DASHBOARD_ID}
+    echo
+
+    printf "\n\n"
+fi
diff --git a/src/bgpls_speaker/requirements.in b/src/bgpls_speaker/requirements.in
new file mode 100644
index 0000000000000000000000000000000000000000..3af49b784a205ac6aada306219f5a2e658beea27
--- /dev/null
+++ b/src/bgpls_speaker/requirements.in
@@ -0,0 +1,23 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+anytree==2.8.0
+APScheduler==3.8.1
+ncclient==0.6.13
+python-json-logger==2.0.2
+lxml==4.9.1
+pytz==2021.3
+xmltodict==0.12.0
+grpcio==1.47.*
+protobuf==3.20.*
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/BgplsService.py b/src/bgpls_speaker/service/BgplsService.py
new file mode 100644
index 0000000000000000000000000000000000000000..3ac4d1c5bab56cfea2a0457893691175a5dfdfbb
--- /dev/null
+++ b/src/bgpls_speaker/service/BgplsService.py
@@ -0,0 +1,31 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from bgpls_speaker.service.tools.DiscoveredDBManager import DiscoveredDBManager
+from bgpls_speaker.service.tools.GrpcServer import GrpcServer
+from common.Constants import ServiceNameEnum
+from common.Settings import get_service_port_grpc
+from common.proto.bgpls_pb2_grpc import add_BgplsServiceServicer_to_server
+from common.tools.service.GenericGrpcService import GenericGrpcService
+from .BgplsServiceServicerImpl import BgplsServiceServicerImpl
+
+class BgplsService(GenericGrpcService):
+    def __init__(self, discoveredDB : DiscoveredDBManager,
+                 speakerServer : GrpcServer,cls_name: str = __name__) -> None:
+        port = get_service_port_grpc(ServiceNameEnum.BGPLS) # El enum en common.constants
+        super().__init__(port, cls_name=cls_name)
+        self.bgpls_servicer = BgplsServiceServicerImpl(discoveredDB,speakerServer)
+
+    def install_servicers(self):
+        add_BgplsServiceServicer_to_server(self.bgpls_servicer, self.server)
diff --git a/src/bgpls_speaker/service/BgplsServiceServicerImpl.py b/src/bgpls_speaker/service/BgplsServiceServicerImpl.py
new file mode 100644
index 0000000000000000000000000000000000000000..79862ee3b1204af105c5bd75c233f80ff3a9cf00
--- /dev/null
+++ b/src/bgpls_speaker/service/BgplsServiceServicerImpl.py
@@ -0,0 +1,192 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import grpc, json, logging
+from typing import List, Tuple, Union
+from bgpls_speaker.service.tools.DiscoveredDBManager import  DiscoveredDBManager, GetContextDevices
+from bgpls_speaker.service.tools.GrpcServer import GrpcServer
+from common.method_wrappers.Decorator import MetricsPool, safe_and_metered_rpc_method
+from common.proto.context_pb2 import DeviceId, Empty, EndPointId, Link, LinkId, Uuid
+from context.client.ContextClient import ContextClient
+from common.proto.bgpls_pb2 import (
+    BgplsSpeaker, BgplsSpeakerId, DiscoveredDeviceList, DiscoveredDevice,
+    DiscoveredLink, DiscoveredLinkList, NodeDescriptors, BgplsSpeakerList
+)
+from common.proto.bgpls_pb2_grpc import BgplsServiceServicer
+
+def json_to_list(json_str : str) -> List[Union[str, Tuple[str, str]]]:
+    try:
+        data = json.loads(json_str)
+    except: # pylint: disable=bare-except
+        return [('item', str(json_str))]
+
+    if isinstance(data, dict):
+        return [('kv', (key, value)) for key, value in data.items()]
+    elif isinstance(data, list):
+        return [('item', ', '.join(data))]
+    else:
+        return [('item', str(data))]
+    
+LOGGER = logging.getLogger(__name__)
+
+METRICS_POOL = MetricsPool('Service', 'RPC')
+
+class BgplsServiceServicerImpl(BgplsServiceServicer):
+    def __init__(self,discoveredDB : DiscoveredDBManager,
+                 speakerServer : GrpcServer) -> None:
+        LOGGER.debug('Creating Servicer...')
+        self.speaker_handler_factory = 1
+        self.speaker_server=speakerServer
+        self.discoveredDB=discoveredDB
+        LOGGER.debug('Servicer Created')
+    
+    @safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
+    def ListDiscoveredDevices(self, request : Empty, context : grpc.ServicerContext) -> DiscoveredDeviceList:
+        """
+        Get devices discovered from bgpls protocol
+        """
+        device_names=self.discoveredDB.GetNodeNamesFromDiscoveredDB()
+        nodes = self.discoveredDB.GetNodesFromDiscoveredDB()
+        devices = [DiscoveredDevice(nodeName=node.node_name,igpID=node.igp_id,learntFrom=node.learnt_from) for node in nodes]
+        return DiscoveredDeviceList(discovereddevices=devices)
+
+    @safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
+    def ListDiscoveredLinks(self, request : Empty, context : grpc.ServicerContext) -> DiscoveredLinkList:
+        """
+        Get links discovered from bgpls protocol
+        """
+        self.discoveredDB.UpdateNodeNameInLink()
+        links = self.discoveredDB.GetLinksFromDiscoveredDB()
+        links_info=[]
+        for link in links:
+            local=NodeDescriptors(igp_id=link.local_id,nodeName=link.local_id)
+            remote=NodeDescriptors(igp_id=link.remote_id,nodeName=link.remote_id)
+            links_info.append(DiscoveredLink(local=local,remote=remote,learntFrom=link.learnt_from,
+                                             local_ipv4=link.local_ipv4_id,remote_ipv4=link.remote_ipv4_id))
+        return DiscoveredLinkList(discoveredlinks=links_info)
+    
+    @safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
+    def AddBgplsSpeaker(self, request : BgplsSpeaker, context : grpc.ServicerContext) -> BgplsSpeakerId:
+        """
+        Creates a new connection with an speaker with the given ip address, port and as.
+        Returns de id of the speaker created (to kill proccess¿)
+        """
+        LOGGER.debug("(AddBgplsSpeaker) Create speaker instance %s",request)
+
+        speaker_id=self.speaker_server.connectToJavaBgpls(request.address,request.port,request.asNumber)
+        return BgplsSpeakerId(id=speaker_id)
+    
+    @safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
+    def ListBgplsSpeakers(self, request : Empty, context : grpc.ServicerContext) -> BgplsSpeakerId:
+        """
+        Returns a list of the IDs of the BGP-LS speakers with open connections. 
+        """
+        speaker_list=[]
+        bgpls_speaker_list=[]
+        speaker_list=self.speaker_server.getSpeakerListIds()
+        for speaker in speaker_list:
+            bgpls_speaker_list.append(BgplsSpeakerId(id=speaker))
+        return BgplsSpeakerList(speakers=bgpls_speaker_list)
+    
+    @safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
+    def DisconnectFromSpeaker(self, request : BgplsSpeaker, context : grpc.ServicerContext) -> bool:
+        """
+        Disconencts from the BGP-LS speaker given its ipv4 address.
+        """
+        speaker_id=self.speaker_server.getSpeakerIdFromIpAddr(request.address)
+        self.speaker_server.terminateRunnerById(speaker_id)
+        return Empty()
+
+    @safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
+    def GetSpeakerInfoFromId(self, request : BgplsSpeakerId, context : grpc.ServicerContext) -> BgplsSpeaker:
+        """
+        Get the address, port and as number of the speaker given its id.
+        """
+        address,as_number,port=self.speaker_server.getSpeakerFromId(request.id)
+        return BgplsSpeaker(address=address,port=port,asNumber=as_number)
+    
+    @safe_and_metered_rpc_method(METRICS_POOL, LOGGER)
+    def NotifyAddNodeToContext(self, request : DiscoveredDevice, context : grpc.ServicerContext) :
+        """
+        When a node is added to context via bgpls module this function checks if there are other nodes in the
+        topology connected by links discovered via bgpls. Then, if the link exist adds it to the context.
+        TODO: get endpoints from pce module
+        """
+        node_name=request.nodeName
+        node_igp=self.discoveredDB.GetIgpIdFromNodeName(node_name)
+        LOGGER.debug("(NotifyAddNodeToContext) Find links to nodes ")
+        nodes_conected=self.discoveredDB.FindConnectedNodes(node_igp)
+        # Check if nodes are in context
+        context_client=ContextClient()
+        context_client.connect()
+        # devices=context_client.ListDevices(Empty())
+        device_names,devices_ips=GetContextDevices(context_client)
+        LOGGER.debug("(NotifyAddNodeToContext) Devices in context: %s", device_names)
+        LOGGER.debug("(NotifyAddNodeToContext) Nodes conected in context: %s", nodes_conected)
+        nodes_conected_in_context=list(set(nodes_conected) & set(device_names))
+        LOGGER.debug("(NotifyAddNodeToContext) nodes_conected_in_context: %s", nodes_conected_in_context)
+        # TODO: next to function
+        for remote_node in nodes_conected_in_context:
+
+            # TODO: get endpoints connected to remote ip (pce¿)
+            end_point1="eth-1/0/20"
+            end_point2="eth-1/0/20"
+            end_point_uuid1=Uuid(uuid=end_point1)
+            end_point_uuid2=Uuid(uuid=end_point2)
+            
+            link_name_src_dest=node_name+"/"+end_point1+"=="+remote_node+"/"+end_point2
+            device_uuid_src=DeviceId(device_uuid=Uuid(uuid=node_name))
+            device_src=context_client.GetDevice(device_uuid_src)
+
+            link_name_dest_src=remote_node+"/"+end_point2+"=="+node_name+"/"+end_point1
+            device_uuid_dest=DeviceId(device_uuid=Uuid(uuid=remote_node))
+            device_dest=context_client.GetDevice(device_uuid_dest)
+
+            self.getEndpointFromIpInterface(device_src,link.local_ipv4_id)
+            self.getEndpointFromIpInterface(device_dest,link.remote_ipv4_id)
+            # LOGGER.debug("(NotifyAddNodeToContext) Source: %s Destination: %s", device_src,device_dest)
+
+            end_point_id1=EndPointId(endpoint_uuid=end_point_uuid1,device_id=device_uuid_src)
+            end_point_id2=EndPointId(endpoint_uuid=end_point_uuid2,device_id=device_uuid_dest)
+
+            end_point_ids_src_dest=[end_point_id1,end_point_id2]
+            end_point_ids_dest_src=[end_point_id2,end_point_id1]
+
+            link_id_src=context_client.SetLink(Link(link_id=LinkId(link_uuid=Uuid(uuid=link_name_src_dest)),
+                                                    link_endpoint_ids=end_point_ids_src_dest))
+            
+            link_id_dst=context_client.SetLink(Link(link_id=LinkId(link_uuid=Uuid(uuid=link_name_dest_src)),
+                                                    link_endpoint_ids=end_point_ids_dest_src))
+
+            LOGGER.debug("(NotifyAddNodeToContext) Link set id src--->dst: %s", link_id_src)
+        context_client.close()
+        return Empty()
+
+    def getEndpointFromIpInterface(self,device,ipv4):
+        """
+        Get TFS endpoint from interface IPv4.
+        """
+        for config in device.device_config.config_rules:
+            if config.WhichOneof('config_rule') == 'custom':
+                for item_type, item in json_to_list(config.custom.resource_value):
+                    if item_type == 'kv':
+                        # LOGGER.debug("(getEndpointFromIpInterface) item: %s",item)
+                        endpoint=item
+                LOGGER.debug("(getEndpointFromIpInterface) config: %s",config.custom.resource_key)
+                if "/interface" in config.custom.resource_key:
+                    interface=config.custom.resource_key.split("/interface")[1].strip("[]")
+                    LOGGER.debug("(getEndpointFromIpInterface) interface: %s",interface)
+                    if ipv4 in config.custom.resource_value:
+                        LOGGER.debug("(getEndpointFromIpInterface) value: %s",config.custom.resource_value)
+        return endpoint
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/__init__.py b/src/bgpls_speaker/service/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..f80ccfd52ebfd4fa1783267201c52eb7381741bf
--- /dev/null
+++ b/src/bgpls_speaker/service/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/__main__.py b/src/bgpls_speaker/service/__main__.py
new file mode 100644
index 0000000000000000000000000000000000000000..a56449eafb0eb40a31768e16f0fdcb1fa1dc72f8
--- /dev/null
+++ b/src/bgpls_speaker/service/__main__.py
@@ -0,0 +1,63 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import logging, signal, sys, threading
+from prometheus_client import start_http_server
+from common.Settings import get_log_level, get_metrics_port
+from .tools.DiscoveredDBManager import DiscoveredDBManager
+from .BgplsService import BgplsService
+from .tools.GrpcServer import GrpcServer
+
+terminate = threading.Event()
+LOGGER : logging.Logger = None
+_ONE_DAY_IN_SECONDS = 60 * 60 * 24
+
+def signal_handler(signal, frame): 
+    LOGGER.warning('Terminate signal received') 
+    LOGGER.warning(signal)
+    terminate.set()
+
+def main():
+    global LOGGER 
+    
+    log_level = get_log_level()
+    logging.basicConfig(level=log_level, format="[%(asctime)s] %(levelname)s:%(name)s:%(message)s")
+    LOGGER = logging.getLogger(__name__)
+    signal.signal(signal.SIGINT,  signal_handler)
+    signal.signal(signal.SIGTERM, signal_handler)
+
+    LOGGER.info('Starting...')
+
+    # Start metrics server
+    metrics_port = get_metrics_port()
+    start_http_server(metrics_port)
+    # One common database for all bgpls_speakers connection
+    DB=DiscoveredDBManager()
+    
+    speaker_server = GrpcServer(DB)
+    speaker_server.Connect()
+
+    grpc_service = BgplsService(DB,speaker_server)
+    grpc_service.start()
+
+    # Wait for termination signal
+    while not terminate.wait(timeout=0.1): pass
+    LOGGER.info('Terminating...')
+    speaker_server.terminateGrpcServer()
+    grpc_service.stop()
+    LOGGER.info('Bye')
+    return 0
+
+if __name__ == '__main__':
+    sys.exit(main())
diff --git a/src/bgpls_speaker/service/java/BGP4Parameters_3.xml b/src/bgpls_speaker/service/java/BGP4Parameters_3.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ec6894922db6cee3fa696a9610929041817e4c82
--- /dev/null
+++ b/src/bgpls_speaker/service/java/BGP4Parameters_3.xml
@@ -0,0 +1,65 @@
+ <!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License. -->
+
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>12179</BGP4Port>
+	<BGPIdentifier>7.7.7.7</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1112</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>10.95.90.43</peer>
+                <export>false</export>
+                <import>true</import>
+                <peerPort>179</peerPort>
+    </configPeer>
+
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser2.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client2.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server2.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>true</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>65006</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>false</sendTopology>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromBGP</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--<topologyFile>src/test/resources/network1.xml</topologyFile>-->
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/java/exec_speakear_java.sh b/src/bgpls_speaker/service/java/exec_speakear_java.sh
new file mode 100644
index 0000000000000000000000000000000000000000..10f84c6537714982a1441b284b45b59373e9b49f
--- /dev/null
+++ b/src/bgpls_speaker/service/java/exec_speakear_java.sh
@@ -0,0 +1,19 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#!/bin/bash
+cd netphony-topology/
+"/home/ubuntu/downloads/apache-maven-3.8.8/bin/mvn" clean package -P bgp-ls-speaker assembly:single -DskipTests
+cd ..
+sudo java -jar netphony-topology/target/bgp-ls-speaker-jar-with-dependencies.jar BGP4Parameters_3.xml
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/java/netphony-topology/.settings/org.eclipse.jdt.core.prefs b/src/bgpls_speaker/service/java/netphony-topology/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000000000000000000000000000000000..cb635b1c2a6bee7b1279cac6db56bd9ee2f6c271
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore
+org.eclipse.jdt.core.compiler.release=disabled
+org.eclipse.jdt.core.compiler.source=1.8
diff --git a/src/bgpls_speaker/service/java/netphony-topology/BGP4Parameters_3.xml b/src/bgpls_speaker/service/java/netphony-topology/BGP4Parameters_3.xml
new file mode 100644
index 0000000000000000000000000000000000000000..063344673d2a07b7fdf2f69871c44518cd7f2d1a
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/BGP4Parameters_3.xml
@@ -0,0 +1,65 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>12179</BGP4Port>
+	<BGPIdentifier>7.7.7.7</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1112</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>10.95.90.43</peer>
+                <export>false</export>
+                <import>true</import>
+                <peerPort>179</peerPort>
+    </configPeer>
+
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser2.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client2.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server2.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>true</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>100</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>false</sendTopology>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromBGP</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--<topologyFile>src/test/resources/network1.xml</topologyFile>-->
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/java/netphony-topology/CHANGELOG b/src/bgpls_speaker/service/java/netphony-topology/CHANGELOG
new file mode 100644
index 0000000000000000000000000000000000000000..4049eba8ae25be4be928f0b937d80788d6c955eb
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/CHANGELOG
@@ -0,0 +1,50 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#      http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+v1.3.3
+- Topology Module added
+- Topology Module: Export via RESCONF with COP model
+- Topology Module: Export via RESTCONF with IETF model (nodes only)
+- Topology Module: Export via UNIFY model
+- Topology Module: Import via XML
+- Topology Module: Import/Export via BGP-LS
+v1.3.2
+- Supports network-protocols 1.3.2
+- Update to support reading multiple AS_PATH
+- Apache 2.0 license
+- Moved to slf4j logging framework
+- Added method to pass multiple TEDs from en external program
+- Added docker support in travis
+v1.3
+- Compile with networking-protocols v1.3.0 (available in maven central)
+- JUnit Test upgrade to check intraTEDBs after sending
+- Added functionality: read multiple intraTEDBs from xml file
+- Added support to draft-previdi-idr-bgpls-te-metric-extensions-00
+v1.2.2
+- Added travis integration
+- Javadoc errors fixed
+- Ready to meet maven central requirements
+- Compile with networking-protocols v1.2.3 (available in maven central)
+v1.2.1
+- Compile with networking-protocols v1.2.1
+v1.2
+- JUnit Test added
+- Bugfixes
+- Reduced number of logs
+- Updated README with explanation of parameters
+v1.1.1
+- Added configuration instructions of the standalone BGP Peer 
+- Added dependencies to pom.xml
+v1.1.0
+First Public Release
diff --git a/src/bgpls_speaker/service/java/netphony-topology/LICENSE b/src/bgpls_speaker/service/java/netphony-topology/LICENSE
new file mode 100644
index 0000000000000000000000000000000000000000..d645695673349e3947e8e5ae42332d0ac3164cd7
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/LICENSE
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/src/bgpls_speaker/service/java/netphony-topology/VERSION b/src/bgpls_speaker/service/java/netphony-topology/VERSION
new file mode 100644
index 0000000000000000000000000000000000000000..31e5c843497c24df077777c05af122d8b3a60ddb
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/VERSION
@@ -0,0 +1 @@
+1.3.3
diff --git a/src/bgpls_speaker/service/java/netphony-topology/doc/Examples.md b/src/bgpls_speaker/service/java/netphony-topology/doc/Examples.md
new file mode 100644
index 0000000000000000000000000000000000000000..88f7a7bd5c7a268857a7a4ec2642c388daf715d3
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/doc/Examples.md
@@ -0,0 +1,133 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+#Examples 
+
+##Topology Module Examples
+
+Two sets of basic configuration files are here included with Topology Module software: the setup for running three TM within the same machine (configuration A) and the setup for running three TM in three dedicated machines (configuration B). In both cases three example network topologies are provided to represent the abstract topology of 2 end-point providers and 1 transit provider.
+
+### Example TM1: 1 Way Test in the same virtual machine, BPG-LS Plugin and UNIFY Export.
+
+The setup has been provided just for testing purpose and configures 3 TADS in the same machine to perform unidirectional information exchange.
+
+![1WayTest](figures/1wayTest.png?raw=true "Test with 3 TM")
+
+The reference files, including Topology Module configuration, BGP-LS Plugin configuration and abstracted topologies are copiend in the folder target/conf1wayTest after the maven installation. Be sure to compile also the Topology Module as indicated in README.md. 
+
+To execute TM1 run:
+  ```bash
+  sudo java -Dlog4j.configurationFile=target/log4j2.xml  -jar target/topology-1.3.3-shaded.jar target/conf1wayTest/TM1.xml
+  ```
+
+To execute TM2 run:
+   ```bash
+ sudo java -Dlog4j.configurationFile=target/log4j2.xml  -jar target/topology-1.3.3-shaded.jar target/conf1wayTest/TM2.xml
+  ```
+
+To execute TM3 run:
+   ```bash
+ sudo java -Dlog4j.configurationFile=target/log4j2.xml  -jar target/topology-1.3.3-shaded.jar target/conf1wayTest/TM3.xml
+  ```
+
+To verify the retrieved information:
+  ```bash
+curl http://localhost:8087/restconf/data/virtualizer/ | python -m json.tool     
+  ```
+[for TADS2]
+  ```bash
+curl http://localhost:8088/restconf/data/virtualizer/ | python -m json.tool     
+  ```
+[for TADS3]
+  ```bash
+curl http://localhost:8089/restconf/data/virtualizer/ | python -m json.tool
+   ```
+  
+### Example TM2:   2 Way Test in the different virtual machines, BPG-LS Plugin and UNIFY Export.
+The setup has been provided as reference configuration for the configuration of 3 TM in dedicated machines to perform bidirectional exchange of information 
+![1WayTest](figures/2wayTest.png?raw=true "Test with 3 TM in 3 different machines")
+The reference files, including Topology Module configuration, BGP-LS Plugin configuration and abstracted topologies are in
+   ```bash
+target/conf2waysReal
+  ```
+Before running the reference scenario be sure to complete the IP configuration in the 3 modules, in fact, according to previous description, minor ad-hoc changes are needed.
+
+In the Topology Module configuration files (TM*.xml): 
+•	set the IP address used for the BGP-LS communication as Identifier
+
+In the BGP-LS Plugin configuration (BGPLS*_2way.xml):
+•	set the IP address used for the BGP-LS communication as BGPIdentifier
+•	configure the peers as needed (IP address and port) 
+
+[where * = 1,2,3] 
+
+To execute TADS1 in machine 1 run:
+  ```bash
+  sudo java -Dlog4j.configurationFile=target/log4j2.xml  -jar target/topology-1.3.3-shaded.jar target/conf1wayTest/TM1.xml
+  ```
+
+To execute TADS1 in machine 2 run:
+   ```bash
+ sudo java -Dlog4j.configurationFile=target/log4j2.xml  -jar target/topology-1.3.3-shaded.jar target/conf1wayTest/TM2.xml
+  ```
+
+To execute TADS1 in machine 3 run:
+   ```bash
+ sudo java -Dlog4j.configurationFile=target/log4j2.xml  -jar target/topology-1.3.3-shaded.jar target/conf1wayTest/TM3.xml
+  ```
+
+To verify the retrieved information:
+[for TADS2, in machine 1]
+  ```bash
+curl http://localhost:8088/restconf/data/virtualizer/ | python -m json.tool     
+  ```
+[for TADS2, in machine 2]
+  ```bash
+>curl http://localhost:8088/restconf/data/virtualizer/ | python -m json.tool     
+  ```
+[for TADS3, in machine 3]
+  ```bash
+>curl http://localhost:8088/restconf/data/virtualizer/ | python -m json.tool
+   ```
+###  Topology module with BGP-LS and COP plugins and BGP-LS speaker
+
+In this example there are 2 BGP-LS speakers, one acting as sender of topology, and the other as consumer. A small topology is loaded from an xml file in BGP-LS Speaker #1. This topology is sent to BGP-LS Speaker #2.  
+  ```bash
+TBD
+  ```
+### Topology module with BGP-LS and COP plugins and Topology module with BGP-LS speaker
+
+In this example there are 2 BGP-LS speakers, one acting as sender of topology, and the other as consumer. A small topology is loaded from an xml file in BGP-LS Speaker #1. This topology is sent to BGP-LS Speaker #2.  
+  ```bash
+TBD
+  ```
+## BGP-LS Speaker Examples
+
+### BPP-LS Speaker Example 1  
+
+In this example there are 2 BGP-LS speakers, one acting as sender of topology, and the other as consumer. A small topology is loaded from an xml file in BGP-LS Speaker #1. This topology is sent to BGP-LS Speaker #2.  
+To launch BGP-LS Speaker #1:
+  ```bash
+sudo java -Dlog4j.configurationFile=target/log4j2.xml  -jar target/bgp-ls-speaker-jar-with-dependencies.jar target/bgpls_example1/BGP4Parameters_1.xml
+ ```
+ BGP-LS Speaker #2:
+  ```bash
+sudo java -Dlog4j.configurationFile=target/log4j2.xml  -jar target/bgp-ls-speaker-jar-with-dependencies.jar target/bgpls_example1/BGP4Parameters_2.xml
+ ```
+To verify the retrieved information:
+  ```bash
+telnet localhost 1112
+show topology
+ ```
+Then, the topology is printed on screen.
diff --git a/src/bgpls_speaker/service/java/netphony-topology/doc/TAPIExample.md b/src/bgpls_speaker/service/java/netphony-topology/doc/TAPIExample.md
new file mode 100644
index 0000000000000000000000000000000000000000..9b0c48c8ed24fe8ca5c06f118b3d440653c686e5
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/doc/TAPIExample.md
@@ -0,0 +1,27 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+# Example 1: TM with XML Plugin and TAPI Plugin
+- First of all, compile the full-jar if you have not done so
+```bash
+ mvn package -P generate-full-jar
+```
+Execute the server
+```bash
+sudo java -Dlog4j.configurationFile=target/examples/log4j2.xml  -jar target/topology-1.3.4-SNAPSHOT-shaded.jar target/TM_TAPI_example1/TMConfTAPI.xml
+```
+Make the query
+```bash
+curl http://localhost:8089/config/context/topology -X GET -i -H "Content-Type: application/json" -H "Accept: application/json"
+```
diff --git a/src/bgpls_speaker/service/java/netphony-topology/doc/TopologyFileDescription.md b/src/bgpls_speaker/service/java/netphony-topology/doc/TopologyFileDescription.md
new file mode 100644
index 0000000000000000000000000000000000000000..452050b65106b8393ac8a7df98ea472b7705e608
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/doc/TopologyFileDescription.md
@@ -0,0 +1,127 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+# Topology XML File
+
+This section describes the topology file format, used by the TADS to load the abstracted view of the local provider.
+
+The reference file for this description is 
+
+```
+target/conf1wayTest/network1.xml
+```
+
+The main tag of the file is **network** that can include multiple **domains**, each domain represents a provider.
+
+```xml
+<network>
+    <domain>
+    </domain>
+    <domain>
+    </domain>
+</network>
+```
+
+In this case the network topology includes two providers.
+
+The first part of the each domain contains some general information:
+
+ - **domain_id**: the AS number of the domain represented in IPv4 format 
+ - the **reachability_entry**: that summarizes the prefix network for the provider (IPv4 network prefix and mask)
+ - **it_resources**: here the information related to overall IT resources availability is described considering 
+  - **controller_it**: the entry point for 5GEx orchestration
+  - **cpu**: overall available CPUs
+  - **mem**: overall available memory
+  - **storage**: overall available storage
+
+```xml
+<domain_id>0.0.0.1</domain_id>
+<reachability_entry>
+    <ipv4_address>172.16.101.0</ipv4_address>
+    <prefix>24</prefix>
+</reachability_entry>
+<it_resources>
+    <controller_it>https://openstack.5Gex.com/url</controller_it>
+    <cpu>100</cpu>
+    <mem>100Gbyte</mem>
+    <storage>100Tbyte</storage>
+</it_resources>
+```
+
+Then the file is organized considering a list of nodes and a list unidirectional links.
+
+Each node is represented with a tag **node** and is identified with an IPv4 id called **router_id**
+
+```xml
+<node>
+    <router_id>172.16.101.101</router_id>
+</node>
+<node>
+    <router_id>172.16.101.102</router_id>
+</node>
+<node>
+    <router_id>172.16.101.103</router_id>
+</node>
+<node>
+    <router_id>172.16.101.104</router_id>
+</node>
+```
+
+In the reference case 4 nodes are considered.
+Each link is identified by the tag **edge**.
+The link description include:
+
+
+ - **source**: the source node of the link, identified with the pair **router_id** and interface id, **if_id**
+ - **destination**: the destination node of the link, identified with the pair router_id and interface
+ - **TE parameters**: several possibilities are available, in the considered example the focus was on
+  - unidirectional link delay
+  - minimum experienced delay
+  - maximum experienced delay
+
+```xml
+<edge>
+    <source>
+        <router_id>172.16.101.101</router_id>
+        <if_id>1</if_id>
+    </source>			
+    <destination>
+        <router_id>172.16.101.104</router_id>
+        <if_id>1</if_id>
+    </destination>	
+    <undir_delay_link>99</undir_delay_link>
+    <undir_min_max_delay>
+        <min>23</min>
+        <max>250</max>
+    </undir_min_max_delay>	
+</edge>
+
+```
+
+For setting up default TE parameters for all the network links, the **edgeCommon** tag is used.
+
+```xml
+<edgeCommon>
+    <undir_delay_link>99</undir_delay_link>
+    <undir_min_max_delay>
+        <min>23</min>
+        <max>43</max>	
+    </undir_min_max_delay>	
+    <undir_delay_variation>1</undir_delay_variation>
+    <undir_link_loss>102</undir_link_loss>
+    <undir_residual_bandwidth>802</undir_residual_bandwidth>
+    <undir_available_bandwidth>500</undir_available_bandwidth>
+    <undir_utilized_bandwidth>436</undir_utilized_bandwidth>	
+</edgeCommon>
+```
diff --git a/src/bgpls_speaker/service/java/netphony-topology/doc/figures/1wayTest.png b/src/bgpls_speaker/service/java/netphony-topology/doc/figures/1wayTest.png
new file mode 100644
index 0000000000000000000000000000000000000000..021dd3ee5c6dff653af4131f8060e0b7cac88f1d
Binary files /dev/null and b/src/bgpls_speaker/service/java/netphony-topology/doc/figures/1wayTest.png differ
diff --git a/src/bgpls_speaker/service/java/netphony-topology/doc/figures/2wayTest.png b/src/bgpls_speaker/service/java/netphony-topology/doc/figures/2wayTest.png
new file mode 100644
index 0000000000000000000000000000000000000000..4800df6d96874c480059be8cc905e753b8614f2b
Binary files /dev/null and b/src/bgpls_speaker/service/java/netphony-topology/doc/figures/2wayTest.png differ
diff --git a/src/bgpls_speaker/service/java/netphony-topology/log4j2.xml b/src/bgpls_speaker/service/java/netphony-topology/log4j2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..d0b383697fccd29960486751685e927d76dda34c
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/log4j2.xml
@@ -0,0 +1,36 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+    <Configuration status="TRACE">
+      <Appenders>
+        <Console name="trace" target="SYSTEM_OUT">
+          <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+        </Console>
+      </Appenders>
+      <Loggers>
+        <Logger name="BGP4Peer" level="trace" additivity="false">
+          <AppenderRef ref="Console"/>
+        </Logger>
+        <Logger name="BGP4Server" level="trace" additivity="false">
+          <AppenderRef ref="Console"/>
+        </Logger>
+        <Logger name="BGP4Parser" level="trace" additivity="false">
+          <AppenderRef ref="Console"/>
+        </Logger>
+        <Root level="trace">
+          <AppenderRef ref="Console"/>
+        </Root>
+      </Loggers>
+    </Configuration>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/pom.xml b/src/bgpls_speaker/service/java/netphony-topology/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..be949361d720695e225e4c9fc08c9730f453fd8a
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/pom.xml
@@ -0,0 +1,497 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>es.tid.netphony</groupId>
+	<artifactId>topology</artifactId>
+	<version>1.4.0-SNAPSHOT</version>
+	<packaging>jar</packaging>
+	<name>Netphony TED and BGP-LS peer</name>
+	<description>Traffic Engineering Database, BGP-LS peer, Topology Module</description>
+	<url>http://telefonicaid.github.io/netphony-topology/</url>
+	<licenses>
+		<license>
+			<name>Apache License 2.0</name>
+			<url>http://www.apache.org/licenses/LICENSE-2.0</url>
+			<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/) -->
+
+			<!-- Licensed under the Apache License, Version 2.0 (the "License"); -->
+			<!-- you may not use this file except in compliance with the License. -->
+			<!-- You may obtain a copy of the License at -->
+
+				<!-- http://www.apache.org/licenses/LICENSE-2.0 -->
+
+			<!-- Unless required by applicable law or agreed to in writing, software -->
+			<!-- distributed under the License is distributed on an "AS IS" BASIS, -->
+			<!-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -->
+			<!-- See the License for the specific language governing permissions and -->
+			<!-- limitations under the License.  -->
+		</license>
+	</licenses>
+	<dependencies>
+		
+		<dependency>
+			<groupId>com.sun.jersey</groupId>
+			<artifactId>jersey-json</artifactId>
+			<version>${jersey-version}</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<version>${slf4j-version}</version>
+		</dependency>
+		<!--			Error slf4j	-->
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-simple</artifactId>
+			<version>${slf4j-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>es.tid.netphony</groupId>
+			<artifactId>network-protocols</artifactId>
+			<version>1.4.1</version>
+			<!-- Next local repo only on docker container -->
+			<!-- <scope>system</scope> 
+			<systemPath>/protocols/target/network-protocols-1.1-SNAPSHOT.jar</systemPath> -->
+		</dependency>
+		<dependency>
+			<groupId>org.jgrapht</groupId>
+			<artifactId>jgrapht-core</artifactId>
+			<version>${jgrapht-core-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>com.google.code.gson</groupId>
+			<artifactId>gson</artifactId>
+			<version>2.2.2</version>
+		</dependency>
+		<dependency>
+			<groupId>com.googlecode.json-simple</groupId>
+			<artifactId>json-simple</artifactId>
+			<version>1.1.1</version>
+		</dependency>
+		<dependency>
+			<groupId>com.metaparadigm</groupId>
+			<artifactId>json-rpc</artifactId>
+			<version>1.0</version>
+		</dependency>
+		<dependency>
+			<groupId>redis.clients</groupId>
+			<artifactId>jedis</artifactId>
+			<version>2.1.0</version>
+		</dependency>
+		<!-- JSON processing: jackson -->
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-core</artifactId>
+			<version>${jackson-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-annotations</artifactId>
+			<version>${jackson-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.core</groupId>
+			<artifactId>jackson-databind</artifactId>
+			<version>${jackson-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>com.fasterxml.jackson.datatype</groupId>
+			<artifactId>jackson-datatype-joda</artifactId>
+			<version>${jackson-datatype-joda-version}</version>
+		</dependency>
+		
+		<dependency>
+			<groupId>joda-time</groupId>
+			<artifactId>joda-time</artifactId>
+			<version>${jodatime-version}</version>
+		</dependency>
+		
+		<!--GRPC DEPENDENCIES-->
+		<dependency>
+			<groupId>io.grpc</groupId>
+			<artifactId>grpc-netty-shaded</artifactId>
+			<version>${grpc-protobuf-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>io.grpc</groupId>
+			<artifactId>grpc-protobuf</artifactId>
+			<version>${grpc-protobuf-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>io.grpc</groupId>
+			<artifactId>grpc-stub</artifactId>
+			<version>${grpc-stub-version}</version>
+		</dependency>
+		<dependency>
+			<groupId>javax.annotation</groupId>
+			<artifactId>javax.annotation-api</artifactId>
+			<version>${javax-annotation-api-version}</version>
+		</dependency>
+		<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
+		<dependency>
+		    <groupId>com.google.guava</groupId>
+		    <artifactId>guava</artifactId>
+		    <version>31.1-jre</version>
+		</dependency>
+
+	</dependencies>
+	<developers>
+		<developer>
+			<name>Telefonica I+D</name>
+			<email>oscar.gonzalezdedios@telefonica.com</email>
+			<organization>Telefonica I+D</organization>
+			<organizationUrl>https://www.tid.es</organizationUrl>
+		</developer>
+	</developers>
+	<scm>
+		<connection>scm:git:git@github.com:telefonicaid/netphony-topology.git</connection>
+		<developerConnection>scm:git:git@github.com:telefonicaid/netphony-topology.git</developerConnection>
+		<url>git@github.com:telefonicaid/netphony-topology.git</url>
+	</scm>
+	<repositories>
+		<!--Enables to get SNAPSHOTS-->
+		<repository>
+			<id>oss.sonatype.org-snapshot</id>
+			<url>http://oss.sonatype.org/content/repositories/snapshots</url>
+			<releases>
+				<enabled>false</enabled>
+			</releases>
+			<snapshots>
+				<enabled>true</enabled>
+			</snapshots>
+		</repository>
+	</repositories>
+	<distributionManagement>
+		<snapshotRepository>
+			<id>ossrh</id>
+			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
+		</snapshotRepository>
+		<repository>
+			<id>ossrh</id>
+			<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
+		</repository>
+	</distributionManagement>
+	<build>
+		<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
+		<extensions>
+			<extension>
+				<groupId>kr.motd.maven</groupId>
+				<artifactId>os-maven-plugin</artifactId>
+				<version>1.6.2</version>
+			</extension>
+		</extensions>
+		<plugins>
+			<!--GRPC plugins + extensions-->
+			<plugin>
+				<groupId>org.xolstice.maven.plugins</groupId>
+				<artifactId>protobuf-maven-plugin</artifactId>
+				<version>0.6.1</version>
+				<configuration>
+					<protocArtifact>com.google.protobuf:protoc:3.9.0:exe:${os.detected.classifier}</protocArtifact>
+					<pluginId>grpc-java</pluginId>
+					<pluginArtifact>io.grpc:protoc-gen-grpc-java:1.24.0:exe:${os.detected.classifier}</pluginArtifact>
+				</configuration>
+				<executions>
+					<execution>
+						<goals>
+							<goal>compile</goal>
+							<goal>compile-custom</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>3.8.1</version>
+				<configuration>
+					<source>8</source>
+					<target>8</target>
+					<encoding>UTF-8</encoding>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-resources-plugin</artifactId>
+				<version>2.6</version>
+				<configuration>
+                	<encoding>UTF-8</encoding>
+            	</configuration>
+				<executions>
+					<execution>
+						<id>copy-resources</id>
+						<phase>validate</phase>
+						<goals>
+							<goal>copy-resources</goal>
+						</goals>
+						<configuration>
+							<outputDirectory>${basedir}/target</outputDirectory>
+							<resources>
+								<resource>
+									<directory>${basedir}/src/main/resources</directory>
+									<filtering>true</filtering>
+								</resource>
+								<resource>
+									<directory>${basedir}/src/main/sample-config-files</directory>
+									<filtering>true</filtering>
+								</resource>
+							</resources>
+						</configuration>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-source-plugin</artifactId>
+				<version>2.2.1</version>
+				<executions>
+					<execution>
+						<id>attach-sources</id>
+						<goals>
+							<goal>jar-no-fork</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+			<!-- Build an executable JAR -->
+			<groupId>org.apache.maven.plugins</groupId>
+			<artifactId>maven-jar-plugin</artifactId>
+			<version>3.1.0</version>
+			<configuration>
+				<archive>
+				<manifest>
+					<addClasspath>true</addClasspath>
+					<classpathPrefix>lib/</classpathPrefix>
+					<mainClass>eu.teraflow.tid.bgp4Peer.peer.BGPPeerMain</mainClass>
+				</manifest>
+				</archive>
+			</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<profiles>
+		<profile>
+			<id>deploy-maven-central</id>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-javadoc-plugin</artifactId>
+						<version>2.9.1</version>
+						<configuration>
+							<additionalparam>-Xdoclint:none</additionalparam>
+						</configuration>
+						<executions>
+							<execution>
+								<id>attach-javadocs</id>
+								<goals>
+									<goal>jar</goal>
+								</goals>
+							</execution>
+						</executions>
+					</plugin>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-gpg-plugin</artifactId>
+						<version>1.6</version>
+						<executions>
+							<execution>
+								<id>sign-artifacts</id>
+								<phase>verify</phase>
+								<goals>
+									<goal>sign</goal>
+								</goals>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+		<profile>
+			<id>bgp-ls-speaker</id>
+			<dependencies>
+				<dependency>
+					<groupId>org.apache.logging.log4j</groupId>
+					<artifactId>log4j-slf4j-impl</artifactId>
+					<version>2.5</version>
+				</dependency>
+				<dependency>
+					<groupId>org.apache.logging.log4j</groupId>
+					<artifactId>log4j-api</artifactId>
+					<version>2.5</version>
+				</dependency>
+				<dependency>
+					<groupId>org.apache.logging.log4j</groupId>
+					<artifactId>log4j-core</artifactId>
+					<version>2.5</version>
+				</dependency>
+				<dependency>
+					<groupId>io.netty</groupId>
+					<artifactId>netty-transport-native-epoll</artifactId>
+					<version>4.1.77.Final</version>
+					<classifier>linux-x86_64</classifier>
+				</dependency>
+			</dependencies>
+			<build>
+				<plugins>
+					<plugin>
+						<artifactId>maven-assembly-plugin</artifactId>
+						<version>3.3.0</version>
+						<configuration>
+							<descriptorRefs>
+								<descriptorRef>jar-with-dependencies</descriptorRef>
+							</descriptorRefs>
+							<finalName>bgp-ls-speaker</finalName>
+							<archive>
+								<manifest>
+									<mainClass>eu.teraflow.tid.bgp4Peer.peer.BGPPeerMain</mainClass>
+								</manifest>
+							</archive>
+						</configuration>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+		<profile>
+			<id>generate-javadoc</id>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-javadoc-plugin</artifactId>
+						<configuration>
+							<failOnError>false</failOnError>
+						</configuration>
+						<version>2.9.1</version>
+						<executions>
+							<execution>
+								<id>attach-javadocs</id>
+								<goals>
+									<goal>jar</goal>
+								</goals>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+		<profile>
+			<id>integration-test</id>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-failsafe-plugin</artifactId>
+						<version>2.13</version>
+						<executions>
+							<execution>
+								<id>integration-test</id>
+								<goals>
+									<goal>integration-test</goal>
+								</goals>
+							</execution>
+							<execution>
+								<id>verify</id>
+								<goals>
+									<goal>verify</goal>
+								</goals>
+							</execution>
+						</executions>
+					</plugin>
+					<!--					No encuentra surefire-->
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-surefire-plugin</artifactId>
+						<version>2.19.1</version>
+						<configuration>
+							<testFailureIgnore>true</testFailureIgnore>
+							<!--		                <shutdown>kill</shutdown>  Use it if required-->
+						</configuration>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+		<profile>
+			<id>generate-full-jar</id>
+			<dependencies>
+				<dependency>
+					<groupId>org.apache.logging.log4j</groupId>
+					<artifactId>log4j-slf4j-impl</artifactId>
+					<version>2.5</version>
+				</dependency>
+				<dependency>
+					<groupId>org.apache.logging.log4j</groupId>
+					<artifactId>log4j-api</artifactId>
+					<version>2.5</version>
+				</dependency>
+				<dependency>
+					<groupId>org.apache.logging.log4j</groupId>
+					<artifactId>log4j-core</artifactId>
+					<version>2.5</version>
+				</dependency>   
+			</dependencies>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-shade-plugin</artifactId>
+						<version>2.4.3</version>
+						<executions>
+							<execution>
+								<phase>package</phase>
+								<goals>
+									<goal>shade</goal>
+								</goals>
+								<configuration>
+									<shadedArtifactAttached>true</shadedArtifactAttached>
+									<filters>
+										<filter>
+											<artifact>*:*</artifact>
+											<!-- <excludes>
+												<exclude>META-INF/*.SF</exclude>
+												<exclude>META-INF/*.DSA</exclude>
+												<exclude>META-INF/*.RSA</exclude>
+											</excludes> -->
+										</filter>
+									</filters>
+									<minimizeJar>false</minimizeJar>
+									<transformers>
+										<!-- <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> -->
+										<transformer
+											implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
+											<mainClass>eu.teraflow.tid.bgp.bgp4Peer.peer.BGPPeerMain</mainClass>
+											 <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+										</transformer>
+									</transformers>
+								</configuration>
+							</execution>
+							<execution>
+								<id>make-assembly</id> <!-- this is used for inheritance merges -->
+								<phase>package</phase> <!-- bind to the packaging phase -->
+								<goals>
+									<goal>single</goal>
+								</goals>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+		</profile>
+	</profiles>
+	<properties>
+		
+		<jersey-version>1.19.4</jersey-version> 
+		<slf4j-version>2.0.6</slf4j-version>
+		<junit-version>4.8.1</junit-version>
+		<servlet-api-version>2.5</servlet-api-version>
+		<jackson-version>2.4.2</jackson-version>
+		<jodatime-version>2.3</jodatime-version>
+		<surefire-version>2.19.1</surefire-version>
+		<jgrapht-core-version>0.9.1</jgrapht-core-version>
+		<javax-annotation-api-version>1.3.2</javax-annotation-api-version>
+		<grpc-stub-version>1.24.0</grpc-stub-version>
+		<grpc-protobuf-version>1.46.0</grpc-protobuf-version>
+		<jackson-datatype-joda-version>2.1.5</jackson-datatype-joda-version>
+	</properties>
+</project>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4PeerInitiatedSession.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4PeerInitiatedSession.java
new file mode 100644
index 0000000000000000000000000000000000000000..e5a37e74344acd28c04428f02ac59d1692720aaf
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4PeerInitiatedSession.java
@@ -0,0 +1,188 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.bgp4session;
+
+import es.tid.bgp.bgp4.messages.BGP4Message;
+import es.tid.bgp.bgp4.messages.BGP4MessageTypes;
+import es.tid.bgp.bgp4.messages.BGP4Update;
+import eu.teraflow.tid.bgp4Peer.peer.BGP4Exception;
+import eu.teraflow.tid.bgp4Peer.updateTEDB.UpdateDispatcher;
+
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.Inet4Address;
+import java.net.InetSocketAddress;
+import java.net.Socket;
+import java.net.SocketException;
+import java.util.Timer;
+
+/**
+ * BGP4 session server
+ * 
+ * @author mcs
+ *
+ */
+public class BGP4PeerInitiatedSession extends GenericBGP4Session{
+	/**
+	 * Class to dispatch the BGP4 update messages. 
+	 * If a BGP5 update message is received, it is stored in a queue of UpdateDispatcher. 
+	 */
+	private UpdateDispatcher updateDispatcher;
+
+
+	/**
+	 * Constructor of the BGP4 Session
+	 * @param s Socket of the BGP4Peer-BGP4Peer Communication
+	 * @param bgp4SessionsInformation bgp4SessionsInformation
+	 * @param updateDispatcher updateDispatcher
+	 * @param holdTime holdTime
+	 * @param BGPIdentifier BGPIdentifier
+	 * @param version version
+	 * @param myAutonomousSystem myAutonomousSystem
+	 * @param noDelay noDelay
+	 * @param keepAliveTimer keepAliveTimer
+	 */
+	public BGP4PeerInitiatedSession(Socket s, BGP4SessionsInformation bgp4SessionsInformation, UpdateDispatcher updateDispatcher,int holdTime,Inet4Address BGPIdentifier,int version,int myAutonomousSystem,boolean noDelay,int keepAliveTimer ){
+		super(bgp4SessionsInformation, holdTime, BGPIdentifier, version, myAutonomousSystem,keepAliveTimer);
+
+		this.setFSMstate(BGP4StateSession.BGP4_STATE_IDLE);
+		log=LoggerFactory.getLogger("BGP4Server");
+		log.debug("New BGP4Session: "+s);
+		this.socket = s;
+		try {
+			s.setTcpNoDelay(noDelay);
+		} catch (SocketException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		this.newSessionId();
+
+		this.remotePeerIP =(Inet4Address) ((InetSocketAddress) socket.getRemoteSocketAddress()).getAddress();
+
+			
+		timer=new Timer();
+		this.updateDispatcher = updateDispatcher;
+		//this.keepAliveLocal=params.getKeepAliveTimer();
+		//this.deadTimerLocal=params.getDeadTimer();
+	}
+
+	
+
+	/**
+	 * Initiates a Session the BGP-4 Peers
+	 */
+	public void run() {
+		try {
+			initializeBGP4Session();
+		} catch (BGP4Exception e2) {
+			// TODO Auto-generated catch block
+			try {
+				this.socket.close();
+			} catch (IOException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			return;
+		}
+		log.info("BGP4 Session established with peer "+this.remotePeerIP);
+		this.deadTimerT=new DeadTimerThread(this, this.holdTime);
+		startDeadTimer();	
+		this.keepAliveT=new KeepAliveThread(out, this.keepAliveTimer);
+		startKeepAlive();
+
+		//Listen to new messages
+		try{
+			while(this.FSMstate==BGP4StateSession.BGP4_STATE_SESSION_UP) {
+				try {
+						this.msg = readBGP4Msg(in);//Read a new message	
+
+				}catch (IOException e){
+					cancelDeadTimer();
+					cancelKeepAlive();
+					timer.cancel();
+					try {
+						in.close();
+						out.close();
+					} catch (Exception e1) {
+						log.warn("Exception Closing BGP4 Session with "+this.remotePeerIP);
+					}
+					log.debug("Finishing BGP4 Session with "+this.remotePeerIP);
+					return;
+				}
+				if (this.msg != null) {//If null, it is not a valid PCEP message			
+					boolean bgp4Msg = true;//By now, we assume a valid PCEP message has arrived
+					//Depending on the type a different action is performed
+					switch(BGP4Message.getMessageType(this.msg)) {
+
+					case BGP4MessageTypes.MESSAGE_OPEN:
+						log.debug("OPEN message received");
+						//After the session has been started, ignore subsequent OPEN messages
+						log.warn("OPEN message ignored");
+						break;
+
+					case BGP4MessageTypes.MESSAGE_KEEPALIVE:
+						log.debug("KEEPALIVE message received from "+this.remotePeerIP);
+						//The Keepalive message allows to reset the deadtimer
+						break;
+
+					case BGP4MessageTypes.MESSAGE_NOTIFICATION:
+						log.info("NOTIFICATION message from "+this.remotePeerIP);
+						break;
+
+					case BGP4MessageTypes.MESSAGE_UPDATE:
+						log.debug("UPDATE message from "+this.remotePeerIP);						
+						BGP4Update bgp4Update = new BGP4Update(msg);
+						log.debug(bgp4Update.toString());
+						bgp4Update.setLearntFrom(this.getRemotePeerIP().toString());
+						updateDispatcher.dispatchRequests(bgp4Update);
+						break;
+
+					default:
+						log.warn("ERROR: unexpected message from "+this.remotePeerIP);
+						bgp4Msg = false;
+					}
+
+					if (bgp4Msg) {
+						//Reseting Dead Timer as BGP4 Session Message has arrived
+						resetDeadTimer();
+					}
+				} 
+			}
+		}finally{
+			log.error("BGP4 session with peer "+this.remotePeerIP+" has been closed");
+			cancelDeadTimer();
+			cancelKeepAlive();
+			this.FSMstate=BGP4StateSession.BGP4_STATE_IDLE;
+			endSession();
+		}
+	}
+
+	@Override
+	public void close() {
+		// TODO Auto-generated method stub
+		
+	}
+
+
+
+	@Override
+	protected void endSession() {
+		// TODO Auto-generated method stub
+		log.debug("Ending session with id "+this.getSessionId()+" from peer "+this.remotePeerIP);
+		BGP4SessionsInformation.deleteSession(this.getSessionId());
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4Session.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4Session.java
new file mode 100644
index 0000000000000000000000000000000000000000..002a5caa56f57f53b1d37f031e815377806684b3
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4Session.java
@@ -0,0 +1,44 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.bgp4session;
+
+import es.tid.bgp.bgp4.messages.BGP4Message;
+
+
+/**
+ * BGP Session Interface
+ * 
+ * @author mcs
+ *
+ */
+public interface BGP4Session {
+	/**
+	 * Send close message and finish the BGP Session
+	 */
+	public void close(/*int reason*/);
+	/**
+	 * Finish the BGP Session abruptly, 
+	 */
+	public void killSession();
+	
+	/**
+	 * Encodes and sends BGP Message
+	 * If the message is bad encoded, the session is closed
+	 * @param message BGP4 Message
+	 */
+	public void sendBGP4Message(BGP4Message message);
+
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionClient.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionClient.java
new file mode 100644
index 0000000000000000000000000000000000000000..61a5fc41c991947aeec8d9940605c9c934e216dd
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionClient.java
@@ -0,0 +1,222 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.bgp4session;
+
+import es.tid.bgp.bgp4.messages.BGP4Message;
+import es.tid.bgp.bgp4.messages.BGP4MessageTypes;
+import es.tid.bgp.bgp4.messages.BGP4Update;
+import eu.teraflow.tid.bgp4Peer.peer.BGP4Exception;
+import eu.teraflow.tid.bgp4Peer.updateTEDB.UpdateDispatcher;
+
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.Inet4Address;
+import java.net.Socket;
+import java.util.Timer;
+/**
+ * Client session
+ * 
+ * @author mcs
+ *
+ */
+public class BGP4SessionClient extends GenericBGP4Session{
+	/**
+	 * Peer BGP port to which the session is connected
+	 */
+	private int peerBGP_port;
+	/**
+	 * Delay
+	 */
+	
+	
+	private boolean no_delay=true;
+	private String localBGP4Address;
+	private int localBGP4Port; 
+	/**
+	 * Class to dispatch the BGP4 update messages. 
+	 * If a BGP5 update message is received, it is stored in a queue of UpdateDispatcher. 
+	 */
+	private UpdateDispatcher updateDispatcher;
+	
+	public BGP4SessionClient(BGP4SessionsInformation bgp4SessionsInformation,UpdateDispatcher updateDispatcher, Inet4Address peerBGP_IPaddress, int peerBGP_port, int holdTime,Inet4Address BGPIdentifier,int version,int myAutonomousSystem, String localBGP4Address, int localBGP4Port,int keepAliveTimer){
+		super(bgp4SessionsInformation, holdTime, BGPIdentifier, version, myAutonomousSystem,keepAliveTimer);
+		timer=new Timer();
+		log = LoggerFactory.getLogger("BGP4Client");		
+		this.peerBGP_port = peerBGP_port;
+		this.updateDispatcher=updateDispatcher;
+		this.localBGP4Address=localBGP4Address;
+		this.localBGP4Port=localBGP4Port;
+		this.remotePeerIP = peerBGP_IPaddress;
+	}
+	/**
+	 * Initiates a Session between the local BGP Peer and the remote BGP Peer
+	 */
+	public void run() {
+	
+		log.info("Opening new BGP4 Session with host "+ this.remotePeerIP.getHostAddress() + " on port " + this.peerBGP_port);
+		log.debug("Do we want to update from peer?" + updateFrom);
+		log.debug("Do we want to send to peer?" + sendTo);
+		try {
+			Inet4Address addr = (Inet4Address) Inet4Address.getByName(localBGP4Address);
+			Inet4Address addrPeer = remotePeerIP;
+			socket = new Socket(addrPeer, peerBGP_port, addr, 0);
+			if (no_delay){
+				this.socket.setTcpNoDelay(true);
+				log.debug("No delay activated");
+			}
+			
+		} catch (IOException e) {
+			log.info("Connection refused trying to connect " + remotePeerIP.getHostAddress() + " on port " + peerBGP_port);
+			//As there is not yet a session added (it is added in the beginning of initializeBGP4Session());
+			//endSession();
+			return;
+		}			
+
+		try {
+			initializeBGP4Session();
+			log.info("BGP4 Session established with peer "+this.remotePeerIP);
+			this.keepAliveT= new KeepAliveThread(this.getOut(),this.keepAliveTimer);
+			keepAliveT.start();
+		} catch (BGP4Exception e2) {
+			// TODO Auto-generated catch block
+			e2.printStackTrace();
+			log.debug("Session with "+this.remotePeerIP+" already exists: "+e2.getMessage());
+			try {
+				socket.close();
+			} catch (IOException e) {
+				// TODO Auto-generated catch block
+				log.error("Problem closing socket "+e.getMessage());
+			}
+			return;
+		}
+		
+		
+		
+		
+		try{
+			while(this.FSMstate==BGP4StateSession.BGP4_STATE_SESSION_UP) {
+				try {
+
+					this.msg = readBGP4Msg(in);//Read a new message	
+
+				}catch (IOException e){
+					cancelDeadTimer();
+					cancelKeepAlive();
+					timer.cancel();		
+					try {
+						in.close();
+						out.close();
+					} catch (Exception e1) {
+						log.warn("problem closing sockets");
+					}
+					log.debug("Finishing BGP4 Session abruptly!");
+					return;
+				}
+				if (this.msg != null) {//If null, it is not a valid PCEP message			
+					boolean bgp4Msg = true;//By now, we assume a valid PCEP message has arrived
+					//Depending on the type a different action is performed
+					switch(BGP4Message.getMessageType(this.msg)) {
+
+					case BGP4MessageTypes.MESSAGE_OPEN:
+						log.debug("BGP OPEN message received from "+this.remotePeerIP);
+						//After the session has been started, ignore subsequent OPEN messages
+						log.warn("OPEN message ignored");
+						break;
+
+					case BGP4MessageTypes.MESSAGE_KEEPALIVE:
+						log.debug("BGP KEEPALIVE message received from "+this.remotePeerIP);
+						//The Keepalive message allows to reset the deadtimer
+						break;
+
+					case BGP4MessageTypes.MESSAGE_NOTIFICATION:
+						log.debug("BGP NOTIFICATION message received from "+this.remotePeerIP);
+						break;
+
+					case BGP4MessageTypes.MESSAGE_UPDATE:
+						log.debug("BGP UPDATE message received from "+this.remotePeerIP);
+						if(this.getUpdateFrom()){
+							BGP4Update bgp4Update = new BGP4Update(msg);
+							log.debug(bgp4Update.toString());
+							bgp4Update.setLearntFrom(this.remotePeerIP.getHostAddress() );
+							updateDispatcher.dispatchRequests(bgp4Update);
+						}
+						else
+							log.debug("Update message from " + this.remotePeerIP + " discarded");
+						break;
+
+					default:
+						log.warn("ERROR: unexpected message received");
+						bgp4Msg = false;
+					}
+
+					if (bgp4Msg) {
+						//Reseting Dead Timer as BGP4 Session Message has arrived
+						resetDeadTimer();
+					}
+				} 
+			}
+		}finally{
+			//log.error("SESSION "+ internalSessionID+" IS KILLED");
+			log.info("BGP4 session with peer "+this.remotePeerIP+" has been closed");
+			cancelDeadTimer();
+			cancelKeepAlive();
+			this.FSMstate=BGP4StateSession.BGP4_STATE_IDLE;
+			endSession();
+		}
+	}
+	
+
+	public int getPeerBGP_port() {
+		return peerBGP_port;
+	}
+	public void setPeerBGP_port(int peerBGP_port) {
+		this.peerBGP_port = peerBGP_port;
+	}
+	public Boolean getUpdateFrom() {
+		return updateFrom;
+	}
+	public void setUpdateFrom(Boolean updateFrom) {
+		this.updateFrom = updateFrom;
+	}
+	public Boolean getSendTo() {
+		return sendTo;
+	}
+	public void setSendTo(Boolean sendTo) {
+		this.sendTo = sendTo;
+	}
+	public boolean isNo_delay() {
+		return no_delay;
+	}
+	public void setNo_delay(boolean no_delay) {
+		this.no_delay = no_delay;
+	}
+
+
+	@Override
+	public void close() {
+		// TODO Auto-generated method stub
+		
+	}
+
+
+	@Override
+	protected void endSession() {
+		// TODO Auto-generated method stub
+		log.debug("Ending session with id "+this.getSessionId());
+		this.BGP4SessionsInformation.deleteSession(this.getSessionId());
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionExistsException.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionExistsException.java
new file mode 100644
index 0000000000000000000000000000000000000000..668825ca8ef616b7867e2bc58de91df4c741a36c
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionExistsException.java
@@ -0,0 +1,24 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.bgp4session;
+
+public class BGP4SessionExistsException extends Exception {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionsInformation.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionsInformation.java
new file mode 100644
index 0000000000000000000000000000000000000000..df5d7bc9c828ab4270f5f2bad01e6c27d674ce98
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4SessionsInformation.java
@@ -0,0 +1,146 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.bgp4session;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import eu.teraflow.tid.bgp4Peer.peer.BGP4Exception;
+
+import java.io.DataOutputStream;
+import java.net.Inet4Address;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+
+/**
+ * Class where the oppened BGP4 sessions are stored.
+ * 
+ * @author mcs
+ *
+ */
+public class BGP4SessionsInformation {
+	public Hashtable<Long,GenericBGP4Session> sessionList;
+	public Hashtable<Inet4Address,GenericBGP4Session> sessionListByPeerIP;
+	private boolean isTest = false;
+	Logger log;
+	//FIXME: ya lo tenemos a trav�s de la lista de sesiones
+	 DataOutputStream out;
+	
+	public BGP4SessionsInformation(){
+		sessionList=new Hashtable<Long,GenericBGP4Session>();
+		sessionListByPeerIP=new Hashtable<Inet4Address,GenericBGP4Session>();
+		log = LoggerFactory.getLogger("BGP4Parser");
+	}
+
+	public BGP4SessionsInformation(boolean test){
+		sessionList=new Hashtable<Long,GenericBGP4Session>();
+		sessionListByPeerIP=new Hashtable<Inet4Address,GenericBGP4Session>();
+		log = LoggerFactory.getLogger("BGP4Parser");
+		isTest= test;
+	}
+
+
+	public synchronized void notifySessionStart(Inet4Address addr) throws BGP4SessionExistsException{
+		if (sessionListByPeerIP.containsKey(addr)){
+			throw new BGP4SessionExistsException();
+		}
+	}
+	
+	public synchronized void addSession(long sessionId, GenericBGP4Session session) throws BGP4Exception{
+		Enumeration <GenericBGP4Session > sessions = sessionList.elements();
+		log.debug("Looking to add session with id "+sessionId+" --> "+session.toString());
+		
+		//Check if there is already a session with the remote peer.
+		//Only one session allowed with each remote peer
+		GenericBGP4Session existingSession=sessionListByPeerIP.get(session.remotePeerIP);
+		if(isTest){
+			//If there is no existing session with the peer
+			sessionList.put(new Long(sessionId),session);
+			sessionListByPeerIP.put(session.getPeerIP() , session);
+			log.debug("Registering new session with Peer "+session.getPeerIP() +" with ID "+sessionId);
+		}
+		else{
+			if (existingSession!=null){
+				log.debug("Session with id "+existingSession.getSessionId()+" against "+session.remotePeerIP.getHostAddress()+" already exists");
+				throw new BGP4Exception();//si no existe throw new BGP4Exception();
+			}
+
+			//If there is no existing session with the peer
+			sessionList.put(new Long(sessionId),session);
+			sessionListByPeerIP.put(session.getPeerIP() , session);
+			log.debug("Registering new session with Peer "+session.getPeerIP() +" with ID "+sessionId);
+
+		}
+
+	}
+	
+	public synchronized void deleteSession(long sessionId){
+		GenericBGP4Session ses=sessionList.get(sessionId);
+		if (ses!=null) {
+			Inet4Address ip=sessionList.get(sessionId).getPeerIP();
+			sessionList.remove(new Long(sessionId));
+			sessionListByPeerIP.remove(ses.getPeerIP());
+			log.debug("Deleted Session with id "+sessionId +" with peer "+ses.getPeerIP().getHostAddress());
+		}else {
+			log.info("SESSION WAS NOT REGISTERED NULL");
+		}
+		
+		
+	}
+	
+	@Override
+	public String toString() {
+		StringBuffer sb=new StringBuffer(2000);		
+		int counter = 1;
+		Enumeration <GenericBGP4Session > sessions = sessionList.elements();
+		
+		//Comprobar si ya existe la session con ese peer
+		while (sessions.hasMoreElements()){
+			sb.append("Session number "+(counter++)+"\n");
+			sb.append(sessions.nextElement().toString()+"\n");
+			
+		}
+		return sb.toString();
+	}
+	
+	public String printSession(long sessionId){
+		GenericBGP4Session ses=sessionList.get(new Long(sessionId));
+		if (ses!=null){
+			return ses.toString();
+		}else {
+			return "session "+sessionId+" does not exist";
+		}
+	}
+	
+	
+	 
+	public DataOutputStream getOut() {
+		return out;
+	}
+
+	public void setOut(DataOutputStream out) {
+		this.out = out;
+	}
+
+	public Hashtable<Long, GenericBGP4Session> getSessionList() {
+		return sessionList;
+	}
+	public void setSessionList(Hashtable<Long, GenericBGP4Session> sessionList) {
+		this.sessionList = sessionList;
+	}
+
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4StateSession.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4StateSession.java
new file mode 100644
index 0000000000000000000000000000000000000000..6f426828b3bcb6b485a12c1966b5b760093bf9cf
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/BGP4StateSession.java
@@ -0,0 +1,28 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.bgp4session;
+/**
+ * The state session attribute indicates the current state of the BGP
+   FSM
+ * @author mcs
+ *
+ */
+public class BGP4StateSession {
+	public static final int BGP4_STATE_IDLE=0;	
+	public static final int BGP4_STATE_TCP_PENDING=1;
+	public static final int BGP4_STATE_OPEN_WAIT=2;
+	public static final int BGP4_STATE_KEEP_WAIT=3;
+	public static final int BGP4_STATE_SESSION_UP=4;
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/ConnectRetryTimer.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/ConnectRetryTimer.java
new file mode 100644
index 0000000000000000000000000000000000000000..736c56fc57eb7c8fddb3e9566f94060a9b06866a
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/ConnectRetryTimer.java
@@ -0,0 +1,30 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.bgp4session;
+
+import java.util.TimerTask;
+
+public class ConnectRetryTimer extends TimerTask {
+	int initialValue;
+	ConnectRetryTimer(int initialValue){
+		this.initialValue=initialValue;
+	}
+	@Override
+	public void run() {
+		// TODO Auto-generated method stub
+		
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/DeadTimerThread.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/DeadTimerThread.java
new file mode 100644
index 0000000000000000000000000000000000000000..f32f0218f751997fb15935ed457b252b9e39685e
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/DeadTimerThread.java
@@ -0,0 +1,72 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.bgp4session;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * BGP4 DeadTimer management Thread
+ * 
+ */
+public class DeadTimerThread extends Thread {
+
+
+	private BGP4Session bgp4Session = null;
+	private int deadTimer = 0;
+	private Logger log;
+	private boolean running;
+	
+	public DeadTimerThread(BGP4Session p, int d) {
+		this.deadTimer = d;
+		this.bgp4Session = p;
+		log=LoggerFactory.getLogger("BGP4Server");
+	}
+	
+	public void run() {
+		running=true;
+		while (running) {
+			try {
+				sleep(deadTimer * 1000);
+				/*
+				 * Time's over, close PCEP Session
+				 */
+				log.warn("DeadTimer OVER");
+				this.bgp4Session.close(/*ObjectParameters.REASON_DEADTIMER*/);
+				return;
+			} catch (InterruptedException e) {
+				//return;
+				if (running==false){
+					log.debug("Ending DeadTimerThread");
+					return;
+				}
+				else {
+					log.debug("Reseting Dead Timer");
+				}
+			} catch (Exception e) {
+				//FIXME: Ver que hacer aqui, por ahora, solo saco un log
+			    log.warn("Unhandled exception: " + e.getMessage());
+			}
+
+		}
+		
+		
+	}
+	
+	public void stopRunning(){
+		running=false;
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/GenericBGP4Session.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/GenericBGP4Session.java
new file mode 100644
index 0000000000000000000000000000000000000000..45636a2fe4e54bc212406bf1bab2a63e2cb5ea78
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/GenericBGP4Session.java
@@ -0,0 +1,908 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.bgp4session;
+
+import es.tid.bgp.bgp4.messages.BGP4Keepalive;
+import es.tid.bgp.bgp4.messages.BGP4Message;
+import es.tid.bgp.bgp4.messages.BGP4MessageTypes;
+import es.tid.bgp.bgp4.messages.BGP4Open;
+import es.tid.bgp.bgp4.open.BGP4CapabilitiesOptionalParameter;
+import es.tid.bgp.bgp4.open.BGP4OctetsASByteCapabilityAdvertisement;
+import es.tid.bgp.bgp4.open.MultiprotocolExtensionCapabilityAdvertisement;
+import es.tid.bgp.bgp4.update.fields.pathAttributes.AFICodes;
+import es.tid.bgp.bgp4.update.fields.pathAttributes.SAFICodes;
+import eu.teraflow.tid.bgp4Peer.peer.BGP4Exception;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.DataInputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+import java.net.Inet4Address;
+import java.net.Socket;
+import java.util.Timer;
+
+
+/**
+ * Generic BGP4 Session.
+ * Implements the basics of a BGP4 Session
+ * Any particular session must inherit this one
+ * 
+ * @author ogondio
+ *
+ */
+public abstract class GenericBGP4Session extends Thread implements BGP4Session {
+
+	/**
+	 * PCEP Session Manager
+	 */
+	protected BGP4SessionsInformation BGP4SessionsInformation;
+
+	/**
+	 * Thread to send periodic Keepalives
+	 */
+	protected KeepAliveThread keepAliveT = null;
+
+	/**
+	 * Value of the Keepalive timer set by the Local PCE. Used to send keepalives
+	 */
+
+	protected int keepAliveLocal;
+
+	/**
+	 * Value of the Keepalive timer of the peer PCC. It is not used in the server!!!
+	 */
+	protected int keepAlivePeer;
+
+	/**
+	 * Thread to check if the connection is still alive. 
+	 * If in this time the PCE has not received anything, it closes the session
+	 * It is set by the PCC (in this case, the remote peer)
+	 */
+	protected DeadTimerThread deadTimerT = null; 
+
+	/**
+	 * Value of the deadtimer that the PCC sends. It is used in the PCC in the thread
+	 */
+	protected int deadTimerPeer;
+
+	/**
+	 * Socket of the communication between BGP peers
+	 */
+	protected Socket socket = null; 
+
+	/**
+	 * Remote Peer IP Address
+	 * Obtained from the socket for convenience
+	 */
+	protected Inet4Address remotePeerIP=null;
+	
+	/**
+	 * DataOutputStream to send messages to the peer 
+	 */
+	protected DataOutputStream out=null; 
+
+
+
+	/**
+	 * DataInputStream to receive messages from PCC
+	 */
+	protected DataInputStream in=null;//
+	/**
+	 * Queue to send the Computing Path Requests
+	 */
+	//protected RequestQueueSend req;
+
+	/**
+	 * Logger to write the Parent PCE server log
+	 */
+	protected Logger log;
+
+	/**
+	 * Timer to schedule KeepWait and OpenWait Timers
+	 */
+	protected Timer timer;
+
+	/**
+	 * Finite State Machine of the PCEP protocol
+	 */
+	protected int FSMstate;
+
+	/**
+	 * Remote Domain ID
+	 * null if not sent
+	 */
+	protected Inet4Address remoteDomainId=null;
+
+	/**
+	 * Remote List of OF Codes
+	 * If sent by the peer PCE
+	 */
+	//private LinkedList<Integer> remoteOfCodes;//FIME: What do we do with them?
+
+	/**
+	 * RemoteOK:  a boolean that is set to 1 if the system has received an
+	      acceptable Open message.
+	 */
+	private boolean remoteOK=false;
+
+	/**
+	 * 
+	 */
+	private boolean localOK=false;
+
+	/**
+	 * 
+	 */
+	private int openRetry=0;
+
+	/**
+	 * Byte array to store the last PCEP message read.
+	 */
+	protected byte[] msg = null;
+
+	/**
+	 * Initial number of the session ID (internal use only)
+	 */
+	public static long sessionIdCounter=0;
+
+	/**
+	 * 
+	 */
+	protected Boolean updateFrom;
+	protected boolean sendTo;
+
+	/**
+	 * Session ID (internal use only)
+	 */
+	private long sessionId;
+	/**************** PARAMETROS DE LA SESION ********************/		
+	private int ConnectRetryCounter=0;
+	private ConnectRetryTimer connectRetryTimer = null;
+	private int connectRetryTime; //FIXME: esto aun no se que es.
+
+	/**************PARAMETROS OPEN MESSAGE************************/
+	protected int holdTime;
+	/**
+	 * Time between sending keepalives
+	 */
+	protected int keepAliveTimer;
+	/**
+	 * IP address that is assigned to that BGP speaker
+	 */
+	protected Inet4Address BGPIdentifier;
+	/**
+	 * Autonomous System number of the sender
+	 */
+	protected int myAutonomousSystem;
+	/**
+	 * version indicates the protocol version number of the message
+	 * it must be 4
+	 */
+	protected int version;
+
+
+	public GenericBGP4Session(BGP4SessionsInformation bgp4SessionsInformation,int holdTime,Inet4Address BGPIdentifier,int version,int myAutonomousSystem,int mykeepAliveTimer) {
+		log=LoggerFactory.getLogger("BGP4Parser");
+		this.BGP4SessionsInformation=bgp4SessionsInformation;
+		this.holdTime=holdTime;
+		this.BGPIdentifier=BGPIdentifier;
+		this.version = version;
+		this.myAutonomousSystem=myAutonomousSystem;
+		this.keepAliveTimer = mykeepAliveTimer;
+		this.newSessionId();
+
+	}
+
+	/**
+	 * Read PCE message from TCP stream
+	 * @param in InputStream
+	 * @return byte array with a BGP4 Message
+	 * @throws IOException Execption thrown trying to read message
+	 */
+	protected byte[] readBGP4Msg(DataInputStream in) throws IOException{
+		byte[] ret = null;
+
+		byte[] hdr = new byte[BGP4Message.getBGPHeaderLength()];
+		byte[] temp = null;
+		boolean endHdr = false;
+		int r = 0;
+		int length = 0;
+		boolean endMsg = false;
+		int offset = 0;
+
+		while (!endMsg) {
+			try {
+				if (endHdr) {
+					r = in.read(temp, offset, 1);
+				}
+				else {
+					r = in.read(hdr, offset, 1);
+				}
+			} catch (IOException e){
+				log.warn("Error reading data: "+ e.getMessage());
+				throw e;
+			}catch (Exception e) {
+				log.warn("readMsg Oops: " + e.getMessage());
+				throw new IOException();
+			}
+
+			if (r > 0) {
+				if (offset == BGP4Message.getBGPMarkerLength()) {
+					length = ((int)hdr[offset]&0xFF) << 8;
+				}
+				if (offset ==  BGP4Message.getBGPMarkerLength() + 1) {
+					length = length | (((int)hdr[offset]&0xFF));
+					temp = new byte[length];
+					endHdr = true;
+					System.arraycopy(hdr, 0, temp, 0, BGP4Message.getBGPHeaderLength());
+				}
+				if ((length > 0) && (offset == length - 1)) {
+					endMsg = true;
+				}
+				offset++;
+			}
+			else if (r==-1){
+				log.debug("End of stream has been reached");
+				throw new IOException();
+			}
+		}
+		if (length > 0) {
+			ret = new byte[length];
+			System.arraycopy(temp, 0, ret, 0, length);
+		}		
+		return ret;
+	}
+
+	/**
+	 * Read PCE message from TCP stream
+	 * @param in InputStream
+	 * @return byte array with a BGP4 Message
+	 * @throws IOException Execption thrown trying to read message
+	 */
+	protected byte[] readMsgOptimized(DataInputStream in) throws IOException{
+		byte[] ret = null;
+
+		byte[] hdr = new byte[4];
+		byte[] temp = null;
+		boolean endHdr = false;
+		int r = 0;
+		int length = 0;
+		boolean endMsg = false;
+		int offset = 0;
+
+
+		while (!endMsg) {
+			try {
+				if (endHdr) {
+					//log.info("Vamos a leer datos ");
+					r = in.read(temp, offset, length-offset);
+					if (r>0){
+						if ((offset+r)>=length){
+							//log.info("Bien ");
+							endMsg=true;	
+						}else {
+							offset=offset+r;
+						}
+
+					}
+					else if (r<0){
+						log.error("End of stream has been reached reading data");
+						throw new IOException();
+					}
+				}
+				else {
+					//log.info("Vamos a leer la cabecera ");
+					r = in.read(hdr, offset, 4-offset);
+					if (r < 0) {
+						log.error("End of stream has been reached reading header");
+						throw new IOException();
+					}else if (r >0){
+						if ((offset+r)>=4){
+							length = ( (hdr[offset+2]&0xFF) << 8)  | ((hdr[offset+3]&0xFF));
+							offset=4;
+							temp = new byte[length];
+							endHdr = true;
+							System.arraycopy(hdr, 0, temp, 0, 4);
+							if (length==4){
+								endMsg=true;
+							}		
+						}else {
+							offset=offset+r;
+						}
+
+					}
+
+				}
+			} catch (IOException e){
+				log.error("Error reading data: "+ e.getMessage());
+				throw e;
+			}catch (Exception e) {
+				log.error("readMsg Oops: " + e.getMessage());
+				log.error("Failure reason : "+e.getStackTrace());
+				throw new IOException();
+			}
+
+		}
+		if (length > 0) {
+			ret = new byte[length];
+			System.arraycopy(temp, 0, ret, 0, length);
+		}		
+		return ret;
+	}
+
+
+	//		/**
+	//		 * <p>Close the PCE session</p>
+	//		 * <p>List of reasons (RFC 5440):</p>
+	//		 *  Value        Meaning
+	//	          1          No explanation provided
+	//	          2          DeadTimer expired
+	//	          3          Reception of a malformed PCEP message
+	//	          4          Reception of an unacceptable number of unknown
+	//	                     requests/replies
+	//	          5          Reception of an unacceptable number of unrecognized
+	//	                     PCEP messages
+	//		 * @param reason Reason for closing the PCEP Session
+	//		 * @return PCEP Session closed OK
+	//		 */
+	//		public void close(int reason){
+	//			log.info("Closing PCEP Session"); 
+	//			BGP4Close p_close=new BGP4Close();
+	//			p_close.setReason(reason);
+	//			sendPCEPMessage(p_close);
+	//			killSession();
+	//		}
+	public DataOutputStream getOut() {
+		return out;
+	}
+
+	public void setOut(DataOutputStream out) {
+		this.out = out;
+	}
+
+	/**
+	 * Starts the deadTimerThread
+	 */
+	protected void startDeadTimer() {
+		this.deadTimerT.start();
+	}
+	/**
+	 * Resets the DeadTimerThread
+	 * To be called every time a message in the session is received
+	 */
+	protected void resetDeadTimer() {
+		if (this.deadTimerT != null) {
+			this.deadTimerT.interrupt();
+		}
+	}
+
+	public Socket getSocket() {
+		return socket;
+	}
+
+	/**
+	 * Ends the DeadTimer Thread
+	 */
+	protected void cancelDeadTimer() {
+		log.debug("Cancelling DeadTimer");
+		if (this.deadTimerT != null) {
+			this.deadTimerT.stopRunning();
+			this.deadTimerT.interrupt();
+			this.deadTimerT=null;
+		}
+	}
+
+	/**
+	 * Starts the Keep Alive Thread
+	 */
+	public void startKeepAlive() {
+		this.keepAliveT.start();		
+	}
+
+	/**
+	 * Ends the KeepAlive Thread
+	 */
+	public void cancelKeepAlive() {
+		log.debug("Cancelling KeepAliveTimer");
+		if (this.keepAliveT != null) {
+			this.keepAliveT.stopRunning();
+			this.keepAliveT.interrupt();
+			this.keepAliveT=null;	
+		}
+	}
+
+	/**
+	 * Ends current connections
+	 */
+	protected void endConnections(){
+		try {
+			if (in != null) {
+				in.close();
+			}
+			if (out != null) {
+				out.close();
+			}
+			if (this.socket != null) {
+				log.warn("Closing socket");
+				this.socket.close();
+			}
+
+		} catch (Exception e) {
+			log.warn("Error closing connections: " + e.getMessage());
+		}
+	}
+
+	public int getFSMstate() {
+		return FSMstate;
+	}
+
+	protected void setFSMstate(int fSMstate) {
+		FSMstate = fSMstate;
+	}
+
+	public void killSession(){	
+		log.warn("Killing Session");
+		timer.cancel();
+		this.endConnections();
+		this.cancelDeadTimer();
+		this.cancelKeepAlive();
+		this.endSession();
+		this.BGP4SessionsInformation.deleteSession(this.sessionId);
+		log.warn("Interrupting thread!!!!");
+		this.interrupt();				
+	}
+
+	/**
+	 * DO HERE ANYTHING NEEDED AT CLOSING??
+	 * STATISTICS, ETC
+	 */
+	protected abstract void endSession();
+
+	protected void initializeBGP4Session() throws BGP4Exception {
+		this.BGP4SessionsInformation.addSession(this.getSessionId(), this);
+
+		/**
+		 * Byte array to store the last PCEP message read.
+		 */
+		byte[] msg = null;
+		//First get the input and output stream
+		try {
+			out = new DataOutputStream(socket.getOutputStream());
+			in = new DataInputStream(socket.getInputStream());
+		} catch (IOException e) {
+			log.warn("Problem in the sockets, ending BGP4Session");
+			killSession();
+			return;
+		}
+		//-	Starts the ConnectRetryTimer with initial value 
+		int initialValue=1000;//FIXME: no tengo ni idea de este parametro aun
+		connectRetryTimer= new ConnectRetryTimer(initialValue) ;
+
+		//STARTING PCEP SESSION ESTABLISHMENT PHASE
+		//It begins in Open Wait State
+		this.setFSMstate(BGP4StateSession.BGP4_STATE_OPEN_WAIT);
+		log.debug("Entering BGP4_STATE_OPEN_WAIT, Scheduling Open Wait Timer");
+
+		//Create the 60 seconds Open Wait Timer to wait for an OPEN message
+		OpenWaitTimerTask owtt= new OpenWaitTimerTask(this);
+		this.timer.schedule(owtt, 60000);
+		//Define (Not use yet), the keepwait timer
+		KeepWaitTimerTask kwtt=new KeepWaitTimerTask(this);	
+		BGP4Open open_msg=new BGP4Open();
+		//Rellenar:
+		// - My autonomous system
+		// - holdTime
+		// - BGPIdentifier
+		open_msg.setMyAutonomousSystem(myAutonomousSystem);
+		open_msg.setBGPIdentifier(BGPIdentifier);
+		open_msg.setHoldTime(holdTime);
+		//Chek optional parameters
+		BGP4CapabilitiesOptionalParameter cop = new BGP4CapabilitiesOptionalParameter();
+		open_msg.getParametersList().add(cop);	
+		MultiprotocolExtensionCapabilityAdvertisement multProtExtCapAdv = new MultiprotocolExtensionCapabilityAdvertisement();
+		multProtExtCapAdv.setAFI(AFICodes.AFI_BGP_LS);
+		multProtExtCapAdv.setSAFI(SAFICodes.SAFI_BGP_LS);		
+		cop.getCapabilityList().add(multProtExtCapAdv);
+		BGP4OctetsASByteCapabilityAdvertisement fouroctects = new BGP4OctetsASByteCapabilityAdvertisement();
+		fouroctects.setAS(myAutonomousSystem);
+		cop.getCapabilityList().add(fouroctects);
+
+		//Send the OPEN message
+		this.sendBGP4Message(open_msg);
+		//Now, read messages until we are in SESSION UP
+		while (this.FSMstate!=BGP4StateSession.BGP4_STATE_SESSION_UP){
+			//log.info("State session "+this.FSMstate);
+			try {
+				//Read a new message
+				msg = readBGP4Msg(in);
+
+			}catch (IOException e){
+				log.warn("Error reading message, ending session"+e.getMessage());
+				killSession();
+				return;
+			}
+			if (msg != null) {//If null, it is not a valid PCEP message
+				//log.info("Read a message");
+				switch(BGP4Message.getMessageType(msg)) {
+				case BGP4MessageTypes.MESSAGE_OPEN:
+					//log.info("OPEN Message Received");
+					if (this.FSMstate==BGP4StateSession.BGP4_STATE_OPEN_WAIT){
+						log.debug("FSMstate = BGP4_STATE_OPEN_WAIT");
+						BGP4Open open_received;
+						//								try {
+						open_received=new BGP4Open(msg);
+						log.debug("**** Open received ****\n"+ open_received.toString());//FIXME!!! Cambiar a finest
+						owtt.cancel();
+						//Check parameters
+						if (openRetry==1){
+							boolean checkOK=true;
+							this.version = open_received.getVersion();
+							if (this.version != 4){
+								checkOK=false;
+							}
+							//										this.deadTimerPeer=open_received.getDeadTimer();
+							//										this.keepAlivePeer=open_received.getKeepalive();
+							//										
+							//										if (this.deadTimerPeer>maxDeadTimerAccepted){
+							//											checkOK=false;
+							//										}	
+							//										if (this.deadTimerPeer==0){
+							//											if(zeroDeadTimerAccepted==false){
+							//												checkOK=false;
+							//											}
+							//										}
+							//										if (this.keepAlivePeer<minimumKeepAliveTimerAccepted){
+							//											checkOK=false;
+							//										}									
+							if (checkOK==false){
+								log.debug("Dont accept");
+								//											PCEPError perror=new PCEPError();
+								//											PCEPErrorObject perrorObject=new PCEPErrorObject();
+								//											perrorObject.setErrorType(ObjectParameters.ERROR_ESTABLISHMENT);
+								//											perrorObject.setErrorValue(ObjectParameters.ERROR_ESTABLISHMENT_SECOND_OPEN_MESSAGE_UNACCEPTABLE_SESSION_CHARACTERISTICS);
+								//											ErrorConstruct error_c=new ErrorConstruct();
+								//											error_c.getErrorObjList().add(perrorObject);
+								//											perror.setError(error_c);
+								//											log.info("Sending Error and ending PCEPSession");
+								//											sendPCEPMessage(perror);										
+							}
+							else {
+								/**
+								 *  If no errors are detected, and the session characteristics are
+								 *	acceptable to the local system, the system:
+
+	   												o  Sends a Keepalive message to the PCEP peer,
+	   												o  Starts the Keepalive timer,
+	   												o  Sets the RemoteOK variable to 1.
+	   											If LocalOK=1, the system clears the OpenWait timer and moves to the
+	   											UP state.
+	   											If LocalOK=0, the system clears the OpenWait timer, starts the
+	   											KeepWait timer, and moves to the KeepWait state.
+								 */
+
+								this.BGPIdentifier=open_received.getBGPIdentifier();
+								this.myAutonomousSystem=open_received.getMyAutonomousSystem();
+								this.holdTime=open_received.getHoldTime();
+//								if (open_received.getOptionalParameterLength() != 0){
+//									log.info("Tiene parametros opcionales");
+//								}
+
+
+								log.debug("OPEN Accepted");
+								log.debug("Sending KA to confirm");
+								BGP4Keepalive ka_snd= new BGP4Keepalive();
+								log.debug("Sending Keepalive message");
+								sendBGP4Message(ka_snd);										//Creates the Keep Wait Timer to wait for a KA to acknowledge the OPEN sent
+								//FIXME: START KA TIMER!
+								this.remoteOK=true;										
+								if(this.localOK==true){
+									log.debug("Entering STATE_SESSION_UP");
+									this.setFSMstate(BGP4StateSession.BGP4_STATE_SESSION_UP);							
+								}
+								else {
+									log.debug("Entering STATE_KEEP_WAIT");
+									log.debug("Scheduling KeepwaitTimer");
+									timer.schedule(kwtt, 60000);
+									this.setFSMstate(BGP4StateSession.BGP4_STATE_KEEP_WAIT);
+								}									
+							}
+						}
+						else {//Open retry is 0
+							log.debug("Open retry is equal to 0");
+							boolean dtOK=true;
+							//										boolean kaOK=true;
+							this.version=open_received.getVersion();
+							if (this.version != 4){
+								dtOK=false;
+							}										
+							if (dtOK==false){
+								///Parameters are unacceptable but negotiable
+								log.debug("PEER  Open parameters are unaccpetable, but negotiable");
+								//											PCEPError perror=new PCEPError();
+								//											PCEPErrorObject perrorObject=new PCEPErrorObject();
+								//											perrorObject.setErrorType(ObjectParameters.ERROR_ESTABLISHMENT);
+								//											perrorObject.setErrorValue(ObjectParameters.ERROR_ESTABLISHMENT_UNACCEPTABLE_NEGOTIABLE_SESSION_CHARACTERISTICS);
+								//											if (dtOK==false){
+								//												open_received.setDeadTimer(this.deadTimerLocal);	
+								//											}
+								//											if (kaOK==false) {
+								//												open_received.setKeepalive(this.keepAliveLocal);
+								//											}
+								//											LinkedList<PCEPErrorObject> perrobjlist=new LinkedList<PCEPErrorObject>(); 
+								//											perrobjlist.add(perrorObject);
+								//											perror.setErrorObjList(perrobjlist);
+								//											perror.setOpen(open_received.getOpen());
+								//											log.info("Sending Error with new proposal");
+								//											this.sendPCEPMessage(perror);
+								//											this.openRetry=this.openRetry+1;
+								/**
+								 * o  If LocalOK=1, the system restarts the OpenWait timer and stays in
+	     											the OpenWait state.
+	     											o  If LocalOK=0, the system clears the OpenWait timer, starts the
+	     											KeepWait timer, and moves to the KeepWait state.
+								 */
+								if (localOK==true){
+									//log.info("Local ok esta a true, vamos a open wait");
+									owtt.cancel();
+									owtt= new OpenWaitTimerTask(this);
+									this.timer.schedule(owtt, 60000);
+									this.setFSMstate(BGP4StateSession.BGP4_STATE_OPEN_WAIT);
+								}
+								else {
+									//log.info("Local ok esta a false, vamos a keep wait");
+									owtt.cancel();
+									this.setFSMstate(BGP4StateSession.BGP4_STATE_KEEP_WAIT);
+									this.timer.schedule(kwtt, 60000);
+								}
+							}
+							else {
+								/*
+								 * If no errors are detected, and the session characteristics are
+	   											acceptable to the local system, the system:
+	   											o  Sends a Keepalive message to the PCEP peer,
+	   											o  Starts the Keepalive timer,
+	   											o  Sets the RemoteOK variable to 1.
+	   											If LocalOK=1, the system clears the OpenWait timer and moves to the
+	   											UP state.
+	   											If LocalOK=0, the system clears the OpenWait timer, starts the
+	   											KeepWait timer, and moves to the KeepWait state.
+								 */
+								this.BGPIdentifier=open_received.getBGPIdentifier();
+								this.myAutonomousSystem=open_received.getMyAutonomousSystem();
+								this.holdTime=open_received.getHoldTime();
+//								if (open_received.getOptionalParameterLength() != 0){
+//									log.info("Tiene parametros opcionales");
+//								}
+								//this.BGP4SessionsInformation.addSession(this.getSessionId(), this);
+								BGP4Keepalive p_ka= new BGP4Keepalive();
+								//log.info("Sending Keepalive message");
+								sendBGP4Message(p_ka);										//Creates the Keep Wait Timer to wait for a KA to acknowledge the OPEN sent
+								//FIXME: START KA TIMER!
+								this.remoteOK=true;										
+								if(this.localOK==true){
+									//log.info("Entering STATE_SESSION_UP");
+									//He conseguido establecer sesion. Hay que matar el otro hilo
+
+									this.setFSMstate(BGP4StateSession.BGP4_STATE_SESSION_UP);
+									//La sesion se ha establecido
+
+								}
+								else {
+									//log.info("Entering STATE_KEEP_WAIT");
+									//log.fine("Scheduling KeepwaitTimer");
+									timer.schedule(kwtt, 60000);
+									this.setFSMstate(BGP4StateSession.BGP4_STATE_KEEP_WAIT);
+								}										
+							}
+						}								
+					}
+					else{
+						log.debug("Ignore OPEN message, already one received!!");
+					}
+
+					break;
+				case BGP4MessageTypes.MESSAGE_KEEPALIVE:
+					//log.info("KeepAlive Message Received");
+					this.localOK=true;
+					if(this.FSMstate==BGP4StateSession.BGP4_STATE_KEEP_WAIT){
+						// If RemoteOK=1, the system clears the KeepWait timer and moves to
+						//  the UP state.
+						// If RemoteOK=0, the system clears the KeepWait timer, starts the
+						//  OpenWait timer, and moves to the OpenWait State. 
+
+						if (remoteOK==true){
+							kwtt.cancel();
+							//log.info("Entering STATE_SESSION_UP");
+							this.setFSMstate(BGP4StateSession.BGP4_STATE_SESSION_UP);								
+						}
+						else{
+							kwtt.cancel();
+							//log.info("Entering OPEN WAIT STATE");
+							owtt=new OpenWaitTimerTask(this);
+							this.timer.schedule(owtt, 60000);
+							this.setFSMstate(BGP4StateSession.BGP4_STATE_OPEN_WAIT);
+						}
+
+					}
+					//If not... seguimos igual que estabamos
+					//Mas KA no hacen mal...
+					break;
+
+				default:
+					log.error("UNEXPECTED Message Received");
+					if (this.FSMstate!=BGP4StateSession.BGP4_STATE_OPEN_WAIT){
+						log.debug("Ignore OPEN message, already one received!!");
+					}
+					else {
+						log.error("Unexpected message RECEIVED, closing");
+
+					}
+					break;
+				}
+			}
+			else {
+				if (this.FSMstate!=BGP4StateSession.BGP4_STATE_OPEN_WAIT){
+					log.info("Ignore message, already one received!!");
+				}
+				else {
+					log.error("Unexpected message RECEIVED, closing");
+	
+				}
+			}//Fin del else
+		}//Fin del WHILE
+	}
+
+
+	@Override
+	public void sendBGP4Message(BGP4Message message) {
+		message.encode();
+		try {
+			out.write(message.getBytes());
+			out.flush();
+		} catch (Exception e) {
+			log.error("Problem writing message, finishing session "+e.getMessage());
+			killSession();
+		}
+
+	}
+
+
+	public Inet4Address getRemotePeerIP() {
+		return remotePeerIP;
+	}
+
+
+	public Inet4Address getBGPIdentifier() {
+		return BGPIdentifier;
+	}
+
+	public void setBGPIdentifier(Inet4Address bGPIdentifier) {
+		BGPIdentifier = bGPIdentifier;
+	}
+
+	public Boolean getUpdateFrom() {
+		return updateFrom;
+	}
+
+	public void setUpdateFrom(Boolean updateFrom) {
+		this.updateFrom = updateFrom;
+	}
+
+	public Boolean getSendTo(){
+		return sendTo;
+	}
+
+	public void setSendTo(boolean sendTo) {
+		this.sendTo = sendTo;
+	}
+
+	public int getMyAutonomousSystem() {
+		return myAutonomousSystem;
+	}
+
+	public void setMyAutonomousSystem(int myAutonomousSystem) {
+		this.myAutonomousSystem = myAutonomousSystem;
+	}
+
+
+
+	public String shortInfo(){
+		StringBuffer sb=new StringBuffer(1000);
+		if (this.socket!=null){
+			sb.append("remAddr: ");
+			sb.append(this.socket.getRemoteSocketAddress());
+			sb.append(" state: ");
+			if (this.FSMstate==BGP4StateSession.BGP4_STATE_OPEN_WAIT){
+				sb.append("OPEN_WAIT");
+			}else if (this.FSMstate==BGP4StateSession.BGP4_STATE_IDLE){
+				sb.append("IDLE");
+			}else if (this.FSMstate==BGP4StateSession.BGP4_STATE_KEEP_WAIT){
+				sb.append("KEEP_WAIT");
+			}else if (this.FSMstate==BGP4StateSession.BGP4_STATE_SESSION_UP){
+				sb.append("SESSION_UP");
+			}else if (this.FSMstate==BGP4StateSession.BGP4_STATE_SESSION_UP){
+				sb.append("TCP_PENDING");
+			}else {
+				sb.append("UNKNOWN");
+			}			
+
+		}
+
+		return sb.toString();
+	}
+
+	public String toString(){
+		StringBuffer sb=new StringBuffer(1000);
+		sb.append("\t> Session ID: "+this.sessionId+"\n");
+		sb.append("\t> BGP Remote Peer: "+this.remotePeerIP+"\n");			
+		sb.append("\t> BGPIdentifier: "+this.BGPIdentifier+"\n");
+		if (this.socket!=null){
+			sb.append("\t> remAddr: ");
+			sb.append(this.socket.getRemoteSocketAddress()+"\n");
+			sb.append("\t> state: ");
+			if (this.FSMstate==BGP4StateSession.BGP4_STATE_OPEN_WAIT){
+				sb.append("OPEN_WAIT\n");
+			}else if (this.FSMstate==BGP4StateSession.BGP4_STATE_IDLE){
+				sb.append("IDLE\n");
+			}else if (this.FSMstate==BGP4StateSession.BGP4_STATE_KEEP_WAIT){
+				sb.append("KEEP_WAIT\n");
+			}else if (this.FSMstate==BGP4StateSession.BGP4_STATE_SESSION_UP){
+				sb.append("SESSION_UP\n");
+			}else if (this.FSMstate==BGP4StateSession.BGP4_STATE_SESSION_UP){
+				sb.append("TCP_PENDING\n");
+			}else {
+				sb.append("UNKNOWN");
+			}
+		}
+
+		return sb.toString();
+	}
+
+	public synchronized void newSessionId(){
+		this.sessionId=GenericBGP4Session.sessionIdCounter+1;
+		sessionIdCounter=sessionIdCounter+1;
+	}
+
+	public long getSessionId() {
+		return sessionId;
+	}
+
+
+	@Override
+	public void close() {
+		// TODO Auto-generated method stub
+
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (remotePeerIP != null){
+			if (this.remotePeerIP.equals(((GenericBGP4Session)obj).getBGPIdentifier())){
+				return true;
+			}
+		}
+		else {
+			log.info("TODO NUL!! en el equals!");
+		}
+		return false;
+	}
+
+
+	public Inet4Address getPeerIP(){
+		return (Inet4Address)this.socket.getInetAddress();
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepAliveThread.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepAliveThread.java
new file mode 100644
index 0000000000000000000000000000000000000000..70ebe101f4674582e62ed1c7607947e9ae2e3c33
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepAliveThread.java
@@ -0,0 +1,98 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.bgp4session;
+import es.tid.bgp.bgp4.messages.BGP4Keepalive;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+
+public class KeepAliveThread extends Thread {
+
+		private int keepAlive = 0;
+		private boolean running;
+		private Logger log;
+		private DataOutputStream out=null; //Use this to send messages to peer	
+		
+		 /* 
+		 * @param p
+		 * @param k
+		 */
+		public KeepAliveThread(DataOutputStream out, int k) {
+			this.keepAlive = k;
+			this.out = out;
+			log=LoggerFactory.getLogger("BGP4Server");
+		}
+		
+		/**
+		 * Starts the Keepalive process
+		 */
+		public void run() {
+			running=true;
+			while (running) {
+				try {
+					if (keepAlive > 0) {
+						sleep(keepAlive * 1000);
+						sendKeepAlive();
+					}
+					else {
+						log.debug("Ending KEEPALIVE mechanism");
+						return;
+					}
+				} catch (InterruptedException e) {
+					if (running==false){
+						log.debug("Ending KeepAliveThread");
+						return;
+					}
+					else {
+						//Keepalive Timer is reseted
+						log.debug("Reseting Keepalive timer");
+					}
+				} 
+			}
+		}
+		
+		/**
+		 * Sets the running variable to false. After this, an interrupt will cause 
+		 * the KeepaliveThread to end.
+		 */
+		public void stopRunning(){
+			running=false;
+		}
+		/**
+		 * Sends KeepAlive Message. It does not wait for any response.
+		 */
+		private void sendKeepAlive() {
+			BGP4Keepalive p_ka= new BGP4Keepalive();
+			//try {
+				p_ka.encode();
+//			} catch (PCEPProtocolViolationException e1) {
+//				// TODO Auto-generated catch block
+//				e1.printStackTrace();
+//			}
+			try {
+				log.debug("Sending Keepalive message");
+				out.write(p_ka.getBytes());
+				out.flush();
+			} catch (IOException e) {
+				log.warn("Error sending KEEPALIVE: " + e.getMessage());
+			}
+		}
+		
+	}
+
+
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepWaitTimerTask.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepWaitTimerTask.java
new file mode 100644
index 0000000000000000000000000000000000000000..3bc72c84d608db79cc28185b63e6ade8d4e1305e
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/KeepWaitTimerTask.java
@@ -0,0 +1,58 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.bgp4session;
+
+
+import java.util.TimerTask;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * If no Open message is received before the expiration of the OpenWait
+   timer, the PCEP peer sends a PCErr message with Error-Type=1 and
+   Error-value=2, the system releases the PCEP resources for the PCEP
+   peer, closes the TCP connection, and moves to the Idle state.
+
+ * @author Oscar Gonzalez de Dios
+ *
+ */
+public class KeepWaitTimerTask extends TimerTask {
+
+//	private DataOutputStream out=null; //Use this to send messages to peer
+	private BGP4Session bgp4Session;
+	private Logger log;
+	
+	public KeepWaitTimerTask(BGP4Session bgp4Session){
+		this.bgp4Session=bgp4Session;
+		log=LoggerFactory.getLogger("PCEServer");
+	}
+		
+	
+	public void run() {
+		log.warn("KEEP WAIT Timer OVER");
+//		PCEPError perror=new PCEPError();
+//		PCEPErrorObject perrorObject=new PCEPErrorObject();
+//		perrorObject.setErrorType(ObjectParameters.ERROR_ESTABLISHMENT);
+//		perrorObject.setErrorValue(ObjectParameters.ERROR_ESTABLISHMENT_NO_KA_OR_ERROR_KEEPWAIT_TIMER);
+//		ErrorConstruct error_c=new ErrorConstruct();
+//		error_c.getErrorObjList().add(perrorObject);
+//		perror.setError(error_c);
+//		bgp4Session.sendBGP4Message(perror);
+		this.bgp4Session.killSession();	
+		return;
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/OpenWaitTimerTask.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/OpenWaitTimerTask.java
new file mode 100644
index 0000000000000000000000000000000000000000..20b77ce4ee14821073bab2bf7b95aabef5fb8cea
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/bgp4session/OpenWaitTimerTask.java
@@ -0,0 +1,59 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.bgp4session;
+
+import java.util.TimerTask;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+
+/**
+ * If no Open message is received before the expiration of the OpenWait
+   timer, the PCEP peer sends a PCErr message with Error-Type=1 and
+   Error-value=2, the system releases the PCEP resources for the PCEP
+   peer, closes the TCP connection, and moves to the Idle state.
+
+ * @author Oscar Gonzalez de Dios
+ *
+ */
+public class OpenWaitTimerTask extends TimerTask {
+
+//	private DataOutputStream out=null; //Use this to send messages to peer
+	private BGP4Session bgp4Session;
+	private Logger log;
+	
+	public OpenWaitTimerTask(BGP4Session bgp4Session){
+		this.bgp4Session=bgp4Session;
+		log=LoggerFactory.getLogger("PCEServer");
+	}
+		
+	
+	public void run() {
+		log.warn("OPEN WAIT Timer OVER");
+//		PCEPError perror=new PCEPError();
+//		PCEPErrorObject perrorObject=new PCEPErrorObject();
+//		perrorObject.setErrorType(ObjectParameters.ERROR_ESTABLISHMENT);
+//		perrorObject.setErrorValue(ObjectParameters.ERROR_ESTABLISHMENT_NO_OPEN_MESSAGE);
+//		ErrorConstruct error_c=new ErrorConstruct();
+//		error_c.getErrorObjList().add(perrorObject);
+//		perror.setError(error_c);
+//		log.info("Sending Error");
+//		bgp4Session.sendPCEPMessage(perror);
+		this.bgp4Session.killSession();
+		return;
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcApp.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcApp.java
new file mode 100644
index 0000000000000000000000000000000000000000..329404668263441348fa3583adb2b5b107ff71f3
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcApp.java
@@ -0,0 +1,38 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.grpc;
+
+import io.grpc.Server;
+import io.grpc.ServerBuilder;
+
+public class grpcApp {
+	
+	public static void main( String[] args ) throws Exception
+    {
+      // Create a new server to listen on port 8080
+      Server server = ServerBuilder.forPort(2021)
+        .addService(new updateServiceImpl())
+        .build();
+ 
+      // Start the server
+      server.start();
+
+      // Server threads are running in the background.
+      System.out.println("Server started");
+      // Don't exit the main thread. Wait until server is terminated.
+      server.awaitTermination();
+    }
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcClient.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcClient.java
new file mode 100644
index 0000000000000000000000000000000000000000..fb1d2354368099c76e69aafab03407295ca2faa2
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/grpcClient.java
@@ -0,0 +1,368 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.grpc;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import com.google.common.net.InetAddresses;
+
+import eu.teraflow.tid.bgp4Peer.models.LinkNLRIMsg;
+import eu.teraflow.tid.bgp4Peer.models.NodeNLRIMsg;
+import eu.teraflow.tid.bgp4Peer.models.UpdateMsg;
+import eu.teraflow.tid.bgp4Peer.models.UpdateMsgList;
+import io.grpc.ManagedChannel;
+import io.grpc.ManagedChannelBuilder;
+import io.grpc.stub.StreamObserver;
+import jdk.javadoc.internal.doclets.toolkit.util.links.LinkInfo;
+import src.main.proto.GrpcService.linkInfo;
+import src.main.proto.GrpcService.nodeInfo;
+import src.main.proto.GrpcService.NodeDescriptors;
+import src.main.proto.GrpcService.updateRequest;
+import src.main.proto.GrpcService.updateResponse;
+import src.main.proto.updateServiceGrpc;
+import src.main.proto.updateServiceGrpc.updateServiceBlockingStub;
+import src.main.proto.updateServiceGrpc.updateServiceStub;
+
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.logging.Logger;
+
+public class grpcClient {
+
+	private static final Logger logger = Logger.getLogger(grpcClient.class.getName());
+
+	public static void sendGrpcUpdateMsg(UpdateMsg update) throws Exception{
+		
+		updateRequest request=null;
+		nodeInfo n=null;
+		linkInfo unic=null;
+		List <linkInfo> l = new ArrayList<>();
+		List <nodeInfo> nodes = new ArrayList<>();
+		if(update.nodeCheck()==false && update.linkCheck()==false){
+			return;
+		}
+//		Build node for grpc message
+		if(update.nodeCheck()!=false) {		
+			for(NodeNLRIMsg node : update.getNodeList()){
+				n = nodeInfo.newBuilder().setNodeName(node.getNodeName()).
+						setIgpID(node.getRouterID()).
+						setBgplsID(node.getLocalBgplsID()).
+						setAsID(InetAddresses.coerceToInteger(node.getAs_number())).
+						setLearntFrom(node.getLearntFrom()).
+					buildPartial();
+				nodes.add(n);
+			}
+		}
+		for(LinkNLRIMsg link : update.getLinkList()) {
+			
+//			String strIPlocal;
+//			String strIPremote;
+			String strIgpR;
+			String strIgpL;
+			// LinkNLRIMsg link=update.getLink();
+		
+//			if(link.getiPv4RouterIDLocalNodeLATLV()==null) 
+//				 strIPlocal="-";
+//			else {
+//				strIPlocal=link.getiPv4RouterIDLocalNodeLATLV();
+//			}
+//			if(link.getiPv4RouterIDNeighborNodeLATLV()==null) 
+//				 strIPremote="-";
+//			else {
+//				strIPremote=link.getiPv4RouterIDNeighborNodeLATLV();
+//			}
+			
+			if(link.getRemoteNodeIGPId()==null) 
+				strIgpR="-";
+			else {
+				strIgpR=link.getRemoteNodeIGPId().toString();
+			}
+			if(link.getLocalNodeIGPId()==null) 
+				strIgpL="-";
+			else {
+				strIgpL=link.getLocalNodeIGPId().toString();
+			}
+			String ipv4R;
+			if(link.getiPv4RouterIDNeighborNodeLATLV()==null) 
+				ipv4R="-";
+			else {
+				ipv4R=link.getiPv4RouterIDNeighborNodeLATLV();
+			}
+			String ipv4L;
+			if(link.getiPv4RouterIDLocalNodeLATLV()==null) 
+				ipv4L="-";
+			else {
+				ipv4L=link.getiPv4RouterIDLocalNodeLATLV();
+			}
+					
+//			Build link for grpc message. need non null values in some cases
+			
+			unic = linkInfo.newBuilder().setLocalID(strIgpR).
+					setLocalIPv4ID(ipv4L).
+					setRemoteID(strIgpL).
+					setRemoteIPv4ID(ipv4R).
+					setLocal(NodeDescriptors.newBuilder().
+							setAsNumber(link.getLocalDomainID().toString()).
+							setBgplsID(link.getLocalBgplsID())).
+					setRemote(NodeDescriptors.newBuilder().
+							setAsNumber(link.getRemoteDomainID().toString()).
+							setBgplsID(link.getRemoteBgplsID())).
+					setAvailableBw(link.getAvailableBw()).
+					setResidualBw(link.getResidualBw()).setUtilized(link.getUtilizedBw()).
+					setMinLinkDelay(link.getMinDelay()).setMaxLinkDelay(link.getMaxDelay()).
+					setDelayVariation(link.getLinkDelayVar()).setDelay(link.getLinkDelay()).
+					setTEDefaultMetric(1).setAdjacencySid("0").setLearntFrom(link.getLearntFrom()).buildPartial();
+			
+			l.add(unic);
+		} 
+		
+		if(nodes.size()==0 && l.size()>0) {
+			request=updateRequest.newBuilder().
+					setNextHop(update.getNextHop().toString()).
+					setAddressFamilyID(Integer.toString(update.getAFI())).
+					setAsPathSegment(Integer.toString(update.getAsPathSegment())).
+					addAllLink(l).build();
+		}else if(nodes.size()>0&& l.size()==0) {
+			// logger.debug("ADDING NODE");
+			request=updateRequest.newBuilder().
+					setNextHop(update.getNextHop().toString()).
+					setAddressFamilyID(Integer.toString(update.getAFI())).
+					setAsPathSegment(Integer.toString(update.getAsPathSegment())).
+					addAllNode(nodes).build();
+		}else {
+			//Error if node name is null 
+			// TODO: handle seng grpc error?
+			// logger.debug("ADDING NODE AND LINK");
+			request=updateRequest.newBuilder().
+					setNextHop("-"+update.getNextHop().toString()).
+					setAddressFamilyID(Integer.toString(update.getAFI())).
+					setAsPathSegment(Integer.toString(update.getAsPathSegment())).
+					addAllNode(nodes).addAllLink(l).build();
+			
+		}
+		final ManagedChannel channel = ManagedChannelBuilder.forAddress("localhost",2021).usePlaintext().build();
+		updateServiceBlockingStub stub = updateServiceGrpc.newBlockingStub(channel);
+
+		//TODO: this to a function
+		System.out.println("grpcClient request: "+request.toString());
+
+		// channel.awaitTermination(20, TimeUnit.SECONDS);
+		// updateResponse response = stub.update(request);
+		// Espera hasta que el canal esté inactivo
+        updateResponse response = stub.update(request);	
+
+		System.out.println("\nRESPUESTA RECIBIDA");
+		System.out.println(response);
+	}
+	// private void shutdownManagedChannel(ManagedChannel managedChannel) {
+	// 	managedChannel.shutdown();
+	// 	try {
+	// 	managedChannel.awaitTermination(mChannelShutdownTimeoutMs, TimeUnit.MILLISECONDS);
+	// 	} catch (InterruptedException e) {
+	// 	Thread.currentThread().interrupt();
+	// 	// Allow thread to exit.
+	// 	} finally {
+	// 	managedChannel.shutdownNow();
+	// 	}
+	// 	Verify.verify(managedChannel.isShutdown());
+	// }
+	// stub.update(request, new StreamObserver <updateResponse>() {
+      		
+	// 	public void onNext(updateResponse response) {
+	// 	  System.out.println("respuesta del server: "+response);
+	// 	}
+	// 	public void onError(Throwable t) {
+	// 		System.out.println("error: "+t.getMessage());
+	// 		latch.countDown();
+	// 	}
+	// 	public void onCompleted() {
+	// 	  // Typically you'll shutdown the channel somewhere else.
+	// 	  // But for the purpose of the lab, we are only making a single
+	// 	  // request. We'll shutdown as soon as this request is done.
+	// 		  latch.countDown();
+	// 		logger.info("gRPC call completed");
+	// 		System.out.println("OnCompleted");
+	// 	//   channel.shutdownNow();
+	// 		// try{
+	// 		// 	channel.shutdown().awaitTermination(5, TimeUnit.SECONDS);
+	// 		// }catch (InterruptedException e){
+	// 		// 	System.out.println("channel error"+e.toString());
+	// 		// }
+			
+	// 	}
+	//   });
+	//   latch.await(5, TimeUnit.SECONDS);
+	//   channel.shutdown().awaitTermination(5, TimeUnit.SECONDS);
+
+	public static void sendGrpc(UpdateMsgList update) {
+		//construir mensaje
+		//update get node,lin,path
+		//getname,ids,as
+		final ManagedChannel channel = ManagedChannelBuilder.forTarget("localhost:2021").usePlaintext().build();
+		updateServiceStub stub = updateServiceGrpc.newStub(channel);
+		
+		
+		if(update.getNodeList().isEmpty()&&update.getLinkList().isEmpty()) {
+			return;
+		}
+		updateRequest request=null;
+		nodeInfo n=null;
+		linkInfo l=null;
+		if(!update.getNodeList().isEmpty()) {
+			
+			for(NodeNLRIMsg node: update.getNodeList()) {
+				
+				n = nodeInfo.newBuilder().setNodeName(node.getNodeName()).setIgpID(node.getLocalBgplsID()).
+						setBgplsID(node.getBgplsID().toString()).setAsID(InetAddresses.coerceToInteger(node.getAs_number())).
+					buildPartial();
+			} 
+			
+			
+		}
+		if(!update.getLinkList().isEmpty()) {
+			
+			String strIPlocal;
+			String strIPremote;
+			String strIgpR;
+			String strIgpL;
+			
+			for(LinkNLRIMsg link: update.getLinkList()) {
+				
+				if(link.getiPv4RouterIDLocalNodeLATLV()==null) 
+					 strIPlocal="-";
+				else {
+					strIPlocal=link.getiPv4RouterIDLocalNodeLATLV();
+				}
+				if(link.getiPv4RouterIDNeighborNodeLATLV()==null) 
+					 strIPremote="-";
+				else {
+					strIPremote=link.getiPv4RouterIDNeighborNodeLATLV();
+				}
+				
+				if(link.getRemoteNodeIGPId()==null) 
+					strIgpR="-";
+				else {
+					strIgpR=link.getRemoteNodeIGPId().toString();
+				}
+				if(link.getLocalNodeIGPId()==null) 
+					strIgpL="-";
+				else {
+					strIgpL=link.getLocalNodeIGPId().toString();
+				}
+				String ipv4R;
+				if(link.getiPv4RouterIDNeighborNodeLATLV()==null) 
+					ipv4R="-";
+				else {
+					ipv4R=link.getiPv4RouterIDNeighborNodeLATLV();
+				}
+				String ipv4L;
+				if(link.getiPv4RouterIDLocalNodeLATLV()==null) 
+					ipv4L="-";
+				else {
+					ipv4L=link.getiPv4RouterIDLocalNodeLATLV();
+				}
+				
+//				NodeDescriptors local= NodeDescriptors.newBuilder().
+//						setAsNumber(link.getLocalDomainID().toString()).
+//						setBgplsID(link.getLocalBgplsID()).buildPartial();
+						
+				
+				l = linkInfo.newBuilder().setLocalID(strIgpR).
+						setLocalIPv4ID(ipv4L).
+						setRemoteID(strIgpL).
+						setRemoteIPv4ID(ipv4R).
+						setLocal(NodeDescriptors.newBuilder().
+								setAsNumber(link.getLocalDomainID().toString()).
+								setBgplsID(link.getLocalBgplsID())).
+						setRemote(NodeDescriptors.newBuilder().
+								setAsNumber(link.getRemoteDomainID().toString()).
+								setBgplsID(link.getRemoteBgplsID())).
+						setAvailableBw(link.getAvailableBw()).
+						setResidualBw(link.getResidualBw()).setUtilized(link.getUtilizedBw()).
+						setMinLinkDelay(link.getMinDelay()).setMaxLinkDelay(link.getMaxDelay()).
+						setDelayVariation(link.getLinkDelayVar()).setDelay(link.getLinkDelay()).
+						setTEDefaultMetric(1).setAdjacencySid("0").buildPartial();
+			} 
+			
+		}
+		if(n==null) {
+			request = updateRequest.newBuilder().addLink(l).build();
+		}else if(l==null) {
+			request = updateRequest.newBuilder().addNode(n).build();
+		}else {
+			request = updateRequest.newBuilder().addNode(n).addLink(l).build();
+		}
+		
+		
+		
+		
+	    
+	    stub.update(request, new StreamObserver <updateResponse>() {
+      		
+	        public void onNext(updateResponse response) {
+	          System.out.println("respuesta del server: "+response);
+	        }
+	        public void onError(Throwable t) {
+	        	System.out.println("error: "+t.getMessage());
+	        }
+	        public void onCompleted() {
+	          // Typically you'll shutdown the channel somewhere else.
+	          // But for the purpose of the lab, we are only making a single
+	          // request. We'll shutdown as soon as this request is done.
+	        	System.out.println("channel shutdown");
+	          channel.shutdownNow();
+	        }
+	      });
+	    
+	    
+	    
+		
+		
+	}
+	public static void main( String[] args ) throws Exception
+    {
+	      final ManagedChannel channel = ManagedChannelBuilder.forTarget("localhost:2021").usePlaintext().build();
+
+	    	      // Replace the previous synchronous code with asynchronous code.
+	    	      // This time use an async stub:
+	    	       updateServiceStub stub = updateServiceGrpc.newStub(channel);
+
+	    	      // Construct a request
+	    	       int a = 123;
+	    	       nodeInfo n = nodeInfo.newBuilder().setNodeName("router 3").setIgpID("1341234").buildPartial();
+	    	      updateRequest request =
+	    	        updateRequest.newBuilder().addNode(n).build();
+
+	    	      // Make an Asynchronous call. Listen to responses w/ StreamObserver
+	    	      	stub.update(request, new StreamObserver <updateResponse>() {
+	    	      		
+	    	        public void onNext(updateResponse response) {
+	    	          System.out.println("respuesta del server: "+response);
+	    	        }
+	    	        public void onError(Throwable t) {
+	    	        	System.out.println("error: "+t.getMessage());
+	    	        }
+	    	        public void onCompleted() {
+	    	          // Typically you'll shutdown the channel somewhere else.
+	    	          // But for the purpose of the lab, we are only making a single
+	    	          // request. We'll shutdown as soon as this request is done.
+	    	        	System.out.println("channel shutdown");
+	    	          channel.shutdownNow();
+	    	        }
+	    	      });
+	    	    }
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/updateServiceImpl.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/updateServiceImpl.java
new file mode 100644
index 0000000000000000000000000000000000000000..3010cbbfb9c29e7233adf3110db02192b2c6a1ff
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/grpc/updateServiceImpl.java
@@ -0,0 +1,42 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.grpc;
+
+import io.grpc.stub.StreamObserver;
+import src.main.proto.GrpcService.updateRequest;
+import src.main.proto.GrpcService.updateResponse;
+import src.main.proto.updateServiceGrpc.updateServiceImplBase;
+
+
+public class updateServiceImpl extends updateServiceImplBase{
+
+public void update(updateRequest request, StreamObserver<updateResponse> responseObserver) {
+		
+		System.out.println(request);
+		
+		updateResponse response = updateResponse.newBuilder()
+			      .setAck("Update procesado, " + request )
+			      .build();
+		
+		 // Use responseObserver to send a single response back
+	    responseObserver.onNext(response);
+
+
+	    // When you are done, you must call onCompleted.
+	    responseObserver.onCompleted();
+	    
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/json/bgpMarshal.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/json/bgpMarshal.java
new file mode 100644
index 0000000000000000000000000000000000000000..87d141222e79c454a66d7002ae67bfe5767a998f
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/json/bgpMarshal.java
@@ -0,0 +1,82 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.json;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.util.LinkedList;
+import java.util.List;
+
+import org.codehaus.jackson.JsonEncoding;
+import org.codehaus.jackson.JsonGenerationException;
+import org.codehaus.jackson.JsonGenerator;
+import org.codehaus.jackson.map.JsonMappingException;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonInclude.Include;
+
+import eu.teraflow.tid.bgp4Peer.models.LinkNLRIMsg;
+import eu.teraflow.tid.bgp4Peer.models.NodeNLRIMsg;
+import eu.teraflow.tid.bgp4Peer.models.PathAttributeMsg;
+import eu.teraflow.tid.bgp4Peer.models.UpdateMsg;
+import eu.teraflow.tid.bgp4Peer.models.UpdateMsgList;
+
+public class bgpMarshal {
+
+	
+	ObjectMapper mapper = new ObjectMapper();
+	JsonGenerator g;
+	FileWriter fWriter;
+	public void bgpMarshaller() throws IOException{
+		
+		
+		mapper.setSerializationInclusion(Inclusion.NON_NULL);
+		mapper.setSerializationInclusion(Inclusion.NON_EMPTY);
+		
+		
+		
+//		String jsonStr = mapper.writeValueAsString(node);
+//		mapper.writeValue(new File("target/node.json"), nodeList);
+//		System.out.println(jsonStr);
+		
+	}
+	public void writeFile(UpdateMsgList update) throws JsonGenerationException, JsonMappingException, IOException {
+		
+		g = mapper.getJsonFactory().createJsonGenerator(new File("node.json"), JsonEncoding.UTF8);
+//		update=update.id2Name();
+		mapper.writeValue(g, update);
+		String temp = mapper.writeValueAsString(update)+"\n";
+//		FileOutputStream fos = new FileOutputStream("target/update.json", true);
+//		fos.write(temp.getBytes());
+//	    fos.close();
+		fWriter = new FileWriter("updateWriter.json");
+//		if(temp.length()>2)
+		fWriter.write(temp);
+	    
+	    
+		
+	}
+	public void closeFile() throws IOException {
+		g.close();
+		fWriter.close();
+	}
+	
+	
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementServer.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementServer.java
new file mode 100644
index 0000000000000000000000000000000000000000..f135a446d9f453cae51986fd5ee42666a80418a5
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementServer.java
@@ -0,0 +1,85 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.management;
+
+import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionsInformation;
+import eu.teraflow.tid.bgp4Peer.peer.SendTopology;
+import eu.teraflow.tid.tedb.MultiDomainTEDB;
+import eu.teraflow.tid.tedb.TEDB;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.ServerSocket;
+import java.util.Hashtable;
+/**
+ * To manage the server 
+ * 
+ * @author mcs
+ *
+ */
+public class BGP4ManagementServer extends Thread {
+	private Logger log;
+	private int BGP4ManagementPort = 8888;
+	private BGP4SessionsInformation bgp4SessionsInformation;
+	/**
+	 * Topology database for interDomain Links.
+	 */
+	private MultiDomainTEDB multiTEDB;
+	/**
+	 * Topology database for intradomain Links. It owns several domains.
+	 */
+	private Hashtable<String,TEDB> intraTEDBs;
+
+	/**
+	 * Class to send the topology. It is needes to set the parameters sendTopology to true or false.
+	 */
+	private SendTopology sendTopology;
+	
+	public BGP4ManagementServer(int BGP4ManagementPort, MultiDomainTEDB multiTEDB, Hashtable<String,TEDB> intraTEDBs, BGP4SessionsInformation bgp4SessionsInformation, SendTopology sendTopology){
+		log =LoggerFactory.getLogger("BGP4Server");
+		this.BGP4ManagementPort = BGP4ManagementPort;
+		this.multiTEDB=multiTEDB;
+		this.intraTEDBs=intraTEDBs;
+		this.bgp4SessionsInformation =bgp4SessionsInformation;
+		this.sendTopology=sendTopology;
+
+	}
+	/**
+	 * RUN
+	 */
+	public void run(){
+	    ServerSocket serverSocket = null;
+	    boolean listening=true;
+		try {
+	      	  log.debug("Listening management on port "+BGP4ManagementPort);
+	          serverSocket = new ServerSocket(BGP4ManagementPort);
+		  }
+		catch (Exception e){
+			 log.error("Could not listen management on port "+BGP4ManagementPort);
+			e.printStackTrace();
+			return;
+		}
+		
+		   try {
+	        	while (listening) {
+	        		new BGP4ManagementSession(serverSocket.accept(),multiTEDB,intraTEDBs,bgp4SessionsInformation, sendTopology).start();
+	        	}
+	        	serverSocket.close();
+	        } catch (Exception e) {
+	        	e.printStackTrace();
+	        }				
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementSession.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementSession.java
new file mode 100644
index 0000000000000000000000000000000000000000..18a433e400e593cc66876c3ac264a6c668dd4f80
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/management/BGP4ManagementSession.java
@@ -0,0 +1,199 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.management;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.io.PrintStream;
+import java.net.Inet4Address;
+import java.net.Socket;
+import java.util.Enumeration;
+import java.util.Hashtable;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionsInformation;
+import eu.teraflow.tid.bgp4Peer.peer.SendTopology;
+import eu.teraflow.tid.bgp4Peer.tedb.IntraTEDBS;
+import eu.teraflow.tid.tedb.DomainTEDB;
+import eu.teraflow.tid.tedb.MultiDomainTEDB;
+import eu.teraflow.tid.tedb.SimpleTEDB;
+import eu.teraflow.tid.tedb.TEDB;
+
+/**
+ * 
+ * @author mcs
+ *
+ */
+public class BGP4ManagementSession extends Thread {
+	/**
+	 * The socket of the management session
+	 */
+	private Socket socket;
+	
+	/**
+	 * Logger
+	 */
+	private Logger log;
+	
+	/**
+	 * Output Stream of the managament session, to write the answers.
+	 */
+	private PrintStream out;
+	/**
+	 * Topology database for interDomain Links.
+	 */
+	private MultiDomainTEDB multiTEDB;
+	/**
+	 * Topology database for intradomain Links. It owns several domains.
+	 */
+	private Hashtable<String,TEDB> intraTEDBs;
+	
+	/**
+	 * The infomation of all the active sessions
+	 */
+	private BGP4SessionsInformation bgp4SessionsInformation;
+	/**
+	 * Class to send the topology. It is needes to set the parameters sendTopology to true or false.
+	 */
+	private SendTopology sendTopology;
+	
+	public BGP4ManagementSession(Socket s,MultiDomainTEDB multiTEDB, Hashtable<String,TEDB> intraTEDBs,BGP4SessionsInformation bgp4SessionsInformation, SendTopology sendTopology){
+		this.socket=s;
+		log=LoggerFactory.getLogger("BGP4Server");
+		this.multiTEDB=multiTEDB;
+		this.intraTEDBs=intraTEDBs;
+		this.bgp4SessionsInformation= bgp4SessionsInformation;
+		this.sendTopology=sendTopology;
+	}
+	
+	public void run(){
+		log.info("Starting Management session");
+		boolean running=true;
+		try {
+			out=new PrintStream(socket.getOutputStream());
+		} catch (IOException e) {
+			log.warn("Management session cancelled: "+e.getMessage());
+			return;
+		}
+		try {
+			BufferedReader br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
+			while (running) {
+				//out.print("BGP4:>");
+				
+				
+				
+				out.print("Available commands:\r\n");
+				out.print(" > show topology\r\n");
+				out.print(" > show sessions\r\n");
+				out.print(" > set traces on\r\n");
+				out.print(" > set traces off\r\n");
+				out.print(" > send topology on\r\n");
+				out.print(" > send topology off\r\n");
+				out.print(" > quit\r\n");
+				
+				
+				String command = null;
+				try {
+					command = br.readLine();
+				} catch (IOException ioe) {
+					log.warn("IO error trying to read your command");
+					return;
+				}
+				if (command.equals("quit")) {
+					log.info("Ending Management Session");
+					out.println("bye!");
+					try {
+						out.close();						
+					} catch (Exception e){
+						e.printStackTrace();
+					}
+					try {
+						br.close();						
+					} catch (Exception e){
+						e.printStackTrace();
+					}					
+					return;
+				}				
+				
+//				else if (command.equals("help")){
+//					out.print("Available commands:\r\n");
+//					out.print(" > show topology\r\n");
+//					out.print(" > show sessions\r\n");
+//					out.print(" > set traces on\r\n");
+//					out.print(" > set traces off\r\n");
+//					out.print(" > send topology on\r\n");
+//					out.print(" > send topology off\r\n");
+//					out.print(" > quit\r\n");
+//					
+//				}
+				else if (command.equals("show sessions")){
+					//Print intradomain and interDomain links
+					out.print(bgp4SessionsInformation.toString());
+				}
+				else if (command.equals("show topology")){
+					//Print intradomain and interDomain links
+					if (multiTEDB != null)
+						out.println(multiTEDB.printTopology());
+					Enumeration<String> domainTedbs=intraTEDBs.keys();
+					while (domainTedbs.hasMoreElements()){		
+						String domainID=domainTedbs.nextElement();
+						TEDB ted=intraTEDBs.get(domainID);
+						if (ted instanceof DomainTEDB) {
+							out.println("Intradomain TEDB with ID "+domainID);
+							out.println(ted.printTopology());
+						}
+						
+					}
+					
+				}
+				else if (command.equals("set traces on")) {
+					//log.setLevel(Level.ALL);		
+					Logger log2=LoggerFactory.getLogger("BGP4Parser");
+					//log2.setLevel(Level.ALL);			
+					Logger log3=LoggerFactory.getLogger("BGP4Client");
+					//log3.setLevel(Level.ALL);
+					out.print("traces on!\r\n");
+				} 
+				else if (command.equals("set traces off")) {
+					//log.setLevel(Level.SEVERE);		
+					Logger log2=LoggerFactory.getLogger("BGP4Parser");
+					//log2.setLevel(Level.SEVERE);
+					Logger log3=LoggerFactory.getLogger("BGP4Client");
+					//log3.setLevel(Level.SEVERE);
+					out.print("traces off!\r\n");
+				} 
+				else if (command.equals("send topology on")) {
+					sendTopology.setSendTopology(true);
+				}
+				else if (command.equals("send topology off")) {
+					sendTopology.setSendTopology(false);
+				}
+				else{
+					out.print("invalid command\n");	
+					out.print("\n");
+				}
+
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+			return;
+		}
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/LinkNLRIMsg.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/LinkNLRIMsg.java
new file mode 100644
index 0000000000000000000000000000000000000000..9455ccd1cb9e55ecb85925db19bf62f97cf12703
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/LinkNLRIMsg.java
@@ -0,0 +1,298 @@
+
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.models;
+
+import java.net.Inet4Address;
+import java.util.ArrayList;
+
+import org.slf4j.Logger;
+
+import es.tid.bgp.bgp4.update.fields.LinkNLRI;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.NodeDescriptorsSubTLV;
+
+public class LinkNLRIMsg {
+
+	private ArrayList<NodeDescriptorsSubTLV> nodeDescriptorsSubTLV;
+	// Dominios
+	private Inet4Address localDomainID;
+	private Inet4Address remoteDomainID;
+
+	private Inet4Address areaID;
+	private Inet4Address bgplsID;
+
+	private Inet4Address LocalNodeIGPId;
+	private Inet4Address RemoteNodeIGPId;
+
+	private int linkDelay;
+	private int linkDelayVar;
+	private int minDelay;
+	private int maxDelay;
+	private int linkLoss;
+	private int residualBw;
+	private int availableBw;
+	private int utilizedBw;
+	
+	private Inet4Address iPv4RouterIDLocalNodeLATLV;
+	private Inet4Address iPv4RouterIDNeighborNodeLATLV;
+
+	private int IGP_type;
+	private String localIGPID = null;
+	private String remoteIGPID = null;
+	private String localBgplsID;
+	private String remoteBgplsID;
+	private Logger log;
+	private String learntFrom;
+
+	public LinkNLRIMsg(LinkNLRI linkNLRI, String learntFrom) {
+
+		// LinkState vs Link??
+		this.learntFrom = learntFrom;
+
+		if (linkNLRI.getLocalNodeDescriptors().getAutonomousSystemSubTLV() != null) {
+			localDomainID = linkNLRI.getLocalNodeDescriptors().getAutonomousSystemSubTLV().getAS_ID();
+		}
+		if (linkNLRI.getLocalNodeDescriptors().getAreaID() != null) {
+			areaID = linkNLRI.getLocalNodeDescriptors().getAreaID().getAREA_ID();
+		}
+		if (linkNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV() != null) {
+			bgplsID = linkNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV().getBGPLS_ID();
+		}
+		if (linkNLRI.getLocalNodeDescriptors().getIGPRouterID() != null) {
+			LocalNodeIGPId = linkNLRI.getLocalNodeDescriptors().getIGPRouterID().getIpv4AddressOSPF();
+		}
+
+		if (linkNLRI.getRemoteNodeDescriptorsTLV().getAutonomousSystemSubTLV() != null) {
+			remoteDomainID = linkNLRI.getRemoteNodeDescriptorsTLV().getAutonomousSystemSubTLV().getAS_ID();
+		}
+		if (linkNLRI.getRemoteNodeDescriptorsTLV().getAreaID() != null) {
+			areaID = linkNLRI.getRemoteNodeDescriptorsTLV().getAreaID().getAREA_ID();
+		}
+		if (linkNLRI.getRemoteNodeDescriptorsTLV().getBGPLSIDSubTLV() != null) {
+			bgplsID = linkNLRI.getRemoteNodeDescriptorsTLV().getBGPLSIDSubTLV().getBGPLS_ID();
+		}
+		if (linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID() != null) {
+			RemoteNodeIGPId = linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID().getIpv4AddressOSPF();
+		}
+		if (linkNLRI.getUndirectionalLinkDelayTLV() != null) {
+			linkDelay = linkNLRI.getUndirectionalLinkDelayTLV().getDelay();
+		}
+		if (linkNLRI.getUndirectionalDelayVariationTLV() != null) {
+			linkDelayVar = linkNLRI.getUndirectionalDelayVariationTLV().getDelayVar();
+		}
+		if (linkNLRI.getMinMaxUndirectionalLinkDelayTLV() != null) {
+			maxDelay = linkNLRI.getMinMaxUndirectionalLinkDelayTLV().getHighDelay();
+			minDelay = linkNLRI.getMinMaxUndirectionalLinkDelayTLV().getLowDelay();
+		}
+		if (linkNLRI.getUndirectionalLinkLossTLV() != null) {
+			linkLoss = linkNLRI.getUndirectionalLinkLossTLV().getLinkLoss();
+		}
+		if (linkNLRI.getUndirectionalResidualBwTLV() != null) {
+			residualBw = linkNLRI.getUndirectionalResidualBwTLV().getResidualBw();
+		}
+		if (linkNLRI.getUndirectionalAvailableBwTLV() != null) {
+			availableBw = linkNLRI.getUndirectionalAvailableBwTLV().getAvailableBw();
+		}
+		if (linkNLRI.getUndirectionalUtilizedBwTLV() != null) {
+			utilizedBw = linkNLRI.getUndirectionalUtilizedBwTLV().getUtilizedBw();
+		}
+		if (linkNLRI.getIpv4InterfaceAddressTLV() != null) {
+			iPv4RouterIDLocalNodeLATLV = linkNLRI.getIpv4InterfaceAddressTLV().getIpv4Address();
+		}
+		if (linkNLRI.getIpv4NeighborAddressTLV() != null) {
+			iPv4RouterIDNeighborNodeLATLV = linkNLRI.getIpv4NeighborAddressTLV().getIpv4Address();
+		}
+		if (linkNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV().getBGPLS_ID() != null) {// alguna condicion?
+			localBgplsID = linkNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV().getBGPLS_ID().toString();
+		}
+		if (linkNLRI.getRemoteNodeDescriptorsTLV().getBGPLSIDSubTLV().getBGPLS_ID() != null) {// alguna condicion?
+			remoteBgplsID = linkNLRI.getRemoteNodeDescriptorsTLV().getBGPLSIDSubTLV().getBGPLS_ID().toString();
+		}
+		if (linkNLRI.getLocalNodeDescriptors().getIGPRouterID() != null) {
+			IGP_type = linkNLRI.getLocalNodeDescriptors().getIGPRouterID().getIGP_router_id_type();
+			switch (IGP_type) {
+			case 1:
+				localIGPID = Integer.toString(linkNLRI.getLocalNodeDescriptors().getIGPRouterID().getISIS_ISO_NODE_ID());
+				break;
+			case 2:
+				localIGPID = Integer.toString(linkNLRI.getLocalNodeDescriptors().getIGPRouterID().getISIS_ISO_NODE_ID());
+				break;
+			case 3:
+				localIGPID = linkNLRI.getLocalNodeDescriptors().getIGPRouterID().getIpv4AddressOSPF().toString();
+
+				break;
+			default:
+				log.info("añadir este tipo de IGP Identifier por implementar ");
+			}
+		}
+		if (linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID() != null) {
+			IGP_type = linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID().getIGP_router_id_type();
+			switch (IGP_type) {
+			case 1:
+				remoteBgplsID = Integer.toString(linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID().getISIS_ISO_NODE_ID());
+				break;
+			case 2:
+				remoteBgplsID = Integer.toString(linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID().getISIS_ISO_NODE_ID());
+			case 3:
+				remoteIGPID = linkNLRI.getRemoteNodeDescriptorsTLV().getIGPRouterID().getIpv4AddressOSPF().toString();
+				break;
+			default:
+				log.info("añadir este tipo de IGP Identifier por implementar ");
+			}
+		}
+
+	}
+
+	@Override
+	public int hashCode() {
+		int result = 17;
+		result = 31 * result + localBgplsID.hashCode();
+		result = 31 * result + iPv4RouterIDLocalNodeLATLV.hashCode();
+		result = 31 * result + iPv4RouterIDNeighborNodeLATLV.hashCode();
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if (o == this)
+			return true;
+		if (!(o instanceof LinkNLRIMsg)) {
+			return false;
+		}
+		LinkNLRIMsg linkCk = (LinkNLRIMsg) o;
+		return linkCk.localBgplsID == localBgplsID && linkCk.iPv4RouterIDLocalNodeLATLV == iPv4RouterIDLocalNodeLATLV
+				&& linkCk.localBgplsID == localBgplsID
+				&& linkCk.iPv4RouterIDLocalNodeLATLV == iPv4RouterIDLocalNodeLATLV;
+	}
+
+	public String toString() {// check type
+		String out = "";
+		if (this.localBgplsID != null)
+			out = out + "ID: " + this.localBgplsID + " ";// esto es id router??
+		if (this.iPv4RouterIDLocalNodeLATLV != null)
+			out = out + this.iPv4RouterIDLocalNodeLATLV.toString();
+		if(this.localIGPID!=null)
+			out = out + " localIGPID: "+ this.localIGPID;
+		if (this.iPv4RouterIDNeighborNodeLATLV != null)
+			out = out + "---->" + this.iPv4RouterIDNeighborNodeLATLV.toString();
+		if(this.remoteIGPID!=null)
+			out = out + " remoteIGPID: "+ this.remoteIGPID;
+		if (this.remoteBgplsID != null)
+			out = out + "ID: " + this.remoteBgplsID + " ";
+		if (this.localDomainID != null)
+			out = out + "\n AS_ID local: " + this.localDomainID.toString() + " ";
+		if (this.remoteDomainID != null)
+			out = out + "\n AS_ID remote: " + this.remoteDomainID.toString() + " ";
+		if (this.availableBw != 0)
+			out = out + "\n availableBW: " + this.availableBw + " ";
+		if (this.residualBw != 0)
+			out = out + "\n residualBw: " + this.residualBw + " ";
+		if (this.linkDelay != 0)
+			out = out + "\n linkDelay: " + this.linkDelay + " ";
+		return out;
+
+	}
+
+	public String getLearntFrom() {
+		return learntFrom;
+	}
+
+	public void setLearntFrom(String learntFrom) {
+		this.learntFrom = learntFrom;
+	}
+
+	public String getiPv4RouterIDLocalNodeLATLV() {
+		if (iPv4RouterIDLocalNodeLATLV != null)
+			return iPv4RouterIDLocalNodeLATLV.toString();
+		else
+			return null;// NO DEBERIA SER NULL
+	}
+
+	public void setiPv4RouterIDLocalNodeLATLV(Inet4Address iPv4RouterIDLocalNodeLATLV) {
+		this.iPv4RouterIDLocalNodeLATLV = iPv4RouterIDLocalNodeLATLV;
+	}
+
+	public String getiPv4RouterIDNeighborNodeLATLV() {
+		if (iPv4RouterIDNeighborNodeLATLV != null)
+			return iPv4RouterIDNeighborNodeLATLV.toString();
+		else
+			return null;// NO DEBERIA SER NULL
+	}
+
+	public void setiPv4RouterIDNeighborNodeLATLV(Inet4Address iPv4RouterIDNeighborNodeLATLV) {
+		this.iPv4RouterIDNeighborNodeLATLV = iPv4RouterIDNeighborNodeLATLV;
+	}
+
+	public Inet4Address getLocalDomainID() {
+		return localDomainID;
+	}
+
+	public Inet4Address getRemoteDomainID() {
+		return remoteDomainID;
+	}
+
+	public String getLocalBgplsID() {
+		return this.localBgplsID;
+	}
+
+	public void setLocalBgplsID(String localBgplsID) {
+		this.localBgplsID = localBgplsID;
+	}
+
+	public String getRemoteBgplsID() {
+		return this.remoteBgplsID;
+	}
+
+	public void setRemoteBgplsID(String remoteBgplsID) {
+		this.remoteBgplsID = remoteBgplsID;
+	}
+
+	public Inet4Address getLocalNodeIGPId() {
+		return LocalNodeIGPId;
+	}
+
+	public Inet4Address getRemoteNodeIGPId() {
+		return RemoteNodeIGPId;
+	}
+
+	public int getLinkDelay() {
+		return linkDelay;
+	}
+
+	public int getLinkDelayVar() {
+		return linkDelayVar;
+	}
+
+	public int getMinDelay() {
+		return minDelay;
+	}
+
+	public int getMaxDelay() {
+		return maxDelay;
+	}
+
+	public int getResidualBw() {
+		return residualBw;
+	}
+
+	public int getAvailableBw() {
+		return availableBw;
+	}
+
+	public int getUtilizedBw() {
+		return utilizedBw;
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/NodeNLRIMsg.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/NodeNLRIMsg.java
new file mode 100644
index 0000000000000000000000000000000000000000..958544f63b30a81480e25e78ae3ea3e578a9a7cd
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/NodeNLRIMsg.java
@@ -0,0 +1,197 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.models;
+
+import java.net.Inet4Address;
+import java.net.InetAddress;
+import java.util.ArrayList;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.common.net.InetAddresses;
+
+import es.tid.bgp.bgp4.update.fields.LinkNLRI;
+import es.tid.bgp.bgp4.update.fields.NodeNLRI;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.NodeDescriptorsSubTLV;
+
+public class NodeNLRIMsg {
+
+	private ArrayList<NodeDescriptorsSubTLV> nodeDescriptorsSubTLV;
+	// Dominios
+	private Inet4Address localDomainID;
+	private Inet4Address remoteDomainID;
+	private Inet4Address areaID;
+	private Inet4Address bgplsID;
+
+	private Inet4Address LocalNodeBGPId;
+
+	private Inet4Address iPv4RouterIDLocalNodeLATLV;
+	private Inet4Address iPv4RouterIDNeighborNodeLATLV;
+
+	private String localBgplsID;
+	private int remoteBgplsID;
+
+	private Inet4Address as_number;
+
+	private int IGP_type;
+	private Inet4Address IGPID = null;
+	private Logger log;
+	private String nodeName;
+	private String ISIS_ID_str;
+	private String router_id="-";
+
+	private String learntFrom;
+
+	public NodeNLRIMsg(NodeNLRI nodeNLRI, String learntFrom, String nodeName) {
+
+		log = LoggerFactory.getLogger("BGP4Server");// prueba logger
+
+		this.learntFrom = learntFrom;
+
+		if (nodeNLRI.getLocalNodeDescriptors().getAutonomousSystemSubTLV() != null) {
+			// inetAddr???
+			as_number = nodeNLRI.getLocalNodeDescriptors().getAutonomousSystemSubTLV().getAS_ID();
+		}
+		if (nodeNLRI.getLocalNodeDescriptors().getAreaID() != null) {
+			areaID = nodeNLRI.getLocalNodeDescriptors().getAreaID().getAREA_ID();
+		}
+		if (nodeNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV() != null) {
+			localBgplsID=nodeNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV().getBGPLS_ID().toString();
+		}
+
+		if (nodeNLRI.getLocalNodeDescriptors().getIGPRouterID() != null) {
+			IGP_type = nodeNLRI.getLocalNodeDescriptors().getIGPRouterID().getIGP_router_id_type();
+			switch (IGP_type) {
+			case 1:
+			    ISIS_ID_str = Integer.toString(nodeNLRI.getLocalNodeDescriptors().getIGPRouterID().getISIS_ISO_NODE_ID());
+				router_id=ISIS_ID_str;
+			case 2:
+				ISIS_ID_str = Integer.toString(nodeNLRI.getLocalNodeDescriptors().getIGPRouterID().getISIS_ISO_NODE_ID());
+				router_id=ISIS_ID_str;
+			case 3:
+				IGPID = nodeNLRI.getLocalNodeDescriptors().getIGPRouterID().getIpv4AddressOSPF();
+				if(IGPID!=null){
+					router_id=IGPID.toString();
+				}else{
+					System.out.println("Null IGPID (type OSPF)");
+				}
+				break;
+			default:
+				log.info("añadir este tipo de IGP Identifier por implementar ");
+			}
+		}
+
+		if (nodeNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV() != null) {
+			if (nodeNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV().getBGPLS_ID() != null) {
+				LocalNodeBGPId = nodeNLRI.getLocalNodeDescriptors().getBGPLSIDSubTLV().getBGPLS_ID();
+			}
+		}
+
+		if (nodeName != null) {
+			this.nodeName = nodeName;
+		}else{
+			this.nodeName= this.router_id;
+		}
+		log.info("End node processing");
+	}
+
+	public String toString() {// check type
+		// TODO: concatenate with stringBuffer
+
+		String out = "";
+		if (this.router_id != null)
+			out = out + "ID: " + this.router_id + " ";// esto es id router??
+		if (this.iPv4RouterIDLocalNodeLATLV != null)
+			out = out + this.iPv4RouterIDLocalNodeLATLV.toString();
+		if (this.iPv4RouterIDNeighborNodeLATLV != null)
+			out = out + "---->" + this.iPv4RouterIDNeighborNodeLATLV.toString();
+		if(this.LocalNodeBGPId!=null)
+			out=out+"BGP_ID: "+this.LocalNodeBGPId+" ";
+		if(this.as_number!=null)
+			out=out+"AS_number: "+InetAddresses.coerceToInteger(this.as_number)+" ";
+		if (this.nodeName != null)
+			out = out + "Name node attribute: " + nodeName + " ";
+		if (this.ISIS_ID_str != null)
+			out = out + "ID node: " + this.ISIS_ID_str + " ";
+		if (this.as_number != null)
+			out = out + "AS number: " + this.as_number.toString() + " ";
+		return out;
+
+	}
+
+	public String getLearntFrom() {
+		return learntFrom;
+	}
+
+	public void setLearntFrom(String learntFrom) {
+		this.learntFrom = learntFrom;
+	}
+
+	public String getLocalBgplsID() {
+		return this.localBgplsID;
+	}
+
+	public void setLocalBgplsID(String localBgplsID) {
+		this.localBgplsID = localBgplsID;
+	}
+
+	public String getNodeName() {
+		return nodeName;
+	}
+
+	public Inet4Address getIGPID() {
+		return IGPID;
+	}
+
+	public Inet4Address getBgplsID() {
+		return bgplsID;
+	}
+
+	public String getRouterID(){
+		return router_id;
+	}
+
+	public void setBgplsID(Inet4Address bgplsID) {
+		this.bgplsID = bgplsID;
+	}
+
+	public Inet4Address getAs_number() {
+		return as_number;
+	}
+
+	@Override
+	public int hashCode() {
+		int result = 17;
+		result = 31 * result + localBgplsID.hashCode();
+		result = 31 * result + iPv4RouterIDLocalNodeLATLV.hashCode();
+		result = 31 * result + iPv4RouterIDNeighborNodeLATLV.hashCode();
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object o) {
+		if (o == this)
+			return true;
+		if (!(o instanceof NodeNLRIMsg)) {
+			return false;
+		}
+		NodeNLRIMsg nodeCk = (NodeNLRIMsg) o;
+		return nodeCk.localBgplsID == localBgplsID && nodeCk.iPv4RouterIDLocalNodeLATLV == iPv4RouterIDLocalNodeLATLV
+				&& nodeCk.localBgplsID == localBgplsID
+				&& nodeCk.iPv4RouterIDLocalNodeLATLV == iPv4RouterIDLocalNodeLATLV;
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/PathAttributeMsg.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/PathAttributeMsg.java
new file mode 100644
index 0000000000000000000000000000000000000000..11bf355d06af41b76eac9fc63f1df7c63628c5df
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/PathAttributeMsg.java
@@ -0,0 +1,89 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.models;
+
+import java.net.Inet4Address;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+
+import es.tid.bgp.bgp4.update.fields.pathAttributes.LinkStateAttribute;
+import es.tid.bgp.bgp4.update.tlv.BGP4TLVFormat;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IPv4RouterIDLocalNodeLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.NodeNameNodeAttribTLV;
+
+public class PathAttributeMsg {
+
+	
+	private NodeNameNodeAttribTLV nodeNameTLV;
+	private byte[] data;
+	private String nodeName;
+	private Inet4Address addrLocal;
+	
+
+	public PathAttributeMsg(LinkStateAttribute att) {
+		
+		
+		if(att.getNodeNameTLV()!=null) {
+
+			nodeNameTLV=att.getNodeNameTLV();
+			data=nodeNameTLV.getTlv_bytes();
+			int b = nodeNameTLV.getTotalTLVLength();
+			int c = nodeNameTLV.getTLVValueLength();
+			byte [] fin= Arrays.copyOfRange(data, b - c, b); 
+			nodeName = new String(fin , StandardCharsets.UTF_8);
+		}
+		if(att.getIPv4RouterIDLocalNodeLATLV()!=null) {
+			addrLocal=att.getIPv4RouterIDLocalNodeLATLV().getIpv4Address();
+		}
+		
+	}
+	public String toString() {
+		String out="";
+		if(this.nodeName!=null)
+			out=out+"NODE name "+nodeName;
+		if(this.addrLocal!=null)
+			out=out+"NODE IP "+addrLocal.toString();
+		
+		return out;
+	}
+	
+	public String getNodeName() {
+		return nodeName;
+	}
+	public void setNodeName(String nodeName) {
+		this.nodeName = nodeName;
+	}
+	
+	@Override
+    public int hashCode() {
+        int result = 17;
+        result = 31 * result + nodeName.hashCode();
+        return result;
+    }
+	 @Override
+	    public boolean equals(Object o) {
+	        if (o == this) return true;
+	        if (!(o instanceof PathAttributeMsg)) {
+	            return false;
+	        }
+	        PathAttributeMsg pathCk = (PathAttributeMsg) o;
+	        return pathCk.nodeName == nodeName;
+	    }
+	public Inet4Address getAddrLocal() {
+		return addrLocal;
+	}
+	 
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsg.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsg.java
new file mode 100644
index 0000000000000000000000000000000000000000..37d87e6836734989ec38d08741f51495262c7d3b
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsg.java
@@ -0,0 +1,99 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.models;
+
+import java.net.InetAddress;
+import java.util.ArrayList;
+import java.util.List;
+
+public class UpdateMsg {
+	
+	private int AFI;
+	private int asPathSegment;
+	private InetAddress nextHop;
+	private String learntFrom;
+	
+	private NodeNLRIMsg node;
+	private LinkNLRIMsg link;
+	private PathAttributeMsg path;
+	private List <LinkNLRIMsg> linkList = new ArrayList<>();
+	private List <NodeNLRIMsg> nodeList = new ArrayList<>();
+	
+	public List <LinkNLRIMsg> getLinkList(){
+		return this.linkList;
+	}
+	public List <NodeNLRIMsg> getNodeList(){
+		return this.nodeList;
+	}
+	public void addNode(NodeNLRIMsg node) {
+		this.nodeList.add(node);
+	}
+	public int getAFI() {
+		return AFI;
+	}
+	public String getLearntFrom() {
+		return learntFrom;
+	}
+	public void setLearntFrom(String learntFrom) {
+		this.learntFrom = learntFrom;
+	}
+	public void setAFI(int aFI) {
+		AFI = aFI;
+	}
+	public int getAsPathSegment() {
+		return asPathSegment;
+	}
+	public void setAsPathSegment(int asPathSegment) {
+		this.asPathSegment = asPathSegment;
+	}
+	public InetAddress getNextHop() {
+		return nextHop;
+	}
+	public void setNextHop(InetAddress nextHop) {
+		this.nextHop = nextHop;
+	}
+	public NodeNLRIMsg getNode() {
+		return node;
+	}
+	public void setNode(NodeNLRIMsg node) {
+		this.node = node;
+	}
+	// public LinkNLRIMsg getLink() {
+	// 	return link;
+	// }
+	public boolean linkCheck(){
+		return linkList.size()>0;
+	}
+	public boolean nodeCheck(){
+		return nodeList.size()>0;
+	}
+	public void setLink(LinkNLRIMsg link) {
+		this.link = link;
+	}
+	public void addLink(LinkNLRIMsg link) {
+		this.linkList.add(link);
+	}
+	public PathAttributeMsg getPath() {
+		return path;
+	}
+	public void setPath(PathAttributeMsg path) {
+		this.path = path;
+	}
+
+	
+	
+	
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsgList.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsgList.java
new file mode 100644
index 0000000000000000000000000000000000000000..6fd30c6cbf5f080676cc43eceaf267e6d2faedff
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/models/UpdateMsgList.java
@@ -0,0 +1,151 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.models;
+
+import java.net.InetAddress;
+import java.util.LinkedList;
+import java.util.List;
+
+public class UpdateMsgList {
+
+	
+	/* Print purposes and debug*/
+	List<NodeNLRIMsg> nodeList = new LinkedList<>();
+	List<LinkNLRIMsg> linkList = new LinkedList<>();
+	List<PathAttributeMsg> pathList = new LinkedList<>();
+	/**/
+	public UpdateMsgList() {
+	}
+
+
+	public String toString() {
+		
+		String out ="Update Message: ";
+		if(nodeList!=null) {
+			out=out+nodeList.toString()+"\n";
+		}
+		if(linkList!=null) {
+			out=out+linkList.toString()+"\n";
+		}
+		if(pathList!=null) {
+			out=out+pathList.toString()+"\n";
+		}
+		
+		return out;
+		
+	}
+	public void addLinkToJson(LinkNLRIMsg link) {
+		
+		if(link==null)
+			return;
+		boolean exists = false;
+		for (LinkNLRIMsg linkInList : linkList) {  // list being the LinkedList
+		    if (link.equals(linkInList)) {
+		        exists = true;
+		        break;
+		    }
+		}
+		if (!exists) {
+			linkList.add(link);
+		}
+	}
+	public void addNodeToJson(NodeNLRIMsg node, String currentName) {//comprobar que existe?
+			
+			if(node==null)
+				return;
+			boolean exists = false;
+			for (NodeNLRIMsg nodeInList : nodeList) {  // list being the LinkedList
+			    if (node.equals(nodeInList)) {
+			        exists = true;
+			        break;
+			    }
+			}
+			if (!exists) {
+				nodeList.add(node);
+			}
+			
+		}
+	public void addpathToJson(PathAttributeMsg path) {
+			
+			boolean exists = false;
+			if(path.getNodeName()==null) {
+				return;
+			}
+			for (PathAttributeMsg pathInList : pathList) {  // list being the LinkedList
+			    if (path.equals(pathInList) ) {
+			        exists = true;
+			        break;
+			    }
+			}
+			if (!exists) {
+				pathList.add(path);
+			}
+			
+		}
+	
+	public List<NodeNLRIMsg> getNodeList() {
+		return nodeList;
+	}
+
+	public List<LinkNLRIMsg> getLinkList() {
+		return linkList;
+	}
+
+	public List<PathAttributeMsg> getPathList() {
+		return pathList;
+	}
+
+	public void addNodeToList(NodeNLRIMsg node) {
+		nodeList.add(node);
+	}
+	public void addLinkToList(LinkNLRIMsg link) {
+		linkList.add(link);
+	}
+	public void addPathToList(PathAttributeMsg path) {
+		pathList.add(path);
+	}
+	
+	public UpdateMsgList id2Name() {
+		
+		UpdateMsgList update=new UpdateMsgList();
+		update.nodeList=this.nodeList;
+		update.pathList=this.pathList;
+		List<LinkNLRIMsg> newLinkList = new LinkedList<>();
+		
+		for (LinkNLRIMsg linkInList : linkList) {
+			LinkNLRIMsg link=linkInList;
+			
+			for(NodeNLRIMsg nodeInList: update.nodeList) {	
+				if((linkInList.getLocalBgplsID().equals(nodeInList.getLocalBgplsID()))) {
+					link.setLocalBgplsID(nodeInList.getNodeName());
+				}
+			}
+			
+			for(NodeNLRIMsg nodeInList: update.nodeList) {	
+				if((linkInList.getRemoteBgplsID().equals(nodeInList.getLocalBgplsID()))) {
+					link.setRemoteBgplsID(nodeInList.getNodeName());
+				}
+			}
+			
+			
+			newLinkList.add(link);
+		}
+		update.linkList=newLinkList;	
+		
+		return update;
+		
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Exception.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Exception.java
new file mode 100644
index 0000000000000000000000000000000000000000..736f6cd3eee8e9ebac12875dcc30407a0e63e8de
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Exception.java
@@ -0,0 +1,20 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.peer;
+
+public class BGP4Exception extends Exception {
+
+	private static final long serialVersionUID = 1L;
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4LSPeerInfo.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4LSPeerInfo.java
new file mode 100644
index 0000000000000000000000000000000000000000..768e4a87b4d85e7355d3359b78e140880f2792d0
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4LSPeerInfo.java
@@ -0,0 +1,85 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.peer;
+
+import java.net.Inet4Address;
+
+public class BGP4LSPeerInfo {
+	/**
+	 * IP Address of the remote Peer
+	 */
+	private  Inet4Address peerIP;
+	
+	/**
+	 * Experimental USE Only
+	 * Default port is 179
+	 * For testing and development, alternative ports are allowed.
+	 */
+	private int peerPort;
+	
+	/**
+	 * If the remote peer is a consumer and we need to send the topology
+	 */
+	private boolean sendToPeer;
+	
+	/**
+	 * If the remote peer is a generator of topology and we are consumers
+	 */
+	private boolean updateFromPeer;
+	
+	
+
+	public BGP4LSPeerInfo() {
+		this.peerPort=179;
+	}
+
+	public Inet4Address getPeerIP() {
+		return peerIP;
+	}
+
+	public void setPeerIP(Inet4Address peerIP) {
+		this.peerIP = peerIP;
+	}
+
+	public int getPeerPort() {
+		return peerPort;
+	}
+
+	public void setPeerPort(int peerPort) {
+		this.peerPort = peerPort;
+	}
+
+	public boolean isSendToPeer() {
+		return sendToPeer;
+	}
+
+	public void setSendToPeer(boolean sendToPeer) {
+		this.sendToPeer = sendToPeer;
+	}
+
+	public boolean isUpdateFromPeer() {
+		return updateFromPeer;
+	}
+
+	public void setUpdateFromPeer(boolean updateFromPeer) {
+		this.updateFromPeer = updateFromPeer;
+	}
+	
+	
+	
+	
+	
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Parameters.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Parameters.java
new file mode 100644
index 0000000000000000000000000000000000000000..e8958d306e3d11e7a3a569d59773ad4351770eea
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4Parameters.java
@@ -0,0 +1,540 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.peer;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+import java.net.Inet4Address;
+import java.net.UnknownHostException;
+import java.util.LinkedList;
+
+/**
+ * Parameters to configure the BGP4 session
+ * @author mcs
+ *
+ */
+public class BGP4Parameters {
+	
+	private Logger log = LoggerFactory.getLogger("BGP4Peer");
+	/**
+	 * TCP port where the BGP is listening for incoming bgp4 connections
+	 * Experimental use only. Default and standard is 179
+	 */
+	private int BGP4Port = 179;
+
+	/**
+	 * TCP port to connect to manage the BGP connection
+	 */
+	private int BGP4ManagementPort = 1112;
+	/**
+	 * Local BGP4 address of this peer
+	 */
+	private String localBGPAddress = "127.0.0.1";
+	/**
+	 * Local port to connect with BGP Peer.
+	 */
+	private int localBGPPort = 0;
+	/**
+	 * Log file
+	 */
+	private String BGP4LogFile="BGP4Parser.log";
+	/**
+	 * Log file Client
+	 */
+	private String BGP4LogFileClient="BGP4Client.log";
+
+
+	/**
+	 * Log file Client
+	 */
+	private String BGP4LogFileServer="BGP4Server.log";
+
+
+	/**
+	 * Name of the configuration file
+	 */
+	private String confFile;
+
+	/**
+	 * If the tcp no delay option is used or not.
+	 */
+	private boolean nodelay=false;
+	/**
+	 * Waiting Time to connect to clients
+	 */
+	long delay = 6000;
+	/**
+	 * List of peers to establish connection.
+	 */
+	private LinkedList<BGP4LSPeerInfo> peersToConnect;
+	
+	/**
+	 * Parameter used to set traces meanwhile the execution.
+	 */
+	private boolean setTraces=true;
+	/**
+	 * OPEN PARAMENTERS
+	 */
+	int holdTime=90;
+	/**
+	 * OPEN PARAMENTERS
+	 */
+
+	private boolean isTest=false;
+
+	/**
+	 * Time between sending keepalives
+	 */
+	int keepAliveTimer=30;
+	
+	/**
+	 * Time between topology updates
+	 */
+	long sendTopoDelay=30000;
+	
+	private boolean saveTopologyDB=false;
+	
+	private Inet4Address topologyDBIP;
+	
+	private int topologyDBport;
+	
+	public int getKeepAliveTimer() {
+		return keepAliveTimer;
+	}
+	public void setKeepAliveTimer(int keepAliveTimer) {
+		this.keepAliveTimer = keepAliveTimer;
+	}
+	String BGPIdentifier = null;
+	int myAutonomousSystem=1;
+	int version=0x04;
+	
+	/**
+	 * This parameter can have three options: fromXML, fromOSPF, fromBGP 
+	 * Explain the way the topology module learns the topology
+	 */
+	private String learnTopology="fromBGP";
+	/**
+	 * XML File to read and generate the topology
+	 */
+	private String topologyFile;
+	
+
+	private int numberTriesToConnect=3;
+	/**
+	 * True: This peer sends the interdomain links of the topology to other peers
+	 * False: This peer does NOT send the topology to other peers
+	 */
+	private boolean sendTopology=false;
+	/**
+	 * True: This peer sends the whole topology to other peers
+	 * False: This peer does NOT send the intradomain linksto other peers
+	 */
+	private boolean sendIntradomainLinks=false;
+	
+
+
+	/**
+	 * Instance identifier for NodeNLRI (Types defined in class InstanceIDTypes)
+	 */
+	private int instanceID=0;
+	/**
+	 * Constructor 
+	 */
+	BGP4Parameters(){
+		confFile="BGP4Parameters.xml";
+		peersToConnect =new LinkedList<BGP4LSPeerInfo>();
+	}
+	/**
+	 * Constructor 
+	 */
+	BGP4Parameters(String confFile){
+		peersToConnect =new LinkedList<BGP4LSPeerInfo>();
+
+		if (confFile!=null){
+			this.confFile=confFile;
+		}else {
+			confFile="BGP4Parameters.xml";
+		}
+		
+	}
+		
+	
+	
+	public void initialize(){
+		
+		try {
+
+			System.out.println("Parsing Config File::"+confFile);
+			
+			SAXParserFactory factory = SAXParserFactory.newInstance();
+			SAXParser saxParser = factory.newSAXParser();
+			
+
+			DefaultHandler handler = new DefaultHandler() {
+				boolean peer = false;
+				boolean send = false;
+				boolean receive = false;
+				boolean peerPort = false;
+				BGP4LSPeerInfo peerInfo=null;
+
+				String tempVal;
+
+				public void startElement(String uri, String localName,
+						String qName, Attributes attributes)
+								throws SAXException {
+					
+					if (qName.equalsIgnoreCase("configPeer")){
+						log.debug("Found peer configuration");
+					}
+					else if (qName.equalsIgnoreCase("peer")){
+						peer = true;
+					}
+					else if (qName.equalsIgnoreCase("export")){
+						send = true;
+					}
+					else if (qName.equalsIgnoreCase("import")){
+						receive = true;
+					}else if (qName.equalsIgnoreCase("peerPort")){
+						peerPort = true;
+					}
+						
+				}
+
+				public void endElement(String uri, String localName,
+						String qName)
+								throws SAXException {
+					if(qName.equalsIgnoreCase("BGP4Port")) {
+						BGP4Port=Integer.parseInt(tempVal.trim());
+						
+					}
+					else if (qName.equalsIgnoreCase("BGP4ManagementPort")){
+						BGP4ManagementPort = Integer.parseInt(tempVal.trim());
+					}
+					
+					else if (qName.equalsIgnoreCase("BGP4LogFile")) {
+						BGP4LogFile=tempVal.trim();
+					}
+					else if (qName.equalsIgnoreCase("BGP4LogFileClient")) {
+						BGP4LogFileClient=tempVal.trim();
+					}
+					else if (qName.equalsIgnoreCase("BGP4LogFileServer")) {
+						BGP4LogFileServer=tempVal.trim();
+					}
+					else if (qName.equalsIgnoreCase("nodelay")) {
+						nodelay=Boolean.parseBoolean(tempVal.trim());
+					}
+					else if (qName.equalsIgnoreCase("isTest")) {
+						isTest=Boolean.parseBoolean(tempVal.trim());
+					}
+
+					else if (qName.equalsIgnoreCase("setTraces")) {
+						setTraces=Boolean.parseBoolean(tempVal.trim());
+					} 
+					else if (qName.equalsIgnoreCase("saveTopologyDB")) {
+						saveTopologyDB=Boolean.parseBoolean(tempVal.trim());
+					}
+					else if (qName.equalsIgnoreCase("topologyDBIP")) {
+						try {
+							topologyDBIP =(Inet4Address)Inet4Address.getByName(tempVal.trim());
+						} catch (UnknownHostException e) {
+							// TODO Auto-generated catch block
+							e.printStackTrace();
+						}
+					}
+					else if (qName.equalsIgnoreCase("topologyDBport")) {
+						topologyDBport=Integer.parseInt(tempVal.trim());
+					}
+					else if (qName.equalsIgnoreCase("sendTopology")) {
+						sendTopology=Boolean.parseBoolean(tempVal.trim());
+					}
+					else if (qName.equalsIgnoreCase("sendIntradomainLinks")) {
+						sendIntradomainLinks=Boolean.parseBoolean(tempVal.trim());
+						sendTopology = true;//si se envian los intradomain entonces se enviara la topologia entera
+					}
+			
+					
+					else if(qName.equalsIgnoreCase("holdTime")) {
+						holdTime=Integer.parseInt(tempVal.trim());
+					}
+					else if(qName.equalsIgnoreCase("keepAliveTimer")) {
+						keepAliveTimer=Integer.parseInt(tempVal.trim());
+					}
+					else if (qName.equalsIgnoreCase("version")){
+						version = Integer.parseInt(tempVal.trim());
+					}
+					else if (qName.equalsIgnoreCase("myAutonomousSystem")){
+						myAutonomousSystem = Integer.parseInt(tempVal.trim());
+					}
+					else if (qName.equalsIgnoreCase("localBGPAddress")){//El BGP Identifier es la local BGP Address.
+						//BGPIdentifier = tempVal.trim();
+						localBGPAddress=tempVal.trim();
+					}
+					else if (qName.equalsIgnoreCase("BGPIdentifier")){//El BGP Identifier es la local BGP Address.
+						BGPIdentifier = tempVal.trim();
+					}
+					else if (qName.equalsIgnoreCase("delay")){
+						delay = Long.parseLong(tempVal.trim());
+					}
+					else if (qName.equalsIgnoreCase("sendTopoDelay")){
+						sendTopoDelay = Long.parseLong(tempVal.trim());
+					}
+					/*
+					else if (qName.equalsIgnoreCase("peer")){
+						String peerBGP_IPaddress = tempVal.trim();
+						peersToConnect.add(peerBGP_IPaddress);					
+					}*/					
+					else if (qName.equalsIgnoreCase("TopologyFile")) {
+						topologyFile=tempVal.trim();
+					}
+					else if (qName.equalsIgnoreCase("learnTopology")) {
+						learnTopology=tempVal.trim();
+					}
+					else if (qName.equalsIgnoreCase("numberTriesToConnect")){
+						numberTriesToConnect = Integer.parseInt(tempVal.trim());
+					}
+					else if (qName.equalsIgnoreCase("instanceID")){
+						instanceID = Integer.parseInt(tempVal.trim());
+					}
+					else if (qName.equalsIgnoreCase("localBGPPort")){
+						localBGPPort = Integer.parseInt(tempVal.trim());
+					}
+//					else if (qName.equalsIgnoreCase("configPeer")){
+//						log.info("peers....." + peersToConnect.toString());
+//					}
+				}	
+				
+
+				public void characters(char[] ch, int start, int length) throws SAXException {
+					tempVal = new String(ch,start,length);
+					
+					if(peer){
+						peerInfo= new BGP4LSPeerInfo();
+						
+						String peerBGP_IPaddress = new String(ch, start, length);
+						Inet4Address peerBGPIP;
+						try {
+							peerBGPIP=(Inet4Address)Inet4Address.getByName(peerBGP_IPaddress.trim());
+							peerInfo.setPeerIP(peerBGPIP);
+						} catch (UnknownHostException e) {
+							// TODO Auto-generated catch block
+							e.printStackTrace();
+						}
+						peersToConnect.add(peerInfo);
+						peer = false;
+					}
+					else if(send){
+						String sendInfo = new String(ch, start, length);
+						peerInfo.setSendToPeer(Boolean.parseBoolean(sendInfo.trim()));
+						send = false;
+					}
+					else if(receive){
+						String update_from = new String(ch, start, length);
+						peerInfo.setUpdateFromPeer(Boolean.parseBoolean(update_from.trim()));
+						receive = false;
+					}else if (peerPort){
+						String peer_port = new String(ch, start, length);
+						peerInfo.setPeerPort(Integer.parseInt(peer_port.trim()));
+						peerPort = false;
+					}
+				}
+			};
+			saxParser.parse(confFile, handler);     
+
+		}catch (Exception e) {
+			log.error("Problems reading config");	
+			e.printStackTrace();
+			System.exit(1);
+		}
+
+	}
+	public int getBGP4Port() {
+		return BGP4Port;
+	}
+	public void setBGP4Port(int bGP4Port) {
+		BGP4Port = bGP4Port;
+	}
+	public int getBGP4ManagementPort() {
+		return BGP4ManagementPort;
+	}
+	public void setBGP4ManagementPort(int bGP4ManagementPort) {
+		BGP4ManagementPort = bGP4ManagementPort;
+	}
+	public String getBGP4LogFile() {
+		return BGP4LogFile;
+	}
+	public void setBGP4LogFile(String bGP4LogFile) {
+		BGP4LogFile = bGP4LogFile;
+	}
+	public boolean isSetTraces() {
+		return setTraces;
+	}
+	public void setSetTraces(boolean setTraces) {
+		this.setTraces = setTraces;
+	}
+	public boolean isTest() {
+		return isTest;
+	}
+	public void setisTest(boolean test) {
+		this.isTest = test;
+	}
+
+	public String getConfFile() {
+		return confFile;
+	}
+	public void setConfFile(String confFile) {
+		this.confFile = confFile;
+	}
+	public boolean isNodelay() {
+		return nodelay;
+	}
+	public void setNodelay(boolean nodelay) {
+		this.nodelay = nodelay;
+	}
+	public int getHoldTime() {
+		return holdTime;
+	}
+	public void setHoldTime(int holdTime) {
+		this.holdTime = holdTime;
+	}
+	public String getBGPIdentifier() {
+		return BGPIdentifier;
+	}
+	public void setBGPIdentifier(String bGPIdentifier) {
+		BGPIdentifier = bGPIdentifier;
+	}
+	public int getMyAutonomousSystem() {
+		return myAutonomousSystem;
+	}
+	public void setMyAutonomousSystem(int myAutonomousSystem) {
+		this.myAutonomousSystem = myAutonomousSystem;
+	}
+	public int getVersion() {
+		return version;
+	}
+	public void setVersion(int version) {
+		this.version = version;
+	}
+
+	public LinkedList<BGP4LSPeerInfo> getPeersToConnect() {
+		return peersToConnect;
+	}
+	public void setPeersToConnect(LinkedList<BGP4LSPeerInfo> peersToConnect) {
+		this.peersToConnect = peersToConnect;
+	}
+
+	public String getLearnTopology() {
+		return learnTopology;
+	}
+	public void setLearnTopology(String learnTopology) {
+		this.learnTopology = learnTopology;
+	}
+	public String getTopologyFile() {
+		return topologyFile;
+	}
+	public void setTopologyFile(String topologyFile) {
+		this.topologyFile = topologyFile;
+	}
+
+	public int getNumberTriesToConnect() {
+		return numberTriesToConnect;
+	}
+	public void setNumberTriesToConnect(int numberTriesToConnect) {
+		this.numberTriesToConnect = numberTriesToConnect;
+	}
+	public long getDelay() {
+		return delay;
+	}
+	public void setDelay(long delay) {
+		this.delay = delay;
+	}
+	public boolean isSendTopology() {
+		return sendTopology;
+	}
+	public void setSendTopology(boolean sendTopology) {
+		this.sendTopology = sendTopology;
+	}
+	public String getBGP4LogFileClient() {
+		return BGP4LogFileClient;
+	}
+	public void setBGP4LogFileClient(String bGP4LogFileClient) {
+		BGP4LogFileClient = bGP4LogFileClient;
+	}
+	public String getBGP4LogFileServer() {
+		return BGP4LogFileServer;
+	}
+	public void setBGP4LogFileServer(String bGP4LogFileServer) {
+		BGP4LogFileServer = bGP4LogFileServer;
+	}
+	public int getInstanceID() {
+		return instanceID;
+	}
+	public void setInstanceID(int instanceID) {
+		this.instanceID = instanceID;
+	}
+	public boolean isSendIntradomainLinks() {
+		return sendIntradomainLinks;
+	}
+	
+	public void setSendIntradomainLinks(boolean sendIntradomainLinks) {
+		this.sendIntradomainLinks = sendIntradomainLinks;
+	}
+	
+		
+	public String getLocalBGPAddress() {
+		return localBGPAddress;
+	}
+	public void setLocalBGPAddress(String localBGPAddress) {
+		this.localBGPAddress = localBGPAddress;
+	}
+	public int getLocalBGPPort() {
+		return localBGPPort;
+	}
+	
+	public long getSendTopoDelay() {
+		return sendTopoDelay;
+	}
+	public void setSendTopoDelay(long sendTopoDelay) {
+		this.sendTopoDelay = sendTopoDelay;
+	}
+	public boolean isSaveTopologyDB() {
+		return saveTopologyDB;
+	}
+	public void setSaveTopologyDB(boolean saveTopologyDB) {
+		this.saveTopologyDB = saveTopologyDB;
+	}
+	public Inet4Address getTopologyDBIP() {
+		return topologyDBIP;
+	}
+	public void setTopologyDBIP(Inet4Address topologyDBIP) {
+		this.topologyDBIP = topologyDBIP;
+	}
+	public int getTopologyDBport() {
+		return topologyDBport;
+	}
+	public void setTopologyDBport(int topologyDBport) {
+		this.topologyDBport = topologyDBport;
+	}
+	
+	
+	
+	
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionClientManager.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionClientManager.java
new file mode 100644
index 0000000000000000000000000000000000000000..75694e90c9ffac9f5760943975f4a437d5fb9863
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionClientManager.java
@@ -0,0 +1,160 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.peer;
+
+import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionClient;
+import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionExistsException;
+import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionsInformation;
+import eu.teraflow.tid.bgp4Peer.updateTEDB.UpdateDispatcher;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.Inet4Address;
+
+/**
+ * Client session manager
+ * @author mcs
+ *
+ */
+public class BGP4SessionClientManager implements Runnable{
+
+
+
+	private BGP4SessionClient bgp4SessionClient;
+	private Logger log;
+
+	BGP4SessionsInformation bgp4SessionInformation;
+	/**
+	 * peer contains the IP address and port where the peer listens.
+	 */
+	private BGP4LSPeerInfo peer;
+	private Inet4Address peerIP;
+	private String localBGP4Address;
+	private int localBGP4Port; 
+	private int holdTime;
+	private int keepAliveTimer;
+	private Inet4Address BGPIdentifier;
+	private int version = 4;
+	private int myAutonomousSystem;
+	private UpdateDispatcher ud;
+	private Boolean updateFrom;
+	private Boolean sendTo;
+
+	public BGP4SessionClientManager(BGP4SessionsInformation bgp4SessionInformation,UpdateDispatcher ud, BGP4LSPeerInfo peer,int bgp4Port,String my_IPAddress,int  my_bgp4Port , int holdTime,Inet4Address BGPIdentifier,int version,int myAutonomousSystem, int my_keepAliveTimer){	
+		log=LoggerFactory.getLogger("BGP4Peer");
+		this.bgp4SessionInformation=bgp4SessionInformation;
+		this.holdTime=holdTime;
+		this.BGPIdentifier=BGPIdentifier;
+		this.version = version;
+		this.myAutonomousSystem=myAutonomousSystem;
+		this.peer = peer;
+		this.ud=ud;
+		this.localBGP4Address=my_IPAddress;
+		this.localBGP4Port=my_bgp4Port;
+		this.keepAliveTimer = my_keepAliveTimer;
+		this.peerIP=peer.getPeerIP();
+		this.setSendTo(peer.isSendToPeer());
+		this.setUpdateFrom(peer.isUpdateFromPeer());
+		
+	}
+
+	/**
+	 * 
+	 * 
+	 * 
+	 */
+	public void run(){
+		if(bgp4SessionClient != null){
+			if (bgp4SessionClient.isAlive()){
+				if (bgp4SessionClient.isInterrupted()){
+					log.debug("Thread alive... backup session dead");
+
+				}
+				log.debug("Session alive and not interrupted");
+				return;	
+			}
+			else{
+				try{
+					bgp4SessionInformation.notifySessionStart(peerIP);	
+					log.debug("Session with BGP-LS peer"+peer +" dead, trying to establish new session");
+					bgp4SessionClient= new BGP4SessionClient(bgp4SessionInformation,ud,peer.getPeerIP(),peer.getPeerPort(),holdTime,BGPIdentifier,version,myAutonomousSystem,localBGP4Address, localBGP4Port,keepAliveTimer);
+					bgp4SessionClient.setSendTo(sendTo);
+					bgp4SessionClient.setUpdateFrom(updateFrom);
+					bgp4SessionClient.start();
+				} catch(BGP4SessionExistsException e){
+					log.debug("Checked that there is already a peer initiated session with "+this.peerIP);
+				}
+
+				return;
+			}
+		} else {
+			try{
+				bgp4SessionInformation.notifySessionStart(peerIP);		
+				log.info("Trying to establish new session with peer "+ peer.getPeerIP()+" on port "+peer.getPeerPort());
+				bgp4SessionClient = new BGP4SessionClient(bgp4SessionInformation,ud, peer.getPeerIP(), peer.getPeerPort(), holdTime, BGPIdentifier,
+						version,myAutonomousSystem,localBGP4Address, localBGP4Port ,keepAliveTimer);
+				bgp4SessionClient.setSendTo(sendTo);
+				bgp4SessionClient.setUpdateFrom(updateFrom);
+				bgp4SessionClient.start();
+
+			} catch(BGP4SessionExistsException e){
+				log.debug("No need to start new connection with "+this.peerIP);
+			}
+
+
+			return;
+
+		}
+
+	}
+	public BGP4SessionClient getBgp4SessionClient() {
+		return bgp4SessionClient;
+	}
+
+	public void setBgp4SessionClient(BGP4SessionClient bgp4SessionClient) {
+		this.bgp4SessionClient = bgp4SessionClient;
+	}
+
+	public void killBGP4Session(){
+		bgp4SessionClient.killSession();
+	}
+
+	public void closeBGP4Session(){
+		log.info("Closing BGP4Session");
+		if (bgp4SessionClient.isAlive()){
+			//FIXME reason for close????
+			bgp4SessionClient.close();
+		}
+
+	}
+
+	public Boolean getUpdateFrom() {
+		return updateFrom;
+	}
+
+	public void setUpdateFrom(Boolean updateFrom) {
+		this.updateFrom = updateFrom;
+	}
+
+	public Boolean getSendTo() {
+		return sendTo;
+	}
+
+	public void setSendTo(Boolean sendTo) {
+		this.sendTo = sendTo;
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionServerManager.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionServerManager.java
new file mode 100644
index 0000000000000000000000000000000000000000..ccb59fa2e1ace06f3cf4586a3325bbec1f5f2794
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGP4SessionServerManager.java
@@ -0,0 +1,160 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.peer;
+
+import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4PeerInitiatedSession;
+import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionsInformation;
+import eu.teraflow.tid.bgp4Peer.updateTEDB.UpdateDispatcher;
+import eu.teraflow.tid.tedb.TEDB;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.net.Inet4Address;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.util.LinkedList;
+
+public class BGP4SessionServerManager implements Runnable {
+	private BGP4PeerInitiatedSession bgp4SessionServer;
+	private Logger log;
+	BGP4SessionsInformation bgp4SessionsInformation;
+	int bgp4Port;
+	private int holdTime;
+	private int keepAliveTimer;
+	private Inet4Address BGPIdentifier;
+	private int version = 4;
+	private int myAutonomousSystem;
+	private boolean noDelay;
+	private boolean isTest=false;
+	private  TEDB tedb;
+	private UpdateDispatcher ud;
+	Inet4Address localBGP4Address; 
+	private Boolean updateFrom;
+	private Boolean sendTo;
+	
+	private LinkedList<BGP4LSPeerInfo> peersToConnect;
+	
+	public BGP4SessionServerManager(BGP4SessionsInformation bgp4SessionInformation, TEDB tedb,UpdateDispatcher ud, int bgp4Port,int holdTime,Inet4Address BGPIdentifier,int version,int myAutonomousSystem,boolean noDelay,Inet4Address localAddress ,int mykeepAliveTimer, LinkedList<BGP4LSPeerInfo> peersToConnect ){
+		log = LoggerFactory.getLogger("BGP4Peer");
+		this.holdTime=holdTime;
+		this.BGPIdentifier=BGPIdentifier;
+		this.version = version;
+		this.myAutonomousSystem=myAutonomousSystem;
+		this.bgp4SessionsInformation=bgp4SessionInformation;
+		this.bgp4Port=bgp4Port;
+		this.noDelay=noDelay;
+		this.tedb=tedb;
+		this.ud=ud;
+		this.localBGP4Address=localAddress;
+		this.keepAliveTimer = mykeepAliveTimer;
+		this.peersToConnect=peersToConnect;
+	}
+
+	public BGP4SessionServerManager(BGP4SessionsInformation bgp4SessionInformation, TEDB tedb,UpdateDispatcher ud, int bgp4Port,int holdTime,Inet4Address BGPIdentifier,int version,int myAutonomousSystem,boolean noDelay,Inet4Address localAddress ,int mykeepAliveTimer, LinkedList<BGP4LSPeerInfo> peersToConnect, boolean test){
+		log = LoggerFactory.getLogger("BGP4Peer");
+		this.holdTime=holdTime;
+		this.BGPIdentifier=BGPIdentifier;
+		this.version = version;
+		this.myAutonomousSystem=myAutonomousSystem;
+		this.bgp4SessionsInformation=bgp4SessionInformation;
+		this.bgp4Port=bgp4Port;
+		this.noDelay=noDelay;
+		this.tedb=tedb;
+		this.ud=ud;
+		this.localBGP4Address=localAddress;
+		this.keepAliveTimer = mykeepAliveTimer;
+		this.peersToConnect=peersToConnect;
+		this.isTest=test;
+	}
+
+
+	public Boolean getSendTo() {
+		return sendTo;
+	}
+
+	public void setSendTo(Boolean sendTo) {
+		this.sendTo = sendTo;
+	}
+	
+	public Boolean getUpdateFrom() {
+		return updateFrom;
+	}
+
+	public void setUpdateFrom(Boolean updateFrom) {
+		this.updateFrom = updateFrom;
+	}
+
+	@Override
+	public void run() {
+
+		
+
+		ServerSocket serverSocket = null;
+		boolean listening = true;
+		try {
+			log.debug("SERVER Listening on port: "+ bgp4Port);
+			log.debug("SERVER Listening on address: "+ localBGP4Address);
+			serverSocket = new ServerSocket( bgp4Port,0,localBGP4Address);
+		} catch (IOException e) {
+			log.error("Could not listen on port: "+ bgp4Port);
+			System.exit(-1);
+		}
+		while (listening) {	
+			try {
+				Socket sock=serverSocket.accept();
+				bgp4SessionServer = new BGP4PeerInitiatedSession(sock,bgp4SessionsInformation,ud,holdTime,BGPIdentifier,version,myAutonomousSystem,noDelay,keepAliveTimer);
+				if (isTest){
+					log.info("isTest");
+					bgp4SessionServer.setSendTo(true);
+					bgp4SessionServer.start();
+				}
+				else {
+					log.info("Not Test");
+					for (int i = 0; i < this.peersToConnect.size(); i++) {
+						try {
+							Inet4Address add = peersToConnect.get(i).getPeerIP();
+							if (add == null) {
+								log.warn("peer IP address shouldn't be null");
+							} else {
+								if (add.equals(sock.getInetAddress())) {
+									log.debug("FOUND " + add);
+									bgp4SessionServer.setSendTo(this.peersToConnect.get(i).isSendToPeer());
+								}
+							}
+
+						} catch (Exception e) {
+							e.printStackTrace();
+						}
+
+					}
+					bgp4SessionServer.start();
+				}
+			}catch (Exception e) {
+				e.printStackTrace();
+			}
+		}
+		try {
+			log.info("Closing the socket");
+			serverSocket.close();
+		
+		}catch (Exception e) {
+				e.printStackTrace();
+		}
+
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeer.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeer.java
new file mode 100644
index 0000000000000000000000000000000000000000..bdddd4379af58b998b0236e701ea17bcecc14997
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeer.java
@@ -0,0 +1,407 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.peer;
+
+import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionsInformation;
+import eu.teraflow.tid.bgp4Peer.management.BGP4ManagementServer;
+import eu.teraflow.tid.bgp4Peer.updateTEDB.UpdateDispatcher;
+import eu.teraflow.tid.tedb.*;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.Inet4Address;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.Hashtable;
+import java.util.LinkedList;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+
+
+/**
+ * BGP-LS Speaker. 
+ * This class is a BGP-LS peer which has two modes:
+ * - Listens to incoming connections
+ * - Launches new BGP session with a list of peers.
+ * It can send periodically its learnt topology to other peers.
+ * TEDB can be initialized from:
+ * - XML file with the topolgoy
+ * - Other BGP-LS Sessions 
+ * 
+ * @author pac ogondio 
+ *
+ */
+public class BGPPeer {
+	/**
+	 * Session server. It opens a socket to listen to new connections.
+	 */
+	private BGP4SessionServerManager bgp4SessionServer;
+	/**
+	 * Session client. It connects to peers.
+	 */
+	private  BGP4SessionClientManager  bgp4SessionClientManager;
+	/**
+	 * BGP4 parameters. Needed to configure the connections.
+	 */
+	private BGP4Parameters params;
+	
+	/**
+	 * List of opened BGP4 sessions. 
+	 */
+	private BGP4SessionsInformation bgp4SessionsInformation;
+	
+	/**
+	 * Topology database only for interDomain Links.
+	 */
+	private MultiDomainTEDB multiDomainTEDB;
+	
+	/**
+	 * Table with domainID - TEDB.
+	 * The BGP-LS Peer can have several domains
+	 */
+	private Hashtable<String,TEDB> intraTEDBs;
+	
+	/**
+	 * Full TEDB with all Links
+	 */
+	
+	private SimpleTEDB fullTEDB;
+	
+	
+	/**
+	 * Class to send periodically the topology
+	 */
+	//private DomainTEDB readDomainTEDB;
+	
+	/**
+	 * True: This peer sends the topology to other peers
+	 * False: This peer does NOT send the topology to other peers
+	 */
+	private boolean sendTopology;
+	/**
+	 * 
+	 */
+	private SendTopology sendTopologyTask;
+	/**
+	 * 
+	 */
+	private boolean saveTopology;
+	
+	private SaveTopologyinDB saveTopologyDB;
+	
+	/**
+	 * 
+	 */
+	/**
+	 * List of peers to establish connections.
+	 */
+	private LinkedList<BGP4LSPeerInfo> peersToConnect;
+	
+	//Whitelist and blacklist not yet implemented
+	
+	/**
+	 * Loggers
+	 */
+	private Logger logParser;
+	private Logger logClient;
+	private Logger logServer;
+	/**
+	 * Class to read and process the BGP4 update messages
+	 */
+	private UpdateDispatcher ud;
+	/**
+	 * Executor. To execute the session server, to execute periodically the session client.
+	 */
+	private ScheduledThreadPoolExecutor executor;
+
+	/**
+	 * Function to configure the BGP4 Peer without specifying the file. It will read a file with name: BGP4Parameters.xml
+	 */
+	public void  configure (){
+		this.configure (null);
+	}
+	
+	/**
+	 * Function to configure the BGP4 peer. 
+	 * It created the loggers, the executor, 
+	 * @param nameParametersFile Name of the Parameters File
+	 */
+	public void configure(String nameParametersFile){
+		configure(nameParametersFile, null, null);
+	}
+	
+	/**
+	 * Function to configure the BGP4 peer. 
+	 * It created the loggers, the executor, 
+	 * @param nameParametersFile Name of the Parameters File
+	 * @param multiTEDB multidomain database
+	 * @param iTEDBs internal domains database 
+	 */
+	public void configure(String nameParametersFile, MultiDomainTEDB multiTEDB, Hashtable<String,TEDB> iTEDBs){
+		//First of all, read the parameters
+		if (nameParametersFile != null){
+			params=new BGP4Parameters(nameParametersFile);
+		}else{
+			params=new BGP4Parameters();
+		}
+		params.initialize();
+		peersToConnect = params.getPeersToConnect();
+		sendTopology = params.isSendTopology();
+		saveTopology = params.isSaveTopologyDB();
+
+		//Initialize loggers
+//		FileHandler fh;
+//		FileHandler fh1;
+//		FileHandler fh2;
+//		try {
+//			fh=new FileHandler(params.getBGP4LogFile());
+			logParser=LoggerFactory.getLogger("BGP4Parser");
+//			logParser.addHandler(fh);
+//			logParser.setLevel(Level.ALL);
+//			fh1=new FileHandler(params.getBGP4LogFileClient());
+			logClient=LoggerFactory.getLogger("BGP4Client");
+//			logClient.addHandler(fh1);
+//			logClient.setLevel(Level.ALL);
+//			fh2=new FileHandler(params.getBGP4LogFileServer());
+			logServer=LoggerFactory.getLogger("BGP4Peer");
+//			logServer.addHandler(fh2);
+//			logServer.setLevel(Level.ALL);
+//
+//		} catch (Exception e1) {
+//			e1.printStackTrace();
+//			System.exit(1);
+//		}
+			logServer.info("Inizializing BGP4 Peer");
+		if (iTEDBs!= null) intraTEDBs=iTEDBs;
+		else intraTEDBs=new Hashtable<String,TEDB>();
+		
+		if (multiTEDB!= null) multiDomainTEDB = multiTEDB;
+		else multiDomainTEDB = new MDTEDB();
+	
+		if (params.getLearnTopology().equals("fromXML")){
+			//intraTEDBs=new Hashtable<Inet4Address,DomainTEDB>();
+			//multiDomainTEDB = new MDTEDB();
+			//intraTEDBs = FileTEDBUpdater.readMultipleDomainSimpleNetworks(params.getTopologyFile(), null, false,0,Integer.MAX_VALUE, false);
+			logParser.info("BGPIdentifier: "+params.getBGPIdentifier());
+			intraTEDBs = FileTEDBUpdater.readMultipleDomainSimpleNetworks(params.getTopologyFile(), null, false,0,Integer.MAX_VALUE, false, params.getBGPIdentifier());
+
+			//multiDomainTEDB.initializeFromFile(params.getTopologyFile());
+			multiDomainTEDB.initializeFromFile(params.getTopologyFile(), params.getBGPIdentifier());
+
+		}
+		// Create Thread executor
+		//FIXME: Actualizar n�mero de threads que se crean
+		executor = new ScheduledThreadPoolExecutor(20);//1 para el servidor, 1 para el que lanza y vigila los clientes
+		// Information about all the sessions of the PCE
+		if (params.isTest()) {
+			bgp4SessionsInformation = new BGP4SessionsInformation(params.isTest());
+		}
+		else{
+			bgp4SessionsInformation = new BGP4SessionsInformation();
+		}
+		//Create the task to send the topology. It has to be created because you can start sending the topology in the management (wirting): send topology on.
+		sendTopologyTask = new SendTopology();
+		saveTopologyDB= new SaveTopologyinDB();
+		if (params.isSaveTopologyDB() == true){
+			saveTopologyDB.configure(intraTEDBs, multiDomainTEDB, params.isSaveTopologyDB(), params.getTopologyDBIP().getHostAddress(), params.getTopologyDBport());
+		}
+
+	}
+	
+	public void setWriteMultiTEDB(MultiDomainTEDB multiTEDB) {
+		
+		this.multiDomainTEDB = multiTEDB;
+		saveTopologyDB.setMultiDomainTEDB(multiTEDB);
+	}
+
+	/*
+	//new function from Andrea
+	public void setWriteMultiAndIntraTEDB(MultiDomainTEDB multiTEDB, Hashtable<Inet4Address,DomainTEDB> intraTEDBs) {
+
+		this.multiDomainTEDB = multiTEDB;
+		this.intraTEDBs = intraTEDBs;
+		saveTopologyDB.setMultiDomainTEDB(multiTEDB);
+		saveTopologyDB.setIntraTEDBs(intraTEDBs);
+	}
+	 */
+
+
+	public void setReadDomainTEDB(DomainTEDB readDomainTEDB) {
+		//this.readDomainTEDB = readDomainTEDB;
+		//System.out.println("setReadDomain: readFomainTEDB().getDomainID()="+readDomainTEDB.getDomainID());
+		//System.out.println("setReadDomain: readFomainTEDB="+readDomainTEDB.printTopology());
+		if(readDomainTEDB.getDomainID() == null)
+			this.intraTEDBs.put("default", readDomainTEDB);
+		else
+			this.intraTEDBs.put(readDomainTEDB.getDomainID().toString(), readDomainTEDB);
+	}
+	public void createUpdateDispatcher(){
+		//Updater dispatcher
+		ud = new UpdateDispatcher(multiDomainTEDB,intraTEDBs);
+	}
+	
+	/**
+	 * Function to create the TEDBs of the peer.
+	 * @param nameParametersFile Name of the Parameters File
+	 */
+
+	
+	/**
+	 * Start the session for the management of the BGP4.
+	 */
+	public void startManagementServer(){
+		logServer.debug("Initializing Management Server");
+		BGP4ManagementServer bms=new BGP4ManagementServer(params.getBGP4ManagementPort(),multiDomainTEDB,intraTEDBs,bgp4SessionsInformation,sendTopologyTask);	
+		bms.start();
+	}
+	/**
+	 * Function which start the peer as a client which try to establish new sessions with peers.
+	 * It starts a new process for each peer.  
+	 */
+	public void startClient(){
+		logClient.debug("Initializing Session Manager to connect as client");
+		if (params.getBGPIdentifier() != null){
+			Inet4Address BGPIdentifier=null;
+			try {
+				BGPIdentifier = (Inet4Address) InetAddress.getByName(params.getBGPIdentifier());
+			} catch (UnknownHostException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+				return;
+			}
+			for (int i =0;i<peersToConnect.size();i++){		
+				bgp4SessionClientManager=new BGP4SessionClientManager(bgp4SessionsInformation,ud, peersToConnect.get(i), params.getBGP4Port(),params.getLocalBGPAddress(),params.getLocalBGPPort(),params.getHoldTime(),BGPIdentifier,params.getVersion(),params.getMyAutonomousSystem(),params.getKeepAliveTimer());
+				//FIXME: Ver si dejamos delay fijo o variable	
+				executor.scheduleWithFixedDelay(bgp4SessionClientManager, 0,params.getDelay(), TimeUnit.MILLISECONDS);
+			}
+		}
+		else{
+			logClient.error("ERROR: BGPIdentifier is not configured. To configure: XML file (BGP4Parameters.xml) <localBGPAddress>.");
+			System.exit(1);
+		}
+		
+	}
+	/**
+	 * Function which starts the peer (listening BGP4 protocol) as a server.
+	 * It starts once the session server manager.
+	 */
+	public  void startServer(){
+		logServer.info("Initializing Session Manager to connect as server");
+		Inet4Address localAddress=null;
+		Inet4Address BGPIdentifier=null;
+		if (params.getBGPIdentifier() != null){
+			try {
+				localAddress = (Inet4Address) InetAddress.getByName(params.getLocalBGPAddress());
+				BGPIdentifier = (Inet4Address) InetAddress.getByName(params.getBGPIdentifier());
+			} catch (UnknownHostException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+				return;
+			}
+			if (params.isTest()) {
+				bgp4SessionServer = new BGP4SessionServerManager(bgp4SessionsInformation, multiDomainTEDB, ud, params.getBGP4Port(), params.getHoldTime(), BGPIdentifier, params.getVersion(), params.getMyAutonomousSystem(), params.isNodelay(), localAddress, params.getKeepAliveTimer(), peersToConnect, params.isTest());
+				executor.execute(bgp4SessionServer);
+			}
+			else {
+				bgp4SessionServer = new BGP4SessionServerManager(bgp4SessionsInformation, multiDomainTEDB, ud, params.getBGP4Port(), params.getHoldTime(), BGPIdentifier, params.getVersion(), params.getMyAutonomousSystem(), params.isNodelay(), localAddress, params.getKeepAliveTimer(), peersToConnect);
+				executor.execute(bgp4SessionServer);
+			}
+
+		}else{
+			logServer.error("ERROR: BGPIdentifier is not configured. To configure: XML file (BGP4Parameters.xml) <localBGPAddress>.");
+			System.exit(1);
+		}
+	}
+	
+	public void startSendTopology(){
+		if (params.isTest()) {
+			sendTopologyTask.configure(intraTEDBs, bgp4SessionsInformation, sendTopology, params.getInstanceID(),params.isSendIntradomainLinks(),this.multiDomainTEDB, params.isTest());
+		}
+		else{
+			sendTopologyTask.configure(intraTEDBs, bgp4SessionsInformation, sendTopology, params.getInstanceID(),params.isSendIntradomainLinks(),this.multiDomainTEDB);
+		}
+		executor.scheduleWithFixedDelay(sendTopologyTask, 0,params.getSendTopoDelay(), TimeUnit.MILLISECONDS);
+	}
+	
+	
+	
+	public void startSaveTopology(){
+		//FIXME: ADD param to configure the delay
+		executor.scheduleWithFixedDelay(saveTopologyDB, 0,5000, TimeUnit.MILLISECONDS);
+	}
+		
+	
+	public SaveTopologyinDB getSaveTopologyDB() {
+		return saveTopologyDB;
+	}
+	
+	public void setSaveTopologyDB(SaveTopologyinDB saveTopologyDB) {
+		this.saveTopologyDB = saveTopologyDB;
+	}
+	
+	public boolean isSaveTopology() {
+		return saveTopology;
+	}
+	
+	public void setSaveTopology(boolean saveTopology) {
+		this.saveTopology = saveTopology;
+	}
+	
+	public UpdateDispatcher getUd() {
+		return ud;
+	}
+	
+	public void setUd(UpdateDispatcher ud) {
+		this.ud = ud;
+	}
+
+	public void addSimpleTEDB(SimpleTEDB simpleTEDB, String domainID) {
+			this.intraTEDBs.put(domainID, simpleTEDB);
+	}
+	
+	public void setSimpleTEDB(SimpleTEDB simpleTEDB) {
+		if(simpleTEDB.getDomainID() == null)
+			this.intraTEDBs.put("default", simpleTEDB);
+		else
+			this.intraTEDBs.put(simpleTEDB.getDomainID().toString(), simpleTEDB);
+	}
+	
+	
+	public void stopPeer(){
+		executor.shutdown();
+	}
+	public MultiDomainTEDB getMultiDomainTEDB() {
+		return multiDomainTEDB;
+	}
+	
+
+	public Hashtable<String, TEDB> getIntraTEDBs() {
+		return intraTEDBs;
+	}
+
+	public void setIntraTEDBs(Hashtable<String, TEDB> intraTEDBs) {
+		this.intraTEDBs = intraTEDBs;
+	}
+
+	public void setMultiDomainTEDB(MultiDomainTEDB multiDomainTEDB) {
+		this.multiDomainTEDB = multiDomainTEDB;
+	}
+	
+	
+	
+	
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeerMain.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeerMain.java
new file mode 100644
index 0000000000000000000000000000000000000000..97e2702f5485ca848d383e5939a330137c49711b
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/BGPPeerMain.java
@@ -0,0 +1,37 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.peer;
+
+public class BGPPeerMain {
+	
+	/**
+	 * @param args Command line arguments. First argument, config file.
+	 */
+	public static void main(String[] args) {
+		BGPPeer bgpPeer = new BGPPeer();
+		if (args.length != 0)
+			bgpPeer.configure(args[0]);
+		else
+			bgpPeer.configure();
+		
+		//bgpPeer.createTEDB("hola"); //did it in configure
+		bgpPeer.createUpdateDispatcher();
+		bgpPeer.startClient();		
+		bgpPeer.startServer();
+		bgpPeer.startSaveTopology();
+		bgpPeer.startManagementServer();
+		bgpPeer.startSendTopology();
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java
new file mode 100644
index 0000000000000000000000000000000000000000..bd27bb87ab0d193f4f7c7de0720aac1cdff1e61c
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SaveTopologyinDB.java
@@ -0,0 +1,300 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+package eu.teraflow.tid.bgp4Peer.peer;
+
+import java.net.Inet4Address;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Set;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import eu.teraflow.tid.tedb.DatabaseControlSimplifiedLSA;
+import eu.teraflow.tid.tedb.DomainTEDB;
+import eu.teraflow.tid.tedb.InterDomainEdge;
+import eu.teraflow.tid.tedb.IntraDomainEdge;
+import eu.teraflow.tid.tedb.MultiDomainTEDB;
+import eu.teraflow.tid.tedb.TEDB;
+import eu.teraflow.tid.tedb.TE_Information;
+import redis.clients.jedis.Jedis;
+
+/**
+ * Class to save periodically the topology. It sends the topology to the active BGP4 sessions.
+ * @author pac
+ *
+ */
+public class SaveTopologyinDB implements Runnable {
+	
+	//FIXME: Configure from file
+		private Jedis jedis;
+		private String host="localhost";
+		private int port=6379;
+		
+	//TEDBs 
+	 private Hashtable<String,TEDB> intraTEDBs;
+	
+	// Multi-domain TEDB to redistribute Multi-domain Topology
+	private MultiDomainTEDB multiDomainTEDB;
+
+	private boolean writeTopology;
+
+	private Logger log;
+	
+	
+	public SaveTopologyinDB(){
+		log = LoggerFactory.getLogger("BGP4Peer");
+		jedis = new Jedis(host,port); 
+	}
+
+	public void configure( Hashtable<String,TEDB> intraTEDBs,MultiDomainTEDB multiTED,  boolean writeTopology, String host, int port){
+		this.intraTEDBs=intraTEDBs;
+		this.writeTopology=writeTopology;
+		this.multiDomainTEDB=multiTED;
+		//rdh.setHost(host);
+		//rdh.setPort(port);
+		
+		
+		if (writeTopology){
+			jedis = new Jedis(host,port);
+			jedis.connect();
+		}
+	}
+
+	/**
+	 * Function to send the topology database.
+	 */
+
+
+	public void run(){		
+		try {
+		if (writeTopology){
+			log.info("Going to save Topology in Redis DB");
+			if (jedis==null){
+				jedis = new Jedis(host,port);
+				jedis.connect();
+			}else if (jedis.isConnected()==false){
+				jedis.connect();
+			}
+			if (multiDomainTEDB!=null){
+					log.info("save Multi-Domain TEDB");
+					writeLinkDBInter( multiDomainTEDB.getInterDomainLinks());
+				}
+				else {
+					log.info("save form TEDB");
+					Enumeration<TEDB> iter = intraTEDBs.elements();
+					while (iter.hasMoreElements()){
+						writeLinkDBInter( iter.nextElement().getInterDomainLinks());
+					}
+				}			
+				
+					log.info("sendIntraDomainLinks activated");
+					Enumeration<String> iter = intraTEDBs.keys();
+					while (iter.hasMoreElements()){						
+						String domainID = iter.nextElement();
+						log.info("Sending TED from domain "+domainID);
+						DomainTEDB ted=(DomainTEDB)intraTEDBs.get(domainID);
+						//writeLinkDB( ted.getNetworkGraph().edgeSet(),domainID);
+						writeLinkDB(ted.getIntraDomainLinks(),domainID);
+					}
+					
+							
+		}
+		}catch (Exception e) {
+			e.printStackTrace();
+			log.error("PROBLEM Writing TOPOLOGY: "+e.toString());
+		}
+
+	}
+
+	/**
+	 * This function write a BGP4 update message in Data Base for each link in the list
+	 * @param intradomainLinks
+	 */
+	private void writeLinkDB(Set<IntraDomainEdge> intradomainLinks, String domainID){
+		
+			Iterator<IntraDomainEdge> edgeIt = intradomainLinks.iterator();
+			
+			while (edgeIt.hasNext()){
+
+				IntraDomainEdge edge = edgeIt.next();
+				
+				DatabaseControlSimplifiedLSA dcsl =createSimplifiedLSA(edge); 
+				String jsonLSA = dcsl.logJsonSimplifiedLSA();
+				
+				if (jedis == null)
+					log.info("JEDIS IS NULL");
+				
+				String ret = jedis.set("LSA:"+dcsl.getAdvertisingRouter().getHostAddress()+":"+dcsl.getLinkId().getHostAddress(), jsonLSA);
+			}
+
+	}
+	
+	private DatabaseControlSimplifiedLSA createSimplifiedLSA(IntraDomainEdge edge){
+		DatabaseControlSimplifiedLSA dcsl = new DatabaseControlSimplifiedLSA();
+		
+		//Inet4Address source = (Inet4Address)edge.getSrc_router_id();
+		//Inet4Address dst = (Inet4Address)edge.getDst_router_id();
+		
+		Inet4Address source = (Inet4Address)edge.getSource();
+		dcsl.setAdvertisingRouter(source);
+		Inet4Address dst = (Inet4Address)edge.getTarget();
+		dcsl.setLinkId(dst);
+		
+		TE_Information te_info = ((IntraDomainEdge) edge).getTE_info();
+		
+		if (te_info != null){
+			
+			if (te_info.getLinkLocalRemoteIdentifiers() != null){
+				dcsl.linkLocalIdentifier = te_info.getLinkLocalRemoteIdentifiers().getLinkLocalIdentifier();
+			}
+			
+			if (te_info.getLinkLocalRemoteIdentifiers() != null){
+				dcsl.linkRemoteIdentifier = te_info.getLinkLocalRemoteIdentifiers().getLinkRemoteIdentifier();
+			}
+			
+			if (te_info.getMaximumBandwidth() != null) {
+				dcsl.maximumBandwidth = te_info.getMaximumBandwidth().getMaximumBandwidth();
+			}
+			
+			if (te_info.getUnreservedBandwidth() != null) {
+				dcsl.unreservedBandwidth = te_info.getUnreservedBandwidth().getUnreservedBandwidth()[0];
+			}
+					
+			if (te_info.getMaximumReservableBandwidth() != null)
+				dcsl.maximumReservableBandwidth = te_info.getMaximumReservableBandwidth().getMaximumReservableBandwidth();
+			
+			String ret = "";
+			
+			if (te_info.getAvailableLabels() != null){
+				
+				if (te_info.getAvailableLabels().getLabelSet() != null){
+					
+					ret=ret+" Bitmap: {";
+					
+					for (int i=0;i<te_info.getAvailableLabels().getLabelSet().getNumLabels();++i){
+					
+						ret = ret+ (te_info.isWavelengthFree(i)?"0":"1");		
+					}
+					
+					ret=ret+"}";
+					
+					dcsl.setBitmapLabelSet(ret);
+				
+				}
+			}
+		}
+		
+		return dcsl;
+	
+	}
+	
+	
+	/**
+	 * This function write a BGP4 update message in Data Base for each link in the list
+	 * @param intradomainLinks
+	 */
+	private void writeLinkDBInter(LinkedList<InterDomainEdge> interdomainLinks){
+		
+			Iterator<InterDomainEdge> edgeIt = interdomainLinks.iterator();
+			
+			while (edgeIt.hasNext()){
+
+				InterDomainEdge edge = edgeIt.next();
+				
+				DatabaseControlSimplifiedLSA dcsl =createSimplifiedLSAInter(edge); 
+				String jsonLSA = dcsl.logJsonSimplifiedLSA();
+				//rdh.write("LSA:"+dcsl.getAdvertisingRouter().getHostAddress()+":"+dcsl.getLinkId().getHostAddress(),jsonLSA);		
+				String ret = jedis.set("LSA:"+dcsl.getAdvertisingRouter().getHostAddress()+":"+dcsl.getLinkId().getHostAddress(), jsonLSA);
+			}
+
+	}
+	
+	private DatabaseControlSimplifiedLSA createSimplifiedLSAInter(InterDomainEdge edge){
+		DatabaseControlSimplifiedLSA dcsl = new DatabaseControlSimplifiedLSA();
+		
+		//Inet4Address source = (Inet4Address)edge.getSrc_router_id();
+		//Inet4Address dst = (Inet4Address)edge.getDst_router_id();
+		
+		Inet4Address source = (Inet4Address)edge.getSource();
+		dcsl.setAdvertisingRouter(source);
+		Inet4Address dst = (Inet4Address)edge.getTarget();
+		dcsl.setLinkId(dst);
+		
+		TE_Information te_info = ((InterDomainEdge) edge).getTE_info();
+		
+		if (te_info != null){
+			
+			if (te_info.getLinkLocalRemoteIdentifiers() != null){
+				dcsl.linkLocalIdentifier = te_info.getLinkLocalRemoteIdentifiers().getLinkLocalIdentifier();
+			}
+			
+			if (te_info.getLinkLocalRemoteIdentifiers() != null){
+				dcsl.linkRemoteIdentifier = te_info.getLinkLocalRemoteIdentifiers().getLinkRemoteIdentifier();
+			}
+			
+			if (te_info.getMaximumBandwidth() != null) {
+				dcsl.maximumBandwidth = te_info.getMaximumBandwidth().getMaximumBandwidth();
+			}
+			
+			if (te_info.getUnreservedBandwidth() != null) {
+				dcsl.unreservedBandwidth = te_info.getUnreservedBandwidth().getUnreservedBandwidth()[0];
+			}
+					
+			if (te_info.getMaximumReservableBandwidth() != null)
+				dcsl.maximumReservableBandwidth = te_info.getMaximumReservableBandwidth().getMaximumReservableBandwidth();
+			
+			String ret = "";
+			
+			if (te_info.getAvailableLabels() != null){
+				
+				if (te_info.getAvailableLabels().getLabelSet() != null){
+					
+					ret=ret+" Bitmap: {";
+					
+					for (int i=0;i<te_info.getAvailableLabels().getLabelSet().getNumLabels();++i){
+					
+						ret = ret+ (te_info.isWavelengthFree(i)?"0":"1");		
+					}
+					
+					ret=ret+"}";
+					
+					dcsl.setBitmapLabelSet(ret);
+				
+				}
+			}
+		}
+		
+		return dcsl;
+	
+	}
+
+	public MultiDomainTEDB getMultiDomainTEDB() {
+		return multiDomainTEDB;
+	}
+
+	public void setMultiDomainTEDB(MultiDomainTEDB multiDomainTEDB) {
+		this.multiDomainTEDB = multiDomainTEDB;
+	}
+	
+	
+}
+				
+			
+
+
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SendTopology.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SendTopology.java
new file mode 100644
index 0000000000000000000000000000000000000000..d2de34a91c00cf6156cba36cc27aebf5e9fe01b5
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/peer/SendTopology.java
@@ -0,0 +1,1028 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.peer;
+
+import es.tid.bgp.bgp4.messages.BGP4Update;
+import es.tid.bgp.bgp4.update.fields.ITNodeNLRI;
+import es.tid.bgp.bgp4.update.fields.LinkNLRI;
+import es.tid.bgp.bgp4.update.fields.NodeNLRI;
+import es.tid.bgp.bgp4.update.fields.PathAttribute;
+import es.tid.bgp.bgp4.update.fields.pathAttributes.*;
+import es.tid.bgp.bgp4.update.tlv.LocalNodeDescriptorsTLV;
+import es.tid.bgp.bgp4.update.tlv.ProtocolIDCodes;
+import es.tid.bgp.bgp4.update.tlv.RemoteNodeDescriptorsTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.*;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.*;
+import es.tid.ospf.ospfv2.OSPFv2LinkStateUpdatePacket;
+import es.tid.ospf.ospfv2.lsa.LSA;
+import es.tid.ospf.ospfv2.lsa.LSATypes;
+import es.tid.ospf.ospfv2.lsa.OSPFTEv2LSA;
+import es.tid.ospf.ospfv2.lsa.tlv.LinkTLV;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.*;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet;
+import eu.teraflow.tid.bgp4Peer.bgp4session.BGP4SessionsInformation;
+import eu.teraflow.tid.bgp4Peer.bgp4session.GenericBGP4Session;
+import eu.teraflow.tid.tedb.*;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.Inet4Address;
+import java.net.UnknownHostException;
+import java.util.*;
+
+/**
+ * Class to send periodically the topology. It sends the topology to the active BGP4 sessions.
+ * @author pac
+ *
+ */
+public class SendTopology implements Runnable {
+	
+	/**
+	 * 1= optical
+	 * 0= L3
+	 */
+	private int identifier=1;
+
+	//TEDBs 
+	 private Hashtable<String,TEDB> intraTEDBs;
+	
+	// Multi-domain TEDB to redistribute Multi-domain Topology
+	private MultiDomainTEDB multiDomainTEDB;
+
+	private boolean sendTopology;
+	private boolean isTest=false;
+	private BGP4SessionsInformation bgp4SessionsInformation;
+	private Logger log;
+	private int instanceId=1;
+	private boolean sendIntraDomainLinks=false;
+
+	private boolean send4AS=false;
+
+
+	
+	
+	private Inet4Address localBGPLSIdentifer;
+	private Inet4Address localAreaID;
+	
+	public SendTopology(){
+		log = LoggerFactory.getLogger("BGP4Peer");
+	}
+
+	public void configure( Hashtable<String,TEDB> intraTEDBs,BGP4SessionsInformation bgp4SessionsInformation,boolean sendTopology,int instanceId,boolean sendIntraDomainLinks, MultiDomainTEDB multiTED){
+		this.intraTEDBs=intraTEDBs;
+		this.bgp4SessionsInformation=bgp4SessionsInformation;
+		this.sendTopology= sendTopology;
+		this.instanceId = instanceId;
+		this.sendIntraDomainLinks=sendIntraDomainLinks;
+		this.multiDomainTEDB=multiTED;
+		try {
+			this.localAreaID=(Inet4Address)Inet4Address.getByName("0.0.0.0");
+			this.localBGPLSIdentifer=(Inet4Address)Inet4Address.getByName("1.1.1.1");
+		} catch (UnknownHostException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+	}
+
+
+	public void configure( Hashtable<String,TEDB> intraTEDBs,BGP4SessionsInformation bgp4SessionsInformation,boolean sendTopology,int instanceId,boolean sendIntraDomainLinks, MultiDomainTEDB multiTED, boolean test){
+		this.intraTEDBs=intraTEDBs;
+		this.bgp4SessionsInformation=bgp4SessionsInformation;
+		this.sendTopology= sendTopology;
+		this.instanceId = instanceId;
+		this.sendIntraDomainLinks=sendIntraDomainLinks;
+		this.multiDomainTEDB=multiTED;
+		this.isTest=test;
+		try {
+			this.localAreaID=(Inet4Address)Inet4Address.getByName("0.0.0.0");
+			this.localBGPLSIdentifer=(Inet4Address)Inet4Address.getByName("1.1.1.1");
+		} catch (UnknownHostException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+
+	}
+
+	/**
+	 * Function to send the topology database.
+	 */
+
+
+	public void run(){	
+		try {
+		if (sendTopology){
+			if (!(bgp4SessionsInformation.getSessionList().isEmpty())){
+				if (multiDomainTEDB!=null){
+					log.debug("Sending Multi-Domain TEDB");
+					sendLinkNLRI( multiDomainTEDB.getInterDomainLinks());
+				}
+				else {
+					log.debug("Sending from TEDB");
+					Enumeration<TEDB> iter = intraTEDBs.elements();
+					while (iter.hasMoreElements()){
+						sendLinkNLRI( iter.nextElement().getInterDomainLinks());
+					}
+				}			
+				
+				if (sendIntraDomainLinks){//Intradomain Links
+					log.debug("sendIntraDomainLinks activated");
+					Enumeration<String> iter = intraTEDBs.keys();
+					while (iter.hasMoreElements()){						
+						String domainID = iter.nextElement();
+						//Andrea
+						log.debug("Sending TED from domain "+domainID);
+
+						TEDB ted=intraTEDBs.get(domainID);
+						if (ted instanceof DomainTEDB) {
+							sendLinkNLRI( ((DomainTEDB)ted).getIntraDomainLinks(),domainID);
+							//log.info(" XXXX ted.getNodeTable():"+ted.getNodeTable());
+							sendNodeNLRI( ((DomainTEDB)ted).getIntraDomainLinksvertexSet(), ((DomainTEDB)ted).getNodeTable());
+							if (((DomainTEDB)ted).getItResources()!=null){
+								sendITNodeNLRI( domainID, ((DomainTEDB)ted).getItResources());
+							}
+			
+						}
+				
+
+						
+					}
+
+				}
+						
+			}
+		}
+		}catch (Exception e) {
+			e.printStackTrace();
+			log.error("PROBLEM SENDING TOPOLOGY: "+e.toString());
+		}
+
+	}
+	/**
+	 * This function sends a BGP4 update message (encoded in a NodeNLRI) for each node in the set 
+	 * @param vertexIt
+	 */
+	private void sendNodeNLRI(Set<Object> vertexSet, Hashtable<Object , Node_Info> NodeTable){
+		Iterator<Object> vertexIt = vertexSet.iterator();	
+		//Enviamos primero los nodos. Un Node NLRI por cada nodo.
+		while (vertexIt.hasNext()){		
+			Inet4Address node=null;
+			Object v = vertexIt.next();
+			if( v instanceof eu.teraflow.tid.tedb.elements.Node){
+				try {
+					node = (Inet4Address)Inet4Address.getByName(((eu.teraflow.tid.tedb.elements.Node)v).getAddress().get(0));
+				} catch (UnknownHostException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+				
+			}else{
+				 node = (Inet4Address)v;
+			}
+				
+			
+			//log.info(" XXXX node: "+ node);
+			Node_Info node_info = NodeTable.get(node);
+			//log.info(" XXXX node_info: "+ node_info);
+			if (node_info!=null){
+				log.debug("Sending node: ("+node+")");
+				//Mandamos NodeNLRI
+				BGP4Update update = createMsgUpdateNodeNLRI(node_info);
+				sendMessage(update);	
+			}else {
+				log.debug("Node "+node+ " HAS NO node_info in NodeTable");
+			}
+			
+
+		}
+	}
+	
+	/**
+	 * This function sends a BGP4 update message (encoded in a ITNodeNLRI) for each node in the set 
+	 * @param vertexIt
+	 */
+
+
+	private void sendITNodeNLRI(String domainID, IT_Resources itResources){
+		//Andrea
+		log.debug("Sending IT REsources");
+		BGP4Update update = createMsgUpdateITNodeNLRI(domainID, itResources);
+		sendMessage(update);
+//		Iterator<Object> vertexIt = vertexSet.iterator();	
+//		//Enviamos primero los nodos. Un Node NLRI por cada nodo.
+//		while (vertexIt.hasNext()){		
+//			Inet4Address node = (Inet4Address)vertexIt.next();
+//			//log.info(" XXXX node: "+ node);
+//			Node_Info node_info = NodeTable.get(node);
+//			//log.info(" XXXX node_info: "+ node_info);
+//			if (node_info!=null){
+//				log.debug("Sending node: ("+node+")");
+//				//Mandamos NodeNLRI
+//				BGP4Update update = createMsgUpdateNodeNLRI(node_info);
+//				sendMessage(update);	
+//			}else {
+//				log.error("Node "+node+ " HAS NO node_info in NodeTable");
+//			}
+//			
+//
+//		}
+	}
+	
+	/**
+	 * This function sends a BGP4 update message (encoded in a LinkNLRI) for each link in the list
+	 * @param interdomainLinks
+	 */
+	private void sendLinkNLRI(LinkedList<InterDomainEdge> interdomainLinks){
+		if (true){
+			int lanID = 1; ///INVENTADOO
+			ArrayList<Inet4Address> addressList = new ArrayList<Inet4Address>();
+			Iterator<InterDomainEdge> edgeIt = interdomainLinks.iterator();
+			while (edgeIt.hasNext()){
+
+				InterDomainEdge edge = edgeIt.next();
+				Inet4Address source = (Inet4Address)edge.getSrc_router_id();
+				Inet4Address dst = (Inet4Address)edge.getDst_router_id();
+				log.debug("Sending ID edge: ("+source.toString() +":"+((InterDomainEdge) edge).getSrc_if_id()+","+dst.toString()+")");
+				addressList = new ArrayList<Inet4Address>();
+				addressList.add(0,source);
+				addressList.add(1,dst);
+				
+			
+
+				//Link Local Remote Identifiers
+				ArrayList<Long> localRemoteIfList =null;
+				localRemoteIfList= new ArrayList<Long> ();
+				localRemoteIfList.add(0,((InterDomainEdge) edge).getSrc_if_id());//te_info.getLinkLocalRemoteIdentifiers().getLinkLocalIdentifier());
+				localRemoteIfList.add(1,((InterDomainEdge) edge).getDst_if_id());//te_info.getLinkLocalRemoteIdentifiers().getLinkRemoteIdentifier());
+
+				
+				ArrayList<String> domainList = new ArrayList<String>(2);
+				//FIXME: chequear
+				TE_Information te_info = ((InterDomainEdge) edge).getTE_info();
+				
+				domainList.add(((Inet4Address)edge.getDomain_src_router()).getHostAddress().toString());
+				//System.out.println("SRC Domain is "+((Inet4Address)edge.getDomain_src_router()).getHostAddress().toString() );
+				domainList.add( ((Inet4Address)edge.getDomain_dst_router()).getHostAddress().toString());
+				log.debug("SRC Domain is "+(Inet4Address)edge.getDomain_dst_router());
+				BGP4Update update = createMsgUpdateLinkNLRI(addressList,localRemoteIfList, lanID, domainList, false, te_info);
+				update.setLearntFrom(edge.getLearntFrom());
+				log.debug("Update message Created");	
+				sendMessage(update);				
+			}
+		}
+
+	}
+	/**
+	 * This function sends a BGP4 update message (encoded in a LinkNLRI) for each link in the set
+	 * @param edgeIt
+	 */
+	private void sendLinkNLRI(Set<IntraDomainEdge> edgeSet, String domainID){
+		int lanID = 1; ///INVENTADOO
+		ArrayList<Inet4Address> addressList = new ArrayList<Inet4Address>();
+		Iterator<IntraDomainEdge> edgeIt = edgeSet.iterator();	
+		while (edgeIt.hasNext()){
+
+			IntraDomainEdge edge = edgeIt.next();
+			Inet4Address source=null;
+			if(edge.getSource() instanceof  eu.teraflow.tid.tedb.elements.Node){
+				try {
+					source=(Inet4Address)Inet4Address.getByName(((eu.teraflow.tid.tedb.elements.Node)edge.getSource()).getAddress().get(0));
+				} catch (UnknownHostException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}else{
+				source = (Inet4Address)edge.getSource();
+			}
+			
+			Inet4Address dst=null;
+			if(edge.getTarget() instanceof  eu.teraflow.tid.tedb.elements.Node){
+				try {
+					dst=(Inet4Address)Inet4Address.getByName(((eu.teraflow.tid.tedb.elements.Node)edge.getTarget()).getAddress().get(0));
+				} catch (UnknownHostException e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+			}else{
+				dst = (Inet4Address)edge.getTarget();
+			}
+			log.debug("Sending: ("+source.toString() +","+dst.toString()+")");
+			addressList = new ArrayList<Inet4Address>();
+			addressList.add(0,source);
+			addressList.add(1,dst);
+			//Link Local Remote Identifiers
+			ArrayList<Long> localRemoteIfList =null;
+			localRemoteIfList= new ArrayList<Long> ();
+			localRemoteIfList.add(0,((IntraDomainEdge) edge).getSrc_if_id());//te_info.getLinkLocalRemoteIdentifiers().getLinkLocalIdentifier());
+			localRemoteIfList.add(1,((IntraDomainEdge) edge).getDst_if_id());//te_info.getLinkLocalRemoteIdentifiers().getLinkRemoteIdentifier());
+
+			//MPLS
+			float maximumBandwidth = 0; 
+			float[] unreservedBandwidth = null;
+			float maximumReservableBandwidth = 0; 
+			int undirLinkDelay = 0;
+			int metric = 0;
+			long te_metric =0;
+	
+			//GMPLS
+			AvailableLabels availableLabels = null;
+			MF_OTPAttribTLV mfOTP = null;
+			
+
+			TE_Information te_info = ((IntraDomainEdge) edge).getTE_info();
+			
+			ArrayList<String> domainList = new ArrayList<String>(2);	
+			domainList.add(domainID);
+			domainList.add(domainID);
+			BGP4Update update = createMsgUpdateLinkNLRI(addressList,localRemoteIfList, lanID, domainList, true, te_info);
+			update.setLearntFrom(edge.getLearntFrom());
+			sendMessage(update);
+
+		}
+
+	}
+	/**
+	 * Function to send a BGP4 update message to the connected peers. 
+	 * @param update
+	 */
+	private void sendMessage (BGP4Update update){
+
+		Enumeration <GenericBGP4Session > sessions = bgp4SessionsInformation.getSessionList().elements();
+
+		log.debug("Sending a BGP4 update message:"+update.toString());
+		while (sessions.hasMoreElements()){	
+			GenericBGP4Session session = sessions.nextElement();
+			if (session==null) {
+				log.error("SESSION NULL");
+			}else {
+				if (session.getSendTo()) {
+					String destination = session.getRemotePeerIP().getHostAddress();
+					log.debug("BGP4 Update learnt from:" + update.getLearntFrom());
+					if (isTest){
+						log.debug("Sending BGP4 update to:" + destination+" with no check on the ID since it is test");
+						session.sendBGP4Message(update);
+					}
+					else{
+						try {
+							if ((update.getLearntFrom() != null) && (update.getLearntFrom().contains("/"))) {
+								//log.info(update.getLearntFrom().substring(1));
+								if (!destination.equals(update.getLearntFrom().substring(1))) {
+									//log.info("id da getLearnt "+ update.getLearntFrom());
+									log.debug("Sending update to destination " + destination + " for info learnt from " + update.getLearntFrom().substring(1));
+									log.debug("Sending BGP4 update to:" + destination);
+									session.sendBGP4Message(update);
+
+								} else
+									log.debug("destination " + destination + " and source of information " + update.getLearntFrom().substring(1) + " are equal");
+
+
+							}
+							else{
+								if (!destination.equals(update.getLearntFrom())) {
+									//log.info("id da getLearnt "+ update.getLearntFrom());
+									log.debug("Sending update to destination " + destination + " for info learnt from " + update.getLearntFrom());
+									log.debug("Sending BGP4 update to:" + destination);
+									session.sendBGP4Message(update);
+								} else
+									log.debug("destination " + destination + " and source of information " + update.getLearntFrom() + " are equal");
+								}
+						}
+						catch (Exception e){
+							e.printStackTrace();
+						}
+					}
+				}
+			}
+			
+		}
+	}
+	/**
+	 * This function create a BGP4 Message with NodeNLRI field
+
+	 * @param node_info
+	 */
+	private  BGP4Update createMsgUpdateNodeNLRI(Node_Info node_info){
+		try{
+			
+		
+				BGP4Update update= new BGP4Update();	
+				//Path Attributes
+				ArrayList<PathAttribute> pathAttributes = update.getPathAttributes();
+				//Origin
+				OriginAttribute or = new OriginAttribute(); 
+				or.setValue(PathAttributesTypeCode.PATH_ATTRIBUTE_ORIGIN_IGP);
+				pathAttributes.add(or);
+				//AS_PATH
+				if (send4AS==true) {
+					AS_Path_Attribute as_path = new AS_Path_Attribute();
+					AS_Path_Segment as_path_seg = new AS_Path_Segment();
+					long[] segs = new long[1];
+					segs[0] = 65522;
+					as_path_seg.set4Segments(segs);
+					as_path.getAsPathSegments().add(as_path_seg);
+					pathAttributes.add(as_path);
+				}
+				else {
+					AS_Path_Attribute as_path = new AS_Path_Attribute();
+					AS_Path_Segment as_path_seg = new AS_Path_Segment();
+					int[] segs = new int[1];
+					segs[0] = 65522;
+					as_path_seg.setSegments(segs);
+					as_path.getAsPathSegments().add(as_path_seg);
+					pathAttributes.add(as_path);
+				}
+
+			//Node Attribute
+		
+				LinkStateAttribute  linkStateAttribute = new LinkStateAttribute();
+				boolean linkStateNeeded=false;
+				
+				if (node_info.getSid()!=0){
+					int sid = node_info.getSid();
+					SidLabelNodeAttribTLV sidLabelTLV = new SidLabelNodeAttribTLV();
+					sidLabelTLV.setSid(sid);
+					linkStateAttribute.setSidLabelTLV(sidLabelTLV);			
+					linkStateNeeded=true;
+				}
+		
+				if (linkStateNeeded){
+					log.debug("Node Attribute added....");
+					pathAttributes.add(linkStateAttribute);
+				}
+		
+				//NLRI
+				NodeNLRI nodeNLRI = new NodeNLRI();
+				nodeNLRI.setProtocolID(ProtocolIDCodes.Unknown_Protocol_ID);	
+				nodeNLRI.setRoutingUniverseIdentifier(identifier);
+				LocalNodeDescriptorsTLV localNodeDescriptors = new LocalNodeDescriptorsTLV();
+		
+				//igp router id
+				if(node_info.getIpv4Address()!=null){
+					IGPRouterIDNodeDescriptorSubTLV igpRouterIDLNSubTLV = new IGPRouterIDNodeDescriptorSubTLV();
+					igpRouterIDLNSubTLV.setIpv4AddressOSPF(node_info.getIpv4Address());	
+					igpRouterIDLNSubTLV.setIGP_router_id_type(IGPRouterIDNodeDescriptorSubTLV.IGP_ROUTER_ID_TYPE_OSPF_NON_PSEUDO);
+					localNodeDescriptors.setIGPRouterID(igpRouterIDLNSubTLV);
+					
+				}
+		
+				//as number
+				if(node_info.getAs_number()!=null){
+					AutonomousSystemNodeDescriptorSubTLV asNodeDescrSubTLV = new AutonomousSystemNodeDescriptorSubTLV();
+					asNodeDescrSubTLV.setAS_ID(node_info.getAs_number());
+					localNodeDescriptors.setAutonomousSystemSubTLV(asNodeDescrSubTLV);
+				} 
+				//Complete Dummy TLVs
+						BGPLSIdentifierNodeDescriptorSubTLV bGPLSIDSubTLV =new BGPLSIdentifierNodeDescriptorSubTLV();
+						bGPLSIDSubTLV.setBGPLS_ID(this.localBGPLSIdentifer);
+						localNodeDescriptors.setBGPLSIDSubTLV(bGPLSIDSubTLV);
+						AreaIDNodeDescriptorSubTLV areaID = new AreaIDNodeDescriptorSubTLV();
+						areaID.setAREA_ID(this.localAreaID);
+						localNodeDescriptors.setAreaID(areaID);
+				
+				nodeNLRI.setLocalNodeDescriptors(localNodeDescriptors);
+				BGP_LS_MP_Reach_Attribute ra= new BGP_LS_MP_Reach_Attribute();
+				ra.setLsNLRI(nodeNLRI);
+				pathAttributes.add(ra);
+				update.setLearntFrom(node_info.getLearntFrom());
+				return update;
+			} catch (Exception e) {
+				e.printStackTrace();
+				return null;
+			}
+		
+		}
+
+	/**
+	 * This function create a BGP4 Message with NodeNLRI field
+	 * @param addressList 
+	 * @param node_info
+	 */
+	private  BGP4Update createMsgUpdateITNodeNLRI(String domainID, IT_Resources itResources){
+		try{
+	
+			BGP4Update update= new BGP4Update();	
+			//Path Attributes
+			ArrayList<PathAttribute> pathAttributes = update.getPathAttributes();
+			//Origin
+			OriginAttribute or = new OriginAttribute(); 
+			or.setValue(PathAttributesTypeCode.PATH_ATTRIBUTE_ORIGIN_IGP);
+			pathAttributes.add(or);
+
+			//AS_PATH
+			if (send4AS==true) {
+				AS_Path_Attribute as_path = new AS_Path_Attribute();
+				AS_Path_Segment as_path_seg = new AS_Path_Segment();
+				long[] segs = new long[1];
+				segs[0] = 65522;
+				as_path_seg.set4Segments(segs);
+				as_path.getAsPathSegments().add(as_path_seg);
+				pathAttributes.add(as_path);
+			}
+			else {
+				AS_Path_Attribute as_path = new AS_Path_Attribute();
+				AS_Path_Segment as_path_seg = new AS_Path_Segment();
+				int[] segs = new int[1];
+				segs[0] = 65522;
+				as_path_seg.setSegments(segs);
+				as_path.getAsPathSegments().add(as_path_seg);
+				pathAttributes.add(as_path);
+			}
+
+
+		
+
+			//NLRI
+			ITNodeNLRI itNodeNLRI = new ITNodeNLRI();
+			itNodeNLRI.setNodeId(domainID);
+			itNodeNLRI.setControllerIT(itResources.getControllerIT());
+			itNodeNLRI.setCpu(itResources.getCpu());
+			itNodeNLRI.setMem(itResources.getMem());
+			itNodeNLRI.setStorage(itResources.getStorage());
+			update.setLearntFrom(itResources.getLearntFrom());
+			log.info("Creating IT Update related to domain "+domainID+" learnt from "+itResources.getLearntFrom());
+			LocalNodeDescriptorsTLV localNodeDescriptors = new LocalNodeDescriptorsTLV();
+			
+			//Complete Dummy TLVs
+			BGPLSIdentifierNodeDescriptorSubTLV bGPLSIDSubTLV =new BGPLSIdentifierNodeDescriptorSubTLV();
+			bGPLSIDSubTLV.setBGPLS_ID(this.localBGPLSIdentifer);
+			localNodeDescriptors.setBGPLSIDSubTLV(bGPLSIDSubTLV);
+			AreaIDNodeDescriptorSubTLV areaID = new AreaIDNodeDescriptorSubTLV();
+			areaID.setAREA_ID(this.localAreaID);
+			localNodeDescriptors.setAreaID(areaID);
+	
+			//itNodeNLRI.setLocalNodeDescriptors(localNodeDescriptors);
+			BGP_LS_MP_Reach_Attribute ra= new BGP_LS_MP_Reach_Attribute();
+			ra.setLsNLRI(itNodeNLRI);
+			pathAttributes.add(ra);
+			return update;
+		
+			} catch (Exception e) {
+				e.printStackTrace();
+				return null;
+			}
+		
+	}
+	
+	/**
+	 * Function to create a BGP4 update message with a link NRLI field. To send the links.
+	 * 				
+	 * @param addressList
+	 * @param addressInterfaceList
+	 * @param localRemoteIfList
+	 * @param lanID
+	 * @param maximumBandwidth
+	 * @param unreservedBandwidth
+	 * @param maximumReservableBandwidth
+	 * @param availableLabels
+	 * @param metric 
+	 * @param domainList
+	 * @param intradomain
+	 * @param linkDelay 
+	 */
+	private BGP4Update createMsgUpdateLinkNLRI(ArrayList<Inet4Address> addressList,ArrayList<Long> localRemoteIfList,int lanID,   ArrayList<String> domainList, boolean intradomain, TE_Information te_info ){
+		BGP4Update update= new BGP4Update();	
+		//1. Path Attributes
+		ArrayList<PathAttribute> pathAttributes = update.getPathAttributes();
+		//1.1. Origin
+		OriginAttribute or = new OriginAttribute(); 
+		if (intradomain)
+			or.setValue(PathAttributesTypeCode.PATH_ATTRIBUTE_ORIGIN_IGP);
+		else
+			or.setValue(PathAttributesTypeCode.PATH_ATTRIBUTE_ORIGIN_EGP);
+		pathAttributes.add(or);	
+		///Andreaaaaa
+		//update.setLearntFrom("192.168.0.1");
+		//1.2. AS-PATH
+
+		if (send4AS==true) {
+			AS_Path_Attribute as_path = new AS_Path_Attribute();
+			AS_Path_Segment as_path_seg = new AS_Path_Segment();
+			long[] segs = new long[1];
+			segs[0] = 65522;
+			as_path_seg.set4Segments(segs);
+			as_path.getAsPathSegments().add(as_path_seg);
+			pathAttributes.add(as_path);
+		}
+		else {
+			AS_Path_Attribute as_path = new AS_Path_Attribute();
+			AS_Path_Segment as_path_seg = new AS_Path_Segment();
+			int[] segs = new int[1];
+			segs[0] = 65522;
+			as_path_seg.setSegments(segs);
+			as_path.getAsPathSegments().add(as_path_seg);
+			pathAttributes.add(as_path);
+		}
+
+
+		//1.2. LINK-STATE
+		//MPLS
+		float maximumBandwidth = 0; 
+		float[] unreservedBandwidth = null;
+		float maximumReservableBandwidth = 0; 	
+
+		//GMPLS
+		AvailableLabels availableLabels = null;
+		MF_OTPAttribTLV mfOTP = null;
+
+		int metric = 0;
+		int te_metric = 0;
+		
+		
+		if (te_info != null){
+			if (te_info.getLinkLocalRemoteIdentifiers() != null){
+
+			}
+			//MPLS
+			if (te_info.getMaximumBandwidth() != null) {
+				maximumBandwidth = te_info.getMaximumBandwidth().getMaximumBandwidth();
+			}
+			if (te_info.getUnreservedBandwidth() != null)
+				unreservedBandwidth = te_info.getUnreservedBandwidth().getUnreservedBandwidth();
+			if (te_info.getMaximumReservableBandwidth() != null)
+				maximumReservableBandwidth = te_info.getMaximumReservableBandwidth().getMaximumReservableBandwidth();
+			//GMPLS
+			if (te_info.getAvailableLabels() != null)
+				availableLabels = te_info.getAvailableLabels();
+			if(te_info.getDefaultTEMetric()!=null){
+				metric = (int) te_info.getDefaultTEMetric().getLinkMetric();
+				log.debug("Metric en el metodo sendLinkNLRI es: " + metric);
+			}
+			if(te_info.getTrafficEngineeringMetric()!=null){
+				te_metric = (int) te_info.getTrafficEngineeringMetric().getLinkMetric() ;
+				log.debug("Metric en el metodo sendLinkNLRI es: " + metric);
+			}
+			if(te_info.getMfOTF()!=null){
+				mfOTP =  te_info.getMfOTF();
+			}
+
+		}else{
+			log.debug("TE_Info es null");
+		}
+		
+		
+		boolean linkStateNeeded = false;
+		LinkStateAttribute  linkStateAttribute = new LinkStateAttribute();
+		//1.2.1. MaxReservableBandwidth
+		if (maximumReservableBandwidth != 0){
+			MaxReservableBandwidthLinkAttribTLV maxReservableBandwidthTLV = new MaxReservableBandwidthLinkAttribTLV();
+			maxReservableBandwidthTLV.setMaximumReservableBandwidth(maximumReservableBandwidth);
+			linkStateAttribute.setMaxReservableBandwidthTLV(maxReservableBandwidthTLV);
+			linkStateNeeded=true;
+		}
+		//1.2.2. maxBandwidth
+		if (maximumBandwidth != 0){
+			MaximumLinkBandwidthLinkAttribTLV maximumLinkBandwidthTLV = new MaximumLinkBandwidthLinkAttribTLV();
+			maximumLinkBandwidthTLV.setMaximumBandwidth(maximumBandwidth);
+			linkStateAttribute.setMaximumLinkBandwidthTLV(maximumLinkBandwidthTLV);
+			linkStateNeeded=true;
+		}
+		//1.2.3. unreservedBandwidth
+		if (unreservedBandwidth != null){
+			UnreservedBandwidthLinkAttribTLV unreservedBandwidthTLV = new UnreservedBandwidthLinkAttribTLV();
+			unreservedBandwidthTLV.setUnreservedBandwidth(unreservedBandwidth);
+			linkStateAttribute.setUnreservedBandwidthTLV(unreservedBandwidthTLV);
+			linkStateNeeded=true;
+		}
+		//1.2.4. AvailableLabels
+		if (availableLabels != null){
+			log.debug("Available labels fields: "+availableLabels.getLabelSet().getNumLabels());
+			AvailableLabels al = new AvailableLabels();
+
+			BitmapLabelSet bl = new BitmapLabelSet();
+			bl.setBytesBitmap(((BitmapLabelSet)availableLabels.getLabelSet()).getBytesBitMap());
+			bl.setNumLabels(availableLabels.getLabelSet().getNumLabels());
+			bl.setDwdmWavelengthLabel(((BitmapLabelSet)availableLabels.getLabelSet()).getDwdmWavelengthLabel());
+
+			bl.setBytesBitmapReserved(((BitmapLabelSet)availableLabels.getLabelSet()).getBytesBitmapReserved());
+
+			al.setLabelSet(bl);
+
+			log.debug("Campo BytesBitmap: "+Integer.toHexString(((int)bl.getBytesBitMap()[0])&0xFF));
+			log.debug("Campo DwdmWavelengthLabel: "+bl.getDwdmWavelengthLabel());
+			if (bl.getBytesBitmapReserved()!=null){
+				log.debug("Campo BytesBitmapReserved: "+bl.getBytesBitmapReserved()[0]);
+			}
+			linkStateAttribute.setAvailableLabels(al);
+
+			linkStateNeeded=true;
+		}
+		//1.2.5 metric
+//		if (metric != 0){
+//			DefaultTEMetricLinkAttribTLV defaultMetric = new DefaultTEMetricLinkAttribTLV();
+//			defaultMetric.setLinkMetric(metric);
+//			log.info("Metric en el metodo createMsgUpdateLinkNLRI es: " + metric);
+//			linkStateAttribute.setTEMetricTLV(defaultMetric);
+//			linkStateNeeded=true;
+//		}
+		
+		if (te_metric != 0){
+			DefaultTEMetricLinkAttribTLV defaultMetric = new DefaultTEMetricLinkAttribTLV();
+			//defaultMetric.setLinkMetric(metric);
+			defaultMetric.setLinkMetric(te_metric);
+			log.debug("Metric en el metodo createMsgUpdateLinkNLRI es: " + te_metric);
+			linkStateAttribute.setTEMetricTLV(defaultMetric);
+			linkStateNeeded=true;
+		}
+		
+		//1.2.6 MF_OPT
+		if (mfOTP != null){
+			MF_OTPAttribTLV mfOTPTLV = mfOTP.duplicate();
+			log.debug("SENDING MFOTP OSCAR");
+			linkStateAttribute.setMF_OTP_ATLV(mfOTPTLV);
+			linkStateNeeded=true;
+		}
+		
+		if (linkStateNeeded){
+			pathAttributes.add(linkStateAttribute);
+		}
+		//2. NLRI
+		LinkNLRI linkNLRI = new LinkNLRI();
+		linkNLRI.setProtocolID(ProtocolIDCodes.Unknown_Protocol_ID);
+		linkNLRI.setIdentifier(instanceId);
+	
+		//2.1. Local Y Remote Descriptors
+		LocalNodeDescriptorsTLV localNodeDescriptors = new LocalNodeDescriptorsTLV();
+		RemoteNodeDescriptorsTLV remoteNodeDescriptors = new RemoteNodeDescriptorsTLV();
+
+		//2.1.1. IPv4
+		IGPRouterIDNodeDescriptorSubTLV igpRouterIDLNSubTLV = new IGPRouterIDNodeDescriptorSubTLV();
+		igpRouterIDLNSubTLV.setIpv4AddressOSPF(addressList.get(0));	
+		igpRouterIDLNSubTLV.setIGP_router_id_type(IGPRouterIDNodeDescriptorSubTLV.IGP_ROUTER_ID_TYPE_OSPF_NON_PSEUDO);
+		localNodeDescriptors.setIGPRouterID(igpRouterIDLNSubTLV);
+		//Complete Dummy TLVs
+		BGPLSIdentifierNodeDescriptorSubTLV bGPLSIDSubTLV =new BGPLSIdentifierNodeDescriptorSubTLV();
+		bGPLSIDSubTLV.setBGPLS_ID(this.localBGPLSIdentifer);
+		localNodeDescriptors.setBGPLSIDSubTLV(bGPLSIDSubTLV);
+		AreaIDNodeDescriptorSubTLV areaID = new AreaIDNodeDescriptorSubTLV();
+		areaID.setAREA_ID(this.localAreaID);
+		localNodeDescriptors.setAreaID(areaID);
+
+		IGPRouterIDNodeDescriptorSubTLV igpRouterIDDNSubTLV = new IGPRouterIDNodeDescriptorSubTLV();
+		igpRouterIDDNSubTLV.setIpv4AddressOSPF(addressList.get(1));	
+		igpRouterIDDNSubTLV.setIGP_router_id_type(IGPRouterIDNodeDescriptorSubTLV.IGP_ROUTER_ID_TYPE_OSPF_NON_PSEUDO);
+		remoteNodeDescriptors.setIGPRouterID(igpRouterIDDNSubTLV);
+		//2.1.2. AS
+		if (domainList != null){
+			AutonomousSystemNodeDescriptorSubTLV as_local = new AutonomousSystemNodeDescriptorSubTLV();
+			try {
+				as_local.setAS_ID((Inet4Address) Inet4Address.getByName(domainList.get(0)));
+				localNodeDescriptors.setAutonomousSystemSubTLV(as_local);
+				AutonomousSystemNodeDescriptorSubTLV as_remote = new AutonomousSystemNodeDescriptorSubTLV();
+				as_remote.setAS_ID((Inet4Address) Inet4Address.getByName(domainList.get(1)));
+				remoteNodeDescriptors.setAutonomousSystemSubTLV(as_remote);	
+			} catch (UnknownHostException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			
+		}
+		//Complete Dummy TLVs
+		remoteNodeDescriptors.setBGPLSIDSubTLV(bGPLSIDSubTLV);
+		remoteNodeDescriptors.setAreaID(areaID);
+
+		linkNLRI.setLocalNodeDescriptors(localNodeDescriptors);
+		linkNLRI.setRemoteNodeDescriptorsTLV(remoteNodeDescriptors);
+
+		//2.2. Link NLRI TLVs 
+		//2.2.1. Ipv4 interface and neighbour address
+		IPv4InterfaceAddressLinkDescriptorsSubTLV ipv4InterfaceAddressTLV = new IPv4InterfaceAddressLinkDescriptorsSubTLV();
+		IPv4NeighborAddressLinkDescriptorSubTLV ipv4NeighborAddressTLV = new IPv4NeighborAddressLinkDescriptorSubTLV();
+		ipv4InterfaceAddressTLV.setIpv4Address(addressList.get(0));
+		ipv4NeighborAddressTLV.setIpv4Address(addressList.get(1));
+		linkNLRI.setIpv4InterfaceAddressTLV(ipv4InterfaceAddressTLV);
+		linkNLRI.setIpv4NeighborAddressTLV(ipv4NeighborAddressTLV);
+
+		//2.2.2. Link Local/Remote identifiers TLV
+		if (localRemoteIfList !=  null){
+			LinkLocalRemoteIdentifiersLinkDescriptorSubTLV linkIdentifiersTLV = new LinkLocalRemoteIdentifiersLinkDescriptorSubTLV();
+			linkIdentifiersTLV.setLinkLocalIdentifier(localRemoteIfList.get(0));
+			linkIdentifiersTLV.setLinkRemoteIdentifier(localRemoteIfList.get(1));
+			linkNLRI.setLinkIdentifiersTLV(linkIdentifiersTLV);
+		}
+		
+		//2.2.3 LinkDelay
+		if (te_info != null){
+			if(te_info.getUndirLinkDelay() != null){
+				int undirLinkDelay = te_info.getUndirLinkDelay().getDelay();
+				UndirectionalLinkDelayDescriptorSubTLV uSTLV =new UndirectionalLinkDelayDescriptorSubTLV();
+				uSTLV.setDelay(undirLinkDelay);
+				linkNLRI.setUndirectionalLinkDelayTLV(uSTLV);
+			}
+			if(te_info.getUndirDelayVar() != null){
+				int undirDelayVar = te_info.getUndirDelayVar().getDelayVar();
+				UndirectionalDelayVariationDescriptorSubTLV uSTLV =new UndirectionalDelayVariationDescriptorSubTLV();
+				uSTLV.setDelayVar(undirDelayVar);
+				linkNLRI.setUndirectionalDelayVariationTLV(uSTLV);
+			}
+			if(te_info.getMinMaxUndirLinkDelay() != null){
+				int minDelay = te_info.getMinMaxUndirLinkDelay().getLowDelay();
+				int maxDelay = te_info.getMinMaxUndirLinkDelay().getHighDelay();
+				MinMaxUndirectionalLinkDelayDescriptorSubTLV uSTLV =new MinMaxUndirectionalLinkDelayDescriptorSubTLV();
+				uSTLV.setHighDelay(maxDelay);
+				uSTLV.setLowDelay(minDelay);
+				linkNLRI.setMinMaxUndirectionalLinkDelayTLV(uSTLV);
+			}
+			if(te_info.getUndirLinkLoss() != null){
+				int linkLoss = te_info.getUndirLinkLoss().getLinkLoss();
+				UndirectionalLinkLossDescriptorSubTLV uSTLV =new UndirectionalLinkLossDescriptorSubTLV();
+				uSTLV.setLinkLoss(linkLoss);
+				linkNLRI.setUndirectionalLinkLossTLV(uSTLV);
+			}
+			if(te_info.getUndirResidualBw() != null){
+				int resBw = te_info.getUndirResidualBw().getResidualBw();
+				UndirectionalResidualBandwidthDescriptorSubTLV uSTLV =new UndirectionalResidualBandwidthDescriptorSubTLV();
+				uSTLV.setResidualBw(resBw);
+				linkNLRI.setUndirectionalResidualBwTLV(uSTLV);
+			}
+			if(te_info.getUndirAvailableBw() != null){
+				int availableBw = te_info.getUndirAvailableBw().getAvailableBw();
+				UndirectionalAvailableBandwidthDescriptorSubTLV uSTLV =new UndirectionalAvailableBandwidthDescriptorSubTLV();
+				uSTLV.setAvailableBw(availableBw);
+				linkNLRI.setUndirectionalAvailableBwTLV(uSTLV);
+			}
+			if(te_info.getUndirUtilizedBw() != null){
+				int utilizedBw = te_info.getUndirUtilizedBw().getUtilizedBw();
+				UndirectionalUtilizedBandwidthDescriptorSubTLV uSTLV =new UndirectionalUtilizedBandwidthDescriptorSubTLV();
+				uSTLV.setUtilizedBw(utilizedBw);
+				linkNLRI.setUndirectionalUtilizedBwTLV(uSTLV);
+			}
+			
+		}
+		linkNLRI.setIdentifier(this.identifier);
+		BGP_LS_MP_Reach_Attribute ra= new BGP_LS_MP_Reach_Attribute();
+		ra.setLsNLRI(linkNLRI);
+		
+		pathAttributes.add(ra);		
+		return update;
+	}
+	/**
+	 * Funcion que crea un mensaje OSPF inventado desde cero.
+	 * Solo se meten en el mensaje los campos:
+	 * - source
+	 * - destino
+	 * - maximun bandwithd
+	 * @return OSPFv2 Link State Update Packet
+	 */
+	public static OSPFv2LinkStateUpdatePacket createMsgOSPF(){
+		Inet4Address src = null;
+		Inet4Address dst = null;
+		MaximumBandwidth maximumBandwidth = new MaximumBandwidth();
+		maximumBandwidth.setMaximumBandwidth(100);
+		UnreservedBandwidth unreservedBandwidth = new UnreservedBandwidth();
+		float[] unReservedB = new float[8];
+		unReservedB[0]=18309;
+		unReservedB[1]=130;
+		unreservedBandwidth.setUnreservedBandwidth(unReservedB);
+		try {
+			src = (Inet4Address) Inet4Address.getByName( "179.123.123.123");
+			dst = (Inet4Address) Inet4Address.getByName( "179.123.123.111");
+		} catch (UnknownHostException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+
+		OSPFv2LinkStateUpdatePacket ospfv2Packet = new OSPFv2LinkStateUpdatePacket();
+		ospfv2Packet.setRouterID(src);
+		LinkedList<LSA> lsaList = new LinkedList<LSA>();
+		OSPFTEv2LSA lsa = new OSPFTEv2LSA();
+		LinkTLV linkTLV=new LinkTLV();
+		lsa.setLinkTLV(linkTLV);
+
+		linkTLV.setMaximumBandwidth(maximumBandwidth);
+		linkTLV.setUnreservedBandwidth(unreservedBandwidth);
+		LocalInterfaceIPAddress localInterfaceIPAddress= new LocalInterfaceIPAddress();
+		LinkedList<Inet4Address> lista =localInterfaceIPAddress.getLocalInterfaceIPAddressList();
+		lista.add(src);
+		linkTLV.setLocalInterfaceIPAddress(localInterfaceIPAddress);
+		RemoteInterfaceIPAddress remoteInterfaceIPAddress= new RemoteInterfaceIPAddress();
+		LinkedList<Inet4Address> listar = remoteInterfaceIPAddress.getRemoteInterfaceIPAddressList();
+		listar.add(dst);
+		linkTLV.setRemoteInterfaceIPAddress(remoteInterfaceIPAddress);
+		LinkID linkID = new LinkID();
+		linkID.setLinkID(dst);
+		linkTLV.setLinkID(linkID);
+		//		if (edge.getTE_info().getAvailableLabels() != null){
+		//			linkTLV.setAvailableLabels(edge.getTE_info().getAvailableLabels());			
+		//		}
+		lsaList.add(lsa);
+
+		ospfv2Packet.setLSAlist(lsaList);
+		return ospfv2Packet;
+	}
+
+	//* Funcion que decodifica un mensaje OSPFv2LinkStateUpdatePacket creando con los campos extraidos un mensaje BGP4 update.
+	public BGP4Update decodificarMsgOSPF(OSPFv2LinkStateUpdatePacket ospfv2Packet){
+		boolean intradomain = true;
+		Inet4Address localIPAddress = ospfv2Packet.getRouterID();
+		Inet4Address remoteIPAddress = null;
+		long localInterfaceIPAddress = -1;
+		long remoteInterfaceIPAddress = -1;
+		Inet4Address remoteASNumber = null;
+		LinkedList<LSA> lsaList;
+		OSPFTEv2LSA lsa;
+		//GMPLS Parameter
+		AvailableLabels al = null;
+		//MPLS Parameter
+		float maxBandwidth = 0;
+		float[] unBandwidth = null;
+		float maximumReservableBandwidth=0;
+
+		lsaList = ((OSPFv2LinkStateUpdatePacket)ospfv2Packet).getLSAlist();
+		for (int i =0;i< lsaList.size();i++){
+			if (lsaList.get(i).getLStype() == LSATypes.TYPE_10_OPAQUE_LSA){
+				lsa=(OSPFTEv2LSA)lsaList.get(i);
+				log.debug("Starting to process LSA");
+
+				LinkTLV linkTLV = lsa.getLinkTLV();
+				if (linkTLV!=null){
+					//Local and Remote interface IP address
+					remoteIPAddress = linkTLV.getLinkID().getLinkID();					
+					log.debug("Remote IP Address: "+remoteIPAddress);	
+					localInterfaceIPAddress = linkTLV.getLinkLocalRemoteIdentifiers().getLinkLocalIdentifier();
+					log.debug("Local Interface: "+localInterfaceIPAddress);
+					remoteInterfaceIPAddress =linkTLV.getLinkLocalRemoteIdentifiers().getLinkRemoteIdentifier();					
+					log.debug("Remote Interface: "+remoteInterfaceIPAddress);
+
+					//MPLS fields
+					if (linkTLV.getMaximumBandwidth() != null)
+						maxBandwidth = linkTLV.getMaximumBandwidth().getMaximumBandwidth();					
+					if (linkTLV.getUnreservedBandwidth() != null)
+						unBandwidth = linkTLV.getUnreservedBandwidth().getUnreservedBandwidth();					
+					if (linkTLV.getMaximumReservableBandwidth()!= null)
+						maximumReservableBandwidth = linkTLV.getMaximumReservableBandwidth().getMaximumReservableBandwidth();
+
+					//GMPLS
+					al = linkTLV.getAvailableLabels(); 
+					//FIXME: Como ver si es inter o intra domain
+					if (linkTLV.getRemoteASNumber() != null)
+						remoteASNumber = linkTLV.getRemoteASNumber().getRemoteASNumber();
+
+				}
+			}
+
+		}
+		//Create the address list
+		ArrayList<Inet4Address> addressList = new ArrayList<Inet4Address>();
+		addressList.add(localIPAddress);
+		addressList.add(remoteIPAddress);
+		//Create the interface list
+		ArrayList<Long> localRemoteIfList = new ArrayList<Long>();
+		localRemoteIfList.add(localInterfaceIPAddress);
+		localRemoteIfList.add(remoteInterfaceIPAddress);
+
+
+		//Create the domain List
+		ArrayList<Inet4Address> domainList = new ArrayList<Inet4Address>(2);
+		//FIXME CHECK IF THIS METHOD IS USED
+		//return createMsgUpdateLinkNLRI(addressList,localRemoteIfList,23,maxBandwidth,unBandwidth,maximumReservableBandwidth,al, 0,0, domainList, intradomain, null);
+		return null;
+	}
+
+	public boolean isSendTopology() {
+		return sendTopology;
+	}
+
+
+	public void setSendTopology(boolean sendTopology) {
+		this.sendTopology = sendTopology;
+	}
+
+	public void setisTest(boolean test) {
+		this.isTest = test;
+	}
+
+	public boolean getisTest() {
+		return this.isTest;
+	}
+
+
+	public BGP4SessionsInformation getBgp4SessionsInformation() {
+		return bgp4SessionsInformation;
+	}
+
+
+	public void setBgp4SessionsInformation(
+			BGP4SessionsInformation bgp4SessionsInformation) {
+		this.bgp4SessionsInformation = bgp4SessionsInformation;
+	}
+
+
+	public void setInstanceId(int instanceId) {
+		this.instanceId = instanceId;
+	}
+
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4DomainTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4DomainTEDB.java
new file mode 100644
index 0000000000000000000000000000000000000000..512467ccf097d7c178aca6083b0ee5c100367e06
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4DomainTEDB.java
@@ -0,0 +1,51 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.tedb;
+
+import java.util.LinkedList;
+import eu.teraflow.tid.tedb.InterDomainEdge;
+import eu.teraflow.tid.tedb.TEDB;
+
+public class BGP4DomainTEDB implements TEDB {
+
+	@Override
+	public void initializeFromFile(String file) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void initializeFromFile(String file, String learnFrom) {
+		
+	}
+
+	@Override
+	public boolean isITtedb() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@Override
+	public String printTopology() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public LinkedList<InterDomainEdge> getInterDomainLinks() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4IntradomainTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4IntradomainTEDB.java
new file mode 100644
index 0000000000000000000000000000000000000000..0f027c6938aa744911936224b7a053c0d69a793f
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/BGP4IntradomainTEDB.java
@@ -0,0 +1,67 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.tedb;
+
+import java.net.Inet4Address;
+import java.util.Hashtable;
+import java.util.LinkedList;
+
+import eu.teraflow.tid.tedb.InterDomainEdge;
+
+public class BGP4IntradomainTEDB implements IntraTEDBS {
+	
+	Hashtable<Inet4Address,BGP4DomainTEDB> tedb;
+	@Override
+	public void initializeFromFile(String file) {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void initializeFromFile(String file, String learnFrom) {
+
+	}
+
+	@Override
+	public boolean isITtedb() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@Override
+	public String printTopology() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public LinkedList<InterDomainEdge> getInterDomainLinks() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+	@Override
+	public void addIntradomainEdge() {
+		// TODO Auto-generated method stub
+		
+	}
+
+	@Override
+	public void addIntradomainNode(Inet4Address domain, Inet4Address node) {
+		BGP4DomainTEDB bgp4TEDB = tedb.get(domain);
+		
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/IntraTEDBS.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/IntraTEDBS.java
new file mode 100644
index 0000000000000000000000000000000000000000..ae4946dd2927ebed32a71953c1023e24c364dac8
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/tedb/IntraTEDBS.java
@@ -0,0 +1,29 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.tedb;
+
+import java.net.Inet4Address;
+import eu.teraflow.tid.tedb.TEDB;
+
+public interface IntraTEDBS extends TEDB {
+
+	
+	//Metodo (annadir enlace intradominio) que le pases un domain id, + cosas que necesites para el intradomain edge.
+	//Las clases que implemente para esta interface ya tengra que ver c�mo hacerlo. Tener una hashtable. 
+	public void addIntradomainEdge();
+	public void addIntradomainNode(Inet4Address domain, Inet4Address node);
+	
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateDispatcher.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateDispatcher.java
new file mode 100644
index 0000000000000000000000000000000000000000..e77612ea6a8c13012d8161367d3dfd7d6bc0e1da
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateDispatcher.java
@@ -0,0 +1,56 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.updateTEDB;
+
+import java.net.Inet4Address;
+import java.util.Hashtable;
+import java.util.concurrent.LinkedBlockingQueue;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import es.tid.bgp.bgp4.messages.BGP4Update;
+import eu.teraflow.tid.bgp4Peer.tedb.IntraTEDBS;
+import eu.teraflow.tid.tedb.DomainTEDB;
+import eu.teraflow.tid.tedb.MultiDomainTEDB;
+import eu.teraflow.tid.tedb.SimpleTEDB;
+import eu.teraflow.tid.tedb.TEDB;
+
+
+/**
+ * This class is in charge of storing the BGP4 update messages in a queue to be processing 
+ * 
+ * @author pac
+ *
+ */
+public class UpdateDispatcher {
+	
+	private Logger log;
+	private LinkedBlockingQueue<BGP4Update> updateList;
+	private UpdateProccesorThread upt;
+
+	
+	public UpdateDispatcher(MultiDomainTEDB multiTedb,Hashtable<String,TEDB> intraTEDBs ){
+		this.updateList=new LinkedBlockingQueue<BGP4Update>();
+		this.upt=new UpdateProccesorThread(updateList, multiTedb,intraTEDBs );		
+		upt.start();
+		log=LoggerFactory.getLogger("BGP4Server");
+	}
+	public void dispatchRequests(BGP4Update updateMessage){
+		updateList.add(updateMessage);
+	}
+
+
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateLink.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateLink.java
new file mode 100644
index 0000000000000000000000000000000000000000..df711c284d75dcc6a1398e6e32750610bce91939
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateLink.java
@@ -0,0 +1,94 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.updateTEDB;
+
+import java.net.Inet4Address;
+import java.util.ArrayList;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import es.tid.bgp.bgp4.update.fields.LinkNLRI;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MaxReservableBandwidthLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MaximumLinkBandwidthLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.UnreservedBandwidthLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.AutonomousSystemNodeDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.NodeDescriptorsSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.NodeDescriptorsSubTLVTypes;
+import es.tid.ospf.ospfv2.lsa.LSA;
+/**
+ * This class is used to control BGP updates (not changing database when is a 'refresh BGP message')
+ * 
+ *  WARNING: we only control when adding new link or when bitmap changes.
+ * @author baam
+ *
+ */
+public class UpdateLink {
+	
+	
+	private MaximumLinkBandwidthLinkAttribTLV maximumLinkBandwidthTLV;
+	private MaxReservableBandwidthLinkAttribTLV maxReservableBandwidthTLV;
+	private UnreservedBandwidthLinkAttribTLV unreservedBandwidthTLV;
+	private LinkNLRI linkNLRI;
+	private Inet4Address localDomainID;
+	private Inet4Address localRouterASBR;
+	private Inet4Address remoteDomainID;
+	private Inet4Address remoteRouterASBR;
+	private byte[] bitmap;
+	private byte[] bitmapReserved;
+	
+	public UpdateLink(Inet4Address remote, Inet4Address local, byte[] bitMap, byte[] bitmapRes) {
+		this.bitmap=new byte[bitMap.length];
+		for(int i=0; i<bitMap.length; i++){
+			this.bitmap[i]=bitMap[i];
+		}
+		if (bitmapRes!=null){
+			this.bitmapReserved=new byte[bitmapRes.length];
+			for(int i=0; i<bitmapRes.length; i++){
+				this.bitmapReserved[i]=bitmapRes[i];
+			}
+		}
+		this.remoteRouterASBR=remote;
+		this.localRouterASBR=local;
+	}
+	
+	public byte[] getBitmap(){
+		return bitmap;
+	}
+	
+	public byte[] getBitmapRserved(){
+		return bitmapReserved;
+	}
+	
+	@Override
+	public boolean equals(Object updateLink){
+		 if (updateLink == null) {
+		        return false;
+		    }
+		 	try {
+			    final UpdateLink other = (UpdateLink) updateLink;
+			    if (!(other.localRouterASBR.equals(this.localRouterASBR)))
+			    	return false;
+			    if (!(other.remoteRouterASBR.equals(this.remoteRouterASBR)))
+			    	return false;
+	 		
+		 	}catch (Exception e){
+		 		return false;
+		 	}
+		return true;
+		
+	}
+	
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateProccesorThread.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateProccesorThread.java
new file mode 100644
index 0000000000000000000000000000000000000000..cedbe3498ddd1534452545f8a10ede59c37d3a71
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdateProccesorThread.java
@@ -0,0 +1,505 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.updateTEDB;
+
+import java.io.IOException;
+import java.net.Inet4Address;
+import java.net.InetAddress;
+import java.net.UnknownHostException;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.TimeUnit;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import es.tid.bgp.bgp4.messages.BGP4Update;
+import es.tid.bgp.bgp4.update.fields.IPv4PrefixNLRI;
+import es.tid.bgp.bgp4.update.fields.ITNodeNLRI;
+import es.tid.bgp.bgp4.update.fields.LinkNLRI;
+import es.tid.bgp.bgp4.update.fields.LinkStateNLRI;
+import es.tid.bgp.bgp4.update.fields.NLRITypes;
+import es.tid.bgp.bgp4.update.fields.NodeNLRI;
+import es.tid.bgp.bgp4.update.fields.PathAttribute;
+import es.tid.bgp.bgp4.update.fields.pathAttributes.AFICodes;
+import es.tid.bgp.bgp4.update.fields.pathAttributes.AS_Path_Attribute;
+import es.tid.bgp.bgp4.update.fields.pathAttributes.AS_Path_Segment;
+import es.tid.bgp.bgp4.update.fields.pathAttributes.BGP_LS_MP_Reach_Attribute;
+import es.tid.bgp.bgp4.update.fields.pathAttributes.LinkStateAttribute;
+import es.tid.bgp.bgp4.update.fields.pathAttributes.MP_Reach_Attribute;
+import es.tid.bgp.bgp4.update.fields.pathAttributes.PathAttributesTypeCode;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.AdministrativeGroupLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.DefaultTEMetricLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IGPFlagBitsPrefixAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IPv4RouterIDLocalNodeLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IPv4RouterIDRemoteNodeLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IS_IS_AreaIdentifierNodeAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.LinkProtectionTypeLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MF_OTPAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MaxReservableBandwidthLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MaximumLinkBandwidthLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MetricLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.NodeFlagBitsNodeAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.NodeNameNodeAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.OSPFForwardingAddressPrefixAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.PrefixMetricPrefixAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.RouteTagPrefixAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.SidLabelNodeAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.TransceiverClassAndAppAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.UnreservedBandwidthLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.MinMaxUndirectionalLinkDelayDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.NodeDescriptorsSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalAvailableBandwidthDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalDelayVariationDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalLinkDelayDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalLinkLossDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalResidualBandwidthDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalUtilizedBandwidthDescriptorSubTLV;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AdministrativeGroup;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.MaximumBandwidth;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.MaximumReservableBandwidth;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.TrafficEngineeringMetric;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.UnreservedBandwidth;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet;
+import eu.teraflow.tid.bgp4Peer.grpc.grpcClient;
+import eu.teraflow.tid.bgp4Peer.json.bgpMarshal;
+import eu.teraflow.tid.bgp4Peer.models.LinkNLRIMsg;
+import eu.teraflow.tid.bgp4Peer.models.NodeNLRIMsg;
+import eu.teraflow.tid.bgp4Peer.models.PathAttributeMsg;
+import eu.teraflow.tid.bgp4Peer.models.UpdateMsg;
+import eu.teraflow.tid.bgp4Peer.models.UpdateMsgList;
+import eu.teraflow.tid.tedb.DomainTEDB;
+import eu.teraflow.tid.tedb.IT_Resources;
+import eu.teraflow.tid.tedb.InterDomainEdge;
+import eu.teraflow.tid.tedb.IntraDomainEdge;
+import eu.teraflow.tid.tedb.MultiDomainTEDB;
+import eu.teraflow.tid.tedb.Node_Info;
+import eu.teraflow.tid.tedb.SSONInformation;
+import eu.teraflow.tid.tedb.SimpleTEDB;
+import eu.teraflow.tid.tedb.TEDB;
+import eu.teraflow.tid.tedb.TE_Information;
+import eu.teraflow.tid.tedb.WSONInformation;
+import io.grpc.ManagedChannel;
+import io.grpc.ManagedChannelBuilder;
+/**
+ * This class process the update messages updating the TEDB.
+ * 
+ *  WARNING: it is suppose to be a SimpleTEDB!!! It is not finished yet.
+ * @author pac
+ *
+ */
+public class UpdateProccesorThread extends Thread {
+	/**
+	 * Parameter to run the class if it is true
+	 */
+	private boolean running;
+	/**
+	 * Queue which stores the BGP4 update messages to be read and process
+	 */
+	private LinkedBlockingQueue<BGP4Update> updateList;
+
+	/** LINK ATTRIBUTE TLVs */
+	MaximumLinkBandwidthLinkAttribTLV maximumLinkBandwidthTLV;
+	MaxReservableBandwidthLinkAttribTLV maxReservableBandwidthTLV;
+	UnreservedBandwidthLinkAttribTLV unreservedBandwidthTLV;
+	AdministrativeGroupLinkAttribTLV administrativeGroupTLV;
+	LinkProtectionTypeLinkAttribTLV linkProtectionTLV;
+	MetricLinkAttribTLV metricTLV;
+	IPv4RouterIDLocalNodeLinkAttribTLV iPv4RouterIDLocalNodeLATLV;
+	IPv4RouterIDRemoteNodeLinkAttribTLV iPv4RouterIDRemoteNodeLATLV;
+	DefaultTEMetricLinkAttribTLV TEMetricTLV;	
+	TransceiverClassAndAppAttribTLV transceiverClassAndAppATLV;
+	MF_OTPAttribTLV mF_OTP_ATLV;
+	int linkDelay;
+	int linkDelayVar;
+	int minDelay;
+	int maxDelay;
+	int linkLoss;
+	int residualBw;
+	int availableBw;
+	int utilizedBw;
+	/** NODE ATTRIBUTE TLVs 
+	 * Ipv4 of local node link attribute TLV also used
+	 * 
+	 * */
+	NodeFlagBitsNodeAttribTLV nodeFlagBitsTLV = new NodeFlagBitsNodeAttribTLV();
+	NodeNameNodeAttribTLV nodeNameTLV = new NodeNameNodeAttribTLV();
+	IS_IS_AreaIdentifierNodeAttribTLV areaIDTLV = new IS_IS_AreaIdentifierNodeAttribTLV();
+	SidLabelNodeAttribTLV sidTLV = new SidLabelNodeAttribTLV();
+
+	/**PREFIX ATTRIBUTE TLVs */
+	IGPFlagBitsPrefixAttribTLV igpFlagBitsTLV = new IGPFlagBitsPrefixAttribTLV();
+	RouteTagPrefixAttribTLV routeTagTLV = new RouteTagPrefixAttribTLV();
+	PrefixMetricPrefixAttribTLV prefixMetricTLV = new PrefixMetricPrefixAttribTLV();
+	OSPFForwardingAddressPrefixAttribTLV OSPFForwardingAddrTLV = new OSPFForwardingAddressPrefixAttribTLV();
+
+	private AvailableLabels availableLabels;
+	/**
+	 * Logger
+	 */
+	private Logger log;
+	/**
+	 * Topology database for interDomain Links which will be updated.
+	 */
+	private MultiDomainTEDB multiTedb;
+	/**
+	 * Topology database for intradomain Links. It owns several domains and.
+	 */
+	private Hashtable<String,TEDB> intraTEDBs;
+
+	private LinkedList<UpdateLink> updateLinks;
+
+	private TE_Information te_info;
+
+
+
+
+	public UpdateProccesorThread(LinkedBlockingQueue<BGP4Update> updateList,
+			MultiDomainTEDB multiTedb ,Hashtable<String,TEDB> intraTEDBs ){
+		log=LoggerFactory.getLogger("BGP4Server");
+		running=true;
+		this.updateList=updateList;
+		this.multiTedb = multiTedb;
+
+		this.intraTEDBs=intraTEDBs;
+		this.availableLabels= new AvailableLabels();
+		this.updateLinks=new LinkedList<UpdateLink>();
+	}
+
+	/**
+	 * Starts processing updates
+	 */
+	public void run(){	
+		
+		BGP4Update updateMsg;
+		UpdateMsgList updateMsgList = new UpdateMsgList();//write nodes and links info to a file
+		bgpMarshal m = new bgpMarshal();//add to json file
+		try {
+			m.bgpMarshaller();
+		} catch (IOException e1) {
+			// TODO Auto-generated catch block
+			e1.printStackTrace();
+		}
+		int j=0; //debug coverage
+		while (running && j<100) {
+			try {
+				clearAttributes();
+				UpdateMsg update = new UpdateMsg();//class to send grpc message
+				PathAttribute att_ls = null;
+				PathAttribute att_mpreach  = null; 
+				PathAttribute att = null;
+				PathAttribute att_path = null;
+				updateMsg= updateList.take();
+				
+				
+				log.info("Update Procesor Thread Reading the message: \n"+ updateMsg.toString());
+				log.info("\n \n");
+				//guille update processor
+				
+				
+				
+				log.debug("END string UPDATE msg");
+				//Andrea To be checked
+				String learntFrom = updateMsg.getLearntFrom();
+				log.info("Received from "+learntFrom);
+				ArrayList<PathAttribute> pathAttributeList = updateMsg.getPathAttributes();
+				ArrayList<PathAttribute> pathAttributeListUtil = new ArrayList<PathAttribute>();			
+				update.setLearntFrom(learntFrom);
+				
+				
+				
+				// buscamos los dos atributos que nos interesan...
+				for (int i=0;i<pathAttributeList.size();i++){
+					att = pathAttributeList.get(i);
+					int typeCode = att.getTypeCode();
+					switch (typeCode){
+					case PathAttributesTypeCode.PATH_ATTRIBUTE_TYPECODE_BGP_LS_ATTRIBUTE:
+						att_ls = att;
+						break;
+					case PathAttributesTypeCode.PATH_ATTRIBUTE_TYPECODE_MP_REACH_NLRI:
+						att_mpreach = att;
+						break;
+					case PathAttributesTypeCode.PATH_ATTRIBUTE_TYPECODE_ASPATH:
+						//log.info("We don't use ASPATH");
+						att_path=att;
+						break;	
+					case PathAttributesTypeCode.PATH_ATTRIBUTE_TYPECODE_ORIGIN:
+						//log.info("We don't use ORIGIN");
+						break;	
+					default:
+						//log.info("Attribute typecode " + typeCode +"unknown");
+						break;
+					}
+
+				}	
+				
+				//guille
+				
+				log.info("NLRI type: ");	
+				String currentName=null;
+				
+				if(att_ls!=null)
+					pathAttributeListUtil.add(att_ls);
+				if(att_mpreach!=null)
+					pathAttributeListUtil.add(att_mpreach);
+				if(att_path!=null) {
+					//More than 1 as_path segment??
+					List<AS_Path_Segment> as_path_segments= ((AS_Path_Attribute)att_path).getAsPathSegments();
+					AS_Path_Segment as_path_segment;
+					int as_path=0;
+					if(as_path_segments.size()>0){
+						as_path_segment=as_path_segments.get(0);
+						int numberOfSeg=as_path_segment.getNumberOfSegments();
+						as_path=as_path_segment.getSegments()[0];
+					}
+					update.setAsPathSegment(as_path);
+				}
+
+				if (pathAttributeListUtil != null){
+					for (int i=0;i<pathAttributeListUtil.size();i++){
+						att = pathAttributeListUtil.get(i);
+						int typeCode = att.getTypeCode();
+						switch (typeCode){	
+						// cuando encontramos el link state attribute rellenamos las tlvs que nos llegan para luego
+						// meterlas en la te_info o en la node_info
+						case PathAttributesTypeCode.PATH_ATTRIBUTE_TYPECODE_BGP_LS_ATTRIBUTE:
+							processAttributeLinkState((LinkStateAttribute) att);
+							PathAttributeMsg pathAtt = new PathAttributeMsg((LinkStateAttribute)att);
+							log.info("Path attributes: " + pathAtt.toString());
+							//get node name for current update so then its possible to substitute for the nodeID 
+							currentName=pathAtt.getNodeName();
+							updateMsgList.addpathToJson(pathAtt);
+							continue;
+							// cuando procesamos el mp_reach distinguimos entre nodo y link...
+							// prefijo aun por hacer
+						case PathAttributesTypeCode.PATH_ATTRIBUTE_TYPECODE_MP_REACH_NLRI:
+							int afi;
+							afi = ((MP_Reach_Attribute)att).getAddressFamilyIdentifier();
+							update.setAFI(afi);//set afi for grpc msg
+							InetAddress nextHop=((MP_Reach_Attribute)att).getNextHop();
+							update.setNextHop(nextHop);//set for grpc msg
+							if (afi == AFICodes.AFI_BGP_LS){
+								LinkStateNLRI nlri = (LinkStateNLRI) ((BGP_LS_MP_Reach_Attribute)att).getLsNLRI();
+								int nlriType =  nlri.getNLRIType();
+								
+								switch (nlriType){
+								case NLRITypes.Link_NLRI:
+									// if(((BGP_LS_MP_Reach_Attribute)att).getLsNLRIList().size()<1){
+									// 	log.info("Link_NLRI");
+									// 	LinkNLRIMsg LnlriMsg = new LinkNLRIMsg((LinkNLRI)nlri,learntFrom);
+									// 	log.info("Link info: " + LnlriMsg.toString());
+									// 	updateMsgList.addLinkToJson(LnlriMsg);
+									// 	update.setLink(LnlriMsg);//set for grpc msg , to be deprecated
+									// 	update.addLink(LnlriMsg);//set for grpc msg
+									// }else{
+										for(LinkStateNLRI linkstateNLRI : (List<LinkStateNLRI>) ((BGP_LS_MP_Reach_Attribute)att).getLsNLRIList()){
+											log.info("Link_NLRI");
+											LinkNLRIMsg LnlriMsg = new LinkNLRIMsg((LinkNLRI)linkstateNLRI,learntFrom);
+											log.info("Link info: " + LnlriMsg.toString());
+											updateMsgList.addLinkToJson(LnlriMsg);
+											update.addLink(LnlriMsg);//set for grpc msg
+										}
+									// }
+									continue;
+								case NLRITypes.Node_NLRI:
+									// NodeNLRIMsg NnlriMsg = new NodeNLRIMsg((NodeNLRI)nlri,learntFrom,currentName);
+									// log.info("Node_NLRI");
+									// log.info("Node info: " + NnlriMsg.toString());
+									// updateMsgList.addNodeToJson(NnlriMsg,currentName);
+									// update.setNode(NnlriMsg);//set for grpc msg
+									// currentName=null;
+									for(LinkStateNLRI linkstateNLRI : (List<LinkStateNLRI>) ((BGP_LS_MP_Reach_Attribute)att).getLsNLRIList()){
+										log.info("Node_NLRI");
+										NodeNLRIMsg NnlriMsg = new NodeNLRIMsg((NodeNLRI)linkstateNLRI,learntFrom,currentName);
+										log.info("Node info: " + NnlriMsg.toString());
+										updateMsgList.addNodeToJson(NnlriMsg,currentName);
+										update.addNode(NnlriMsg);//set for grpc msg
+									}
+									currentName=null;
+									continue;
+								case NLRITypes.Prefix_v4_NLRI://POR HACER...
+									log.info("Prefix_v4_NLRI");
+									continue;
+								case NLRITypes.IT_Node_NLRI:
+									log.info("IT_Node_NLRI");
+									continue;
+								default:
+									log.debug("Attribute Code unknown");
+								}
+								
+							}
+							continue;
+						default:
+							log.debug("Attribute Code unknown");
+						}
+						
+						
+						
+					}//fin for
+					try {m.writeFile(updateMsgList);} catch (IOException e) {e.printStackTrace();}
+				}
+				
+				//
+				
+				
+				log.warn("\n");
+//				System.out.println(update.toString());
+				//cambiar clase?
+				log.info("--->Sending to grpc manager");
+				try {
+					grpcClient.sendGrpcUpdateMsg(update);
+				} catch (Exception e) {
+					// TODO Auto-generated catch block
+					e.printStackTrace();
+				}
+				//fin guille
+				
+				
+				
+			} catch (InterruptedException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			j++;
+		}//fin while
+		// try {
+		// 	channel.shutdown().awaitTermination(5, TimeUnit.SECONDS);
+		// } catch (InterruptedException e) {
+		// 	// TODO Auto-generated catch block
+		// 	e.printStackTrace();
+		// }
+		System.exit(0);
+	}
+
+
+	
+	/**
+	 * Function which process the attribute link State. It updates the fields passed by argument. 
+	 */
+	private void processAttributeLinkState(LinkStateAttribute lsAtt){
+
+		if (lsAtt.getMaximumLinkBandwidthTLV() != null){
+			maximumLinkBandwidthTLV = lsAtt.getMaximumLinkBandwidthTLV();
+		}
+
+		if (lsAtt.getMaxReservableBandwidthTLV() != null){
+			maxReservableBandwidthTLV = lsAtt.getMaxReservableBandwidthTLV();
+		}
+		if (lsAtt.getUnreservedBandwidthTLV() != null){
+			unreservedBandwidthTLV = lsAtt.getUnreservedBandwidthTLV();
+		}
+		if(lsAtt.getAdministrativeGroupTLV() != null){
+			administrativeGroupTLV = lsAtt.getAdministrativeGroupTLV();
+		}
+		if(lsAtt.getLinkProtectionTLV() != null){
+			linkProtectionTLV = lsAtt.getLinkProtectionTLV();
+		}
+		if(lsAtt.getIPv4RouterIDLocalNodeLATLV()!= null){
+			iPv4RouterIDLocalNodeLATLV = lsAtt.getIPv4RouterIDLocalNodeLATLV();
+		}
+		if(lsAtt.getIPv4RouterIDRemoteNodeLATLV()!=null){
+			iPv4RouterIDRemoteNodeLATLV = lsAtt.getIPv4RouterIDRemoteNodeLATLV();
+		}
+		if(lsAtt.getMetricTLV() != null){
+			metricTLV = lsAtt.getMetricTLV();
+		}
+		if(lsAtt.getTEMetricTLV()!=null){
+			TEMetricTLV = lsAtt.getTEMetricTLV();
+		}
+		if(lsAtt.getNodeFlagBitsTLV()!= null){
+			nodeFlagBitsTLV = lsAtt.getNodeFlagBitsTLV();
+		}
+		if(lsAtt.getNodeNameTLV() != null){
+			nodeNameTLV = lsAtt.getNodeNameTLV();
+		}
+		if(lsAtt.getAreaIDTLV() != null){
+			areaIDTLV = lsAtt.getAreaIDTLV();
+		}
+		if(lsAtt.getIgpFlagBitsTLV() != null){
+			igpFlagBitsTLV= lsAtt.getIgpFlagBitsTLV();
+		}
+		if(lsAtt.getRouteTagTLV() != null){
+			routeTagTLV = lsAtt.getRouteTagTLV();
+		}
+		if(lsAtt.getOSPFForwardingAddrTLV() != null){
+			OSPFForwardingAddrTLV = lsAtt.getOSPFForwardingAddrTLV();
+		}
+		if(lsAtt.getSidLabelTLV()!=null){
+			sidTLV = lsAtt.getSidLabelTLV();
+		}
+
+		if (lsAtt.getAvailableLabels() != null){
+			this.availableLabels =lsAtt.getAvailableLabels();
+		}
+		if (lsAtt.getMF_OTP_ATLV() != null){
+			this.mF_OTP_ATLV =lsAtt.getMF_OTP_ATLV();
+		}
+
+		if (lsAtt.getTransceiverClassAndAppATLV() != null){
+			this.transceiverClassAndAppATLV =lsAtt.getTransceiverClassAndAppATLV();
+		}
+
+	}
+	/**
+	 * Function which process the link NLRI. It updates the fields passed by argument.
+	 * @param linkNLRI
+	 * @param maximumLinkBandwidthTLV
+	 * @param maxReservableBandwidthTLV
+	 * @param unreservedBandwidthTLV
+	 * @param availableLabels
+	 */
+
+
+	/** Procesar un link significa:
+	 * crear los vertices si no existen ya
+	 * crear la edge si no existe ya
+	 * crear la te_info o actualizarla
+	 * @param linkNLRI
+	 * @param learntFrom 
+	 */
+
+	
+
+	private void clearAttributes(){
+		maximumLinkBandwidthTLV= null;
+		maxReservableBandwidthTLV= null;
+		unreservedBandwidthTLV= null;
+		administrativeGroupTLV = null;
+		linkProtectionTLV =null;
+		metricTLV = null;
+		iPv4RouterIDLocalNodeLATLV = null;
+		iPv4RouterIDRemoteNodeLATLV = null;
+		TEMetricTLV = null;				
+		transceiverClassAndAppATLV = null;
+		mF_OTP_ATLV = null;
+		availableLabels=null;
+		linkDelay=0;
+		linkDelayVar=0;
+		minDelay=0;
+		maxDelay=0;
+		linkLoss=0;
+		residualBw=0;
+		availableBw=0;
+		utilizedBw=0;
+
+	}
+
+
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdaterThreadRedisTED.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdaterThreadRedisTED.java
new file mode 100644
index 0000000000000000000000000000000000000000..229fbe1de8b9805fa5c18c0dd10f5e1f1fd1a94a
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/bgp4Peer/updateTEDB/UpdaterThreadRedisTED.java
@@ -0,0 +1,77 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.bgp4Peer.updateTEDB;
+
+import java.util.LinkedList;
+import java.util.concurrent.LinkedBlockingQueue;
+
+import redis.clients.jedis.Jedis;
+import es.tid.ospf.ospfv2.OSPFv2LinkStateUpdatePacket;
+import es.tid.ospf.ospfv2.lsa.LSA;
+import es.tid.ospf.ospfv2.lsa.LSATypes;
+import es.tid.ospf.ospfv2.lsa.OSPFTEv2LSA;
+import eu.teraflow.tid.tedb.DatabaseControlSimplifiedLSA;
+
+public class UpdaterThreadRedisTED extends Thread{
+	//FIXME: Configure from file
+	private Jedis jedis;
+	private String host="localhost";
+	
+	private int port=6379;
+	
+	private LinkedBlockingQueue<OSPFv2LinkStateUpdatePacket> redisOspfv2PacketQueue;
+	
+	public UpdaterThreadRedisTED(LinkedBlockingQueue<OSPFv2LinkStateUpdatePacket> redisOspfv2PacketQueue) {
+		// TODO Auto-generated constructor stub
+				
+		this.redisOspfv2PacketQueue = redisOspfv2PacketQueue;
+		jedis = new Jedis(host,port);
+	    
+		
+		
+	}
+
+	public void run() {
+
+		LinkedList<LSA> lsaList;
+		OSPFTEv2LSA lsa;
+		OSPFv2LinkStateUpdatePacket ospfv2Packet;
+		jedis.connect();
+		//FIXE: Add disconnect
+		while(true){
+			try {
+				
+				ospfv2Packet = redisOspfv2PacketQueue.take();
+				lsaList = ((OSPFv2LinkStateUpdatePacket)ospfv2Packet).getLSAlist();
+				for (int i =0;i< lsaList.size();i++){
+					if (lsaList.get(i).getLStype() == LSATypes.TYPE_10_OPAQUE_LSA){
+						lsa=(OSPFTEv2LSA)lsaList.get(i);
+						DatabaseControlSimplifiedLSA dcsl = new DatabaseControlSimplifiedLSA();
+						dcsl.fillSimplifiedLsa(lsa);
+						String jsonLSA = dcsl.logJsonSimplifiedLSA();
+						//RedisDatabaseHandler rdh = new RedisDatabaseHandler();
+						String key="LSA:"+dcsl.getAdvertisingRouter().getHostAddress()+":"+dcsl.getLinkId().getHostAddress();
+						 String ret = jedis.set(key, jsonLSA);
+						 jedis.sadd("TEDB",key);
+					}
+				}
+			} catch (InterruptedException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+		}
+	}
+	
+}
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DatabaseControlSimplifiedLSA.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DatabaseControlSimplifiedLSA.java
new file mode 100644
index 0000000000000000000000000000000000000000..e56e45cf50fb201a555d70624599d8bed5e988ac
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DatabaseControlSimplifiedLSA.java
@@ -0,0 +1,174 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import java.net.Inet4Address;
+
+import com.google.gson.Gson;
+
+import es.tid.ospf.ospfv2.lsa.OSPFTEv2LSA;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet;
+
+/**
+ * 
+ * Class for simplified database write of LSAs
+ * 
+ * @author Fernando Mu�oz del Nuevo
+ * 
+ * 
+ *
+ */
+
+public class DatabaseControlSimplifiedLSA {
+
+	public Inet4Address advertisingRouter; 
+	
+	public Inet4Address linkId; 
+	
+	public long linkLocalIdentifier; 
+	
+	public long linkRemoteIdentifier; 
+	
+	public String bitmapLabelSet;
+	
+	public float maximumBandwidth; 
+	
+	public float unreservedBandwidth; 
+	
+	public float maximumReservableBandwidth;
+	
+	//protected LinkedList<Inet4Address> labelSet;
+	
+	public Inet4Address getAdvertisingRouter() {
+		return advertisingRouter;
+	}
+
+	public void setAdvertisingRouter(Inet4Address advertisingRouter) {
+		this.advertisingRouter = advertisingRouter;
+	}
+
+	public Inet4Address getLinkId() {
+		return linkId;
+	}
+
+	public void setLinkId(Inet4Address linkId) {
+		this.linkId = linkId;
+	}
+
+	public long getLinkLocalIdentifier() {
+		return linkLocalIdentifier;
+	}
+
+	public void setLinkLocalIdentifier(long linkLocalIdentifier) {
+		this.linkLocalIdentifier = linkLocalIdentifier;
+	}
+
+	public long getLinkRemoteIdentifier() {
+		return linkRemoteIdentifier;
+	}
+
+	public void setLinkRemoteIdentifier(long linkRemoteIdentifier) {
+		this.linkRemoteIdentifier = linkRemoteIdentifier;
+	}
+
+	public String getBitmapLabelSet() {
+		return bitmapLabelSet;
+	}
+
+	public void setBitmapLabelSet(String bitmapLabelSet) {
+		this.bitmapLabelSet = bitmapLabelSet;
+	}
+	
+	public float getMaximumBandwidth() {
+		return maximumBandwidth;
+	}
+
+	public void setMaximumBandwidth(float maximumBandwidth) {
+		this.maximumBandwidth = maximumBandwidth;
+	}
+
+	public float getUnreservedBandwidth() {
+		return unreservedBandwidth;
+	}
+
+	public void setUnreservedBandwidth(float unreservedBandwidth) {
+		this.unreservedBandwidth = unreservedBandwidth;
+	}
+	
+	public float getMaximumReservableBandwidth() {
+		return maximumReservableBandwidth;
+	}
+
+	public void setMaximumReservableBandwidth(float maximumReservableBandwidth) {
+		this.maximumReservableBandwidth = maximumReservableBandwidth;
+	}
+
+	public void fillBitmap(AvailableLabels availableLabels){
+		
+		int num_wavelength = 0;
+			
+
+		bitmapLabelSet = "";
+		
+		while(num_wavelength < availableLabels.getLabelSet().getNumLabels()){
+			
+			int num_byte=num_wavelength/8;
+			boolean isFree = ((((BitmapLabelSet)availableLabels.getLabelSet()).getBytesBitMap()[num_byte]&(0x80>>>(num_wavelength%8)))==0);
+			
+			if(isFree){
+				bitmapLabelSet = bitmapLabelSet + "0";				
+			}else{
+				bitmapLabelSet = bitmapLabelSet + "1";
+			}
+			
+			num_wavelength++;
+		}	
+	}
+	
+	public void fillSimplifiedLsa(OSPFTEv2LSA lsa){
+		if (lsa.getAdvertisingRouter()!=null)
+			this.setAdvertisingRouter(lsa.getAdvertisingRouter());
+		if (lsa.getLinkTLV().getLinkID().getLinkID()!=null)
+			this.setLinkId(lsa.getLinkTLV().getLinkID().getLinkID());
+		if (lsa.getLinkTLV().getLinkLocalRemoteIdentifiers()!=null){
+			this.setLinkLocalIdentifier(lsa.getLinkTLV().getLinkLocalRemoteIdentifiers().getLinkLocalIdentifier());
+			this.setLinkRemoteIdentifier(lsa.getLinkTLV().getLinkLocalRemoteIdentifiers().getLinkRemoteIdentifier());
+		}
+		if (lsa.getLinkTLV().getMaximumBandwidth()!=null)
+			this.setMaximumBandwidth(lsa.getLinkTLV().getMaximumBandwidth().getMaximumBandwidth());
+		if (lsa.getLinkTLV().getUnreservedBandwidth()!=null){
+			this.setMaximumBandwidth(lsa.getLinkTLV().getUnreservedBandwidth().unreservedBandwidth[0]);
+		} if (lsa.getLinkTLV().getMaximumReservableBandwidth()!=null){
+			this.setMaximumReservableBandwidth(lsa.getLinkTLV().getMaximumReservableBandwidth().maximumReservableBandwidth);
+		}
+		
+		if (lsa.getLinkTLV().getAvailableLabels()!=null){
+			this.fillBitmap(lsa.getLinkTLV().getAvailableLabels());
+		}
+	}
+	
+	
+	public String logJsonSimplifiedLSA(){
+		
+		Gson gson = new Gson();
+   	 	String json = gson.toJson(this);
+   	 	
+   	 	
+   	 	return json;
+   	 	
+   	 	//IPInterfaceTrafficRequest iitr2 = gson.fromJson(json, DatabaseControlSimplifiedLSA.class);
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DomainTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DomainTEDB.java
new file mode 100644
index 0000000000000000000000000000000000000000..85ecd8fd3cf59a271504b92e224c17ea92b1a560
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/DomainTEDB.java
@@ -0,0 +1,85 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import java.net.Inet4Address;
+import java.util.Hashtable;
+import java.util.LinkedList;
+import java.util.Set;
+
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet;
+
+
+public interface DomainTEDB extends TEDB {
+	
+	public Inet4Address getDomainID();
+	 
+	
+	public boolean belongsToDomain(Object addr);
+
+	//public Object getDomainId();
+	public ReachabilityEntry getReachabilityEntry();
+
+	//public byte[]  getDomainReachabilityIPv4Prefix();
+
+	public LinkedList<InterDomainEdge> getInterDomainLinks();
+	public Set<IntraDomainEdge> getIntraDomainLinks();
+	public String printInterDomainLinks();
+
+	public boolean containsVertex(Object vertex);
+	public WSONInformation getWSONinfo();
+	public void setWSONinfo(WSONInformation wSONinfo);
+	public SSONInformation getSSONinfo(); 
+	public void setSSONinfo(SSONInformation sSONinfo);
+	public void notifyWavelengthReservation(LinkedList<Object> sourceVertexList, LinkedList<Object> targetVertexList, int wavelength, boolean bidirectional);
+	public void notifyWavelengthReservationSSON (LinkedList<Object> sourceVertexList, LinkedList<Object> targetVertexList, int wavelength, boolean bidirectional, int m);
+	public void notifyWavelengthEndReservation(LinkedList<Object> sourceVertexList, LinkedList<Object> targetVertexList, int wavelength, boolean bidirectional);
+	public void notifyWavelengthChange(Object localInterfaceIPAddress,Object remoteInterfaceIPAddress,BitmapLabelSet previousBitmapLabelSet,BitmapLabelSet newBitmapLabelSet );
+	public void notifyNewEdgeIP(Object source, Object destination, TE_Information informationTEDB);
+	public void register(TEDListener compAlgPreComp);
+	public void registerSSON(SSONListener compAlgPreComp);
+	
+	public void notifyNewVertex(Object vertex);
+	
+	public void notifyNewEdge (Object source, Object destination);
+	
+	public void clearAllReservations();
+
+	public void notifyWavelengthEndReservationSSON(
+			LinkedList<Object> sourceVertexList,
+			LinkedList<Object> targetVertexList, int wavelength,
+			boolean bidirectional, int m);
+	public void notifyWavelengthReservationWLAN(
+			LinkedList<Object> sourceVertexList,
+			LinkedList<Object> targetVertexList, LinkedList<Integer> wlans,
+			boolean bidirectional);
+
+
+	public void createGraph();
+
+
+	public Set<Object> getIntraDomainLinksvertexSet();
+
+
+	public Hashtable<Object, Node_Info> getNodeTable();
+
+	public IT_Resources getItResources();
+	public void setItResources(IT_Resources itResources);
+	
+
+
+	
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/EdgeUtils.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/EdgeUtils.java
new file mode 100644
index 0000000000000000000000000000000000000000..e2fafa2385ae77500aeb3d6ed0c892d96708e4f6
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/EdgeUtils.java
@@ -0,0 +1,34 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import java.net.Inet4Address;
+
+import es.tid.of.DataPathID;
+
+public class EdgeUtils {
+	
+	public static Object getEdge(String edge){
+		Object router_id_addr;
+		try { //Router_type: IPv4
+			router_id_addr = (Inet4Address) Inet4Address.getByName(edge);
+		} catch (Exception e) { //Router_type: DatapathID
+			router_id_addr =  (DataPathID) DataPathID.getByName(edge);
+			//FIXME: See what to do if it is not IPv4 or DatapahID
+		}
+		return router_id_addr;
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/FileTEDBUpdater.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/FileTEDBUpdater.java
new file mode 100644
index 0000000000000000000000000000000000000000..ce5652267a4344155263a83b04f419161656b1a9
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/FileTEDBUpdater.java
@@ -0,0 +1,3585 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.DefaultTEMetricLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.*;
+import es.tid.of.DataPathID;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.MaximumBandwidth;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.UnreservedBandwidth;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet;
+
+import es.tid.rsvp.constructs.gmpls.DWDMWavelengthLabel;
+import es.tid.rsvp.objects.subobjects.IPv4prefixEROSubobject;
+import org.jgrapht.graph.DirectedWeightedMultigraph;
+import org.jgrapht.graph.SimpleDirectedWeightedGraph;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.*;
+import org.w3c.dom.CharacterData;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import java.io.File;
+import java.net.Inet4Address;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.LinkedList;
+
+
+/**
+ * Convenience class to read Traffic Engineering Databases from XML files.
+ * 
+ * @author ogondio
+ *
+ */
+public class FileTEDBUpdater {
+
+
+	/**
+	 * Read a full network (no specific layer)
+	 * @param fileName Name of the XML file
+	 * @return Graph of the Network
+	 */
+	public static SimpleDirectedWeightedGraph<Object, IntraDomainEdge> readNetwork(String fileName){
+		return FileTEDBUpdater.readNetwork(fileName,null,false,0,Integer.MAX_VALUE);
+	}
+
+	/**
+	 * Reads a specific layer from a Network XML file
+	 * @param fileName Name of the XML file
+	 * @param layer Layer
+	 * @return Graph of the network
+	 */
+	public static SimpleDirectedWeightedGraph<Object, IntraDomainEdge> readNetwork(String fileName,String layer){
+		return FileTEDBUpdater.readNetwork(fileName,layer,false,0,Integer.MAX_VALUE, false);
+	}
+	/**
+	 * Reads a specific layer from a Network XML file
+	 * It can treat all domains as a single domain
+	 * @param fileName Name of the XML file
+	 * @param layer Layer 
+	 * @param allDomains if all domains are read or not 
+	 * @return Graph of the network
+	 */
+	public static SimpleDirectedWeightedGraph<Object, IntraDomainEdge> readNetwork(String fileName,String layer,boolean allDomains){
+		return FileTEDBUpdater.readNetwork(fileName,layer,allDomains,0,Integer.MAX_VALUE, false);
+	}
+	/**
+	 * Reads a specific layer from a Network XML file
+	 * It can treat all domains as a single domain
+	 * @param fileName Name of the XML file
+	 * @param layer Layer
+	 * @param allDomains if all domains are read or not 
+	 * @param lambdaIni first lambda (n)
+	 * @param lambdaEnd last lamnda (n)
+	 * @return Graph of the network
+	 */
+
+	public static SimpleDirectedWeightedGraph<Object, IntraDomainEdge> readNetwork(String fileName, String layer,boolean allDomains,int lambdaIni, int lambdaEnd) {
+		return FileTEDBUpdater.readNetwork(fileName,layer,allDomains,0,Integer.MAX_VALUE, false);
+	}
+
+
+	/**
+	 * Reads a specific layer from a Network XML file. 
+	 * It can treat all domains as a single domain.
+	 * 
+	 * @param fileName Name of the XML file 
+	 * @param layer Layer
+	 * @param allDomains if all domains are read or not 
+	 * @param lambdaIni first lambda (n)
+	 * @param lambdaEnd last lamnda (n)
+	 * @param isSSONnetwork If the network supports Flexi Grid	
+	 * @return Graph of the network.
+	 */
+	public static SimpleDirectedWeightedGraph<Object, IntraDomainEdge> readNetwork(String fileName, String layer,boolean allDomains,int lambdaIni, int lambdaEnd, boolean isSSONnetwork) {
+		Logger log = LoggerFactory.getLogger("BGP4Peer");
+		Object router_id_addr = null;
+		Object s_router_id_addr = null;
+		Object d_router_id_addr = null;
+		Object src_Numif_id = null;
+		Object dst_Numif_id = null;
+
+
+		//First, create the graph
+		SimpleDirectedWeightedGraph<Object, IntraDomainEdge> graph = new SimpleDirectedWeightedGraph<Object, IntraDomainEdge>(IntraDomainEdge.class);
+
+		log.debug("1. SimpleDirectedWeightedGraph");
+
+		File file = new File(fileName);
+		try {
+			String domain_id = "";
+			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			Document doc = builder.parse(file);			
+			HashMap<Inet4Address, Integer >SIDS = new HashMap<Inet4Address,Integer>();
+			HashMap<DataPathID, Integer >SIDSDP = new HashMap<DataPathID,Integer>();
+
+			NodeList nodes_domains = doc.getElementsByTagName("domain");
+			if (layer!=null){
+				log.debug("Reading topology, looking for layer "+ layer);
+			}
+
+
+			//First pass to get all the nodes
+			//If we need to read all the domains
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				boolean readNetwork=false;
+				Element element1 = (Element) nodes_domains.item(j);
+
+				if (layer!=null){				
+					NodeList domain_layer = element1.getElementsByTagName("layer");					
+					if (domain_layer.getLength()==1){						
+						Element layer_type = (Element) domain_layer.item(0);
+						log.debug("Layer: " + layer_type.getAttributeNode("type").getValue());
+						log.debug("Reading network topology");
+						if (layer_type.getAttributeNode("type").getValue().equals(layer)){
+							readNetwork = true;
+
+						}
+						if (layer.equals("interlayer")){
+							readNetwork = true;
+						}
+					}															
+				}else {
+					readNetwork=true;
+				}
+				if (readNetwork){
+					Element element_domain = (Element) nodes_domains.item(j);
+					NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id");
+					for (int k = 0; k < nodes_domain_id.getLength(); k++) {
+						Element domain_id_e = (Element) nodes_domain_id.item(0);
+						domain_id = getCharacterDataFromElement(domain_id_e);
+						log.debug("Loading nodes for domain: " + domain_id);
+						log.info("Loading topology from domain " + domain_id);
+					}
+
+					NodeList nodes = element1.getElementsByTagName("node");
+					for (int i = 0; i < nodes.getLength(); i++) {
+						Element element = (Element) nodes.item(i);
+						NodeList router_id_node = element.getElementsByTagName("router_id");
+						Element router_id_e = (Element) router_id_node.item(0);
+						String router_id = getCharacterDataFromElement(router_id_e);
+
+						log.info("Adding node " + router_id);
+						router_id_addr = EdgeUtils.getEdge(router_id);
+						graph.addVertex(router_id_addr);
+
+						log.debug("About to look for SID");
+						NodeList SID_aux = element.getElementsByTagName("sid");
+						Element SID_e = (Element) SID_aux.item(0);
+						if (SID_e!=null)
+						{ 
+							log.debug("SID exist");
+							int SID = Integer.parseInt(getCharacterDataFromElement(SID_e));
+
+							try { //Router_type: DatapathID
+								SIDS.put((Inet4Address) router_id_addr,SID);
+								log.debug("SID of node Inet4Address: "+SID);
+							} catch (Exception e) { //Router_type: DatapathID
+								SIDSDP.put((DataPathID)router_id_addr, SID);
+								log.debug("SID of node DataPathID: "+SID);
+							}
+						}
+						else
+						{
+							log.debug("SID not found");
+						}
+
+					}
+				}
+			}	
+
+
+			//Next pass to get all the links
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+
+				boolean readNetwork=false;
+				Element element1 = (Element) nodes_domains.item(j);
+
+				if (layer!=null){				
+					NodeList domain_layer = element1.getElementsByTagName("layer");					
+					if (domain_layer.getLength()==1){						
+						Element layer_type = (Element) domain_layer.item(0);
+						log.debug("Layer: " + layer_type.getAttributeNode("type").getValue());
+						log.debug("Reading Topology");
+						if (layer_type.getAttributeNode("type").getValue().equals(layer)){
+							readNetwork = true;
+						}	
+					}															
+				}else {
+					readNetwork=true;
+				}
+				log.debug("Read network = "+readNetwork);
+				if (readNetwork){
+					Element element_domain = (Element) nodes_domains.item(j);
+					NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id");
+
+					for (int k = 0; k < nodes_domain_id.getLength(); k++) {
+						Element domain_id_e = (Element) nodes_domain_id.item(0);
+						domain_id = getCharacterDataFromElement(domain_id_e);
+						log.debug("Looking for links in domain: " + domain_id);
+					}
+					int numLabels=0;
+
+					Boolean commonBitmapLabelSet = false;
+					NodeList edgeCommon = doc.getElementsByTagName("edgeCommon");
+					int grid=0;
+					int cs=0;
+					int n=0;
+					for (int i = 0; i < edgeCommon.getLength(); i++) {
+
+						Element edgeCommonElement = (Element) edgeCommon.item(i);
+						NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels");
+						for (int k = 0; k < availableLabels_node.getLength(); k++) {
+
+							Element availableLabels_e = (Element) availableLabels_node.item(k);
+							NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField");
+							Element labelSetField_el = (Element) labelSetField_node.item(0);
+							if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet
+								//Crear un BitMapSet
+
+								NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels");
+
+								Element numbLabels_e = (Element) numbLabels_node.item(0);
+								String numbLabels_s = getCharacterDataFromElement(numbLabels_e);						
+								numLabels=Integer.parseInt(numbLabels_s);	
+
+								NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel");
+								Element baseLabel_e = (Element) baseLabel_node.item(0);
+
+								float min_frequency;
+
+								grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue());
+
+								cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue());
+								boolean n_frequency_included=false;
+								if (baseLabel_e.getAttributeNode("n") != null ){
+									n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue());
+									n_frequency_included = true;
+								}
+								else if (baseLabel_e.getAttributeNode("min_frequency") != null){
+									String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue();
+
+									min_frequency=Float.parseFloat(s_min_frequency);	
+									n = ((int)min_frequency - 1471)/20;
+									n_frequency_included=true;
+								}
+								if (n_frequency_included){
+									commonBitmapLabelSet = true;
+								}else{
+									log.error("ERROR reading the xml file of the topology, you should enter <baseLabel grid=\"1\" cs=\"2\" n=\"-11\"></baseLabel> ");
+								}
+
+							}
+						}
+
+					}
+					/*if(isSSONnetwork ==true){
+						if(cs==4){
+							numLabels=numLabels*4;
+						}
+						else if (cs==5){
+							numLabels=numLabels*8;
+						}
+					}*/
+
+					NodeList edges = element_domain.getElementsByTagName("edge");
+					for (int i = 0; i < edges.getLength(); i++) {
+						log.info("New Edge");
+						Element element = (Element) edges.item(i);
+						//By default, all nodes are intradomain
+						String type;
+						Attr attr_type=element.getAttributeNode("type");
+						if (attr_type==null){
+							type="intradomain";
+						}else {
+							type=attr_type.getValue();
+							if (allDomains){
+								if (type.equals("interdomain")){
+									type="intradomain";
+								}
+							}
+
+							else if (type.equals("interlayer")){
+								if (layer.equals("interlayer")){
+									type="intradomain";
+								}
+
+							}
+						}	
+						log.debug("type::"+type);
+						if (type.equals("intradomain")) {						
+							IntraDomainEdge edge = new IntraDomainEdge();
+							log.info("New Intradomain Edge");
+							NodeList source = element.getElementsByTagName("source");
+							Element source_router_el = (Element) source.item(0);
+
+							NodeList source_router_id = source_router_el.getElementsByTagName("router_id");
+							Element source_router_id_el = (Element) source_router_id.item(0);
+							String s_r_id = getCharacterDataFromElement(source_router_id_el);
+							s_router_id_addr= EdgeUtils.getEdge(s_r_id);
+
+							NodeList source_if_id_nl = source_router_el.getElementsByTagName("if_id");
+							Element source_if_id_el = (Element) source_if_id_nl.item(0);
+							String s_source_if_id;
+							int src_if_id = -1;
+							if (source_if_id_el!=null){
+								s_source_if_id = getCharacterDataFromElement(source_if_id_el);
+								src_if_id = Integer.parseInt(s_source_if_id);
+							}
+							if (src_if_id!=-1) {
+								log.debug("SRC if id: "+src_if_id);	
+							}							
+
+							NodeList source_Numif_id_nl = source_router_el.getElementsByTagName("NumIf_id");
+							Element source_Numif_id_el = (Element) source_Numif_id_nl.item(0);
+							String s_source_Numif_id=null;
+							if (source_Numif_id_el!=null){
+								s_source_Numif_id = getCharacterDataFromElement(source_Numif_id_el);
+								try { // src_Numif_id type : Inet4Address
+									src_Numif_id = (Inet4Address) Inet4Address.getByName(s_source_Numif_id);
+								} catch (Exception e) { // src_Numif_id type : DataPathID
+									src_Numif_id =  DataPathID.getByName(s_source_Numif_id);
+								}
+							}
+							if (s_source_Numif_id!=null) {
+								log.debug("NumIf_id id: "+src_Numif_id);	
+							}
+							
+							NodeList dest_nl = element.getElementsByTagName("destination");
+							Element dest_el = (Element) dest_nl.item(0);
+
+							NodeList dest_router_id_nl = dest_el.getElementsByTagName("router_id");
+							Element dest_router_id_el = (Element) dest_router_id_nl.item(0);
+							String d_r_id = getCharacterDataFromElement(dest_router_id_el);
+							d_router_id_addr= EdgeUtils.getEdge(d_r_id);
+
+							//Anyadimos los SID
+							if (SIDS.get(s_router_id_addr)!=null && SIDS.get(d_router_id_addr)!=null)
+							{
+								log.debug("setting SIDS src: "+SIDS.get(s_router_id_addr)+" dst: "+SIDS.get(d_router_id_addr));
+								edge.setSrc_sid(SIDS.get(s_router_id_addr));
+								edge.setDst_sid(SIDS.get(d_router_id_addr));
+								log.debug("edge.getSrc_sid(): "+edge.getSrc_sid());
+								log.debug("edge.getDst_sid(): "+edge.getDst_sid());
+							}
+							else if (SIDSDP.get(s_router_id_addr)!=null && SIDSDP.get(d_router_id_addr)!=null)
+							{
+								log.debug("setting SIDSDP src: "+SIDSDP.get(s_router_id_addr)+" dst: "+SIDSDP.get(d_router_id_addr));
+								edge.setSrc_sid(SIDSDP.get(s_router_id_addr));
+								edge.setDst_sid(SIDSDP.get(d_router_id_addr));
+								log.debug("edge.getSrc_sid(): "+edge.getSrc_sid());
+								log.debug("edge.getDst_sid(): "+edge.getDst_sid());
+							}
+
+
+							NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id");
+							Element dest_if_id_el= (Element) dest_if_id_nl.item(0);
+							String s_dest_if_id;
+							int dst_if_id = -1;
+							if (dest_if_id_el!=null){
+								s_dest_if_id = getCharacterDataFromElement(dest_if_id_el);
+								dst_if_id = Integer.parseInt(s_dest_if_id);
+							}
+							if (dst_if_id!=-1) {
+								log.debug("DST if id: "+dst_if_id);
+							}	
+							
+
+							NodeList dest_Numif_id_nl = dest_el.getElementsByTagName("NumIf_id");
+							Element dest_Numif_id_el = (Element) dest_Numif_id_nl.item(0);
+							String s_dest_Numif_id=null;
+
+							if (source_Numif_id_el!=null){
+								s_dest_Numif_id = getCharacterDataFromElement(dest_Numif_id_el);
+
+								try { // s_dest_Numif_id type : Inet4Address
+									dst_Numif_id = (Inet4Address) Inet4Address.getByName(s_dest_Numif_id);
+								} catch (Exception e) { // s_dest_Numif_id type : DataPathID 
+									dst_Numif_id =  DataPathID.getByName(s_dest_Numif_id);
+								}
+							}
+							if (s_dest_Numif_id!=null) {
+								log.debug("DST NumIf_id id: "+dst_Numif_id);	
+							}
+							
+							// Añadimos interfaces Numeradas
+							if (src_Numif_id!=null){
+								edge.setSrc_Numif_id(src_Numif_id);
+							}if (dst_Numif_id!=null){
+								edge.setDst_Numif_id(dst_Numif_id);
+							}else{
+								if (src_if_id != -1){
+									edge.setSrc_if_id(src_if_id);
+								}
+								if (dst_if_id != -1){
+									edge.setDst_if_id(dst_if_id);
+								}
+							}
+
+							//DELAY, IF IT COMES..
+							NodeList delay_ms_nl = element.getElementsByTagName("delay");
+							if (delay_ms_nl.getLength()>0){
+
+								Element delay_ms_el = (Element)delay_ms_nl.item(0);
+								String s_delay_ms=getCharacterDataFromElement(delay_ms_el);
+								double delay_ms=Double.parseDouble(s_delay_ms);
+								edge.setDelay_ms(delay_ms);
+							}
+
+							//TE Link information
+							NodeList maximum_bandwidth_nl = element.getElementsByTagName("maximum_bandwidth");
+							if (maximum_bandwidth_nl!=null){
+								if (maximum_bandwidth_nl.getLength()>0){
+									if(edge.getTE_info()==null){
+										TE_Information tE_info= new TE_Information();
+										if (commonBitmapLabelSet){
+											if(lambdaEnd!=Integer.MAX_VALUE){
+
+												tE_info.createBitmapLabelSet(numLabels, grid,  cs, n,lambdaIni,lambdaEnd);
+											}
+											else
+												tE_info.createBitmapLabelSet(numLabels, grid,  cs, n);
+										}
+										//tid.util.FuncionesUtiles.printByte(((BitmapLabelSet)tE_info.getAvailableLabels().getLabelSet()).getBytesBitmapReserved(),"getBytesBitmapReserved1:");
+										edge.setTE_info(tE_info);
+
+									} else {
+										TE_Information te_info = edge.getTE_info();
+										if (commonBitmapLabelSet){
+											//	if(lambdaEnd!=Integer.MAX_VALUE){
+
+											//	te_info.createBitmapLabelSet(numLabels, grid,  cs, n,lambdaIni,lambdaEnd);
+											//	}
+											//	else
+											te_info.createBitmapLabelSet(numLabels, grid,  cs, n);
+										}
+										//tid.util.FuncionesUtiles.printByte(((BitmapLabelSet)tE_info.getAvailableLabels().getLabelSet()).getBytesBitmapReserved(),"getBytesBitmapReserved1:");
+										edge.setTE_info(te_info);
+									}
+
+									Element maximum_bandwidth_el = (Element) maximum_bandwidth_nl.item(0);
+									String s_maximum_bandwidth = getCharacterDataFromElement(maximum_bandwidth_el);
+
+									float maximum_bandwidth=Float.parseFloat(s_maximum_bandwidth);
+									MaximumBandwidth maximumBandwidth =new MaximumBandwidth();
+									maximumBandwidth.setMaximumBandwidth(maximum_bandwidth);
+									(edge.getTE_info()).setMaximumBandwidth(maximumBandwidth);
+
+								}
+							}
+							/**
+							 * NodeList SID_aux = element.getElementsByTagName("sid");
+						Element SID_e = (Element) SID_aux.item(0);
+						if (SID_e!=null)
+						{ 
+							log.info("SID existe");
+							int SID = Integer.parseInt(getCharacterDataFromElement(SID_e));
+							SIDS.put(router_id_addr,SID);
+							log.info("SID of node: "+SID);
+						}
+						else
+						{
+							log.info("SID not found");
+						}
+							 */
+
+							NodeList defaultmetric = element.getElementsByTagName("default_te_metric");
+							Element metric_aux = (Element) defaultmetric.item(0);
+
+							if (metric_aux != null){
+								String s_metric_aux = getCharacterDataFromElement(metric_aux);
+								TE_Information tE_info;
+								int metric = Integer.parseInt(s_metric_aux);
+								DefaultTEMetricLinkAttribTLV defaultTeMetric= new DefaultTEMetricLinkAttribTLV();
+								if(edge.getTE_info()==null){
+									tE_info= new TE_Information();
+								}
+								else{
+									tE_info = edge.getTE_info();
+								}
+								defaultTeMetric.setLinkMetric((long)metric);
+								tE_info.setDefaultTEMetric(defaultTeMetric);
+								edge.setTE_info(tE_info);
+							}
+
+							NodeList unreserved_bandwidth_nl = element.getElementsByTagName("unreserved_bandwidth");
+							if (unreserved_bandwidth_nl!=null){
+								int num_u_b=unreserved_bandwidth_nl.getLength();
+								UnreservedBandwidth unreservedBandwidth;
+								if (num_u_b>0){
+									if(edge.getTE_info()==null){
+										TE_Information tE_info= new TE_Information();
+										if (commonBitmapLabelSet){
+											if(lambdaEnd!=Integer.MAX_VALUE)
+												tE_info.createBitmapLabelSet(numLabels, grid,  cs, n,lambdaIni,lambdaEnd);
+											else
+												tE_info.createBitmapLabelSet(numLabels, grid,  cs, n);
+										}
+										edge.setTE_info(tE_info);
+									}
+									unreservedBandwidth =new UnreservedBandwidth();
+									(edge.getTE_info()).setUnreservedBandwidth(unreservedBandwidth);
+									for(int k=0;k<num_u_b;++k){
+										Element unreserved_bandwidth_el = (Element) unreserved_bandwidth_nl.item(k);
+										String s_unreserved_bandwidth = getCharacterDataFromElement(unreserved_bandwidth_el);
+
+										String s_priority=unreserved_bandwidth_el.getAttributeNode("priority").getValue();
+										Integer priority = Integer.valueOf(s_priority);
+										float unreserved_bandwidth=Float.parseFloat(s_unreserved_bandwidth);	
+
+										(unreservedBandwidth.getUnreservedBandwidth())[priority]=unreserved_bandwidth;
+									}
+								}
+
+
+							}
+
+							NodeList maximum_wlans_nl = element.getElementsByTagName("number_wlans");
+							if (maximum_wlans_nl!=null){
+								if (maximum_wlans_nl.getLength()>0){
+									if(edge.getTE_info()==null){
+										TE_Information tE_info= new TE_Information();
+
+										if (commonBitmapLabelSet){
+											if(lambdaEnd!=Integer.MAX_VALUE){
+
+												tE_info.createBitmapLabelSet(numLabels, grid,  cs, n,lambdaIni,lambdaEnd);
+											}
+											else
+												tE_info.createBitmapLabelSet(numLabels, grid,  cs, n);
+										}
+										//tid.util.FuncionesUtiles.printByte(((BitmapLabelSet)tE_info.getAvailableLabels().getLabelSet()).getBytesBitmapReserved(),"getBytesBitmapReserved1:");
+										edge.setTE_info(tE_info);
+
+									}
+
+									Element number_wlan_el = (Element) maximum_wlans_nl.item(0);
+									String s_number_wlans = getCharacterDataFromElement(number_wlan_el);
+
+									int number_wlans=Integer.parseInt(s_number_wlans.replace("\n", "").replaceAll("\\s",""));
+									(edge.getTE_info()).setNumberWLANs(number_wlans);
+									(edge.getTE_info()).initWLANs();
+
+								}
+							}
+
+							if(edge.getTE_info()==null){
+								TE_Information tE_info= new TE_Information();							
+								edge.setTE_info(tE_info);
+							}
+							if (commonBitmapLabelSet){
+								if(lambdaEnd!=Integer.MAX_VALUE)
+									edge.getTE_info().createBitmapLabelSet(numLabels, grid,  cs, n,lambdaIni,lambdaEnd);
+								else
+									edge.getTE_info().createBitmapLabelSet(numLabels, grid,  cs, n);
+							}
+
+							NodeList availableLabels_node = element.getElementsByTagName("AvailableLabels");
+							if ( availableLabels_node != null){
+								for (int k = 0; k < availableLabels_node.getLength(); k++) {
+									Element availableLabels_e = (Element) availableLabels_node.item(k);
+									NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField");
+									Element labelSetField_el = (Element) labelSetField_node.item(0);
+									if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet
+
+										NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels");
+
+										Element numbLabels_e = (Element) numbLabels_node.item(0);
+										String numbLabels_s = getCharacterDataFromElement(numbLabels_e);						
+										numLabels=Integer.parseInt(numbLabels_s);	
+
+										NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel");
+										Element baseLabel_e = (Element) baseLabel_node.item(0);
+
+										byte[] bitmap=new byte[1];
+										NodeList bitmap_node = labelSetField_el.getElementsByTagName("bitmap");
+										int result=0;
+										Element bitmap_e = (Element) bitmap_node.item(0);
+										if (bitmap_e!=null){
+											String bitmap_string=getCharacterDataFromElement(bitmap_e);
+											log.debug("Bitmap read: "+bitmap_string);
+											for (int p =0; p<bitmap_string.length(); p++)
+												result= (int) (result+Math.pow(2, bitmap_string.length()-p-1)*(bitmap_string.charAt(p)-48));
+											bitmap[0]=(byte) result;
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).setBytesBitmap(bitmap);
+										}
+										float min_frequency;
+
+										grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue());
+
+										cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue());
+										boolean n_frequency_included=false;
+										if (baseLabel_e.getAttributeNode("n") != null ){
+											n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue());
+											n_frequency_included = true;
+										}
+										else if (baseLabel_e.getAttributeNode("min_frequency") != null){
+											String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue();
+
+											min_frequency=Float.parseFloat(s_min_frequency);	
+											n = ((int)min_frequency - 1471)/20;
+											n_frequency_included=true;
+										}
+										if (n_frequency_included){/*Modify availableLabels*/
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).setNumLabels(numLabels);
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).getDwdmWavelengthLabel().setGrid(grid);
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).getDwdmWavelengthLabel().setChannelSpacing(cs);
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).getDwdmWavelengthLabel().setN(n);
+										}
+										else{
+											log.error("ERROR reading the xml file of the topology, you should enter <baseLabel grid=\"1\" cs=\"2\" n=\"-11\"></baseLabel> ");
+										}
+									}
+								}
+
+							}
+							log.debug("Preparing to add edge");
+							try{
+								if(graph.containsEdge(s_router_id_addr, d_router_id_addr)){
+									graph.getEdge(s_router_id_addr, d_router_id_addr).setNumberFibers(graph.getEdge(s_router_id_addr, d_router_id_addr).getNumberFibers()+1);
+								}else{
+									log.debug("s_router_id_addr: "+s_router_id_addr.toString()+"; d_router_id_addr: "+d_router_id_addr.toString()+"; edge: "+edge);
+									graph.addEdge(s_router_id_addr, d_router_id_addr, edge);
+									graph.getEdge(s_router_id_addr, d_router_id_addr).setNumberFibers(1);
+								}
+								log.info("Adding edge from "+s_router_id_addr.toString()+" to "+d_router_id_addr.toString()+"; \n "+edge);
+
+							}catch(Exception e){
+								log.error("Problem with source "+s_router_id_addr+" destination "+d_router_id_addr);
+								e.printStackTrace();
+								System.exit(-1);
+							}
+						}
+					}
+				}
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		log.debug("Info graph edge :: "+graph.edgeSet());
+		return graph;
+	}
+	
+	/*private static SimpleDirectedWeightedGraph<Object, IntraDomainEdge> readGraphIntraDomain(Element element1, String layer, Logger log){
+		
+		Object router_id_addr = null;
+		
+		HashMap<Inet4Address, Integer >SIDS = new HashMap<Inet4Address,Integer>();
+		HashMap<DataPathID, Integer >SIDSDP = new HashMap<DataPathID,Integer>();
+		
+		SimpleDirectedWeightedGraph<Object, IntraDomainEdge> graph = new SimpleDirectedWeightedGraph<Object, IntraDomainEdge>(IntraDomainEdge.class);
+		//NodeList nodes_domains = doc.getElementsByTagName("domain");
+		boolean readNetwork=false;
+		//Element element1 = (Element) nodes_domains.item(j);
+		String domain_id = "";
+		
+		if (layer!=null){				
+			NodeList domain_layer = element1.getElementsByTagName("layer");					
+			if (domain_layer.getLength()==1){						
+				Element layer_type = (Element) domain_layer.item(0);
+				log.info("Layer: " + layer_type.getAttributeNode("type").getValue());
+				log.info("Reading network topology");
+				if (layer_type.getAttributeNode("type").getValue().equals(layer)){
+					readNetwork = true;
+
+				}
+				if (layer.equals("interlayer")){
+					readNetwork = true;
+				}
+			}															
+		}else {
+			readNetwork=true;
+		}
+		if (readNetwork){
+			Element element_domain = element1;
+			NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id");
+			for (int k = 0; k < nodes_domain_id.getLength(); k++) {
+				Element domain_id_e = (Element) nodes_domain_id.item(0);
+				domain_id = getCharacterDataFromElement(domain_id_e);
+				//log.info("Looking for nodes in domain: " + domain_id);
+			}
+
+			NodeList nodes = element1.getElementsByTagName("node");
+			for (int i = 0; i < nodes.getLength(); i++) {
+				Element element = (Element) nodes.item(i);
+				NodeList router_id_node = element.getElementsByTagName("router_id");
+				Element router_id_e = (Element) router_id_node.item(0);
+				String router_id = getCharacterDataFromElement(router_id_e);
+
+				//log.info("Adding router_id " + router_id);
+				router_id_addr = EdgeUtils.getEdge(router_id);
+				graph.addVertex(router_id_addr);
+
+				//log.info("About to look for SID");
+				NodeList SID_aux = element.getElementsByTagName("sid");
+				Element SID_e = (Element) SID_aux.item(0);
+				if (SID_e!=null)
+				{ 
+					//log.info("SID existe");
+					int SID = Integer.parseInt(getCharacterDataFromElement(SID_e));
+
+					try { //Router_type: DatapathID
+						SIDS.put((Inet4Address) router_id_addr,SID);
+						//log.info("SID of node Inet4Address: "+SID);
+					} catch (Exception e) { //Router_type: DatapathID
+						SIDSDP.put((DataPathID)router_id_addr, SID);
+						//log.info("SID of node DataPathID: "+SID);
+					}
+				}
+				else
+				{
+					//log.info("SID not found");
+				}
+
+			}
+		}
+		return graph;
+	}*/
+
+	public static Hashtable<String,TEDB> readMultipleDomainSimpleNetworks(String fileName, String layer,boolean allDomains,int lambdaIni, int lambdaEnd, boolean isSSONnetwork) {
+		Logger log = LoggerFactory.getLogger("BGP4Peer");
+		Object router_id_addr = null;
+		Object s_router_id_addr = null;
+		Object d_router_id_addr = null;
+		Object src_Numif_id = null;
+		Object dst_Numif_id = null;
+
+
+		Hashtable<String,TEDB> TEDBs = new Hashtable<String,TEDB>();
+
+		//First, create the graph
+		
+		log.debug("1. SimpleDirectedWeightedGraph");
+
+		File file = new File(fileName);
+		try {
+			String domain_id = "";
+			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			Document doc = builder.parse(file);			
+			HashMap<Inet4Address, Integer >SIDS = new HashMap<Inet4Address,Integer>();
+			HashMap<DataPathID, Integer >SIDSDP = new HashMap<DataPathID,Integer>();
+
+			NodeList nodes_domains = doc.getElementsByTagName("domain");
+			if (layer!=null){
+				log.debug("Reading topology, looking for layer "+ layer);
+			}
+
+
+			//First pass to get all the nodes
+			//If we need to read all the domains
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				boolean readNetwork=false;
+				Element element1 = (Element) nodes_domains.item(j);
+				SimpleTEDB tedb = new SimpleTEDB();
+				SimpleDirectedWeightedGraph<Object, IntraDomainEdge> graph = new SimpleDirectedWeightedGraph<Object, IntraDomainEdge>(IntraDomainEdge.class);
+
+				if (layer!=null){				
+					NodeList domain_layer = element1.getElementsByTagName("layer");					
+					if (domain_layer.getLength()==1){						
+						Element layer_type = (Element) domain_layer.item(0);
+						log.debug("Layer: " + layer_type.getAttributeNode("type").getValue());
+						log.debug("Reading network topology");
+						if (layer_type.getAttributeNode("type").getValue().equals(layer)){
+							readNetwork = true;
+
+						}
+						if (layer.equals("interlayer")){
+							readNetwork = true;
+						}
+					}															
+				}else {
+					readNetwork=true;
+				}
+				if (readNetwork){
+					Element element_domain = (Element) nodes_domains.item(j);
+					NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id");
+					for (int k = 0; k < nodes_domain_id.getLength(); k++) {
+						Element domain_id_e = (Element) nodes_domain_id.item(0);
+						domain_id = getCharacterDataFromElement(domain_id_e);
+						log.debug("Looking for nodes in domain: " + domain_id);
+						log.info("Loading topology from domain " + domain_id);
+					}
+					
+					NodeList itResourcesElement = element1.getElementsByTagName("it_resources");
+					for (int i = 0; i < itResourcesElement.getLength(); i++) {
+						Element element = (Element) itResourcesElement.item(i);
+						
+						NodeList itResourcesControllerITList = element.getElementsByTagName("controller_it");
+						Element itResourcesControllerITElement = (Element) itResourcesControllerITList.item(0);
+						String itResourcesControllerIT = getCharacterDataFromElement(itResourcesControllerITElement);
+						
+						NodeList itResourcesCpuList = element.getElementsByTagName("cpu");
+						Element itResourcesCpuElement = (Element) itResourcesCpuList.item(0);
+						String itResourcesCpu = getCharacterDataFromElement(itResourcesCpuElement);
+						
+						NodeList itResourcesMemList = element.getElementsByTagName("mem");
+						Element itResourcesMemElement = (Element) itResourcesMemList.item(0);
+						String itResourcesMem = getCharacterDataFromElement(itResourcesMemElement);
+						
+						NodeList itResourcesStorageList = element.getElementsByTagName("storage");
+						Element itResourcesStorageElement = (Element) itResourcesStorageList.item(0);
+						String itResourcesStorage = getCharacterDataFromElement(itResourcesStorageElement);
+												
+						IT_Resources itResources = new IT_Resources();
+						if (itResourcesControllerIT!=null) itResources.setControllerIT(itResourcesControllerIT);
+						if (itResourcesCpu!=null) itResources.setCpu(itResourcesCpu);
+						if (itResourcesMem!=null) itResources.setMem(itResourcesMem);
+						if (itResourcesStorage!=null) itResources.setStorage(itResourcesStorage);
+						
+						
+						tedb.setItResources(itResources);
+						
+					}
+					NodeList nodes = element1.getElementsByTagName("node");
+					for (int i = 0; i < nodes.getLength(); i++) {
+						Element element = (Element) nodes.item(i);
+						NodeList router_id_node = element.getElementsByTagName("router_id");
+						Element router_id_e = (Element) router_id_node.item(0);
+						String router_id = getCharacterDataFromElement(router_id_e);
+
+						log.info("Adding node " + router_id);
+						router_id_addr = EdgeUtils.getEdge(router_id);
+						graph.addVertex(router_id_addr);
+
+						log.debug("About to look for SID");
+						NodeList SID_aux = element.getElementsByTagName("sid");
+						Element SID_e = (Element) SID_aux.item(0);
+						if (SID_e!=null)
+						{ 
+							log.debug("SID exist");
+							int SID = Integer.parseInt(getCharacterDataFromElement(SID_e));
+
+							try { //Router_type: DatapathID
+								SIDS.put((Inet4Address) router_id_addr,SID);
+								log.debug("SID of node Inet4Address: "+SID);
+							} catch (Exception e) { //Router_type: DatapathID
+								SIDSDP.put((DataPathID)router_id_addr, SID);
+								log.debug("SID of node DataPathID: "+SID);
+							}
+						}
+						else
+						{
+							log.debug("SID not found");
+						}
+
+					}
+				}
+				
+				tedb.setNetworkGraph(graph);
+				tedb.setDomainID((Inet4Address) Inet4Address.getByName(domain_id));
+				TEDBs.put(domain_id,tedb);
+			}	
+
+
+			//Next pass to get all the links
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				SimpleDirectedWeightedGraph<Object, IntraDomainEdge> graph=null;
+				boolean readNetwork=false;
+				Element element1 = (Element) nodes_domains.item(j);
+
+				if (layer!=null){				
+					NodeList domain_layer = element1.getElementsByTagName("layer");					
+					if (domain_layer.getLength()==1){						
+						Element layer_type = (Element) domain_layer.item(0);
+						log.debug("Layer: " + layer_type.getAttributeNode("type").getValue());
+						log.debug("Reading Topology");
+						if (layer_type.getAttributeNode("type").getValue().equals(layer)){
+							readNetwork = true;
+						}	
+					}															
+				}else {
+					readNetwork=true;
+				}
+				log.debug("Read network = "+readNetwork);
+				if (readNetwork){
+					Element element_domain = (Element) nodes_domains.item(j);
+					NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id");
+
+					for (int k = 0; k < nodes_domain_id.getLength(); k++) {
+						Element domain_id_e = (Element) nodes_domain_id.item(0);
+						domain_id = getCharacterDataFromElement(domain_id_e);
+						log.debug("Looking for links in domain: " + domain_id);
+					}
+					//System.out.println("VVV debug domain id:"+domain_id);
+					SimpleTEDB domainTEDB = (SimpleTEDB)TEDBs.get( domain_id);
+					graph = domainTEDB.getNetworkGraph();
+					
+					int numLabels=0;
+					TE_Information tE_info_common=null;
+					Boolean commonBitmapLabelSet = false;
+					NodeList edgeCommon = element1.getElementsByTagName("edgeCommon");
+					int grid=0;
+					int cs=0;
+					int n=0;
+					for (int i = 0; i < edgeCommon.getLength(); i++) {
+						Element edgeCommonElement = (Element) edgeCommon.item(i);
+						tE_info_common =readTE_INFOfromXml(tE_info_common,edgeCommonElement, false,numLabels, grid,  cs, n, 0, Integer.MAX_VALUE);
+						NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels");
+						for (int k = 0; k < availableLabels_node.getLength(); k++) {
+							Element availableLabels_e = (Element) availableLabels_node.item(k);
+							NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField");
+							Element labelSetField_el = (Element) labelSetField_node.item(0);
+							if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet
+								//Crear un BitMapSet
+
+								NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels");
+
+								Element numbLabels_e = (Element) numbLabels_node.item(0);
+								String numbLabels_s = getCharacterDataFromElement(numbLabels_e);						
+								numLabels=Integer.parseInt(numbLabels_s);	
+
+								NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel");
+								Element baseLabel_e = (Element) baseLabel_node.item(0);
+
+								float min_frequency;
+
+								grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue());
+
+								cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue());
+								boolean n_frequency_included=false;
+								if (baseLabel_e.getAttributeNode("n") != null ){
+									n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue());
+									n_frequency_included = true;
+								}
+								else if (baseLabel_e.getAttributeNode("min_frequency") != null){
+									String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue();
+
+									min_frequency=Float.parseFloat(s_min_frequency);	
+									n = ((int)min_frequency - 1471)/20;
+									n_frequency_included=true;
+								}
+								if (n_frequency_included){
+									commonBitmapLabelSet = true;
+								}else{
+									log.error("ERROR reading the xml file of the topology, you should enter <baseLabel grid=\"1\" cs=\"2\" n=\"-11\"></baseLabel> ");
+								}
+							}
+						}
+
+					}
+					/*if(isSSONnetwork ==true){
+						if(cs==4){
+							numLabels=numLabels*4;
+						}
+						else if (cs==5){
+							numLabels=numLabels*8;
+						}
+					}*/
+
+					NodeList edges = element_domain.getElementsByTagName("edge");
+					for (int i = 0; i < edges.getLength(); i++) {
+						log.debug("New Link");
+						Element element = (Element) edges.item(i);
+						//By default, all nodes are intradomain
+						String type;
+						Attr attr_type=element.getAttributeNode("type");
+						if (attr_type==null){
+							type="intradomain";
+						}else {
+							type=attr_type.getValue();
+							/*if (allDomains){
+								if (type.equals("interdomain")){
+									type="intradomain";
+								}
+							}*/
+							//else if (type.equals("interlayer")){
+								if (layer!=null && layer.equals("interlayer")){
+									type="intradomain";
+								}
+
+							//}
+						}	
+						log.debug("type::"+type);
+						if (type.equals("intradomain")) {						
+							IntraDomainEdge edge = new IntraDomainEdge();
+							NodeList source = element.getElementsByTagName("source");
+							Element source_router_el = (Element) source.item(0);
+
+							NodeList source_router_id = source_router_el.getElementsByTagName("router_id");
+							Element source_router_id_el = (Element) source_router_id.item(0);
+							String s_r_id = getCharacterDataFromElement(source_router_id_el);
+							s_router_id_addr= EdgeUtils.getEdge(s_r_id);
+
+							NodeList source_if_id_nl = source_router_el.getElementsByTagName("if_id");
+							Element source_if_id_el = (Element) source_if_id_nl.item(0);
+							String s_source_if_id;
+							int src_if_id = -1;
+							if (source_if_id_el!=null){
+								s_source_if_id = getCharacterDataFromElement(source_if_id_el);
+								src_if_id = Integer.parseInt(s_source_if_id);
+							}
+							log.debug("SRC if id: "+src_if_id);
+
+							NodeList source_Numif_id_nl = source_router_el.getElementsByTagName("NumIf_id");
+							Element source_Numif_id_el = (Element) source_Numif_id_nl.item(0);
+							String s_source_Numif_id;
+							if (source_Numif_id_el!=null){
+								s_source_Numif_id = getCharacterDataFromElement(source_Numif_id_el);
+								try { // src_Numif_id type : Inet4Address
+									src_Numif_id = (Inet4Address) Inet4Address.getByName(s_source_Numif_id);
+								} catch (Exception e) { // src_Numif_id type : DataPathID
+									src_Numif_id =  DataPathID.getByName(s_source_Numif_id);
+								}
+							}
+
+							NodeList dest_nl = element.getElementsByTagName("destination");
+							Element dest_el = (Element) dest_nl.item(0);
+
+							NodeList dest_router_id_nl = dest_el.getElementsByTagName("router_id");
+							Element dest_router_id_el = (Element) dest_router_id_nl.item(0);
+							String d_r_id = getCharacterDataFromElement(dest_router_id_el);
+							d_router_id_addr= EdgeUtils.getEdge(d_r_id);
+
+							//Anyadimos los SID
+							if (SIDS.get(s_router_id_addr)!=null && SIDS.get(d_router_id_addr)!=null)
+							{
+								log.debug("setting SIDS src: "+SIDS.get(s_router_id_addr)+" dst: "+SIDS.get(d_router_id_addr));
+								edge.setSrc_sid(SIDS.get(s_router_id_addr));
+								edge.setDst_sid(SIDS.get(d_router_id_addr));
+								log.debug("edge.getSrc_sid(): "+edge.getSrc_sid());
+								log.debug("edge.getDst_sid(): "+edge.getDst_sid());
+							}
+							else if (SIDSDP.get(s_router_id_addr)!=null && SIDSDP.get(d_router_id_addr)!=null)
+							{
+								log.debug("setting SIDSDP src: "+SIDSDP.get(s_router_id_addr)+" dst: "+SIDSDP.get(d_router_id_addr));
+								edge.setSrc_sid(SIDSDP.get(s_router_id_addr));
+								edge.setDst_sid(SIDSDP.get(d_router_id_addr));
+								log.debug("edge.getSrc_sid(): "+edge.getSrc_sid());
+								log.debug("edge.getDst_sid(): "+edge.getDst_sid());
+							}
+
+
+							NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id");
+							Element dest_if_id_el= (Element) dest_if_id_nl.item(0);
+							String s_dest_if_id;
+							int dst_if_id = -1;
+							if (dest_if_id_el!=null){
+								s_dest_if_id = getCharacterDataFromElement(dest_if_id_el);
+								dst_if_id = Integer.parseInt(s_dest_if_id);
+							}
+							log.debug("DST if id: "+dst_if_id);
+
+							NodeList dest_Numif_id_nl = dest_el.getElementsByTagName("NumIf_id");
+							Element dest_Numif_id_el = (Element) dest_Numif_id_nl.item(0);
+							String s_dest_Numif_id;
+
+							if (source_Numif_id_el!=null){
+								s_dest_Numif_id = getCharacterDataFromElement(dest_Numif_id_el);
+
+								try { // s_dest_Numif_id type : Inet4Address
+									dst_Numif_id = (Inet4Address) Inet4Address.getByName(s_dest_Numif_id);
+								} catch (Exception e) { // s_dest_Numif_id type : DataPathID 
+									dst_Numif_id =  DataPathID.getByName(s_dest_Numif_id);
+								}
+							}
+							// Añadimos interfaces Numeradas
+							if (src_Numif_id!=null){
+								edge.setSrc_Numif_id(src_Numif_id);
+							}if (dst_Numif_id!=null){
+								edge.setDst_Numif_id(dst_Numif_id);
+							}else{
+								if (src_if_id != -1){
+									edge.setSrc_if_id(src_if_id);
+								}
+								if (dst_if_id != -1){
+									edge.setDst_if_id(dst_if_id);
+								}
+							}
+
+							//DELAY, IF IT COMES..
+							NodeList delay_ms_nl = element.getElementsByTagName("delay");
+							if (delay_ms_nl.getLength()>0){
+
+								Element delay_ms_el = (Element)delay_ms_nl.item(0);
+								String s_delay_ms=getCharacterDataFromElement(delay_ms_el);
+								double delay_ms=Double.parseDouble(s_delay_ms);
+								edge.setDelay_ms(delay_ms);
+							}
+
+							//TE Link information
+							edge.setTE_info(readTE_INFOfromXml(tE_info_common, element, commonBitmapLabelSet,numLabels, grid,  cs, n,lambdaIni,lambdaEnd));
+							
+
+							NodeList availableLabels_node = element.getElementsByTagName("AvailableLabels");
+							if ( availableLabels_node != null){
+								for (int k = 0; k < availableLabels_node.getLength(); k++) {
+									Element availableLabels_e = (Element) availableLabels_node.item(k);
+									NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField");
+									Element labelSetField_el = (Element) labelSetField_node.item(0);
+									if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet
+
+										NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels");
+
+										Element numbLabels_e = (Element) numbLabels_node.item(0);
+										String numbLabels_s = getCharacterDataFromElement(numbLabels_e);						
+										numLabels=Integer.parseInt(numbLabels_s);	
+
+										NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel");
+										Element baseLabel_e = (Element) baseLabel_node.item(0);
+
+										byte[] bitmap=new byte[1];
+										NodeList bitmap_node = labelSetField_el.getElementsByTagName("bitmap");
+										int result=0;
+										Element bitmap_e = (Element) bitmap_node.item(0);
+										if (bitmap_e!=null){
+											String bitmap_string=getCharacterDataFromElement(bitmap_e);
+											System.out.println("Bitmap read: "+bitmap_string);
+											for (int p =0; p<bitmap_string.length(); p++)
+												result= (int) (result+Math.pow(2, bitmap_string.length()-p-1)*(bitmap_string.charAt(p)-48));
+											bitmap[0]=(byte) result;
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).setBytesBitmap(bitmap);
+										}
+										float min_frequency;
+
+										grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue());
+
+										cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue());
+										boolean n_frequency_included=false;
+										if (baseLabel_e.getAttributeNode("n") != null ){
+											n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue());
+											n_frequency_included = true;
+										}
+										else if (baseLabel_e.getAttributeNode("min_frequency") != null){
+											String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue();
+
+											min_frequency=Float.parseFloat(s_min_frequency);	
+											n = ((int)min_frequency - 1471)/20;
+											n_frequency_included=true;
+										}
+										if (n_frequency_included){/*Modify availableLabels*/
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).setNumLabels(numLabels);
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).getDwdmWavelengthLabel().setGrid(grid);
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).getDwdmWavelengthLabel().setChannelSpacing(cs);
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).getDwdmWavelengthLabel().setN(n);
+										}
+										else{
+											log.error("ERROR reading the xml file of the topology, you should enter <baseLabel grid=\"1\" cs=\"2\" n=\"-11\"></baseLabel> ");
+										}
+									}
+								}
+
+							}
+							log.debug("Preparing to add edge");
+							log.debug("NODES IN GRAPH:: "+graph.vertexSet());
+							try{
+								if(graph.containsEdge(s_router_id_addr, d_router_id_addr)){
+									log.debug("New Intradomain Edge");
+									graph.getEdge(s_router_id_addr, d_router_id_addr).setNumberFibers(graph.getEdge(s_router_id_addr, d_router_id_addr).getNumberFibers()+1);
+									log.debug("s_router_id_addr: "+s_router_id_addr.toString()+"; d_router_id_addr: "+d_router_id_addr.toString()+"; edge: "+edge);
+									log.info("New intradomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString());//+" \n "+edge);
+
+								}else{
+									log.debug("s_router_id_addr: "+s_router_id_addr.toString()+"; d_router_id_addr: "+d_router_id_addr.toString()+"; edge: "+edge);
+									if(graph.containsVertex(d_router_id_addr)==false){
+										//interDomain edge
+										//TODO
+										type="interdomain";
+										
+									}else{
+										graph.addEdge(s_router_id_addr, d_router_id_addr, edge);
+										graph.getEdge(s_router_id_addr, d_router_id_addr).setNumberFibers(1);
+										log.debug("New Intradomain Edge");
+										log.info("New intradomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString());//+" \n "+edge);
+
+									}
+								}
+							}catch(Exception e){
+								log.error("Problem with source "+s_router_id_addr+" destination "+d_router_id_addr);
+								e.printStackTrace();
+								System.exit(-1);
+							}
+						}
+						if(type.equals("interdomain")){
+							log.debug("New Interdomain Edge");
+							InterDomainEdge edge = new InterDomainEdge();
+							TE_Information tE_info=readTE_INFOfromXml(tE_info_common,element, false,numLabels, grid,  cs, n, 0, Integer.MAX_VALUE);
+							edge.setTE_info(tE_info);
+							NodeList source = element.getElementsByTagName("source");
+							Element source_router_el = (Element) source.item(0);
+							NodeList source_router_id = source_router_el
+									.getElementsByTagName("router_id");
+							Element source_router_id_el = (Element) source_router_id
+									.item(0);
+							String s_r_id = getCharacterDataFromElement(source_router_id_el);
+							log.debug("Edge Source router_id: " + s_r_id);
+
+							try { // s_router_id_addr type: Inet4Address
+								s_router_id_addr = (Inet4Address) Inet4Address.getByName(s_r_id);
+							} catch (Exception e) {// s_router_id_addr type: DataPathID
+								s_router_id_addr =  DataPathID.getByName(s_r_id);
+							}
+							Inet4Address source_domain_id = (Inet4Address) Inet4Address.getByName(domain_id);
+							log.debug("Edge Source domain_id: " + source_domain_id);
+
+							NodeList source_if_id_nl = source_router_el
+									.getElementsByTagName("if_id");
+							Element source_if_id_el = (Element) source_if_id_nl.item(0);
+							String s_source_if_id = getCharacterDataFromElement(source_if_id_el);
+							log.debug("Edge Source if_id: " + s_source_if_id);
+							int src_if_id = Integer.parseInt(s_source_if_id);
+
+							NodeList dest_nl = element.getElementsByTagName("destination");
+							Element dest_el = (Element) dest_nl.item(0);
+							NodeList dest_router_id_nl = dest_el
+									.getElementsByTagName("router_id");
+							Element dest_router_id_el = (Element) dest_router_id_nl.item(0);
+							String d_r_id = getCharacterDataFromElement(dest_router_id_el);
+							log.debug("Edge Destination router_id: " + d_r_id);
+							try { // d_router_id_addr type: Inet4Address
+								d_router_id_addr = (Inet4Address) Inet4Address.getByName(d_r_id);
+							} catch (Exception e) { // d_router_id_addr type: DataPathID
+								d_router_id_addr =  DataPathID.getByName(d_r_id);
+							}
+							//Inet4Address dest_domain_id = router_id_domain_ed.get(d_router_id_addr);
+							log.debug("Destination domain_id: <Unknown>");
+
+							NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id");
+							Element dest_if_id_el = (Element) dest_if_id_nl.item(0);
+							String s_dest_if_id = getCharacterDataFromElement(dest_if_id_el);
+							log.debug("Edge Dest if_id: " + s_dest_if_id);
+							int dst_if_id = Integer.parseInt(s_dest_if_id);
+
+							//router_id_domain_ed
+							//edge.setDomain_src_router(source_domain_id);
+
+							edge.setSrc_if_id(src_if_id);
+							edge.setDst_if_id(dst_if_id);
+							edge.setDomain_src_router(source_domain_id);
+							//edge.setDomain_dst_router(dest_domain_id);
+
+							edge.setSrc_router_id(s_router_id_addr);
+							edge.setDst_router_id(d_router_id_addr);
+							if(domainTEDB.getInterDomainLinks()==null){
+								LinkedList<InterDomainEdge> interDomainLinks= new LinkedList<InterDomainEdge>();
+								interDomainLinks.add(edge);
+								domainTEDB.setInterDomainLinks(interDomainLinks);
+								log.info("New interdomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString());//+"; \n "+edge);
+
+							}else{
+								domainTEDB.getInterDomainLinks().add(edge);
+								log.info("New interdomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString());//+"; \n "+edge);
+
+							}
+							
+						}
+					}
+					
+				}
+				log.debug("Info graph edge :: "+graph.edgeSet());
+				
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		
+		return TEDBs;
+	}
+
+	public static Hashtable<String,TEDB> readMultipleDomainSimpleNetworks(String fileName, String layer,boolean allDomains,int lambdaIni, int lambdaEnd, boolean isSSONnetwork, String learntFrom) {
+		Logger log = LoggerFactory.getLogger("BGP4Peer");
+		Object router_id_addr = null;
+		Object s_router_id_addr = null;
+		Object d_router_id_addr = null;
+		Object src_Numif_id = null;
+		Object dst_Numif_id = null;
+
+
+		Hashtable<String,TEDB> TEDBs = new Hashtable<String,TEDB>();
+
+		//First, create the graph
+
+		log.debug("1. SimpleDirectedWeightedGraph");
+
+		File file = new File(fileName);
+		try {
+			String domain_id = "";
+			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			Document doc = builder.parse(file);
+			HashMap<Inet4Address, Integer >SIDS = new HashMap<Inet4Address,Integer>();
+			HashMap<DataPathID, Integer >SIDSDP = new HashMap<DataPathID,Integer>();
+
+			NodeList nodes_domains = doc.getElementsByTagName("domain");
+			if (layer!=null){
+				log.debug("Reading topology, looking for layer "+ layer);
+			}
+
+
+			//First pass to get all the nodes
+			//If we need to read all the domains
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				boolean readNetwork=false;
+				Element element1 = (Element) nodes_domains.item(j);
+				SimpleTEDB tedb = new SimpleTEDB();
+				SimpleDirectedWeightedGraph<Object, IntraDomainEdge> graph = new SimpleDirectedWeightedGraph<Object, IntraDomainEdge>(IntraDomainEdge.class);
+
+				if (layer!=null){
+					NodeList domain_layer = element1.getElementsByTagName("layer");
+					if (domain_layer.getLength()==1){
+						Element layer_type = (Element) domain_layer.item(0);
+						log.debug("Layer: " + layer_type.getAttributeNode("type").getValue());
+						log.debug("Reading network topology");
+						if (layer_type.getAttributeNode("type").getValue().equals(layer)){
+							readNetwork = true;
+
+						}
+						if (layer.equals("interlayer")){
+							readNetwork = true;
+						}
+					}
+				}else {
+					readNetwork=true;
+				}
+				if (readNetwork){
+					Element element_domain = (Element) nodes_domains.item(j);
+					NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id");
+					for (int k = 0; k < nodes_domain_id.getLength(); k++) {
+						Element domain_id_e = (Element) nodes_domain_id.item(0);
+						domain_id = getCharacterDataFromElement(domain_id_e);
+						log.debug("Looking for nodes in domain: " + domain_id);
+						log.info("Loading topology from domain " + domain_id);
+					}
+
+					NodeList itResourcesElement = element1.getElementsByTagName("it_resources");
+					for (int i = 0; i < itResourcesElement.getLength(); i++) {
+						Element element = (Element) itResourcesElement.item(i);
+
+						NodeList itResourcesControllerITList = element.getElementsByTagName("controller_it");
+						Element itResourcesControllerITElement = (Element) itResourcesControllerITList.item(0);
+						String itResourcesControllerIT = getCharacterDataFromElement(itResourcesControllerITElement);
+
+						NodeList itResourcesCpuList = element.getElementsByTagName("cpu");
+						Element itResourcesCpuElement = (Element) itResourcesCpuList.item(0);
+						String itResourcesCpu = getCharacterDataFromElement(itResourcesCpuElement);
+
+						NodeList itResourcesMemList = element.getElementsByTagName("mem");
+						Element itResourcesMemElement = (Element) itResourcesMemList.item(0);
+						String itResourcesMem = getCharacterDataFromElement(itResourcesMemElement);
+
+						NodeList itResourcesStorageList = element.getElementsByTagName("storage");
+						Element itResourcesStorageElement = (Element) itResourcesStorageList.item(0);
+						String itResourcesStorage = getCharacterDataFromElement(itResourcesStorageElement);
+
+						IT_Resources itResources = new IT_Resources();
+						if (itResourcesControllerIT!=null){
+							itResources.setControllerIT(itResourcesControllerIT);
+							itResources.setLearntFrom(learntFrom);
+						}
+						if (itResourcesCpu!=null) itResources.setCpu(itResourcesCpu);
+						if (itResourcesMem!=null) itResources.setMem(itResourcesMem);
+						if (itResourcesStorage!=null) {
+							itResources.setStorage(itResourcesStorage);
+							log.info("set learn from for it resources "+ itResources.toString());
+						}
+
+						tedb.setItResources(itResources);
+
+					}
+					NodeList nodes = element1.getElementsByTagName("node");
+					for (int i = 0; i < nodes.getLength(); i++) {
+						Element element = (Element) nodes.item(i);
+						NodeList router_id_node = element.getElementsByTagName("router_id");
+						Element router_id_e = (Element) router_id_node.item(0);
+						String router_id = getCharacterDataFromElement(router_id_e);
+
+						log.info("Adding node " + router_id);
+						router_id_addr = EdgeUtils.getEdge(router_id);
+						graph.addVertex(router_id_addr);
+
+						log.debug("About to look for SID");
+						NodeList SID_aux = element.getElementsByTagName("sid");
+						Element SID_e = (Element) SID_aux.item(0);
+						if (SID_e!=null)
+						{
+							log.debug("SID exist");
+							int SID = Integer.parseInt(getCharacterDataFromElement(SID_e));
+
+							try { //Router_type: DatapathID
+								SIDS.put((Inet4Address) router_id_addr,SID);
+								log.debug("SID of node Inet4Address: "+SID);
+							} catch (Exception e) { //Router_type: DatapathID
+								SIDSDP.put((DataPathID)router_id_addr, SID);
+								log.debug("SID of node DataPathID: "+SID);
+							}
+						}
+						else
+						{
+							log.debug("SID not found");
+						}
+
+					}
+				}
+
+				tedb.setNetworkGraph(graph);
+				tedb.setDomainID((Inet4Address) Inet4Address.getByName(domain_id));
+				TEDBs.put(domain_id,tedb);
+			}
+
+
+			//Next pass to get all the links
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				SimpleDirectedWeightedGraph<Object, IntraDomainEdge> graph=null;
+				boolean readNetwork=false;
+				Element element1 = (Element) nodes_domains.item(j);
+
+				if (layer!=null){
+					NodeList domain_layer = element1.getElementsByTagName("layer");
+					if (domain_layer.getLength()==1){
+						Element layer_type = (Element) domain_layer.item(0);
+						log.debug("Layer: " + layer_type.getAttributeNode("type").getValue());
+						log.debug("Reading Topology");
+						if (layer_type.getAttributeNode("type").getValue().equals(layer)){
+							readNetwork = true;
+						}
+					}
+				}else {
+					readNetwork=true;
+				}
+				log.debug("Read network = "+readNetwork);
+				if (readNetwork){
+					Element element_domain = (Element) nodes_domains.item(j);
+					NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id");
+
+					for (int k = 0; k < nodes_domain_id.getLength(); k++) {
+						Element domain_id_e = (Element) nodes_domain_id.item(0);
+						domain_id = getCharacterDataFromElement(domain_id_e);
+						log.debug("Looking for links in domain: " + domain_id);
+					}
+					//System.out.println("VVV debug domain id:"+domain_id);
+					SimpleTEDB domainTEDB = (SimpleTEDB)TEDBs.get( domain_id);
+					graph = domainTEDB.getNetworkGraph();
+
+					int numLabels=0;
+					TE_Information tE_info_common=null;
+					Boolean commonBitmapLabelSet = false;
+					NodeList edgeCommon = element1.getElementsByTagName("edgeCommon");
+					int grid=0;
+					int cs=0;
+					int n=0;
+					for (int i = 0; i < edgeCommon.getLength(); i++) {
+						Element edgeCommonElement = (Element) edgeCommon.item(i);
+						tE_info_common =readTE_INFOfromXml(tE_info_common,edgeCommonElement, false,numLabels, grid,  cs, n, 0, Integer.MAX_VALUE);
+						NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels");
+						for (int k = 0; k < availableLabels_node.getLength(); k++) {
+							Element availableLabels_e = (Element) availableLabels_node.item(k);
+							NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField");
+							Element labelSetField_el = (Element) labelSetField_node.item(0);
+							if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet
+								//Crear un BitMapSet
+
+								NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels");
+
+								Element numbLabels_e = (Element) numbLabels_node.item(0);
+								String numbLabels_s = getCharacterDataFromElement(numbLabels_e);
+								numLabels=Integer.parseInt(numbLabels_s);
+
+								NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel");
+								Element baseLabel_e = (Element) baseLabel_node.item(0);
+
+								float min_frequency;
+
+								grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue());
+
+								cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue());
+								boolean n_frequency_included=false;
+								if (baseLabel_e.getAttributeNode("n") != null ){
+									n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue());
+									n_frequency_included = true;
+								}
+								else if (baseLabel_e.getAttributeNode("min_frequency") != null){
+									String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue();
+
+									min_frequency=Float.parseFloat(s_min_frequency);
+									n = ((int)min_frequency - 1471)/20;
+									n_frequency_included=true;
+								}
+								if (n_frequency_included){
+									commonBitmapLabelSet = true;
+								}else{
+									log.error("ERROR reading the xml file of the topology, you should enter <baseLabel grid=\"1\" cs=\"2\" n=\"-11\"></baseLabel> ");
+								}
+							}
+						}
+
+					}
+					/*if(isSSONnetwork ==true){
+						if(cs==4){
+							numLabels=numLabels*4;
+						}
+						else if (cs==5){
+							numLabels=numLabels*8;
+						}
+					}*/
+
+					NodeList edges = element_domain.getElementsByTagName("edge");
+					for (int i = 0; i < edges.getLength(); i++) {
+						log.debug("New Link");
+						Element element = (Element) edges.item(i);
+						//By default, all nodes are intradomain
+						String type;
+						Attr attr_type=element.getAttributeNode("type");
+						if (attr_type==null){
+							type="intradomain";
+						}else {
+							type=attr_type.getValue();
+							/*if (allDomains){
+								if (type.equals("interdomain")){
+									type="intradomain";
+								}
+							}*/
+							//else if (type.equals("interlayer")){
+							if (layer!=null && layer.equals("interlayer")){
+								type="intradomain";
+							}
+
+							//}
+						}
+						log.debug("type::"+type);
+						if (type.equals("intradomain")) {
+							IntraDomainEdge edge = new IntraDomainEdge();
+							NodeList source = element.getElementsByTagName("source");
+							Element source_router_el = (Element) source.item(0);
+							edge.setLearntFrom(learntFrom);
+							NodeList source_router_id = source_router_el.getElementsByTagName("router_id");
+							Element source_router_id_el = (Element) source_router_id.item(0);
+							String s_r_id = getCharacterDataFromElement(source_router_id_el);
+							s_router_id_addr= EdgeUtils.getEdge(s_r_id);
+
+							NodeList source_if_id_nl = source_router_el.getElementsByTagName("if_id");
+							Element source_if_id_el = (Element) source_if_id_nl.item(0);
+							String s_source_if_id;
+							int src_if_id = -1;
+							if (source_if_id_el!=null){
+								s_source_if_id = getCharacterDataFromElement(source_if_id_el);
+								src_if_id = Integer.parseInt(s_source_if_id);
+							}
+							log.debug("SRC if id: "+src_if_id);
+
+							NodeList source_Numif_id_nl = source_router_el.getElementsByTagName("NumIf_id");
+							Element source_Numif_id_el = (Element) source_Numif_id_nl.item(0);
+							String s_source_Numif_id;
+							if (source_Numif_id_el!=null){
+								s_source_Numif_id = getCharacterDataFromElement(source_Numif_id_el);
+								try { // src_Numif_id type : Inet4Address
+									src_Numif_id = (Inet4Address) Inet4Address.getByName(s_source_Numif_id);
+								} catch (Exception e) { // src_Numif_id type : DataPathID
+									src_Numif_id =  DataPathID.getByName(s_source_Numif_id);
+								}
+							}
+
+							NodeList dest_nl = element.getElementsByTagName("destination");
+							Element dest_el = (Element) dest_nl.item(0);
+
+							NodeList dest_router_id_nl = dest_el.getElementsByTagName("router_id");
+							Element dest_router_id_el = (Element) dest_router_id_nl.item(0);
+							String d_r_id = getCharacterDataFromElement(dest_router_id_el);
+							d_router_id_addr= EdgeUtils.getEdge(d_r_id);
+
+							//Anyadimos los SID
+							if (SIDS.get(s_router_id_addr)!=null && SIDS.get(d_router_id_addr)!=null)
+							{
+								log.debug("setting SIDS src: "+SIDS.get(s_router_id_addr)+" dst: "+SIDS.get(d_router_id_addr));
+								edge.setSrc_sid(SIDS.get(s_router_id_addr));
+								edge.setDst_sid(SIDS.get(d_router_id_addr));
+								log.debug("edge.getSrc_sid(): "+edge.getSrc_sid());
+								log.debug("edge.getDst_sid(): "+edge.getDst_sid());
+							}
+							else if (SIDSDP.get(s_router_id_addr)!=null && SIDSDP.get(d_router_id_addr)!=null)
+							{
+								log.debug("setting SIDSDP src: "+SIDSDP.get(s_router_id_addr)+" dst: "+SIDSDP.get(d_router_id_addr));
+								edge.setSrc_sid(SIDSDP.get(s_router_id_addr));
+								edge.setDst_sid(SIDSDP.get(d_router_id_addr));
+								log.debug("edge.getSrc_sid(): "+edge.getSrc_sid());
+								log.debug("edge.getDst_sid(): "+edge.getDst_sid());
+							}
+
+
+							NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id");
+							Element dest_if_id_el= (Element) dest_if_id_nl.item(0);
+							String s_dest_if_id;
+							int dst_if_id = -1;
+							if (dest_if_id_el!=null){
+								s_dest_if_id = getCharacterDataFromElement(dest_if_id_el);
+								dst_if_id = Integer.parseInt(s_dest_if_id);
+							}
+							log.debug("DST if id: "+dst_if_id);
+
+							NodeList dest_Numif_id_nl = dest_el.getElementsByTagName("NumIf_id");
+							Element dest_Numif_id_el = (Element) dest_Numif_id_nl.item(0);
+							String s_dest_Numif_id;
+
+							if (source_Numif_id_el!=null){
+								s_dest_Numif_id = getCharacterDataFromElement(dest_Numif_id_el);
+
+								try { // s_dest_Numif_id type : Inet4Address
+									dst_Numif_id = (Inet4Address) Inet4Address.getByName(s_dest_Numif_id);
+								} catch (Exception e) { // s_dest_Numif_id type : DataPathID
+									dst_Numif_id =  DataPathID.getByName(s_dest_Numif_id);
+								}
+							}
+							// Añadimos interfaces Numeradas
+							if (src_Numif_id!=null){
+								edge.setSrc_Numif_id(src_Numif_id);
+							}if (dst_Numif_id!=null){
+								edge.setDst_Numif_id(dst_Numif_id);
+							}else{
+								if (src_if_id != -1){
+									edge.setSrc_if_id(src_if_id);
+								}
+								if (dst_if_id != -1){
+									edge.setDst_if_id(dst_if_id);
+								}
+							}
+
+							//DELAY, IF IT COMES..
+							NodeList delay_ms_nl = element.getElementsByTagName("delay");
+							if (delay_ms_nl.getLength()>0){
+
+								Element delay_ms_el = (Element)delay_ms_nl.item(0);
+								String s_delay_ms=getCharacterDataFromElement(delay_ms_el);
+								double delay_ms=Double.parseDouble(s_delay_ms);
+								edge.setDelay_ms(delay_ms);
+							}
+
+							//TE Link information
+							edge.setTE_info(readTE_INFOfromXml(tE_info_common, element, commonBitmapLabelSet,numLabels, grid,  cs, n,lambdaIni,lambdaEnd));
+
+
+							NodeList availableLabels_node = element.getElementsByTagName("AvailableLabels");
+							if ( availableLabels_node != null){
+								for (int k = 0; k < availableLabels_node.getLength(); k++) {
+									Element availableLabels_e = (Element) availableLabels_node.item(k);
+									NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField");
+									Element labelSetField_el = (Element) labelSetField_node.item(0);
+									if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet
+
+										NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels");
+
+										Element numbLabels_e = (Element) numbLabels_node.item(0);
+										String numbLabels_s = getCharacterDataFromElement(numbLabels_e);
+										numLabels=Integer.parseInt(numbLabels_s);
+
+										NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel");
+										Element baseLabel_e = (Element) baseLabel_node.item(0);
+
+										byte[] bitmap=new byte[1];
+										NodeList bitmap_node = labelSetField_el.getElementsByTagName("bitmap");
+										int result=0;
+										Element bitmap_e = (Element) bitmap_node.item(0);
+										if (bitmap_e!=null){
+											String bitmap_string=getCharacterDataFromElement(bitmap_e);
+											System.out.println("Bitmap read: "+bitmap_string);
+											for (int p =0; p<bitmap_string.length(); p++)
+												result= (int) (result+Math.pow(2, bitmap_string.length()-p-1)*(bitmap_string.charAt(p)-48));
+											bitmap[0]=(byte) result;
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).setBytesBitmap(bitmap);
+										}
+										float min_frequency;
+
+										grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue());
+
+										cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue());
+										boolean n_frequency_included=false;
+										if (baseLabel_e.getAttributeNode("n") != null ){
+											n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue());
+											n_frequency_included = true;
+										}
+										else if (baseLabel_e.getAttributeNode("min_frequency") != null){
+											String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue();
+
+											min_frequency=Float.parseFloat(s_min_frequency);
+											n = ((int)min_frequency - 1471)/20;
+											n_frequency_included=true;
+										}
+										if (n_frequency_included){/*Modify availableLabels*/
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).setNumLabels(numLabels);
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).getDwdmWavelengthLabel().setGrid(grid);
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).getDwdmWavelengthLabel().setChannelSpacing(cs);
+											((BitmapLabelSet)edge.getTE_info().getAvailableLabels().getLabelSet()).getDwdmWavelengthLabel().setN(n);
+										}
+										else{
+											log.error("ERROR reading the xml file of the topology, you should enter <baseLabel grid=\"1\" cs=\"2\" n=\"-11\"></baseLabel> ");
+										}
+									}
+								}
+
+							}
+							log.debug("Preparing to add edge");
+							log.debug("NODES IN GRAPH:: "+graph.vertexSet());
+							try{
+								if(graph.containsEdge(s_router_id_addr, d_router_id_addr)){
+									log.debug("New Intradomain Edge");
+									graph.getEdge(s_router_id_addr, d_router_id_addr).setNumberFibers(graph.getEdge(s_router_id_addr, d_router_id_addr).getNumberFibers()+1);
+									log.debug("s_router_id_addr: "+s_router_id_addr.toString()+"; d_router_id_addr: "+d_router_id_addr.toString()+"; edge: "+edge);
+									log.info("New intradomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString());//+" \n "+edge);
+
+								}else{
+									log.debug("s_router_id_addr: "+s_router_id_addr.toString()+"; d_router_id_addr: "+d_router_id_addr.toString()+"; edge: "+edge);
+									if(graph.containsVertex(d_router_id_addr)==false){
+										//interDomain edge
+										//TODO
+										type="interdomain";
+
+									}else{
+										graph.addEdge(s_router_id_addr, d_router_id_addr, edge);
+										graph.getEdge(s_router_id_addr, d_router_id_addr).setNumberFibers(1);
+										log.debug("New Intradomain Edge");
+										log.info("New intradomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString()+" learnt "+edge.getLearntFrom());//+" \n "+edge);
+
+									}
+								}
+							}catch(Exception e){
+								log.error("Problem with source "+s_router_id_addr+" destination "+d_router_id_addr);
+								e.printStackTrace();
+								System.exit(-1);
+							}
+						}
+						if(type.equals("interdomain")){
+							log.debug("New Interdomain Edge");
+							InterDomainEdge edge = new InterDomainEdge();
+							TE_Information tE_info=readTE_INFOfromXml(tE_info_common,element, false,numLabels, grid,  cs, n, 0, Integer.MAX_VALUE);
+							edge.setTE_info(tE_info);
+							edge.setLearntFrom(learntFrom);
+							NodeList source = element.getElementsByTagName("source");
+							Element source_router_el = (Element) source.item(0);
+							NodeList source_router_id = source_router_el
+									.getElementsByTagName("router_id");
+							Element source_router_id_el = (Element) source_router_id
+									.item(0);
+							String s_r_id = getCharacterDataFromElement(source_router_id_el);
+							log.debug("Edge Source router_id: " + s_r_id);
+
+							try { // s_router_id_addr type: Inet4Address
+								s_router_id_addr = (Inet4Address) Inet4Address.getByName(s_r_id);
+							} catch (Exception e) {// s_router_id_addr type: DataPathID
+								s_router_id_addr =  DataPathID.getByName(s_r_id);
+							}
+							Inet4Address source_domain_id = (Inet4Address) Inet4Address.getByName(domain_id);
+							log.debug("Edge Source domain_id: " + source_domain_id);
+
+							NodeList source_if_id_nl = source_router_el
+									.getElementsByTagName("if_id");
+							Element source_if_id_el = (Element) source_if_id_nl.item(0);
+							String s_source_if_id = getCharacterDataFromElement(source_if_id_el);
+							log.debug("Edge Source if_id: " + s_source_if_id);
+							int src_if_id = Integer.parseInt(s_source_if_id);
+
+							NodeList dest_nl = element.getElementsByTagName("destination");
+							Element dest_el = (Element) dest_nl.item(0);
+							NodeList dest_router_id_nl = dest_el
+									.getElementsByTagName("router_id");
+							Element dest_router_id_el = (Element) dest_router_id_nl.item(0);
+							String d_r_id = getCharacterDataFromElement(dest_router_id_el);
+							log.debug("Edge Destination router_id: " + d_r_id);
+							try { // d_router_id_addr type: Inet4Address
+								d_router_id_addr = (Inet4Address) Inet4Address.getByName(d_r_id);
+							} catch (Exception e) { // d_router_id_addr type: DataPathID
+								d_router_id_addr =  DataPathID.getByName(d_r_id);
+							}
+							//Inet4Address dest_domain_id = router_id_domain_ed.get(d_router_id_addr);
+							log.debug("Destination domain_id: <Unknown>");
+
+							NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id");
+							Element dest_if_id_el = (Element) dest_if_id_nl.item(0);
+							String s_dest_if_id = getCharacterDataFromElement(dest_if_id_el);
+							log.debug("Edge Dest if_id: " + s_dest_if_id);
+							int dst_if_id = Integer.parseInt(s_dest_if_id);
+
+							//router_id_domain_ed
+							//edge.setDomain_src_router(source_domain_id);
+
+							edge.setSrc_if_id(src_if_id);
+							edge.setDst_if_id(dst_if_id);
+							edge.setDomain_src_router(source_domain_id);
+							//edge.setDomain_dst_router(dest_domain_id);
+
+							edge.setSrc_router_id(s_router_id_addr);
+							edge.setDst_router_id(d_router_id_addr);
+							if(domainTEDB.getInterDomainLinks()==null){
+								LinkedList<InterDomainEdge> interDomainLinks= new LinkedList<InterDomainEdge>();
+								interDomainLinks.add(edge);
+								domainTEDB.setInterDomainLinks(interDomainLinks);
+								log.info("New interdomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString()+" learnt "+edge.getLearntFrom());//+"; \n "+edge);
+
+							}else{
+								domainTEDB.getInterDomainLinks().add(edge);
+								log.info("New interdomain link: "+s_router_id_addr.toString()+" --> "+d_router_id_addr.toString()+" learnt "+edge.getLearntFrom());//+"; \n "+edge);
+
+							}
+
+						}
+					}
+
+				}
+				log.debug("Info graph edge :: "+graph.edgeSet());
+
+			}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+
+		return TEDBs;
+	}
+
+
+	private static TE_Information readTE_INFOfromXml(TE_Information tE_info_common,Element element, Boolean commonBitmapLabelSet, int numLabels, int grid, int cs, int n, int lambdaIni, int lambdaEnd) {
+		
+			TE_Information tE_info= new TE_Information();
+			if (commonBitmapLabelSet){
+				if(lambdaEnd!=Integer.MAX_VALUE)
+					tE_info.createBitmapLabelSet(numLabels, grid,  cs, n,lambdaIni,lambdaEnd);
+				else
+					tE_info.createBitmapLabelSet(numLabels, grid,  cs, n);
+			}
+		
+		NodeList maximum_bandwidth_nl = element.getElementsByTagName("maximum_bandwidth");
+		if (maximum_bandwidth_nl!=null){
+			if (maximum_bandwidth_nl.getLength()>0){
+				Element maximum_bandwidth_el = (Element) maximum_bandwidth_nl.item(0);
+				String s_maximum_bandwidth = getCharacterDataFromElement(maximum_bandwidth_el);
+
+				float maximum_bandwidth=Float.parseFloat(s_maximum_bandwidth);
+				MaximumBandwidth maximumBandwidth =new MaximumBandwidth();
+				maximumBandwidth.setMaximumBandwidth(maximum_bandwidth);
+				tE_info.setMaximumBandwidth(maximumBandwidth);
+
+			}
+		}else if(tE_info_common!=null && tE_info_common.getMaximumBandwidth()!=null){
+			MaximumBandwidth maximumBandwidth =new MaximumBandwidth();
+			maximumBandwidth.setMaximumBandwidth(tE_info_common.getMaximumBandwidth().getMaximumBandwidth());
+			tE_info.setMaximumBandwidth(maximumBandwidth);
+		}
+		/**
+		 * NodeList SID_aux = element.getElementsByTagName("sid");
+	Element SID_e = (Element) SID_aux.item(0);
+	if (SID_e!=null)
+	{ 
+		log.info("SID existe");
+		int SID = Integer.parseInt(getCharacterDataFromElement(SID_e));
+		SIDS.put(router_id_addr,SID);
+		log.info("SID of node: "+SID);
+	}
+	else
+	{
+		log.info("SID not found");
+	}
+		 */
+
+		NodeList defaultmetric = element.getElementsByTagName("default_te_metric");
+		Element metric_aux = (Element) defaultmetric.item(0);
+
+		if (metric_aux != null){
+			String s_metric_aux = getCharacterDataFromElement(metric_aux);
+			int metric = Integer.parseInt(s_metric_aux);
+			DefaultTEMetricLinkAttribTLV defaultTeMetric= new DefaultTEMetricLinkAttribTLV();
+			defaultTeMetric.setLinkMetric((long)metric);
+			tE_info.setDefaultTEMetric(defaultTeMetric);
+		}else if(tE_info_common!=null && tE_info_common.getDefaultTEMetric()!=null){
+			DefaultTEMetricLinkAttribTLV defaultTeMetric= new DefaultTEMetricLinkAttribTLV();
+			defaultTeMetric.setLinkMetric(tE_info_common.getDefaultTEMetric().getLinkMetric());
+			tE_info.setDefaultTEMetric(defaultTeMetric);
+		}
+
+		NodeList unreserved_bandwidth_nl = element.getElementsByTagName("unreserved_bandwidth");
+		if (unreserved_bandwidth_nl!=null){
+			int num_u_b=unreserved_bandwidth_nl.getLength();
+			UnreservedBandwidth unreservedBandwidth;
+			if (num_u_b>0){
+				unreservedBandwidth =new UnreservedBandwidth();
+				tE_info.setUnreservedBandwidth(unreservedBandwidth);
+				for(int k=0;k<num_u_b;++k){
+					Element unreserved_bandwidth_el = (Element) unreserved_bandwidth_nl.item(k);
+					String s_unreserved_bandwidth = getCharacterDataFromElement(unreserved_bandwidth_el);
+
+					String s_priority=unreserved_bandwidth_el.getAttributeNode("priority").getValue();
+					Integer priority = Integer.valueOf(s_priority);
+					float unreserved_bandwidth=Float.parseFloat(s_unreserved_bandwidth);	
+
+					(unreservedBandwidth.getUnreservedBandwidth())[priority]=unreserved_bandwidth;
+				}
+			}
+
+
+		}
+
+		NodeList maximum_wlans_nl = element.getElementsByTagName("number_wlans");
+		if (maximum_wlans_nl!=null){
+			if (maximum_wlans_nl.getLength()>0){
+				Element number_wlan_el = (Element) maximum_wlans_nl.item(0);
+				String s_number_wlans = getCharacterDataFromElement(number_wlan_el);
+
+				int number_wlans=Integer.parseInt(s_number_wlans.replace("\n", "").replaceAll("\\s",""));
+				tE_info.setNumberWLANs(number_wlans);
+				tE_info.initWLANs();
+			}
+		}
+		
+		NodeList undirDelayLinks = element.getElementsByTagName("undir_delay_link");
+		Element undirDelayLink = (Element) undirDelayLinks.item(0);
+
+		if (undirDelayLink != null){
+			String s_undirDelayLink = getCharacterDataFromElement(undirDelayLink);
+			int undirDelayLinkValue = Integer.parseInt(s_undirDelayLink);
+			UndirectionalLinkDelayDescriptorSubTLV uldSTLV = new UndirectionalLinkDelayDescriptorSubTLV();
+			uldSTLV.setDelay(undirDelayLinkValue);
+			tE_info.setUndirLinkDelay(uldSTLV);
+		}else if(tE_info_common!=null && tE_info_common.getUndirLinkDelay()!=null){
+			UndirectionalLinkDelayDescriptorSubTLV uldSTLV = new UndirectionalLinkDelayDescriptorSubTLV();
+			uldSTLV.setDelay(tE_info_common.getUndirLinkDelay().getDelay());
+			tE_info.setUndirLinkDelay(uldSTLV);
+		}
+		
+		NodeList undirDelayVars = element.getElementsByTagName("undir_delay_variation");
+		Element undirDelayVar = (Element) undirDelayVars.item(0);
+		if (undirDelayVar != null){
+			String s_undirDelayVar = getCharacterDataFromElement(undirDelayVar);
+			int undirDelayVarValue = Integer.parseInt(s_undirDelayVar);
+			UndirectionalDelayVariationDescriptorSubTLV udvSTLV = new UndirectionalDelayVariationDescriptorSubTLV();
+			udvSTLV.setDelayVar(undirDelayVarValue);
+			tE_info.setUndirDelayVar(udvSTLV);
+		}else if(tE_info_common!=null && tE_info_common.getUndirDelayVar()!=null){
+			UndirectionalDelayVariationDescriptorSubTLV uldSTLV = new UndirectionalDelayVariationDescriptorSubTLV();
+			uldSTLV.setDelayVar(tE_info_common.getUndirDelayVar().getDelayVar());
+			tE_info.setUndirDelayVar(uldSTLV);
+		}
+		
+		NodeList undirLinkLosss = element.getElementsByTagName("undir_link_loss");
+		Element undirLinkLoss = (Element) undirLinkLosss.item(0);
+		if (undirLinkLoss != null){
+			String s_undirLinkLoss = getCharacterDataFromElement(undirLinkLoss);
+			int undirLinkLossValue = Integer.parseInt(s_undirLinkLoss);
+			UndirectionalLinkLossDescriptorSubTLV uSTLV = new UndirectionalLinkLossDescriptorSubTLV();
+			uSTLV.setLinkLoss(undirLinkLossValue);
+			tE_info.setUndirLinkLoss(uSTLV);
+		}else if(tE_info_common!=null && tE_info_common.getUndirLinkLoss()!=null){
+			UndirectionalLinkLossDescriptorSubTLV uldSTLV = new UndirectionalLinkLossDescriptorSubTLV();
+			uldSTLV.setLinkLoss(tE_info_common.getUndirLinkLoss().getLinkLoss());
+			tE_info.setUndirLinkLoss(uldSTLV);
+		}
+		
+		NodeList undirReBws = element.getElementsByTagName("undir_residual_bandwidth");
+		Element undirReBw = (Element) undirReBws.item(0);
+		if (undirReBw != null){
+			String s_undirReBw = getCharacterDataFromElement(undirReBw);
+			int undirReBwValue = Integer.parseInt(s_undirReBw);
+			UndirectionalResidualBandwidthDescriptorSubTLV uSTLV = new UndirectionalResidualBandwidthDescriptorSubTLV();
+			uSTLV.setResidualBw(undirReBwValue);
+			tE_info.setUndirResidualBw(uSTLV);
+		}else if(tE_info_common!=null && tE_info_common.getUndirResidualBw()!=null){
+			UndirectionalResidualBandwidthDescriptorSubTLV uldSTLV = new UndirectionalResidualBandwidthDescriptorSubTLV();
+			uldSTLV.setResidualBw( tE_info_common.getUndirResidualBw().getResidualBw());
+			tE_info.setUndirResidualBw(uldSTLV);
+		}
+		
+		NodeList undirAvalBws = element.getElementsByTagName("undir_available_bandwidth");
+		Element undirAvalBw = (Element) undirAvalBws.item(0);
+		if (undirAvalBw != null){
+			String s_undirAvalBw = getCharacterDataFromElement(undirAvalBw);
+			int undirAvalBwValue = Integer.parseInt(s_undirAvalBw);
+			UndirectionalAvailableBandwidthDescriptorSubTLV uSTLV = new UndirectionalAvailableBandwidthDescriptorSubTLV();
+			uSTLV.setAvailableBw(undirAvalBwValue);
+			tE_info.setUndirAvailableBw(uSTLV);
+		}else if(tE_info_common!=null && tE_info_common.getUndirAvailableBw()!=null){
+			UndirectionalAvailableBandwidthDescriptorSubTLV uldSTLV = new UndirectionalAvailableBandwidthDescriptorSubTLV();
+			uldSTLV.setAvailableBw( tE_info_common.getUndirAvailableBw().getAvailableBw());
+			tE_info.setUndirAvailableBw(uldSTLV);
+		}
+		
+		NodeList undirUtilBws = element.getElementsByTagName("undir_utilized_bandwidth");
+		Element undirUtilBw = (Element) undirUtilBws.item(0);
+		if (undirUtilBw != null){
+			String s_undirUtilBw = getCharacterDataFromElement(undirUtilBw);
+			int undirUtilBwValue = Integer.parseInt(s_undirUtilBw);
+			UndirectionalUtilizedBandwidthDescriptorSubTLV uSTLV = new UndirectionalUtilizedBandwidthDescriptorSubTLV();
+			uSTLV.setUtilizedBw(undirUtilBwValue);
+			tE_info.setUndirUtilizedBw(uSTLV);
+		}else if(tE_info_common!=null && tE_info_common.getUndirUtilizedBw()!=null){
+			UndirectionalUtilizedBandwidthDescriptorSubTLV uldSTLV = new UndirectionalUtilizedBandwidthDescriptorSubTLV();
+			uldSTLV.setUtilizedBw( tE_info_common.getUndirUtilizedBw().getUtilizedBw());
+			tE_info.setUndirUtilizedBw(uldSTLV);
+		}
+		
+		NodeList minMaxDelays = element.getElementsByTagName("undir_min_max_delay");
+		Element minMaxDelay = (Element) minMaxDelays.item(0);
+		if (minMaxDelay != null){
+			NodeList minDelays = minMaxDelay.getElementsByTagName("min");
+			Element minDelay = (Element) minDelays.item(0);
+			NodeList maxDelays = minMaxDelay.getElementsByTagName("max");
+			Element maxDelay = (Element) maxDelays.item(0);
+			if(minDelay !=null && maxDelay!=null){
+				String s_minDelay = getCharacterDataFromElement(minDelay);
+				String s_maxDelay = getCharacterDataFromElement(maxDelay);
+				int minDelayValue = Integer.parseInt(s_minDelay);
+				int maxDelayValue = Integer.parseInt(s_maxDelay);
+				MinMaxUndirectionalLinkDelayDescriptorSubTLV ummSTLV = new MinMaxUndirectionalLinkDelayDescriptorSubTLV();
+				ummSTLV.setHighDelay(maxDelayValue);
+				ummSTLV.setLowDelay(minDelayValue);
+				tE_info.setMinMaxUndirLinkDelay(ummSTLV);
+			}
+		}else if(tE_info_common!=null && tE_info_common.getMinMaxUndirLinkDelay()!=null){
+			MinMaxUndirectionalLinkDelayDescriptorSubTLV uldSTLV = new MinMaxUndirectionalLinkDelayDescriptorSubTLV();
+			uldSTLV.setHighDelay( tE_info_common.getMinMaxUndirLinkDelay().getHighDelay());
+			uldSTLV.setLowDelay( tE_info_common.getMinMaxUndirLinkDelay().getLowDelay());
+			tE_info.setMinMaxUndirLinkDelay(uldSTLV);
+		}
+
+		return tE_info;
+		
+	}
+
+	public static SimpleDirectedWeightedGraph<Object,IntraDomainEdge> readITNetwork(String fileName){
+		Logger log=LoggerFactory.getLogger("BGP4Peer");
+		SimpleDirectedWeightedGraph<Object,IntraDomainEdge> graph =new SimpleDirectedWeightedGraph<Object,IntraDomainEdge>(IntraDomainEdge.class);
+		Object router_id_addr = null;
+		Object it_site_id_addr = null;
+		Object resource_addr = null;
+		Object s_id_addr = null;
+		Object d_id_addr = null;
+		Object s_router_id_addr = null;
+		Object d_router_id_addr = null;
+		Object s_it_site_id_addr = null;
+		Object d_it_site_id_addr = null;
+		Object s_resource_id_addr = null;
+		Object d_resource_id_addr = null;
+
+		log.debug("2. SimpleDirectedWeightedGraph");
+
+		File file = new File(fileName);
+		try {
+			DocumentBuilder builder =	DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			Document doc = builder.parse(file);
+			NodeList nodes_domains = doc.getElementsByTagName("domain");
+			HashMap<Inet4Address, Integer >SIDS   = new HashMap<Inet4Address,Integer>();
+			HashMap<DataPathID,   Integer >SIDSDP = new HashMap<DataPathID,Integer>();
+
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				Element element_domain = (Element) nodes_domains.item(j);
+				NodeList nodes_domain_id =  element_domain.getElementsByTagName("domain_id");
+				for (int k = 0; k < nodes_domain_id.getLength(); k++) {
+					Element domain_id_e = (Element) nodes_domain_id.item(0);
+					String domain_id=getCharacterDataFromElement(domain_id_e);
+					log.debug("Network domain: "+domain_id);
+				}
+
+				NodeList nodes = doc.getElementsByTagName("node");
+				for (int i = 0; i < nodes.getLength(); i++) {
+					Element element = (Element) nodes.item(i);
+					NodeList router_id_node = element.getElementsByTagName("router_id");
+					Element router_id_e = (Element) router_id_node.item(0);
+					String router_id=getCharacterDataFromElement(router_id_e);
+					log.debug("El router_id es "+router_id);
+
+					try { // router_id_addr type: Inet4Address
+						router_id_addr = (Inet4Address) Inet4Address.getByName(router_id);
+					} catch (Exception e) { // router_id_addr type: DataPathID
+						router_id_addr =  DataPathID.getByName(router_id);
+					}
+
+					graph.addVertex(router_id_addr);
+
+					Element SID_e = (Element) element.getElementsByTagName("sid");
+					if (SID_e!=null)
+					{	int SID = Integer.parseInt(getCharacterDataFromElement(SID_e));
+
+					try { // router_id_addr type: Inet4Address
+						SIDS.put((Inet4Address)router_id_addr,SID);
+					} catch (Exception e) { // router_id_addr type: DataPathID
+						SIDSDP.put((DataPathID)router_id_addr,SID);
+					}
+					}					
+				}
+
+				NodeList it_sites = doc.getElementsByTagName("it_site");
+				for (int i = 0; i < it_sites.getLength(); i++) {
+					Element element = (Element) it_sites.item(i);
+					NodeList it_site_id_node = element.getElementsByTagName("it_site_id");
+					Element it_site_id_e = (Element) it_site_id_node.item(0);
+					String it_site_id=getCharacterDataFromElement(it_site_id_e);
+					log.debug("El IT_site_id es "+it_site_id);
+
+					try { // it_site_id_addr type: Inet4Address
+						it_site_id_addr = (Inet4Address) Inet4Address.getByName(it_site_id);
+					} catch (Exception e) { // it_site_id_addr type: DataPathID
+						it_site_id_addr =  DataPathID.getByName(it_site_id);
+					}
+					graph.addVertex(it_site_id_addr);
+				}
+
+				NodeList storages = doc.getElementsByTagName("storage");
+				for (int i = 0; i < storages.getLength(); i++) {
+					Element element = (Element) storages.item(i);
+					NodeList resource_id_node = element.getElementsByTagName("resource_id");
+					Element resource_id_e = (Element) resource_id_node.item(0);
+					String resource_id=getCharacterDataFromElement(resource_id_e);
+					log.debug("El resource_id es "+resource_id);
+
+					try {
+						resource_addr = (Inet4Address) Inet4Address.getByName(resource_id);
+					} catch (Exception e) {
+						resource_addr =  DataPathID.getByName(resource_id);
+					}
+					graph.addVertex(resource_addr);
+				}
+
+				NodeList edges = doc.getElementsByTagName("edge");
+				for (int i = 0; i < edges.getLength(); i++) {
+
+					Element element = (Element) edges.item(i);
+
+					// We only want those routers which have type="intradomain" //MARTA
+					if (element.getAttributeNode("type").getValue().equals("intradomain")) {//MARTA
+						//IntraDomainEdge edge = new IntraDomainEdge();
+
+						IntraDomainEdge edge = new IntraDomainEdge();
+
+						NodeList source = element.getElementsByTagName("source");
+						Element source_router_el = (Element)source.item(0);
+						NodeList source_router_id= source_router_el.getElementsByTagName("router_id");
+						if (source_router_id.getLength()>0){
+							Element source_router_id_el=(Element)source_router_id.item(0);
+							String s_r_id=getCharacterDataFromElement(source_router_id_el);
+
+							try { // s_router_id_addr type: Inet4Address
+								s_router_id_addr = (Inet4Address) Inet4Address.getByName(s_r_id);
+							} catch (Exception e) { // s_router_id_addr type: DataPathID
+								s_router_id_addr =  DataPathID.getByName(s_r_id);
+							}
+
+							s_id_addr=s_router_id_addr;
+						}
+
+						NodeList source_it_site_id= source_router_el.getElementsByTagName("it_site_id");
+						if (source_it_site_id.getLength()>0){
+							Element source_it_site_id_el=(Element)source_it_site_id.item(0);
+							String s_itsite_id=getCharacterDataFromElement(source_it_site_id_el);
+							log.debug("Edge Source IT_site_id: "+s_itsite_id);
+
+							try { // s_it_site_id_addr type: Inet4Address
+								s_it_site_id_addr = (Inet4Address) Inet4Address.getByName(s_itsite_id);
+							} catch (Exception e) { // s_it_site_id_addr type: DataPathID
+								s_it_site_id_addr =  DataPathID.getByName(s_itsite_id);
+							}
+							s_id_addr=s_it_site_id_addr;
+						}
+
+						NodeList source_resource_id= source_router_el.getElementsByTagName("resource_id");
+						if (source_resource_id.getLength()>0){
+							Element source_resource_id_el=(Element)source_resource_id.item(0);
+							String s_resource_id=getCharacterDataFromElement(source_resource_id_el);
+							log.debug("Edge Source resource_id: "+s_resource_id);
+
+							try {// s_resource_id_addr type: Inet4Address
+								s_resource_id_addr = (Inet4Address) Inet4Address.getByName(s_resource_id);
+							} catch (Exception e) { // s_resource_id_addr type: DataPathID
+								s_resource_id_addr =  DataPathID.getByName(s_resource_id);
+							}
+							s_id_addr=s_resource_id_addr;
+						}
+
+						NodeList source_if_id_nl= source_router_el.getElementsByTagName("if_id");
+						Element source_if_id_el=(Element)source_if_id_nl.item(0);
+						String s_source_if_id=getCharacterDataFromElement(source_if_id_el);
+						log.debug("Edge Source if_id: "+s_source_if_id);
+						int src_if_id=Integer.parseInt(s_source_if_id);
+
+
+
+						NodeList dest_nl = element.getElementsByTagName("destination");
+						Element dest_el = (Element)dest_nl.item(0);
+						NodeList dest_router_id_nl= dest_el.getElementsByTagName("router_id");
+						if (dest_router_id_nl.getLength()>0){
+							Element dest_router_id_el=(Element)dest_router_id_nl.item(0);
+							String d_r_id=getCharacterDataFromElement(dest_router_id_el);
+							log.debug("Edge Destination router_id: "+d_r_id);
+
+							try { // d_router_id_addr type: Inet4Address
+								d_router_id_addr = (Inet4Address) Inet4Address.getByName(d_r_id);
+							} catch (Exception e) { // d_router_id_addr type: DataPathID
+								d_router_id_addr =  DataPathID.getByName(d_r_id);
+
+							}
+							d_id_addr=d_router_id_addr;
+						}
+
+
+						NodeList dest_it_site_id_nl= dest_el.getElementsByTagName("it_site_id");
+						if (dest_it_site_id_nl.getLength()>0){
+							Element dest_it_site_id_el=(Element)dest_it_site_id_nl.item(0);
+							String d_it_site_id=getCharacterDataFromElement(dest_it_site_id_el);
+							log.debug("Edge Destination IT_site_id: "+d_it_site_id);
+
+							try { // d_it_site_id_addr type: Inet4Address
+								d_it_site_id_addr = (Inet4Address) Inet4Address.getByName(d_it_site_id);
+							} catch (Exception e) { // d_it_site_id_addr type: DataPathID
+								d_it_site_id_addr =  DataPathID.getByName(d_it_site_id);
+							}
+							d_id_addr=d_it_site_id_addr;
+						}
+
+						NodeList dest_resource_id_nl= dest_el.getElementsByTagName("resource_id");
+						if (dest_resource_id_nl.getLength()>0){
+							Element dest_resource_id_el=(Element)dest_resource_id_nl.item(0);
+							String d_resource_id=getCharacterDataFromElement(dest_resource_id_el);
+							log.debug("Edge Destination resource_id: "+d_resource_id);
+							try { // d_resource_id_addr type: Inet4Address
+								d_resource_id_addr = (Inet4Address) Inet4Address.getByName(d_resource_id);
+							} catch (Exception e) { // d_resource_id_addr type: DataPathID
+								d_resource_id_addr =  DataPathID.getByName(d_resource_id);
+
+							}
+							d_id_addr=d_resource_id_addr;
+						}
+
+						NodeList dest_if_id_nl= dest_el.getElementsByTagName("if_id");
+						Element dest_if_id_el=(Element)dest_if_id_nl.item(0);
+						String s_dest_if_id=getCharacterDataFromElement(dest_if_id_el);
+						log.debug("Edge Dest if_id: "+s_dest_if_id);
+						int dst_if_id=Integer.parseInt(s_dest_if_id);
+
+
+						edge.setSrc_if_id(src_if_id);
+						edge.setDst_if_id(dst_if_id);
+
+
+						//TODO: Tal vez pete aqui
+						//Anyadimos los SID
+						if (SIDS.get(s_id_addr)!=null && SIDS.get(d_id_addr)!=null)
+						{
+							edge.setSrc_sid(SIDS.get(s_id_addr));
+							edge.setSrc_sid(SIDS.get(d_id_addr));
+						}	
+
+						graph.addEdge(s_id_addr, d_id_addr,edge);		       
+					}//MARTA
+				}
+			}
+		}
+		catch (Exception e) {
+			e.printStackTrace();
+		}		 
+
+		return graph;
+	}
+
+
+	public static Inet4Address readNetworkDomain(String fileName) {
+		Logger log = LoggerFactory.getLogger("BGP4Peer");
+		File file = new File(fileName);
+		try {
+			DocumentBuilder builder = DocumentBuilderFactory.newInstance()
+					.newDocumentBuilder();
+			Document doc = builder.parse(file);
+
+			NodeList nodes_domains = doc.getElementsByTagName("domain");
+			Element element_domain = (Element) nodes_domains.item(0);
+			NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id");
+			Element domain_id_e = (Element) nodes_domain_id.item(0);
+			String domain_id = getCharacterDataFromElement(domain_id_e);
+			log.info("Network domain: " + domain_id);
+			Inet4Address domId = (Inet4Address) Inet4Address
+					.getByName(domain_id);
+			return domId;
+		} catch (Exception e) {
+			e.printStackTrace();
+			return null;
+		}
+	}
+
+	public static String getCharacterDataFromElement(Element e) {
+		Node child = e.getFirstChild();
+		if (child instanceof CharacterData) {
+			CharacterData cd = (CharacterData) child;
+			return cd.getData();
+		} else {
+			return "?";
+		}
+	}
+	
+	/**
+	 * Reads the inter-domain Topology from a topology XML file.
+	 * Needs update to work with datapath IDs.
+	 * @param fileName Name of the XML
+	 * @return Graph of the network.
+	 */
+	public static DirectedWeightedMultigraph<Object, InterDomainEdge> readMDNetwork(
+			String fileName) {
+		Logger log = LoggerFactory.getLogger("BGP4Peer");
+		DirectedWeightedMultigraph<Object, InterDomainEdge> graph = new DirectedWeightedMultigraph<Object, InterDomainEdge>(
+				InterDomainEdge.class);
+		Hashtable<Object, Inet4Address> router_id_domain_ed  = new Hashtable<Object, Inet4Address>();
+		Hashtable<Object, DataPathID> router_id_domain_ed_dp = new Hashtable<Object, DataPathID>();
+
+		HashMap<Inet4Address, Integer >SIDS   = new HashMap<Inet4Address,Integer>();
+		HashMap<DataPathID,   Integer >SIDSDP = new HashMap<DataPathID,Integer>();
+
+		Object router_id_addr = null;
+		Object s_router_id_addr = null;
+		Object d_router_id_addr = null;
+
+		File file = new File(fileName);
+		try {
+			DocumentBuilder builder = DocumentBuilderFactory.newInstance()
+					.newDocumentBuilder();
+			Document doc = builder.parse(file);
+
+			NodeList nodes_domains = doc.getElementsByTagName("domain");
+			// First pass to read all the nodes and domains
+			log.info("Multidomain Graph");
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				Element element_domain = (Element) nodes_domains.item(j);
+				NodeList nodes_domain_id = element_domain
+						.getElementsByTagName("domain_id");
+				Element domain_id_e = (Element) nodes_domain_id.item(0);
+				String domain_id_str = getCharacterDataFromElement(domain_id_e);
+				Inet4Address domain_id = (Inet4Address) Inet4Address
+						.getByName(domain_id_str);
+
+				log.info("Adding Domain: " + domain_id);
+				graph.addVertex(domain_id);
+				NodeList nodes = element_domain.getElementsByTagName("node");
+				for (int i = 0; i < nodes.getLength(); i++) {
+					Element element = (Element) nodes.item(i);
+					NodeList router_id_node = element
+							.getElementsByTagName("router_id");
+					Element router_id_e = (Element) router_id_node.item(0);
+					String router_id = getCharacterDataFromElement(router_id_e);
+					log.debug("Router_id: " + router_id);
+					try { // router_id_addr type: Inet4Address
+						router_id_addr = (Inet4Address) Inet4Address.getByName(router_id);
+					} catch (Exception e) { // router_id_addr type: DataPathID
+						router_id_addr =  DataPathID.getByName(router_id);
+					}
+					router_id_domain_ed.put(router_id_addr, domain_id);
+					NodeList nl_sid=element.getElementsByTagName("sid");
+
+					Element SID_e = (Element) nl_sid.item(0);
+					if (SID_e!=null)
+					{	int SID = Integer.parseInt(getCharacterDataFromElement(SID_e));
+					try {
+						SIDS.put((Inet4Address)router_id_addr,SID);
+					} catch (Exception e) {
+						SIDSDP.put((DataPathID)router_id_addr,SID);
+					}
+					}
+				}
+				
+			}
+			log.debug("Domain_ids read");
+			
+			int numLabels=0;
+
+			Boolean commonBitmapLabelSet = false;
+			NodeList edgeCommon = doc.getElementsByTagName("edgeCommon");
+			int grid=0;
+			int cs=0;
+			int n=0;
+			for (int i = 0; i < edgeCommon.getLength(); i++) {
+
+				Element edgeCommonElement = (Element) edgeCommon.item(i);
+				NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels");
+				for (int k = 0; k < availableLabels_node.getLength(); k++) {
+
+					Element availableLabels_e = (Element) availableLabels_node.item(k);
+					NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField");
+					Element labelSetField_el = (Element) labelSetField_node.item(0);
+					if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet
+						//Crear un BitMapSet
+
+						NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels");
+
+						Element numbLabels_e = (Element) numbLabels_node.item(0);
+						String numbLabels_s = getCharacterDataFromElement(numbLabels_e);						
+						numLabels=Integer.parseInt(numbLabels_s);	
+
+						NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel");
+						Element baseLabel_e = (Element) baseLabel_node.item(0);
+
+						float min_frequency;
+
+						grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue());
+
+						cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue());
+						boolean n_frequency_included=false;
+						if (baseLabel_e.getAttributeNode("n") != null ){
+							n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue());
+							n_frequency_included = true;
+						}
+						else if (baseLabel_e.getAttributeNode("min_frequency") != null){
+							String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue();
+
+							min_frequency=Float.parseFloat(s_min_frequency);	
+							n = ((int)min_frequency - 1471)/20;
+							n_frequency_included=true;
+						}
+						if (n_frequency_included){
+							commonBitmapLabelSet = true;
+						}else{
+							log.error("ERROR reading the xml file of the topology, you should enter <baseLabel grid=\"1\" cs=\"2\" n=\"-11\"></baseLabel> ");
+						}
+
+					}
+				}
+
+			}
+			NodeList edges = doc.getElementsByTagName("edge");
+			boolean a =true;
+			for (int i = 0; i < edges.getLength(); i++) {
+				log.debug("Looking at edge");
+
+				Element element = (Element) edges.item(i);
+				InterDomainEdge edge = new InterDomainEdge();
+				TE_Information tE_info=readTE_INFOfromXml(null, element, false,numLabels, grid,  cs, n, 0, Integer.MAX_VALUE);
+				edge.setTE_info(tE_info);
+				NodeList source = element.getElementsByTagName("source");
+				Element source_router_el = (Element) source.item(0);
+				NodeList source_router_id = source_router_el
+						.getElementsByTagName("router_id");
+				Element source_router_id_el = (Element) source_router_id
+						.item(0);
+				String s_r_id = getCharacterDataFromElement(source_router_id_el);
+				log.debug("Edge Source router_id: " + s_r_id);
+
+				try { // s_router_id_addr type: Inet4Address
+					s_router_id_addr = (Inet4Address) Inet4Address.getByName(s_r_id);
+				} catch (Exception e) {// s_router_id_addr type: DataPathID
+					s_router_id_addr =  DataPathID.getByName(s_r_id);
+				}
+				Inet4Address source_domain_id = router_id_domain_ed.get(s_router_id_addr);
+				log.debug("Edge Source domain_id: " + source_domain_id);
+
+				NodeList source_if_id_nl = source_router_el
+						.getElementsByTagName("if_id");
+				Element source_if_id_el = (Element) source_if_id_nl.item(0);
+				String s_source_if_id = getCharacterDataFromElement(source_if_id_el);
+				log.debug("Edge Source if_id: " + s_source_if_id);
+				int src_if_id = Integer.parseInt(s_source_if_id);
+
+				NodeList dest_nl = element.getElementsByTagName("destination");
+				Element dest_el = (Element) dest_nl.item(0);
+				NodeList dest_router_id_nl = dest_el
+						.getElementsByTagName("router_id");
+				Element dest_router_id_el = (Element) dest_router_id_nl.item(0);
+				String d_r_id = getCharacterDataFromElement(dest_router_id_el);
+				log.debug("Edge Destination router_id: " + d_r_id);
+				try { // d_router_id_addr type: Inet4Address
+					d_router_id_addr = (Inet4Address) Inet4Address.getByName(d_r_id);
+				} catch (Exception e) { // d_router_id_addr type: DataPathID
+					d_router_id_addr =  DataPathID.getByName(d_r_id);
+				}
+				Inet4Address dest_domain_id = router_id_domain_ed.get(d_router_id_addr);
+				log.debug("Destination domain_id: " + dest_domain_id);
+
+				NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id");
+				Element dest_if_id_el = (Element) dest_if_id_nl.item(0);
+				String s_dest_if_id = getCharacterDataFromElement(dest_if_id_el);
+				log.debug("Edge Dest if_id: " + s_dest_if_id);
+				int dst_if_id = Integer.parseInt(s_dest_if_id);
+
+				//router_id_domain_ed
+				//edge.setDomain_src_router(source_domain_id);
+
+				edge.setSrc_if_id(src_if_id);
+				edge.setDst_if_id(dst_if_id);
+				edge.setDomain_src_router(source_domain_id);
+				edge.setDomain_dst_router(dest_domain_id);
+
+				edge.setSrc_router_id(s_router_id_addr);
+				edge.setDst_router_id(d_router_id_addr);
+				if (!source_domain_id.equals(dest_domain_id)) {
+					log.info("Adding interdomain link "+source_domain_id.toString()+"-->"+dest_domain_id.toString());//edge.toString());
+					//Only add if the source and destination domains are different
+					graph.addEdge(source_domain_id, dest_domain_id, edge);
+				}
+
+			}
+
+
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+
+		return graph;
+
+	}
+
+	public static DirectedWeightedMultigraph<Object, InterDomainEdge> readMDNetwork(
+			String fileName, String LearntFrom) {
+		Logger log = LoggerFactory.getLogger("BGP4Peer");
+		DirectedWeightedMultigraph<Object, InterDomainEdge> graph = new DirectedWeightedMultigraph<Object, InterDomainEdge>(
+				InterDomainEdge.class);
+		Hashtable<Object, Inet4Address> router_id_domain_ed  = new Hashtable<Object, Inet4Address>();
+		Hashtable<Object, DataPathID> router_id_domain_ed_dp = new Hashtable<Object, DataPathID>();
+
+		HashMap<Inet4Address, Integer >SIDS   = new HashMap<Inet4Address,Integer>();
+		HashMap<DataPathID,   Integer >SIDSDP = new HashMap<DataPathID,Integer>();
+
+		Object router_id_addr = null;
+		Object s_router_id_addr = null;
+		Object d_router_id_addr = null;
+
+		File file = new File(fileName);
+		try {
+			DocumentBuilder builder = DocumentBuilderFactory.newInstance()
+					.newDocumentBuilder();
+			Document doc = builder.parse(file);
+
+			NodeList nodes_domains = doc.getElementsByTagName("domain");
+			// First pass to read all the nodes and domains
+			log.info("Multidomain Graph");
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				Element element_domain = (Element) nodes_domains.item(j);
+				NodeList nodes_domain_id = element_domain
+						.getElementsByTagName("domain_id");
+				Element domain_id_e = (Element) nodes_domain_id.item(0);
+				String domain_id_str = getCharacterDataFromElement(domain_id_e);
+				Inet4Address domain_id = (Inet4Address) Inet4Address
+						.getByName(domain_id_str);
+
+				log.info("Adding Domain: " + domain_id);
+				graph.addVertex(domain_id);
+				NodeList nodes = element_domain.getElementsByTagName("node");
+				for (int i = 0; i < nodes.getLength(); i++) {
+					Element element = (Element) nodes.item(i);
+					NodeList router_id_node = element
+							.getElementsByTagName("router_id");
+					Element router_id_e = (Element) router_id_node.item(0);
+					String router_id = getCharacterDataFromElement(router_id_e);
+					log.debug("Router_id: " + router_id);
+					try { // router_id_addr type: Inet4Address
+						router_id_addr = (Inet4Address) Inet4Address.getByName(router_id);
+					} catch (Exception e) { // router_id_addr type: DataPathID
+						router_id_addr =  DataPathID.getByName(router_id);
+					}
+					router_id_domain_ed.put(router_id_addr, domain_id);
+					NodeList nl_sid=element.getElementsByTagName("sid");
+
+					Element SID_e = (Element) nl_sid.item(0);
+					if (SID_e!=null)
+					{	int SID = Integer.parseInt(getCharacterDataFromElement(SID_e));
+						try {
+							SIDS.put((Inet4Address)router_id_addr,SID);
+						} catch (Exception e) {
+							SIDSDP.put((DataPathID)router_id_addr,SID);
+						}
+					}
+				}
+
+			}
+			log.debug("Domain_ids read");
+
+			int numLabels=0;
+
+			Boolean commonBitmapLabelSet = false;
+			NodeList edgeCommon = doc.getElementsByTagName("edgeCommon");
+			int grid=0;
+			int cs=0;
+			int n=0;
+			for (int i = 0; i < edgeCommon.getLength(); i++) {
+
+				Element edgeCommonElement = (Element) edgeCommon.item(i);
+				NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels");
+				for (int k = 0; k < availableLabels_node.getLength(); k++) {
+
+					Element availableLabels_e = (Element) availableLabels_node.item(k);
+					NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField");
+					Element labelSetField_el = (Element) labelSetField_node.item(0);
+					if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet
+						//Crear un BitMapSet
+
+						NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels");
+
+						Element numbLabels_e = (Element) numbLabels_node.item(0);
+						String numbLabels_s = getCharacterDataFromElement(numbLabels_e);
+						numLabels=Integer.parseInt(numbLabels_s);
+
+						NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel");
+						Element baseLabel_e = (Element) baseLabel_node.item(0);
+
+						float min_frequency;
+
+						grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue());
+
+						cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue());
+						boolean n_frequency_included=false;
+						if (baseLabel_e.getAttributeNode("n") != null ){
+							n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue());
+							n_frequency_included = true;
+						}
+						else if (baseLabel_e.getAttributeNode("min_frequency") != null){
+							String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue();
+
+							min_frequency=Float.parseFloat(s_min_frequency);
+							n = ((int)min_frequency - 1471)/20;
+							n_frequency_included=true;
+						}
+						if (n_frequency_included){
+							commonBitmapLabelSet = true;
+						}else{
+							log.error("ERROR reading the xml file of the topology, you should enter <baseLabel grid=\"1\" cs=\"2\" n=\"-11\"></baseLabel> ");
+						}
+
+					}
+				}
+
+			}
+			NodeList edges = doc.getElementsByTagName("edge");
+			boolean a =true;
+			for (int i = 0; i < edges.getLength(); i++) {
+				log.debug("Looking at edge");
+
+				Element element = (Element) edges.item(i);
+				InterDomainEdge edge = new InterDomainEdge();
+				TE_Information tE_info=readTE_INFOfromXml(null, element, false,numLabels, grid,  cs, n, 0, Integer.MAX_VALUE);
+				edge.setTE_info(tE_info);
+				edge.setLearntFrom(LearntFrom);
+				NodeList source = element.getElementsByTagName("source");
+				Element source_router_el = (Element) source.item(0);
+				NodeList source_router_id = source_router_el
+						.getElementsByTagName("router_id");
+				Element source_router_id_el = (Element) source_router_id
+						.item(0);
+				String s_r_id = getCharacterDataFromElement(source_router_id_el);
+				log.debug("Edge Source router_id: " + s_r_id);
+
+				try { // s_router_id_addr type: Inet4Address
+					s_router_id_addr = (Inet4Address) Inet4Address.getByName(s_r_id);
+				} catch (Exception e) {// s_router_id_addr type: DataPathID
+					s_router_id_addr =  DataPathID.getByName(s_r_id);
+				}
+				Inet4Address source_domain_id = router_id_domain_ed.get(s_router_id_addr);
+				log.debug("Edge Source domain_id: " + source_domain_id);
+
+				NodeList source_if_id_nl = source_router_el
+						.getElementsByTagName("if_id");
+				Element source_if_id_el = (Element) source_if_id_nl.item(0);
+				String s_source_if_id = getCharacterDataFromElement(source_if_id_el);
+				log.debug("Edge Source if_id: " + s_source_if_id);
+				int src_if_id = Integer.parseInt(s_source_if_id);
+
+				NodeList dest_nl = element.getElementsByTagName("destination");
+				Element dest_el = (Element) dest_nl.item(0);
+				NodeList dest_router_id_nl = dest_el
+						.getElementsByTagName("router_id");
+				Element dest_router_id_el = (Element) dest_router_id_nl.item(0);
+				String d_r_id = getCharacterDataFromElement(dest_router_id_el);
+				log.debug("Edge Destination router_id: " + d_r_id);
+				try { // d_router_id_addr type: Inet4Address
+					d_router_id_addr = (Inet4Address) Inet4Address.getByName(d_r_id);
+				} catch (Exception e) { // d_router_id_addr type: DataPathID
+					d_router_id_addr =  DataPathID.getByName(d_r_id);
+				}
+				Inet4Address dest_domain_id = router_id_domain_ed.get(d_router_id_addr);
+				log.debug("Destination domain_id: " + dest_domain_id);
+
+				NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id");
+				Element dest_if_id_el = (Element) dest_if_id_nl.item(0);
+				String s_dest_if_id = getCharacterDataFromElement(dest_if_id_el);
+				log.debug("Edge Dest if_id: " + s_dest_if_id);
+				int dst_if_id = Integer.parseInt(s_dest_if_id);
+
+				//router_id_domain_ed
+				//edge.setDomain_src_router(source_domain_id);
+
+				edge.setSrc_if_id(src_if_id);
+				edge.setDst_if_id(dst_if_id);
+				edge.setDomain_src_router(source_domain_id);
+				edge.setDomain_dst_router(dest_domain_id);
+
+				edge.setSrc_router_id(s_router_id_addr);
+				edge.setDst_router_id(d_router_id_addr);
+				if (!source_domain_id.equals(dest_domain_id)) {
+					log.info("Adding interdomain link "+source_domain_id.toString()+"-->"+dest_domain_id.toString()+" learnt "+edge.getLearntFrom());//edge.toString());
+					//Only add if the source and destination domains are different
+					graph.addEdge(source_domain_id, dest_domain_id, edge);
+				}
+
+			}
+
+
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+
+		return graph;
+
+	}
+
+
+	public static void initializeReachabilityFromFile(String fileName,
+			ReachabilityManager rm) {
+		Logger log = LoggerFactory.getLogger("BGP4Peer");
+		log.debug("Initializing reachability from " + fileName);
+		File file = new File(fileName);
+		try {
+			DocumentBuilder builder = DocumentBuilderFactory.newInstance()
+					.newDocumentBuilder();
+			Document doc = builder.parse(file);
+
+			NodeList nodes_domains = doc.getElementsByTagName("domain");
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				Element element_domain = (Element) nodes_domains.item(j);
+				NodeList nodes_domain_id = element_domain
+						.getElementsByTagName("domain_id");
+				Element domain_id_e = (Element) nodes_domain_id.item(0);
+				String domain_id_str = getCharacterDataFromElement(domain_id_e);
+				Inet4Address domain_id = (Inet4Address) Inet4Address
+						.getByName(domain_id_str);
+
+				log.debug("Network domain es: " + domain_id);
+
+				NodeList nodes = element_domain
+						.getElementsByTagName("reachability_entry");
+				log.debug("HAY : " + nodes.getLength());
+
+				for (int i = 0; i < nodes.getLength(); i++) {
+					Element element = (Element) nodes.item(i);
+					NodeList ipv4_address_node = element
+							.getElementsByTagName("ipv4_address");
+					Element ipv4_address_el = (Element) ipv4_address_node
+							.item(0);
+					String ipv4_address_str = getCharacterDataFromElement(ipv4_address_el);
+					log.debug("ipv4_address: " + ipv4_address_str);
+					Inet4Address ipv4_address = (Inet4Address) Inet4Address
+							.getByName(ipv4_address_str);
+					IPv4prefixEROSubobject eroso = new IPv4prefixEROSubobject();
+					eroso.setIpv4address(ipv4_address);
+					NodeList prefix_node = element
+							.getElementsByTagName("prefix");
+					Element prefix_el = (Element) prefix_node.item(0);
+					String prefix_str = getCharacterDataFromElement(prefix_el);
+					int prefix = Integer.parseInt(prefix_str);
+					eroso.setPrefix(prefix);
+					rm.addEROSubobject(domain_id, eroso);
+
+				}
+
+			}
+
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	// IT update del GEYSERS
+
+	public static DirectedWeightedMultigraph<Object,InterDomainEdge> readITMDNetwork(String fileName){
+		Logger log=LoggerFactory.getLogger("BGP4Peer");
+		DirectedWeightedMultigraph<Object,InterDomainEdge>graph =new DirectedWeightedMultigraph<Object,InterDomainEdge>(InterDomainEdge.class);
+		Hashtable <Object,Object> router_id_domain_ed=new Hashtable <Object,Object>();
+		Hashtable <Object,Object> it_site_id_domain_ed2=new Hashtable <Object,Object>();
+		Hashtable <Object,Object> resource_id_domain_ed=new Hashtable <Object,Object>();
+
+		File file = new File(fileName);
+		try {
+			DocumentBuilder builder =	DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			Document doc = builder.parse(file);
+
+			NodeList nodes_domains = doc.getElementsByTagName("domain");
+
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				Element element_domain = (Element) nodes_domains.item(j);
+				NodeList nodes_domain_id =  element_domain.getElementsByTagName("domain_id");
+				Element domain_id_e = (Element) nodes_domain_id.item(0);
+				String domain_id_str=getCharacterDataFromElement(domain_id_e);
+				Inet4Address domain_id= (Inet4Address) Inet4Address.getByName(domain_id_str);
+
+				log.info("Network domain: "+domain_id);
+				graph.addVertex(domain_id);
+				NodeList nodes = element_domain.getElementsByTagName("node");
+				for (int i = 0; i < nodes.getLength(); i++) {
+					Element element = (Element) nodes.item(i);
+					NodeList router_id_node = element.getElementsByTagName("router_id");
+					Element router_id_e = (Element) router_id_node.item(0);
+					String router_id=getCharacterDataFromElement(router_id_e);
+					log.debug("El router_id es "+router_id);
+					Inet4Address router_id_addr= (Inet4Address) Inet4Address.getByName(router_id);
+
+					NodeList domain_id_node = element.getElementsByTagName("domain_id");
+					router_id_domain_ed.put(router_id_addr, domain_id);
+					//graph.addVertex(router_id_addr);
+
+				}
+
+				NodeList ITsites = element_domain.getElementsByTagName("it_site");
+				for (int i = 0; i < ITsites.getLength(); i++) {
+					Element element = (Element) ITsites.item(i);
+					NodeList it_site_id_node = element.getElementsByTagName("it_site_id");
+					Element it_site_id_e = (Element) it_site_id_node.item(0);
+					String it_site_id=getCharacterDataFromElement(it_site_id_e);
+					log.info("El it_site_id es "+it_site_id);
+					Inet4Address it_site_id_addr= (Inet4Address) Inet4Address.getByName(it_site_id);
+
+					NodeList domain_id_node = element.getElementsByTagName("domain_id");
+					it_site_id_domain_ed2.put(it_site_id_addr, domain_id);
+					//graph.addVertex(router_id_addr);
+
+				}
+
+				NodeList storages = element_domain.getElementsByTagName("storage");
+				for (int i = 0; i < storages.getLength(); i++) {
+					Element element = (Element) storages.item(i);
+					NodeList resource_id_node = element.getElementsByTagName("resource_id");
+					Element resource_id_e = (Element) resource_id_node.item(0);
+					String resource_id=getCharacterDataFromElement(resource_id_e);
+					log.info("El resource_id es "+resource_id);
+					Inet4Address resource_id_addr= (Inet4Address) Inet4Address.getByName(resource_id);
+
+					NodeList domain_id_node = element.getElementsByTagName("domain_id");
+					resource_id_domain_ed.put(resource_id_addr, domain_id);
+					//graph.addVertex(router_id_addr);
+
+				}
+
+
+			}
+
+
+
+			NodeList edges = doc.getElementsByTagName("edge");
+			for (int i = 0; i < edges.getLength(); i++) {
+				log.info("New interdomain edge");
+				Inet4Address s_router_id_addr= null;
+				Inet4Address d_router_id_addr= null;
+				Inet4Address s_itsite_id_addr= null;
+				Inet4Address d_itsite_id_addr= null;
+				Inet4Address s_resource_id_addr= null;
+				Inet4Address d_resource_id_addr= null;
+				Inet4Address source_domain_id=null;
+				Inet4Address dest_domain_id=null;
+
+
+				Element element = (Element) edges.item(i);
+				InterDomainEdge edge =new InterDomainEdge();
+
+				NodeList source = element.getElementsByTagName("source");
+				Element source_router_el = (Element)source.item(0);
+				NodeList source_router_id= source_router_el.getElementsByTagName("router_id");
+				if (source_router_id.getLength()>0){
+					Element source_router_id_el=(Element)source_router_id.item(0);
+					String s_r_id=getCharacterDataFromElement(source_router_id_el);
+					log.info("Edge Source router_id: "+s_r_id);
+					s_router_id_addr= (Inet4Address) Inet4Address.getByName(s_r_id);
+					source_domain_id=  (Inet4Address)router_id_domain_ed.get(s_router_id_addr);
+					log.info("Edge Source domain_id: "+source_domain_id);
+				}
+
+				NodeList source_it_site_id= source_router_el.getElementsByTagName("it_site_id");
+				if (source_it_site_id.getLength()>0){
+					Element source_it_site_id_el=(Element)source_it_site_id.item(0);
+					String s_itsite_id=getCharacterDataFromElement(source_it_site_id_el);
+					log.info("Edge Source it_site_id: "+s_itsite_id);
+					s_itsite_id_addr= (Inet4Address) Inet4Address.getByName(s_itsite_id);						
+					source_domain_id=  (Inet4Address)it_site_id_domain_ed2.get(s_itsite_id_addr);
+					log.info("Edge Source ITsite domain_id: "+source_domain_id);
+				}
+
+				NodeList source_resource_id= source_router_el.getElementsByTagName("resource_id");
+				if (source_resource_id.getLength()>0){
+					Element source_resource_id_el=(Element)source_resource_id.item(0);
+					String s_resource_id=getCharacterDataFromElement(source_resource_id_el);
+					log.info("Edge Source resource_id: "+s_resource_id);
+					s_resource_id_addr= (Inet4Address) Inet4Address.getByName(s_resource_id);						
+					source_domain_id=  (Inet4Address)resource_id_domain_ed.get(s_resource_id_addr);
+					log.info("Edge Source ITsite domain_id: "+source_domain_id);
+				}
+
+				NodeList source_if_id_nl= source_router_el.getElementsByTagName("if_id");
+				Element source_if_id_el=(Element)source_if_id_nl.item(0);
+				String s_source_if_id=getCharacterDataFromElement(source_if_id_el);
+				log.info("Edge Source if_id: "+s_source_if_id);
+				int src_if_id=Integer.parseInt(s_source_if_id);
+
+				NodeList dest_nl = element.getElementsByTagName("destination");
+				Element dest_el = (Element)dest_nl.item(0);
+				NodeList dest_router_id_nl= dest_el.getElementsByTagName("router_id");
+				if (dest_router_id_nl.getLength()>0){
+					Element dest_router_id_el=(Element)dest_router_id_nl.item(0);	
+					String d_r_id=getCharacterDataFromElement(dest_router_id_el);
+					log.info("Edge Destination router_id: "+d_r_id);
+					d_router_id_addr= (Inet4Address) Inet4Address.getByName(d_r_id);
+					dest_domain_id=  (Inet4Address)router_id_domain_ed.get(d_router_id_addr);
+					log.info("Destination domain_id: "+dest_domain_id);
+				}
+
+				NodeList dest_it_site_id_nl= dest_el.getElementsByTagName("it_site_id");
+				if (dest_it_site_id_nl.getLength()>0){				
+					Element dest_it_site_id_el=(Element)dest_it_site_id_nl.item(0);
+					String d_itsite_id=getCharacterDataFromElement(dest_it_site_id_el);
+					log.info("Edge Destination it_site_id: "+d_itsite_id);
+					d_itsite_id_addr= (Inet4Address) Inet4Address.getByName(d_itsite_id);						
+					dest_domain_id=  (Inet4Address)it_site_id_domain_ed2.get(d_itsite_id_addr);						
+					log.info("Destination ITsite domain_id: "+dest_domain_id);
+				}
+
+				NodeList dest_resource_id_nl= dest_el.getElementsByTagName("resource_id");
+				if (dest_resource_id_nl.getLength()>0){				
+					Element dest_resource_id_el=(Element)dest_resource_id_nl.item(0);
+					String d_resource_id=getCharacterDataFromElement(dest_resource_id_el);
+					log.info("Edge Destination resource_id: "+d_resource_id);
+					d_resource_id_addr= (Inet4Address) Inet4Address.getByName(d_resource_id);						
+					dest_domain_id=  (Inet4Address)resource_id_domain_ed.get(d_resource_id_addr);						
+					log.info("Destination ITsite domain_id: "+dest_domain_id);
+				}
+
+				NodeList dest_if_id_nl= dest_el.getElementsByTagName("if_id");
+				Element dest_if_id_el=(Element)dest_if_id_nl.item(0);
+				String s_dest_if_id=getCharacterDataFromElement(dest_if_id_el);
+				log.info("Edge Dest if_id: "+s_dest_if_id);
+				int dst_if_id=Integer.parseInt(s_dest_if_id);
+
+				edge.setSrc_if_id(src_if_id);
+				edge.setDst_if_id(dst_if_id);
+
+				if (source_router_id.getLength()>0){
+					edge.setSrc_router_id(s_router_id_addr);
+				}else if(source_it_site_id.getLength()>0){
+					edge.setSrc_router_id(s_itsite_id_addr);
+				}else if(source_resource_id.getLength()>0){
+					edge.setSrc_router_id(s_resource_id_addr);
+				}
+
+				if (dest_router_id_nl.getLength()>0){
+					edge.setDst_router_id(d_router_id_addr);
+				}else if(dest_it_site_id_nl.getLength()>0){
+					edge.setDst_router_id(d_itsite_id_addr);
+				}else if(dest_resource_id_nl.getLength()>0){
+					edge.setDst_router_id(d_resource_id_addr);
+				}
+				graph.addEdge(source_domain_id, dest_domain_id,edge);
+			}			
+		}
+		catch (Exception e) {
+			e.printStackTrace();
+		}		
+
+		return graph;
+
+	}
+
+
+	public static WSONInformation getWSONInformation(String fileName){
+		return FileTEDBUpdater.getWSONInformation(fileName,null);
+	}
+
+	public static WSONInformation getWSONInformation(String fileName, String layer){
+		Logger log = LoggerFactory.getLogger("BGP4Peer");
+		File file = new File(fileName);
+		AvailableLabels commonAvailableLabels = null;
+		WSONInformation WSONinfo = null;
+		int numLabels = 0;
+		int grid=0;
+		int cs=0;
+		int n=0;
+		log.debug("FileName:::"+fileName);
+		try {
+			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			Document doc = builder.parse(file);
+			//			NodeList nodes_domains = doc.getElementsByTagName("domain");
+			//			for (int j = 0; j < nodes_domains.getLength(); j++) {
+			//				Element element_domain = (Element) nodes_domains.item(j);
+
+			NodeList edgeCommon = doc.getElementsByTagName("edgeCommon");
+
+			for (int i = 0; i < edgeCommon.getLength(); i++) {
+
+				Element edgeCommonElement = (Element) edgeCommon.item(i);
+				NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels");
+				for (int k = 0; k < availableLabels_node.getLength(); k++) {
+					commonAvailableLabels = new AvailableLabels();
+					Element availableLabels_e = (Element) availableLabels_node.item(k);
+					NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField");
+					Element labelSetField_el = (Element) labelSetField_node.item(0);
+					if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet
+						//Crear un BitMapSet
+
+						NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels");
+
+						Element numbLabels_e = (Element) numbLabels_node.item(0);
+						String numbLabels_s = getCharacterDataFromElement(numbLabels_e);						
+						numLabels=Integer.parseInt(numbLabels_s);	
+
+						NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel");
+						Element baseLabel_e = (Element) baseLabel_node.item(0);
+
+						float min_frequency;
+
+						grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue());
+
+						cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue());
+						boolean n_frequency_included=false;
+						if (baseLabel_e.getAttributeNode("n") != null ){
+							n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue());
+							n_frequency_included = true;
+						}
+						else if (baseLabel_e.getAttributeNode("min_frequency") != null){
+							String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue();
+
+							min_frequency=Float.parseFloat(s_min_frequency);	
+							n = ((int)min_frequency - 1471)/20;
+							n_frequency_included=true;
+						}
+						if (n_frequency_included){
+							createBitmapLabelSet(commonAvailableLabels,numLabels,grid,cs,n);
+						}else{
+							log.error("ERROR reading the xml file of the topology, you should enter <baseLabel grid=\"1\" cs=\"2\" n=\"-11\"></baseLabel> ");
+						}
+
+					}
+				}
+
+			}
+			//}
+		} catch (Exception e) {
+			log.error(e.toString());
+			e.printStackTrace();
+		}
+		if (commonAvailableLabels !=null){
+			WSONinfo = new WSONInformation();
+			WSONinfo.setCommonAvailableLabels(commonAvailableLabels);
+			WSONinfo.setNumLambdas(numLabels);
+			WSONinfo.setCs(cs);
+			WSONinfo.setGrid(grid);
+			WSONinfo.setnMin(n);
+		}
+		return WSONinfo;
+
+	}
+
+	public static SSONInformation getSSONInformation(String fileName){
+		return FileTEDBUpdater.getSSONInformation(fileName,null);
+	}
+
+	public static SSONInformation getSSONInformation(String fileName, String layer){
+		Logger log = LoggerFactory.getLogger("BGP4Peer");
+		File file = new File(fileName);
+		AvailableLabels commonAvailableLabels = null;
+		SSONInformation SSONinfo = null;
+		int numLabels = 0;
+		int grid=0;
+		int cs=0;
+		int n=0;
+		try {
+			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			Document doc = builder.parse(file);
+			//			NodeList nodes_domains = doc.getElementsByTagName("domain");
+			//			for (int j = 0; j < nodes_domains.getLength(); j++) {
+			//				Element element_domain = (Element) nodes_domains.item(j);
+
+			NodeList edgeCommon = doc.getElementsByTagName("edgeCommon");
+
+			for (int i = 0; i < edgeCommon.getLength(); i++) {
+
+				Element edgeCommonElement = (Element) edgeCommon.item(i);
+				NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels");
+				for (int k = 0; k < availableLabels_node.getLength(); k++) {
+					commonAvailableLabels = new AvailableLabels();
+					Element availableLabels_e = (Element) availableLabels_node.item(k);
+					NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField");
+					Element labelSetField_el = (Element) labelSetField_node.item(0);
+					if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet
+						//Crear un BitMapSet
+
+						NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels");
+
+						Element numbLabels_e = (Element) numbLabels_node.item(0);
+						String numbLabels_s = getCharacterDataFromElement(numbLabels_e);						
+						numLabels=Integer.parseInt(numbLabels_s);	
+
+						NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel");
+						Element baseLabel_e = (Element) baseLabel_node.item(0);
+
+						float min_frequency;
+
+						grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue());
+
+						cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue());
+						boolean n_frequency_included=false;
+						if (baseLabel_e.getAttributeNode("n") != null ){
+							n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue());
+							n_frequency_included = true;
+						}
+						else if (baseLabel_e.getAttributeNode("min_frequency") != null){
+							String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue();
+
+							min_frequency=Float.parseFloat(s_min_frequency);	
+							n = ((int)min_frequency - 1471)/20;
+							n_frequency_included=true;
+						}
+						if (n_frequency_included){
+							createBitmapLabelSet(commonAvailableLabels,numLabels,grid,cs,n);
+						}else{
+							log.error("ERROR reading the xml file of the topology, you should enter <baseLabel grid=\"1\" cs=\"2\" n=\"-11\"></baseLabel> ");
+						}
+
+					}
+				}
+
+			}
+			//}
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+		if (commonAvailableLabels !=null){
+			SSONinfo = new SSONInformation();
+			SSONinfo.setCommonAvailableLabels(commonAvailableLabels);
+			//			if(cs==5){
+			//				SSONinfo.setNumLambdas(numLabels*8);
+			//			}
+			SSONinfo.setNumLambdas(numLabels);
+			SSONinfo.setCs(cs);
+			SSONinfo.setGrid(grid);
+			SSONinfo.setnMin(n);
+		}
+		return SSONinfo;
+
+	}
+	public static void createBitmapLabelSet(AvailableLabels availableLabels,int numLabels,int grid, int cs,int n){
+		//FIXME: no hay problema de que se salga el ancho de banda
+		BitmapLabelSet bitmapLabelSet = new BitmapLabelSet();
+		DWDMWavelengthLabel dwdmWavelengthLabel = new DWDMWavelengthLabel();
+		dwdmWavelengthLabel.setGrid(grid);
+		dwdmWavelengthLabel.setChannelSpacing(cs);
+		dwdmWavelengthLabel.setN(n);
+		bitmapLabelSet.setDwdmWavelengthLabel(dwdmWavelengthLabel);
+
+		int numberBytes = numLabels/8;
+		if ((numberBytes*8)<numLabels){
+			numberBytes++;
+		}
+		byte[] bytesBitMap =  new byte[numberBytes];
+		for (int i=0;i<numberBytes;i++)
+			bytesBitMap[i]=0x00;	
+
+		bitmapLabelSet.setBytesBitmap(bytesBitMap);
+		bitmapLabelSet.setNumLabels(numLabels);
+
+		availableLabels.setLabelSet(bitmapLabelSet);
+
+	}
+	public static void getDomainReachabilityFromFile(String fileName, ReachabilityEntry reachabilityEntry) {
+		FileTEDBUpdater.getDomainReachabilityFromFile(fileName, reachabilityEntry,null);
+	}
+
+	public static Inet4Address getDomainIDfromSimpleDomain(String fileName) {
+		Logger log = LoggerFactory.getLogger("BGP4Peer");
+		log.debug("Initializng reachability from " + fileName);
+		File file = new File(fileName);
+		Inet4Address domain_id = null;
+		try {
+			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			Document doc = builder.parse(file);
+
+			NodeList nodes_domains = doc.getElementsByTagName("domain");
+			Element element_domain = (Element) nodes_domains.item(0);
+			NodeList nodes_domain_id = element_domain.getElementsByTagName("domain_id");
+			Element domain_id_e = (Element) nodes_domain_id.item(0);
+			String domain_id_str = getCharacterDataFromElement(domain_id_e);
+			domain_id = (Inet4Address) Inet4Address.getByName(domain_id_str);
+			log.debug("El dominio leido es: " + domain_id);
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+
+		return domain_id;
+	}
+
+	public static void getDomainReachabilityFromFile(String fileName,
+			/*byte[] domainReachabilityIPv4Prefix,*/ ReachabilityEntry reachabilityEntry,String layer) {
+		Logger log = LoggerFactory.getLogger("BGP4Peer");
+		log.debug("Initializng reachability from " + fileName);
+		log.debug("probandoooo Initializng reachability from " + fileName);
+		File file = new File(fileName);
+		try {
+			DocumentBuilder builder = DocumentBuilderFactory.newInstance()
+					.newDocumentBuilder();
+			Document doc = builder.parse(file);
+
+			NodeList nodes_domains = doc.getElementsByTagName("domain");
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				boolean readNetwork=false;
+				if (layer!=null){
+					NodeList nodes_layer = doc.getElementsByTagName("layer");
+					for (int i = 0; i < nodes_layer.getLength(); i++) {
+						Element element = (Element) nodes_layer.item(i);
+						String layer2 =getCharacterDataFromElement(element);
+						if (layer2.equals(layer)){
+							readNetwork=true;
+						}
+
+					}
+				}else {
+					readNetwork=true;
+				}
+				if (readNetwork){
+
+
+					Element element_domain = (Element) nodes_domains.item(j);
+					NodeList nodes_domain_id = element_domain
+							.getElementsByTagName("domain_id");
+					Element domain_id_e = (Element) nodes_domain_id.item(0);
+					String domain_id_str = getCharacterDataFromElement(domain_id_e);
+					Inet4Address domain_id = (Inet4Address) Inet4Address
+							.getByName(domain_id_str);
+					reachabilityEntry.setDomainId(domain_id);
+					log.debug("Network domain es: " + domain_id);
+					NodeList nodes = element_domain
+							.getElementsByTagName("reachability_entry");
+
+
+					for (int i = 0; i < nodes.getLength(); i++) {
+						Element element = (Element) nodes.item(i);
+						NodeList ipv4_address_node = element
+								.getElementsByTagName("ipv4_address");
+						Element ipv4_address_el = (Element) ipv4_address_node
+								.item(0);
+						String ipv4_address_str = getCharacterDataFromElement(ipv4_address_el);
+						log.debug("ipv4_address: " + ipv4_address_str);
+						Inet4Address ipv4_address = (Inet4Address) Inet4Address
+								.getByName(ipv4_address_str);
+						reachabilityEntry.setAggregatedIPRange(ipv4_address);
+						//FIXME: dudas de esto. Si asignar la IP o copiarla byte a byte con arraycopy
+						/*	System.arraycopy(ipv4_address.getAddress(), 0,
+							reachabilityEntry.getAggregatedIPRange(), 0, 4);*/
+						IPv4prefixEROSubobject eroso = new IPv4prefixEROSubobject();
+						NodeList prefix_node = element
+								.getElementsByTagName("prefix");
+						Element prefix_el = (Element) prefix_node.item(0);
+						String prefix_str = getCharacterDataFromElement(prefix_el);
+						int prefix = Integer.parseInt(prefix_str);
+						//Meto el prefijo
+						reachabilityEntry.setPrefix(prefix);
+						long resta = ((long) 0x1 << prefix) - 1;
+						long maskLong = resta << (32 - prefix);
+						byte[] mask = new byte[4];
+						mask[0] = (byte) (maskLong >>> 24 & 0xFF);
+						mask[1] = (byte) (maskLong >>> 16 & 0xFF);
+						mask[2] = (byte) (maskLong >>> 8 & 0xFF);
+						mask[3] = (byte) (maskLong & 0xFF);
+						//Meto la mascara
+						reachabilityEntry.setMask(mask);
+
+
+					}
+				}
+			}
+
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	
+	/**
+	 * Read the interdomain Topology from a topology file
+	 * @param fileName Name of the xml file.
+	 * @return List of interdomain edges.
+	 */
+	public static LinkedList<InterDomainEdge> readInterDomainLinks(String fileName) {
+
+		LinkedList<InterDomainEdge> interDomainLinks = new LinkedList<InterDomainEdge>();
+		Logger log = LoggerFactory.getLogger("BGP4Peer");
+		File file = new File(fileName);
+		Inet4Address domain_id=null;
+		try {
+			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			Document doc = builder.parse(file);
+
+			NodeList nodes_domains = doc.getElementsByTagName("domain");
+			if (nodes_domains!=null){
+				if (nodes_domains.getLength()>=1){
+					for (int j = 0; j < nodes_domains.getLength(); j++) {
+						Element element_domain = (Element) nodes_domains.item(j);
+						NodeList nodes_domain_id =  element_domain.getElementsByTagName("domain_id");
+						Element domain_id_e = (Element) nodes_domain_id.item(0);
+						String domain_id_str=getCharacterDataFromElement(domain_id_e);
+						domain_id= (Inet4Address) Inet4Address.getByName(domain_id_str);
+					}
+				}
+			}
+
+
+
+			Boolean commonBitmapLabelSet = false;
+			NodeList edgeCommon = doc.getElementsByTagName("edgeCommon");
+			int grid=0;
+			int cs=0;
+			int n=0;
+			int numLabels=0;
+			for (int i = 0; i < edgeCommon.getLength(); i++) {
+
+				Element edgeCommonElement = (Element) edgeCommon.item(i);
+				NodeList availableLabels_node = edgeCommonElement.getElementsByTagName("AvailableLabels");
+				for (int k = 0; k < availableLabels_node.getLength(); k++) {
+
+					Element availableLabels_e = (Element) availableLabels_node.item(k);
+					NodeList labelSetField_node = availableLabels_e.getElementsByTagName("LabelSetField");
+					Element labelSetField_el = (Element) labelSetField_node.item(0);
+					if (labelSetField_el.getAttributeNode("type").getValue().equals("4")){//Tengo BitMapSet
+						//Crear un BitMapSet
+
+						NodeList numbLabels_node = labelSetField_el.getElementsByTagName("numLabels");
+
+						Element numbLabels_e = (Element) numbLabels_node.item(0);
+						String numbLabels_s = getCharacterDataFromElement(numbLabels_e);						
+						numLabels=Integer.parseInt(numbLabels_s);	
+
+						NodeList baseLabel_node = labelSetField_el.getElementsByTagName("baseLabel");
+						Element baseLabel_e = (Element) baseLabel_node.item(0);
+
+						float min_frequency;
+
+						grid= Integer.parseInt(baseLabel_e.getAttributeNode("grid").getValue());
+
+						cs = Integer.parseInt(baseLabel_e.getAttributeNode("cs").getValue());
+						boolean n_frequency_included=false;
+						if (baseLabel_e.getAttributeNode("n") != null ){
+							n = Integer.parseInt(baseLabel_e.getAttributeNode("n").getValue());
+							n_frequency_included = true;
+						}
+						else if (baseLabel_e.getAttributeNode("min_frequency") != null){
+							String s_min_frequency = labelSetField_el.getAttributeNode("min_frequency").getValue();
+
+							min_frequency=Float.parseFloat(s_min_frequency);	
+							n = ((int)min_frequency - 1471)/20;
+							n_frequency_included=true;
+						}
+						if (n_frequency_included){
+							commonBitmapLabelSet = true;
+						}else{
+							log.error("ERROR reading the xml file of the topology, you should enter <baseLabel grid=\"1\" cs=\"2\" n=\"-11\"></baseLabel> ");
+						}
+
+					}
+				}
+
+			}
+
+
+			// Read the nodes of the domain which has interdomain connection
+			NodeList edges = doc.getElementsByTagName("edge");
+			for (int i = 0; i < edges.getLength(); i++) {
+				Element element = (Element) edges.item(i);
+
+				// We only want those routers which have type="interdomain"
+				//if (((String)element.getAttributeNode("type").getValue()).equals("interdomain")) {
+
+				if (element.getAttributeNode("type")!=null) {
+
+
+					if (element.getAttributeNode("type").getValue().equals("interdomain")) {
+
+						// Create a variable InterDomainEdge where we include
+						// the two nodes of the connection.
+						InterDomainEdge connection = new InterDomainEdge();
+						NodeList source = element.getElementsByTagName("source");
+						Element source_router_el = (Element) source.item(0);
+						//Read the source router IP
+						NodeList source_router_id = source_router_el.getElementsByTagName("router_id");
+						Element source_router_id_el = (Element) source_router_id.item(0);
+						String s_r_id = getCharacterDataFromElement(source_router_id_el);
+
+						Inet4Address s_router_id_addr = (Inet4Address) Inet4Address.getByName(s_r_id);
+						//Read the source router interface identifier of the connection
+						NodeList source_if_id_nl = source_router_el.getElementsByTagName("if_id");
+						Element source_if_id_el = (Element) source_if_id_nl.item(0);
+						String s_source_if_id = getCharacterDataFromElement(source_if_id_el);
+
+						int src_if_id = Integer.parseInt(s_source_if_id);
+						NodeList src_domain_nl = source_router_el.getElementsByTagName("domain_id");
+						Inet4Address s_router_domain=null;
+
+						if (src_domain_nl!=null)
+						{
+							if (src_domain_nl.getLength()>=1){
+								Element domain_id_el = (Element) src_domain_nl.item(0);
+								String s_r_domain = getCharacterDataFromElement(domain_id_el).trim();
+								s_router_domain = (Inet4Address) Inet4Address.getByName(s_r_domain);
+
+							}else{
+								s_router_domain= domain_id;
+
+							}
+						}else {
+							s_router_domain= domain_id;
+
+						}
+
+
+
+						//Read the router destination
+						NodeList dest_nl = element.getElementsByTagName("destination");
+						Element dest_el = (Element) dest_nl.item(0);
+						NodeList dest_router_id_nl = dest_el.getElementsByTagName("router_id");
+						Element dest_router_id_el = (Element) dest_router_id_nl.item(0);
+						String d_r_id = getCharacterDataFromElement(dest_router_id_el);
+						log.info("Edge Destination router_id: "+ d_r_id);
+						Inet4Address d_router_id_addr = (Inet4Address) Inet4Address.getByName(d_r_id);
+						NodeList dest_if_id_nl = dest_el.getElementsByTagName("if_id");
+						Element dest_if_id_el = (Element) dest_if_id_nl.item(0);
+						String s_dest_if_id = getCharacterDataFromElement(dest_if_id_el);
+						log.info("Edge Dest if_id: " + s_dest_if_id);
+						int dst_if_id = Integer.parseInt(s_dest_if_id);
+						NodeList domain = dest_el.getElementsByTagName("domain_id");
+						Element domain_id_el = (Element) domain.item(0);
+						String d_r_domain = getCharacterDataFromElement(domain_id_el);
+						log.info("Destination router domain: "+ d_r_domain);
+						Inet4Address d_router_domain= (Inet4Address) Inet4Address.getByName(d_r_domain);
+
+
+						// Include the connection between both nodes
+						connection.setSrc_if_id(src_if_id);
+						connection.setSrc_router_id(s_router_id_addr);
+						connection.setDst_if_id(dst_if_id);
+						connection.setDst_router_id(d_router_id_addr);
+						connection.setDomain_src_router(s_router_domain);
+						connection.setDomain_dst_router(d_router_domain);
+						if(connection.getTE_info()==null){
+							TE_Information tE_info= new TE_Information();							
+							if (commonBitmapLabelSet){	
+								tE_info.createBitmapLabelSet(numLabels, grid,  cs, n);
+							}
+							connection.setTE_info(tE_info);
+						}
+						//add the connection to the LinkedList.
+						interDomainLinks.add(connection);
+
+					}
+				}
+			}
+			//}//end for domains
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+
+		return interDomainLinks;
+
+	}
+
+	public static int readWSONLambdas(String fileName){
+		Logger log=LoggerFactory.getLogger("BGP4Peer");
+		File file = new File(fileName);
+		int num_wavelengths=4;
+		try {
+			DocumentBuilder builder =	DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			Document doc = builder.parse(file);
+			NodeList nodes_domains = doc.getElementsByTagName("domain");
+
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				Element element_domain = (Element) nodes_domains.item(j);
+				NodeList nodes_wl=  element_domain.getElementsByTagName("num_wavelengths");
+				for (int k = 0; k < nodes_wl.getLength(); k++) {
+					Element nodes_wl_e = (Element) nodes_wl.item(0);
+					String num_wavelengths_id=getCharacterDataFromElement(nodes_wl_e );
+					num_wavelengths=Integer.parseInt(num_wavelengths_id);
+					log.info("num_wavelength: "+num_wavelengths);
+				}
+
+			}
+		}
+		catch (Exception e) {
+			e.printStackTrace();
+		}		 
+
+		return num_wavelengths;
+	}
+
+
+	public static Hashtable <Object,Object> getITSites(String fileName){
+		Hashtable <Object,Object> it_site_id_domain_ed=new Hashtable <Object,Object>();
+
+		File file2 = new File(fileName);
+		try {
+			DocumentBuilder builder2 =	DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			Document doc2 = builder2.parse(file2);
+
+			NodeList nodes_domains = doc2.getElementsByTagName("domain");
+
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				Element element_domain = (Element) nodes_domains.item(j);
+				NodeList nodes_domain_id =  element_domain.getElementsByTagName("domain_id");
+				Element domain_id_e = (Element) nodes_domain_id.item(0);
+				String domain_id_str=getCharacterDataFromElement(domain_id_e);
+				Inet4Address domain_id= (Inet4Address) Inet4Address.getByName(domain_id_str);
+
+				NodeList ITsites = element_domain.getElementsByTagName("it_site");
+				for (int i = 0; i < ITsites.getLength(); i++) {
+					Element element = (Element) ITsites.item(i);
+					NodeList it_site_id_node = element.getElementsByTagName("it_site_id");
+					Element it_site_id_e = (Element) it_site_id_node.item(0);
+					String it_site_id=getCharacterDataFromElement(it_site_id_e);
+					Inet4Address it_site_id_addr= (Inet4Address) Inet4Address.getByName(it_site_id);
+
+					NodeList domain_id_node = element.getElementsByTagName("domain_id");
+					it_site_id_domain_ed.put(it_site_id_addr, domain_id);
+					//graph.addVertex(router_id_addr);					
+				}
+
+			}
+
+		}
+		catch (Exception e) {
+			e.printStackTrace();
+		}		 
+
+		return it_site_id_domain_ed;
+
+	}
+
+
+	public static Hashtable <Object,Object> getResource(String fileName){
+		Hashtable <Object,Object> resource_id_domain_ed=new Hashtable <Object,Object>();
+
+		File file2 = new File(fileName);
+		try {
+			DocumentBuilder builder2 =	DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			Document doc2 = builder2.parse(file2);
+
+			NodeList nodes_domains = doc2.getElementsByTagName("domain");
+
+			for (int j = 0; j < nodes_domains.getLength(); j++) {
+				Element element_domain = (Element) nodes_domains.item(j);
+				NodeList nodes_domain_id =  element_domain.getElementsByTagName("domain_id");
+				Element domain_id_e = (Element) nodes_domain_id.item(0);
+				String domain_id_str=getCharacterDataFromElement(domain_id_e);
+				Inet4Address domain_id= (Inet4Address) Inet4Address.getByName(domain_id_str);
+
+				NodeList storages = element_domain.getElementsByTagName("storage");
+				for (int i = 0; i < storages.getLength(); i++) {
+					Element element = (Element) storages.item(i);
+					NodeList resource_id_node = element.getElementsByTagName("resource_id");
+					Element resource_id_e = (Element) resource_id_node.item(0);
+					String resource_id=getCharacterDataFromElement(resource_id_e);
+					Inet4Address resource_id_addr= (Inet4Address) Inet4Address.getByName(resource_id);
+
+					NodeList domain_id_node = element.getElementsByTagName("domain_id");
+					resource_id_domain_ed.put(resource_id_addr, domain_id);
+					//graph.addVertex(router_id_addr);
+
+				}
+
+			}
+
+		}
+		catch (Exception e) {
+			e.printStackTrace();
+		}		 
+		return resource_id_domain_ed;
+
+	}
+
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IT_Resources.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IT_Resources.java
new file mode 100644
index 0000000000000000000000000000000000000000..a819bcf4d037085a7ce6eea68df7176129bdcd5c
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IT_Resources.java
@@ -0,0 +1,147 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.DefaultTEMetricLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IPv4RouterIDLocalNodeLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IPv4RouterIDRemoteNodeLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.LinkProtectionTypeLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MF_OTPAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MetricLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.TransceiverClassAndAppAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.MinMaxUndirectionalLinkDelayDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalAvailableBandwidthDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalDelayVariationDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalLinkDelayDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalLinkLossDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalResidualBandwidthDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalUtilizedBandwidthDescriptorSubTLV;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AdministrativeGroup;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.IPv4RemoteASBRID;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.InterfaceSwitchingCapabilityDescriptor;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.LinkLocalRemoteIdentifiers;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.LinkProtectionType;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.MaximumBandwidth;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.MaximumReservableBandwidth;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.RemoteASNumber;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.SharedRiskLinkGroup;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.TrafficEngineeringMetric;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.UnreservedBandwidth;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet;
+import es.tid.rsvp.constructs.gmpls.DWDMWavelengthLabel;
+
+public class IT_Resources {
+	
+	private String controllerIT;
+	private String cpu;
+	private String mem;
+	private String storage;
+	private String learntFrom;
+	private String domainID;
+
+	/**
+	 * TEDB logger
+	 */
+	public IT_Resources()
+	{
+		//initWLANs();
+	}
+
+	public String getCpu() {
+		return cpu;
+	}
+
+	public void setCpu(String cpu) {
+		this.cpu = cpu;
+	}
+	
+	
+	public String getMem() {
+		return mem;
+	}
+
+	public void setMem(String mem) {
+		this.mem = mem;
+	}
+	
+	
+	public String getStorage() {
+		return storage;
+	}
+
+	public void setStorage(String storage) {
+		this.storage = storage;
+	}
+
+	/**
+	 * Funcion que transforma una cantidad de bits en el numero de bytes que necesita 
+	 * @param numBit
+	 */
+	private int getNumberBytes(int numBits){
+		int numberBytes = numBits/8;
+		if ((numberBytes*8)<numBits){
+			numberBytes++;
+		}
+		return numberBytes;
+	}
+	
+	
+	public String toString(){
+		String ret="";
+
+		if (controllerIT!=null){
+			ret=ret+controllerIT.toString()+"\t";
+		}
+		if (cpu!=null){
+			ret=ret+cpu.toString()+"\t";
+		}
+		if (mem!=null){
+			ret=ret+mem.toString()+"\t";
+		}
+		if (storage!=null){
+			ret=ret+storage.toString()+"\t";
+		}
+		
+		
+		return ret;
+	}
+
+	public String getControllerIT() {
+		return controllerIT;
+	}
+
+	public void setControllerIT(String controllerIT) {
+		this.controllerIT = controllerIT;
+	}
+
+
+	public String getLearntFrom() {
+		return learntFrom;
+	}
+	public void setLearntFrom(String learntFrom) {
+		this.learntFrom = learntFrom;
+	}
+
+	public String getITdomainID() {
+		return domainID;
+	}
+
+	public void setITdomainID(String ID) {
+		this.domainID = ID;
+	}
+
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/InterDomainEdge.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/InterDomainEdge.java
new file mode 100644
index 0000000000000000000000000000000000000000..724dbb8e0de7861d4477c709d8a6c5a847253a8f
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/InterDomainEdge.java
@@ -0,0 +1,221 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import org.jgrapht.graph.DefaultWeightedEdge;
+
+public class InterDomainEdge extends DefaultWeightedEdge {
+	
+	/**
+	 * Interface ID of the outgoing interface from the source
+	 */
+	public long src_if_id;
+	
+	/**
+	 * Interface ID of the incoming interface from the destination
+	 */
+	public long dst_if_id;
+	
+	
+	public Object src_router_id;
+	
+	public Object dst_router_id;
+	
+
+	/**
+	 * Source route domain
+	 */
+	public Object domain_src_router;
+	
+	/**
+	 * Destination router domain
+	 */
+	public Object domain_dst_router;
+	
+	
+	public TE_Information TE_info;
+	public InterDomainEdge(){
+		TE_info=new TE_Information();
+		
+	}
+	public InterDomainEdge(Object src, Object dst){
+		src_router_id= src;
+		dst_router_id=dst;
+	}
+	public Object getDomain_dst_router() {
+		return domain_dst_router;
+	}
+
+	public void setDomain_dst_router(Object domain_dst_router) {
+		this.domain_dst_router = domain_dst_router;
+	}
+
+	public Object getSource(){
+		Object source= (Object)super.getSource();
+		return source;
+	}
+	
+	public TE_Information getTE_info() {
+		return TE_info;
+	}
+	public void setTE_info(TE_Information tE_info) {
+		TE_info = tE_info;
+	}
+	public Object getTarget(){
+		Object destination= (Object)super.getTarget();
+		return destination;
+	}
+
+	public long getSrc_if_id() {
+		return src_if_id;
+	}
+
+	public void setSrc_if_id(long src_if_id) {
+		this.src_if_id = src_if_id;
+	}
+
+	public long getDst_if_id() {
+		return dst_if_id;
+	}
+
+	public void setDst_if_id(long dst_if_id) {
+		this.dst_if_id = dst_if_id;
+	}
+
+	public Object getSrc_router_id() {
+		return src_router_id;
+	}
+
+	public void setSrc_router_id(Object src_router_id) {
+		this.src_router_id = src_router_id;
+	}
+
+	public Object getDst_router_id() {
+		return dst_router_id;
+	}
+
+	public void setDst_router_id(Object dst_router_id) {
+		this.dst_router_id = dst_router_id;
+	}
+	
+	public Node_Info getLocal_Node_Info() {
+		return Local_Node_Info;
+	}
+	public void setLocal_Node_Info(Node_Info local_Node_Info) {
+		Local_Node_Info = local_Node_Info;
+	}
+	public Node_Info getRemote_Node_Info() {
+		return Remote_Node_Info;
+	}
+	public void setRemote_Node_Info(Node_Info remote_Node_Info) {
+		Remote_Node_Info = remote_Node_Info;
+	}
+	public String getLearntFrom() {
+		return learntFrom;
+	}
+	public void setLearntFrom(String learntFrom) {
+		this.learntFrom = learntFrom;
+	}
+	public int getSrc_sid() {
+		return src_sid;
+	}
+	public void setSrc_sid(int src_sid) {
+		this.src_sid = src_sid;
+	}
+	public int getDst_sid() {
+		return dst_sid;
+	}
+	public void setDst_sid(int dst_sid) {
+		this.dst_sid = dst_sid;
+	}
+
+	/** 
+	 * Characterization of local node
+	 * 
+	 */
+	public Node_Info Local_Node_Info;
+		
+	/** 
+	 * Characterization of remote node
+	 * 
+	 */
+	
+	public Node_Info Remote_Node_Info;
+	
+	/**
+	 * where have we leanrt the info from...
+	 */
+	
+	private String learntFrom;
+	
+	/**
+	 * SID of the source node
+	 */
+	private int src_sid;
+	
+	/**
+	 * SID of the destination node
+	 */
+	private int dst_sid;
+	
+	
+	@Override
+	public boolean equals(Object obj) {
+		if ((((InterDomainEdge)obj).getDst_router_id()).equals(dst_router_id)
+				&& (((InterDomainEdge)obj).getSrc_router_id()).equals(src_router_id)){
+			return true;
+		}
+		return false;
+	}
+	@Override
+	public String toString(){
+		String ideString;
+		//TODO: he cambiado esta linea,...porq no me funcionaba super.getSource...Hayq ue mirarlo!!
+		//ideString=src_router_id.toString()+":"+src_if_id+" ("+((Object)super.getSource()).toString()+")  --> "+dst_router_id.toString()+":"+dst_if_id+" ("+((Object)super.getTarget()).toString()+")";
+		ideString=src_router_id.toString()+": "+src_if_id+" --> "+dst_router_id.toString()+": "+dst_if_id;
+		/*if (TE_info==null){
+			return ideString;
+		}
+		else		
+		{
+			if ((this.TE_info.getAvailableLabels()!=null) &&(this.TE_info.getAvailableLabels().getLabelSet()!=null)){
+				ideString=ideString+" Bitmap: {";
+				for (int i=0;i<this.TE_info.getAvailableLabels().getLabelSet().getNumLabels();++i){
+					ideString = ideString+ (this.TE_info.isWavelengthFree(i)?"0":"1");		
+				}
+				ideString=ideString+"}";	
+				ideString=ideString+" Reserved: {";
+				for (int i=0;i<this.TE_info.getAvailableLabels().getLabelSet().getNumLabels();++i){
+					ideString = ideString+ (this.TE_info.isWavelengthUnreserved(i)?"0":"1");		
+				}
+				ideString=ideString+"}";
+				ideString = ideString + "\r\n TED: " + this.TE_info.toString() + "\r\n";
+				return ideString;	
+				
+			}else {*/
+				return ideString + "\r\n TED: " + this.TE_info.toString() + "\r\n";
+		//	}	
+		//}
+	}
+	public Object getDomain_src_router() {
+		return domain_src_router;
+	}
+	public void setDomain_src_router(Object domain_src_router) {
+		this.domain_src_router = domain_src_router;
+	}
+	
+	
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainEdge.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainEdge.java
new file mode 100644
index 0000000000000000000000000000000000000000..50bf939597638d1a8074437971744bf0eca932c2
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainEdge.java
@@ -0,0 +1,298 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import org.jgrapht.graph.DefaultWeightedEdge;
+
+import eu.teraflow.tid.tedb.elements.Bandwidth;
+
+/**
+ * IntraDomain Edge of a Traffic Engineering Database.
+ * @author ogondio, msc. pac
+ *
+ */
+public class IntraDomainEdge extends DefaultWeightedEdge {
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+
+	/**
+	 * Unnumbered Interface ID of the outgoing interface from the source
+	 */
+	public long src_if_id;
+
+	/**
+	 * Unnumbered Interface ID of the incoming interface from the destination
+	 */
+	public long dst_if_id;
+
+	/**
+	 * Numbered Interface ID of the outgoing interface from the source
+	 */
+	public Object src_Numif_id;
+
+	/**
+	 * Numbered Interface ID of the incoming interface from the destination
+	 */
+	public Object dst_Numif_id;
+
+	/**
+	 * Traffic engineering information, as defined in IETF
+	 */
+	public TE_Information TE_info = new TE_Information();
+
+	/**
+	 * Transmission delay of the link (just transmission) 
+	 */
+	private double delay_ms;
+
+	/**
+	 * Number of parallel fibers in the logical link.
+	 */
+	public int numFibers;
+
+	/** 
+	 * Characterization of local node
+	 * 
+	 */
+	public Node_Info Local_Node_Info;
+
+	/** 
+	 * Characterization of remote node
+	 * 
+	 */
+
+	public Node_Info Remote_Node_Info;
+
+	/**
+	 * where have we leanrt the info from...
+	 */
+
+	private String learntFrom;
+
+	/**
+	 * SID of the source node
+	 */
+	 
+	private int src_sid;
+
+	/**
+	 * SID of the destination node
+	 */
+	private int dst_sid;
+
+	private String linkID=null;
+	private boolean isDirectional;
+	private String type=null;
+	private double temetric;
+
+	private Bandwidth bw=null;
+
+	public String getLinkID() {
+		return linkID;
+	}
+
+	public void setLinkID(String linkID) {
+		this.linkID = linkID;
+	}
+
+	public boolean isDirectional() {
+		return isDirectional;
+	}
+
+	public void setDirectional(boolean isDirectional) {
+		this.isDirectional = isDirectional;
+	}
+
+	public String getType() {
+		return type;
+	}
+
+	public void setType(String type) {
+		this.type = type;
+	}
+
+	public double getTemetric() {
+		return temetric;
+	}
+
+	public void setTemetric(double temetric) {
+		this.temetric = temetric;
+	}
+
+	public Bandwidth getBw() {
+		return bw;
+	}
+
+	public void setBw(Bandwidth bw) {
+		this.bw = bw;
+	}
+
+	public IntraDomainEdge()
+	{
+		TE_info = new TE_Information();
+	}
+
+	public Object getSource(){
+		Object source= (Object)super.getSource();
+		return source;
+	}
+
+	public Object getTarget(){
+		Object destination= (Object)super.getTarget();
+		return destination;
+	}
+
+	public long getSrc_if_id() {
+		return src_if_id;
+	}
+
+	public void setSrc_if_id(long src_if_id) {
+		this.src_if_id = src_if_id;
+	}
+
+	public long getDst_if_id() {
+		return dst_if_id;
+	}
+
+	public void setDst_if_id(long dst_if_id) {
+		this.dst_if_id = dst_if_id;
+	}
+
+	public TE_Information getTE_info() {
+		return TE_info;
+	}
+
+	public void setTE_info(TE_Information tE_info) {
+		TE_info = tE_info;
+	}
+
+
+
+	public double getDelay_ms() {
+		return delay_ms;
+	}
+
+	public void setDelay_ms(double delay_ms) {
+		this.delay_ms = delay_ms;
+	}
+
+	public int getNumberFibers() {
+		return numFibers;
+	}
+
+
+
+	public void setNumberFibers(int numFibers) {
+		this.numFibers = numFibers;
+	}
+
+	public Object getSrc_Numif_id() {
+		return src_Numif_id;
+	}
+
+	public void setSrc_Numif_id(Object srcNumifId) {
+		src_Numif_id = srcNumifId;
+	}
+
+	public Node_Info getLocal_Node_Info() {
+		return Local_Node_Info;
+	}
+
+	public void setLocal_Node_Info(Node_Info local_Node_Info) {
+		Local_Node_Info = local_Node_Info;
+	}
+
+	public Node_Info getRemote_Node_Info() {
+		return Remote_Node_Info;
+	}
+
+	public void setRemote_Node_Info(Node_Info remote_Node_Info) {
+		Remote_Node_Info = remote_Node_Info;
+	}
+
+	public Object getDst_Numif_id() {
+		return dst_Numif_id;
+	}
+
+	public void setDst_Numif_id(Object dstNumifId) {
+		dst_Numif_id = dstNumifId;
+	}
+
+	public String getLearntFrom() {
+		return learntFrom;
+	}
+
+	public void setLearntFrom(String leanrtFrom) {
+		this.learntFrom = leanrtFrom;
+	}
+
+	public int getSrc_sid() {
+		return src_sid;
+	}
+
+	public void setSrc_sid(int src_sid) {
+		this.src_sid = src_sid;
+	}
+
+	public int getDst_sid() {
+		return dst_sid;
+	}
+
+	public void setDst_sid(int dst_sid) {
+		this.dst_sid = dst_sid;
+	}
+
+	public String toString(){
+		String ret=this.getSource()+":"+this.getSrc_if_id()+"-->"+this.getTarget()+":"+this.getDst_if_id()+" NumFibers = "+numFibers;
+		if (TE_info==null){
+			return ret;
+		}
+		else		
+		{
+			if ((this.TE_info.getAvailableLabels()!=null) &&(this.TE_info.getAvailableLabels().getLabelSet()!=null)){
+				ret=ret+" Bitmap: {";
+				for (int i=0;i<this.TE_info.getAvailableLabels().getLabelSet().getNumLabels();++i){
+					ret = ret+ (this.TE_info.isWavelengthFree(i)?"0":"1");		
+				}
+				ret=ret+"}";	
+				ret=ret+" Reserved: {";
+				for (int i=0;i<this.TE_info.getAvailableLabels().getLabelSet().getNumLabels();++i){
+					ret = ret+ (this.TE_info.isWavelengthUnreserved(i)?"0":"1");		
+				}
+				ret=ret+"}";
+				ret = ret + "\r\n TED: " + this.TE_info.toString() + "\r\n";
+				return ret;	
+
+			}else {
+				return ret + "\r\n TED: " + this.TE_info.toString() + "\r\n";
+			}	
+		}
+	}
+
+	
+
+	/*
+	@Override
+	public String toString() {
+		return "IntraDomainEdge [src_if_id=" + src_if_id + ", dst_if_id="
+				+ dst_if_id + ", src_Numif_id=" + src_Numif_id
+				+ ", dst_Numif_id=" + dst_Numif_id + ", TE_info=" + TE_info
+				+ ", delay_ms=" + delay_ms + ", numFibers=" + numFibers + "]";
+	}*/
+
+}
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainWeightEdge.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainWeightEdge.java
new file mode 100644
index 0000000000000000000000000000000000000000..ce3cac72e27b99c296b2d54270c07f604f818446
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/IntraDomainWeightEdge.java
@@ -0,0 +1,131 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import java.net.Inet4Address;
+
+import org.jgrapht.graph.DefaultWeightedEdge;
+
+/**
+ * IntraDomain Edge of a Traffic Engineering Database.
+ * @author ogondio, msc
+ *
+ */
+public class IntraDomainWeightEdge extends DefaultWeightedEdge {
+	
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = 1L;
+	
+	/**
+	 * Interface ID of the outgoing interface from the source
+	 */
+	public long src_if_id;
+	
+	/**
+	 * Interface ID of the incoming interface from the destination
+	 */
+	public long dst_if_id;
+
+	/**
+	 * Traffic engineering information, as defined in IETF
+	 */
+	public TE_Information TE_info;
+	
+	/**
+	 * Transmission delay of the link (just transmission) 
+	 */
+	private double delay_ms;
+
+	public IntraDomainWeightEdge(){
+		
+	}
+		
+	
+	
+	public Inet4Address getSource(){
+		Inet4Address source= (Inet4Address)super.getSource();
+		return source;
+	}
+	
+	public Inet4Address getTarget(){
+		Inet4Address destination= (Inet4Address)super.getTarget();
+		return destination;
+	}
+
+	public long getSrc_if_id() {
+		return src_if_id;
+	}
+
+	public void setSrc_if_id(long src_if_id) {
+		this.src_if_id = src_if_id;
+	}
+
+	public long getDst_if_id() {
+		return dst_if_id;
+	}
+
+	public void setDst_if_id(long dst_if_id) {
+		this.dst_if_id = dst_if_id;
+	}
+	
+	public TE_Information getTE_info() {
+		return TE_info;
+	}
+
+	public void setTE_info(TE_Information tE_info) {
+		TE_info = tE_info;
+	}
+
+	
+
+	public double getDelay_ms() {
+		return delay_ms;
+	}
+
+	public void setDelay_ms(double delay_ms) {
+		this.delay_ms = delay_ms;
+	}
+	
+	public String toString(){
+		String ret=this.getSource()+":"+this.getSrc_if_id()+"-->"+this.getTarget()+":"+this.getDst_if_id();
+		if (TE_info==null){
+			return ret;
+		}
+		else		
+			{
+				if (this.TE_info.getAvailableLabels()!=null){
+					ret=ret+" Bitmap: {";
+					for (int i=0;i<this.TE_info.getAvailableLabels().getLabelSet().getNumLabels();++i){
+						ret = ret+ (this.TE_info.isWavelengthFree(i)?"0":"1");		
+					}
+					ret=ret+"}";	
+					ret=ret+" Reserved: {";
+					for (int i=0;i<this.TE_info.getAvailableLabels().getLabelSet().getNumLabels();++i){
+						ret = ret+ (this.TE_info.isWavelengthUnreserved(i)?"0":"1");		
+					}
+					ret=ret+"}";							
+					return ret;	
+					
+				}else {
+					return ret;
+				}	
+		}
+		
+	}
+	
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Layer.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Layer.java
new file mode 100644
index 0000000000000000000000000000000000000000..e9835d418f6edcb39a84ada9abc9967600702ec3
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Layer.java
@@ -0,0 +1,37 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+public class Layer {
+
+	/**
+	 * True if it is a GMPLS layer
+	 * False if it is an IP/MPLS layer (by default, false)
+	 */
+	public boolean gmpls=false;
+	
+	/**
+	 * 
+	 */
+	public int encodingType;
+	
+	/**
+	 * 
+	 */
+	public int switchingType;	
+	
+	public static final int SWITCHING_TYPE_WSON=150;
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MDTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MDTEDB.java
new file mode 100644
index 0000000000000000000000000000000000000000..09b75f6fe226a94673db8b93ecefcb4a1c7f167a
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MDTEDB.java
@@ -0,0 +1,270 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import org.jgrapht.graph.DirectedWeightedMultigraph;
+import org.jgrapht.graph.SimpleDirectedWeightedGraph;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.net.Inet4Address;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Set;
+
+/**
+ * Base de datos de ingenieria de trafico
+ * CLASE DE PRUEBA REESTRUCTURAR DESPUES!!!!!!!!!!
+ * @author ogondio
+ *
+ */
+public class MDTEDB implements MultiDomainTEDB {
+	private long graphId;
+	private DirectedWeightedMultigraph<Object,InterDomainEdge> networkDomainGraph;
+	public SimpleDirectedWeightedGraph<Object,IntraDomainEdge> networkGraph;
+	
+	//private LinkedList<InterDomainEdge> interDomainLinks;  
+		
+	public SimpleTEDB simple_ted;
+	
+	private Logger log;
+	
+	private boolean addBidirectional;
+	
+	/**
+	 * Table with IP address/prefix --> domain
+	 */
+	LinkedList<ReachabilityEntry> reachability;
+	
+	public MDTEDB(){
+		log=LoggerFactory.getLogger("BGP4Peer");
+		networkDomainGraph=new DirectedWeightedMultigraph<Object,InterDomainEdge> (InterDomainEdge.class);
+		addBidirectional=true;//FIXME: ESTO ES UN APA�O TEMPORAL
+		reachability=new LinkedList<ReachabilityEntry>();
+		//interDomainLinks = new LinkedList<InterDomainEdge>();
+	}
+	
+	public DirectedWeightedMultigraph<Object,InterDomainEdge> getDuplicatedMDNetworkGraph(){
+		
+		DirectedWeightedMultigraph<Object,InterDomainEdge> graphCopy= (DirectedWeightedMultigraph<Object, InterDomainEdge>) networkDomainGraph.clone();
+		return graphCopy;
+	}
+	
+	public DirectedWeightedMultigraph<Object, InterDomainEdge> getNetworkDomainGraph() {
+		return networkDomainGraph;
+	}
+
+	public void setNetworkDomainGraph(
+			DirectedWeightedMultigraph<Object, InterDomainEdge> networkDomainGraph) {
+		this.networkDomainGraph = networkDomainGraph;
+	}
+
+	public void initializeFromFile(String file){
+		networkDomainGraph=FileTEDBUpdater.readMDNetwork(file);		
+	}
+
+	public void initializeFromFile(String file, String learntFrom){
+		networkDomainGraph=FileTEDBUpdater.readMDNetwork(file, learntFrom);
+	}
+	
+	public void initializeFromFileInterDomainLinks(String file){
+	}
+	
+	public void initializeFullTEDFromFile(String file){
+		networkGraph=FileTEDBUpdater.readNetwork(file);		
+	}
+	
+	public long getGraphId() {
+		return graphId;
+	}
+	public void setGraphId(long graphId) {
+		this.graphId = graphId;
+	}
+
+
+	public SimpleDirectedWeightedGraph<Object, IntraDomainEdge> getDuplicatedNetworkGraph() {
+		return networkGraph;
+	}
+	
+	public synchronized void addInterdomainLink( Object localDomainID, Object localRouterASBR, long localRouterASBRIf, Object remoteDomainID, Object remoteRouterASBR, long remoteRouterASBRIf, TE_Information te_info){
+
+		if (!networkDomainGraph.containsVertex(localDomainID)){
+			networkDomainGraph.addVertex(localDomainID);
+			log.debug("Vertex (domain) "+localDomainID+" added");
+		}
+		if (!networkDomainGraph.containsVertex(remoteDomainID)){
+			networkDomainGraph.addVertex(remoteDomainID);
+			log.debug("Vertex (domain) "+remoteDomainID+" added");
+		}
+		log.debug("Looking to add "+localRouterASBR+":"+localRouterASBRIf+" ("+localDomainID+") -->"+remoteRouterASBR+":"+remoteRouterASBRIf+" ("+remoteDomainID+")");
+		Set<InterDomainEdge> edgeset= networkDomainGraph.edgesOf(localDomainID);
+		Iterator <InterDomainEdge> iterador=edgeset.iterator();
+		boolean edgeFound=false;
+		InterDomainEdge interDomainEdgeFound=null;
+		if (edgeset.size() == 0)
+			log.debug("Edge set size = 0");
+		while (iterador.hasNext()){
+			InterDomainEdge interDomainEdge=iterador.next();
+			log.debug("existing edge: "+interDomainEdge.toString());
+			if (interDomainEdge.getSrc_router_id().equals(localRouterASBR)){
+				log.debug("Local router is the same!!!");
+				if (interDomainEdge.getDst_router_id().equals(remoteRouterASBR)){
+					log.debug("Destination router is the same!!!");
+					edgeFound=true;
+					interDomainEdgeFound=interDomainEdge;
+				}
+				else {
+					log.debug("Destination router is NOT the same!!!");
+				}
+			}else {
+				log.debug("Local router is NOT the same!!!");
+			}			
+		}
+		
+		if (edgeFound==false) {
+			InterDomainEdge newInterDomainEdge =new InterDomainEdge();
+			newInterDomainEdge.setSrc_router_id(localRouterASBR);
+			newInterDomainEdge.setDst_router_id(remoteRouterASBR);
+			newInterDomainEdge.setSrc_if_id(localRouterASBRIf);
+			newInterDomainEdge.setDst_if_id(remoteRouterASBRIf);
+			newInterDomainEdge.setDomain_dst_router(remoteDomainID);
+			newInterDomainEdge.setDomain_src_router(localDomainID);
+			if (te_info != null)
+				newInterDomainEdge.setTE_info(te_info);
+			networkDomainGraph.addEdge(localDomainID, remoteDomainID, newInterDomainEdge);
+			log.info("New interdomain edge between "+localDomainID+" and "+remoteDomainID+" received");
+
+		}else {
+			
+			if (te_info != null){
+				//FIXME: Update of TE info to be optimized
+				log.debug("TE_info updated");
+				interDomainEdgeFound.setTE_info(te_info);
+			}
+			
+			
+		}
+	}
+
+	
+	public void addReachabilityIPv4(Inet4Address domainId,Inet4Address aggregatedIPRange,int prefix){
+		ReachabilityEntry ra=new ReachabilityEntry();
+		ra.setAggregatedIPRange(aggregatedIPRange);
+		long resta=((long)0x1<<prefix)-1;
+		long maskLong=resta<<(32-prefix);
+		byte[] mask=new byte[4];
+		mask[0]=(byte)(maskLong>>>24 & 0xFF);
+		mask[1]=(byte)(maskLong>>>16 & 0xFF);
+		mask[2]=(byte)(maskLong>>>8 & 0xFF);
+		mask[3]=(byte)(maskLong& 0xFF);
+		ra.setMask(mask);
+		ra.setDomainId(domainId);
+		ra.setPrefix(prefix);
+		if (!(reachability.contains(ra))){
+			reachability.add(ra);
+		}	
+		return;
+	}
+	
+	
+	public String printMDTopology(){
+		String topoString;
+		Set<Object> vetexSet= networkDomainGraph.vertexSet();
+		Iterator <Object> vertexIterator=vetexSet.iterator();
+		topoString="Domains: \r\n";
+		while (vertexIterator.hasNext()){
+			Object vertex= vertexIterator.next();
+			topoString=topoString+"\t"+vertex.toString()+"\r\n";
+		}
+		topoString=topoString+"Interdomain list: \r\n";
+		Set<InterDomainEdge> edgeSet= networkDomainGraph.edgeSet();
+		Iterator <InterDomainEdge> edgeIterator=edgeSet.iterator();
+		while (edgeIterator.hasNext()){
+			InterDomainEdge edge= edgeIterator.next();
+			topoString=topoString+"\t"+edge.toString()+"\r\n";
+		}
+		
+		return topoString;
+	}
+	
+//	public String printMD2Topology(){
+//		String topoString;
+//		Set<Object> vetexSet= networkDomainGraph.vertexSet();
+//		Iterator <Object> vertexIterator=vetexSet.iterator();
+//		topoString="Domains: \r\n";
+//		while (vertexIterator.hasNext()){
+//			Object vertex= vertexIterator.next();
+//			topoString=topoString+"\t"+vertex.toString()+"\r\n";
+//		}
+//		topoString=topoString+"Interdomain list: \r\n";
+//		Iterator <InterDomainEdge> edgeIterator=interDomainLinks.iterator();
+//		while (edgeIterator.hasNext()){
+//			InterDomainEdge edge= edgeIterator.next();
+//			topoString=topoString+"\t"+edge.toString()+"\r\n";
+//		}
+//		
+//		return topoString;
+//	}
+	
+	//Check resources SSON and WSON
+	public boolean CheckLocalResources(long ifID, Object ip){
+		Iterator<InterDomainEdge> iteredges = networkDomainGraph.edgeSet().iterator();								
+		InterDomainEdge link;
+		while (iteredges.hasNext())
+		{
+			link = iteredges.next();
+			if ((link.getSrc_if_id()==(ifID)))
+			{
+				log.info("InterDomain Link Found to "+link.getDst_router_id().toString());
+				return true;
+			}
+		}
+		return false;		 
+	}
+	
+	@Override
+	public String printTopology() {
+		// TODO Auto-generated method stub
+		return printMDTopology();
+	}
+
+	public LinkedList<InterDomainEdge> getInterDomainLinks() {
+		return new LinkedList<InterDomainEdge>(networkDomainGraph.edgeSet());
+	}
+
+	@Override
+	public boolean isITtedb() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	public SimpleTEDB getSimple_ted() {
+		return simple_ted;
+	}
+
+	public void setSimple_ted(SimpleTEDB simple_ted) {
+		this.simple_ted = simple_ted;
+	}
+
+	public LinkedList<ReachabilityEntry> getReachability() {
+		return reachability;
+	}
+
+	public void setReachability(LinkedList<ReachabilityEntry> reachability) {
+		this.reachability = reachability;
+	}
+	
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiDomainTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiDomainTEDB.java
new file mode 100644
index 0000000000000000000000000000000000000000..19c345888fcec23cdeda386fd8a8fccaf8fd3262
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiDomainTEDB.java
@@ -0,0 +1,25 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import java.net.Inet4Address;
+
+
+public interface MultiDomainTEDB extends TEDB {
+
+	public void addInterdomainLink( Object localDomainID, Object localRouterASBR, long localRouterASBRIf, Object remoteDomainID, Object remoteRouterASBR, long remoteRouterASBRIf, TE_Information te_info );
+	public void addReachabilityIPv4(Inet4Address domainId,Inet4Address aggregatedIPRange,int prefix);
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiLayerTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiLayerTEDB.java
new file mode 100644
index 0000000000000000000000000000000000000000..a2690516a0e1b4945718efa27a8126b50a5471a1
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/MultiLayerTEDB.java
@@ -0,0 +1,473 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet;
+import org.jgrapht.graph.SimpleDirectedWeightedGraph;
+
+import java.net.Inet4Address;
+import java.util.*;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+
+public class MultiLayerTEDB implements DomainTEDB {
+	
+	private ArrayList<TEDListener> registeredAlgorithms;
+	/**
+	 * Graph of the Upper Layer Network
+	 */
+	/**
+	 * 
+	 */
+	private SimpleDirectedWeightedGraph<Object,IntraDomainEdge> upperLayerGraph;
+
+	/**
+	 * Graph of the Upper Layer Network
+	 */
+	private SimpleDirectedWeightedGraph<Object,IntraDomainEdge> lowerLayerGraph;
+
+	/**
+	 * InterLayer Graph
+	 */
+	private SimpleDirectedWeightedGraph<Object,IntraDomainEdge> interLayerGraph;
+	/**
+	 * Reachability information
+	 */
+	private ReachabilityEntry reachabilityEntry;
+
+	/**
+	 * WSON Information of the lower Layer
+	 */
+	private WSONInformation WSONinfo=null;
+	
+	private Lock TEDBlock;
+	
+
+	/**
+	 * List of interdomain Links
+	 */
+	private LinkedList<InterDomainEdge> interDomainLinks; 
+	
+	private Hashtable<Object,Object> RelationNodesInterlayer;
+	
+	
+
+
+	public MultiLayerTEDB(){
+		registeredAlgorithms= new ArrayList<TEDListener>(); 
+		TEDBlock=new ReentrantLock();
+	}
+	
+	
+	public SimpleDirectedWeightedGraph<Object, IntraDomainEdge> getUpperLayerGraph() {
+		return upperLayerGraph;
+	}
+
+	public void setUpperLayerGraph(
+			SimpleDirectedWeightedGraph<Object, IntraDomainEdge> upperLayerGraph) {
+		this.upperLayerGraph = upperLayerGraph;
+	}
+
+	
+	public SimpleDirectedWeightedGraph<Object, IntraDomainEdge> getLowerLayerGraph() {
+		return lowerLayerGraph;
+	}
+
+	public void setLowerLayerGraph(
+			SimpleDirectedWeightedGraph<Object, IntraDomainEdge> lowerLayerGraph) {
+		this.lowerLayerGraph = lowerLayerGraph;
+	}
+
+	
+	public SimpleDirectedWeightedGraph<Object, IntraDomainEdge> getInterLayerGraph() {
+		return interLayerGraph;
+	}
+
+	public void setInterLayerGraph(
+			SimpleDirectedWeightedGraph<Object, IntraDomainEdge> interLayerGraph) {
+		this.interLayerGraph = interLayerGraph;
+	}
+
+
+
+	public SimpleDirectedWeightedGraph<Object,IntraDomainEdge> getDuplicatedUpperLayerkGraph(){
+		SimpleDirectedWeightedGraph<Object,IntraDomainEdge> graphCopy;
+		TEDBlock.lock();
+		try{
+			graphCopy= (SimpleDirectedWeightedGraph<Object, IntraDomainEdge>) upperLayerGraph.clone();
+		} finally{
+			TEDBlock.unlock();
+		}
+		return graphCopy;
+	}
+	public Hashtable<Object, Object> getRelationNodesInterlayer() {
+		return RelationNodesInterlayer;
+	}
+	public SimpleDirectedWeightedGraph<Object,IntraDomainEdge> getDuplicatedLowerLayerkGraph(){
+		SimpleDirectedWeightedGraph<Object,IntraDomainEdge> graphCopy;
+		TEDBlock.lock();
+		try{
+			graphCopy= (SimpleDirectedWeightedGraph<Object, IntraDomainEdge>) lowerLayerGraph.clone();
+		} finally{
+			TEDBlock.unlock();
+		}
+		return graphCopy;
+	}
+	
+	public SimpleDirectedWeightedGraph<Object,IntraDomainEdge> getDuplicatedInterLayerGraph(){
+		SimpleDirectedWeightedGraph<Object,IntraDomainEdge> graphCopy;
+		TEDBlock.lock();
+		try{
+			graphCopy= (SimpleDirectedWeightedGraph<Object, IntraDomainEdge>) interLayerGraph.clone();
+		} finally{
+			TEDBlock.unlock();
+		}
+		return graphCopy;
+	}
+
+	public void initializeFromFile(String file) {
+		upperLayerGraph=FileTEDBUpdater.readNetwork(file, "mpls");	
+		lowerLayerGraph=FileTEDBUpdater.readNetwork(file, "wson");
+		interLayerGraph=FileTEDBUpdater.readNetwork(file, "interlayer");
+		WSONinfo = FileTEDBUpdater.getWSONInformation(file, "wson");
+		interDomainLinks = FileTEDBUpdater.readInterDomainLinks(file);	
+		
+		reachabilityEntry = new ReachabilityEntry();
+		//domainReachabilityIPv4Prefix=new byte[4];
+		FileTEDBUpdater.getDomainReachabilityFromFile(file,reachabilityEntry,"mpls");
+	}
+
+	@Override
+	public void initializeFromFile(String file, String learnFrom) {
+
+	}
+
+	@Override
+	public boolean isITtedb() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@Override
+	public String printTopology() {
+		String topoString;
+		Set<Object> vetexSet= upperLayerGraph.vertexSet();
+		Iterator <Object> vertexIterator=vetexSet.iterator();
+		topoString="MPLS Nodes: \r\n";
+		while (vertexIterator.hasNext()){
+			Object vertex= vertexIterator.next();
+			topoString=topoString+"\t"+vertex.toString()+"\r\n";
+		}
+		topoString=topoString+"MPLS Link list: \r\n";
+		Set<IntraDomainEdge> edgeSet= upperLayerGraph.edgeSet();
+		Iterator <IntraDomainEdge> edgeIterator=edgeSet.iterator();
+		while (edgeIterator.hasNext()){
+			IntraDomainEdge edge= edgeIterator.next();
+			topoString=topoString+"\t"+edge.toString()+"\r\n";
+		}
+		vetexSet= lowerLayerGraph.vertexSet();
+		vertexIterator=vetexSet.iterator();
+		topoString="GMPLS Nodes: \r\n";
+		while (vertexIterator.hasNext()){
+			Object vertex= vertexIterator.next();
+			topoString=topoString+"\t"+vertex.toString()+"\r\n";
+		}
+		topoString=topoString+"gmpls Link list: \r\n";
+		edgeSet= lowerLayerGraph.edgeSet();
+		edgeIterator=edgeSet.iterator();
+		while (edgeIterator.hasNext()){
+			IntraDomainEdge edge= edgeIterator.next();
+			topoString=topoString+"\t"+edge.toString()+"\r\n";
+		}
+		topoString=topoString+"InterLayer list: \r\n";
+		edgeSet= interLayerGraph.edgeSet();
+		edgeIterator=edgeSet.iterator();
+		while (edgeIterator.hasNext()){
+			IntraDomainEdge edge= edgeIterator.next();
+			topoString=topoString+"\t"+edge.toString()+"\r\n";
+		}
+		
+		topoString=topoString+printInterDomainLinks();
+		return topoString;
+	}
+
+	@Override
+	public boolean belongsToDomain(Object addr) {
+		int i;
+		byte[] addrbytes= ((Inet4Address)addr).getAddress();
+		for (i=0;i<4;++i){
+			addrbytes[i]=(byte) (addrbytes[i]&(reachabilityEntry.getMask())[i]);
+		}
+		return Arrays.equals(addrbytes,reachabilityEntry.getAggregatedIPRange().getAddress());
+	}
+
+	public ReachabilityEntry getReachabilityEntry() {
+		return reachabilityEntry;
+	}
+
+	public LinkedList<InterDomainEdge> getInterDomainLinks() {
+		return interDomainLinks;
+	}
+
+	@Override
+	public String printInterDomainLinks(){
+		String topoString="";
+
+		int size = interDomainLinks.size();
+		topoString="Interdomain Link list: \r\n";
+		for (int i=0;i<size;i++){
+			//por pantalla  
+			InterDomainEdge edge = interDomainLinks.get(i);
+			topoString=topoString+"\t"+edge.toString()+"\r\n";
+
+		}
+		return topoString;
+
+	}
+
+	public boolean containsVertex(Object vertex) {
+		return upperLayerGraph.containsVertex(vertex);
+
+	}
+
+	public WSONInformation getWSONinfo() {
+		return WSONinfo;
+	}
+
+	@Override
+	public void notifyWavelengthReservation(LinkedList<Object> sourceVertexList, LinkedList<Object> targetVertexList, int wavelength, boolean bidirectional){
+		TEDBlock.lock();
+		try {
+			for (int i=0;i<sourceVertexList.size();++i){		
+				IntraDomainEdge edge=lowerLayerGraph.getEdge(sourceVertexList.get(i), targetVertexList.get(i));
+				
+				edge.getTE_info().setWavelengthReserved(wavelength);
+				if (bidirectional == true){
+					edge=lowerLayerGraph.getEdge(targetVertexList.get(i), sourceVertexList.get(i));
+					edge.getTE_info().setWavelengthReserved(wavelength);
+				}
+			}
+		}finally{
+			TEDBlock.unlock();
+		}
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			registeredAlgorithms.get(i).notifyWavelengthReservation(sourceVertexList, targetVertexList, wavelength);
+			if (bidirectional == true){
+				registeredAlgorithms.get(i).notifyWavelengthReservation(targetVertexList, sourceVertexList, wavelength);
+			}
+		}
+	}
+
+	@Override
+	public void notifyWavelengthEndReservation(LinkedList<Object> sourceVertexList, LinkedList<Object> targetVertexList, int wavelength, boolean bidirectional){
+		// TODO Auto-generated method stub
+		//Delete the resource reservation
+		TEDBlock.lock();
+		try {
+			for (int i=0;i<sourceVertexList.size();++i){
+				//			SimpleDirectedWeightedGraph<Object,FiberLinkEdge> graph= ted.getNetworkGraph();
+				IntraDomainEdge edge=lowerLayerGraph.getEdge(sourceVertexList.get(i),targetVertexList.get(i) );
+				edge.getTE_info().setWavelengthUnReserved(wavelength);
+				if (bidirectional == true)
+				{
+					edge=lowerLayerGraph.getEdge(targetVertexList.get(i), sourceVertexList.get(i));
+					edge.getTE_info().setWavelengthUnReserved(wavelength);
+				}
+			}
+		}finally{
+			TEDBlock.unlock();
+		}
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			registeredAlgorithms.get(i).notifyWavelengthEndReservation(sourceVertexList, targetVertexList, wavelength);
+			if (bidirectional == true)
+			{
+				registeredAlgorithms.get(i).notifyWavelengthEndReservation(targetVertexList, sourceVertexList, wavelength);
+			}
+		}
+		//FIXME:TEMPORAL!!!!!!
+		//requestDispatcher.moveRetryQueueToComputingRequestQueue();
+		//Call request dispatcher to pass requests to queue?
+	}
+
+	@Override
+	public void notifyWavelengthChange(Object localInterfaceIPAddress, Object remoteInterfaceIPAddress,	BitmapLabelSet previousBitmapLabelSet, BitmapLabelSet newBitmapLabelSet) {
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			registeredAlgorithms.get(i).notifyWavelengthStatusChange(localInterfaceIPAddress, remoteInterfaceIPAddress, previousBitmapLabelSet, newBitmapLabelSet);
+		}
+	}
+
+	@Override
+	public void register(TEDListener compAlgPreComp) {
+		registeredAlgorithms.add(compAlgPreComp);		
+	}
+
+	@Override
+	public void notifyNewVertex(Object vertex) {
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			registeredAlgorithms.get(i).notifyNewVertex(vertex);
+		}	
+	}
+
+	@Override
+	public void notifyNewEdge(Object source, Object destination) {
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			registeredAlgorithms.get(i).notifyNewEdge(source,destination);
+		}	
+	}
+
+	@Override
+	public void clearAllReservations() {
+		if (WSONinfo!=null){
+			TEDBlock.lock();
+			try{	
+				Set<IntraDomainEdge> edgeSet= lowerLayerGraph.edgeSet();
+				Iterator <IntraDomainEdge> edgeIterator=edgeSet.iterator();
+				while (edgeIterator.hasNext()){
+					IntraDomainEdge edge= edgeIterator.next();
+					edge.TE_info.setAllWavelengtshUnReserved();
+				}
+			}finally{
+				TEDBlock.unlock();
+			}
+			for (int i=0;i<registeredAlgorithms.size();++i){
+				registeredAlgorithms.get(i).notifyTEDBFullUpdate();
+			}	
+		}
+		
+	}
+
+	@Override
+	public void notifyNewEdgeIP(Object source, Object destination, TE_Information informationTEDB) {
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			
+			registeredAlgorithms.get(i).notifyNewEdgeIP(source,destination, informationTEDB);
+		}	
+	}
+
+
+	public void notificationEdgeIP_AuxGraph(Object src, Object dst, TE_Information informationTEDB) {
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			registeredAlgorithms.get(i).notificationEdgeIP_AuxGraph(src,dst, informationTEDB);
+		}	
+		
+	}
+	public void notificationEdgeOPTICAL_AuxGraph(Object src, Object dst, int lambda) {
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			registeredAlgorithms.get(i).notificationEdgeOPTICAL_AuxGraph(src, dst, lambda);
+		}	
+	}
+	@Override
+	public void notifyWavelengthEndReservationSSON(
+			LinkedList<Object> sourceVertexList,
+			LinkedList<Object> targetVertexList, int wavelength,
+			boolean bidirectional, int m) {
+		// TODO Auto-generated method stub
+	}
+
+	@Override
+	public void notifyWavelengthReservationSSON(
+			LinkedList<Object> sourceVertexList,
+			LinkedList<Object> targetVertexList, int wavelength,
+			boolean bidirectional, int m) {
+		// TODO Auto-generated method stub
+	}
+
+	@Override
+	public SSONInformation getSSONinfo() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+
+	@Override
+	public Set<IntraDomainEdge> getIntraDomainLinks() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+
+	@Override
+	public void notifyWavelengthReservationWLAN(
+			LinkedList<Object> sourceVertexList,
+			LinkedList<Object> targetVertexList,
+			LinkedList<Integer> wlans, boolean bidirectional) {
+		// TODO Auto-generated method stub
+		
+	}
+
+
+	@Override
+	public void registerSSON(SSONListener compAlgPreComp) {
+		// TODO Auto-generated method stub
+		
+	}
+
+
+	@Override
+	public Inet4Address getDomainID() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+
+	@Override
+	public void setWSONinfo(WSONInformation wSONinfo) {
+		// TODO Auto-generated method stub
+		
+	}
+
+
+	@Override
+	public void setSSONinfo(SSONInformation sSONinfo) {
+		// TODO Auto-generated method stub
+		
+	}
+
+
+	@Override
+	public void createGraph() {
+		// TODO Auto-generated method stub
+		
+	}
+
+
+	@Override
+	public Set<Object> getIntraDomainLinksvertexSet() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+
+	@Override
+	public Hashtable<Object, Node_Info> getNodeTable() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+
+	@Override
+	public IT_Resources getItResources() {
+		// TODO Auto-generated method stub
+		return null;
+	}
+
+
+	@Override
+	public void setItResources(IT_Resources itResources) {
+		// TODO Auto-generated method stub
+		
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Node_Info.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Node_Info.java
new file mode 100644
index 0000000000000000000000000000000000000000..bc523ba5a6044c2cd9b16d5fa011cb03ce7dfbe9
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/Node_Info.java
@@ -0,0 +1,207 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import java.net.Inet4Address;
+import java.util.LinkedList;
+
+import es.tid.of.DataPathID;
+
+public class Node_Info {
+
+	//we specify we we learn the topology from
+
+	private String learntFrom = null;
+	// for the moment only ospf-non pseudo supported
+	private  Inet4Address igp_ident = null;
+
+	//caracterizacion
+	private Inet4Address as_number, area_id, bgpls_ident, ipv4AddressLocalNode= null;
+	private DataPathID dataPathIDLocalNode;
+	private boolean overload_bit = false;
+	private boolean attached_bit = false;
+	private boolean external_bit = false;
+	private boolean abr_bit = false;
+	private byte[] name;
+	private LinkedList <Inet4Address> ipv4areaIDs = new LinkedList <Inet4Address>();
+	private int sid;
+
+
+
+
+	public Node_Info() {
+		// TODO Auto-generated constructor stub
+	}
+
+	public Node_Info(Inet4Address ipv4Address_ospf, Inet4Address as_number,
+			boolean overload_bit, boolean attached_bit, boolean external_bit,
+			boolean abr_bit, byte[] name, LinkedList<Inet4Address> ipv4areaIDs, Inet4Address ipv4AdddressLN) {
+		super();
+		this.igp_ident = ipv4Address_ospf;
+		this.as_number = as_number;
+		this.overload_bit = overload_bit;
+		this.attached_bit = attached_bit;
+		this.external_bit = external_bit;
+		this.abr_bit = abr_bit;
+		this.name = name;
+		this.ipv4areaIDs = ipv4areaIDs;
+		this.ipv4AddressLocalNode = ipv4AdddressLN;
+	}
+
+	public LinkedList<Inet4Address> getIpv4areaIDs() {
+		return ipv4areaIDs;
+	}
+
+	public void setIpv4areaIDs(LinkedList<Inet4Address> ipv4areaIDs) {
+		this.ipv4areaIDs = ipv4areaIDs;
+	}
+
+	public byte[] getName() {
+		return name;
+	}
+
+
+	public void setName(byte[] name) {
+		this.name = name;
+	}
+
+	public boolean isOverload_bit() {
+		return overload_bit;
+	}
+
+
+	public void setOverload_bit(boolean overload_bit) {
+		this.overload_bit = overload_bit;
+	}
+
+
+	public boolean isAttached_bit() {
+		return attached_bit;
+	}
+
+
+	public void setAttached_bit(boolean attached_bit) {
+		this.attached_bit = attached_bit;
+	}
+
+
+	public boolean isExternal_bit() {
+		return external_bit;
+	}
+
+
+	public void setExternal_bit(boolean external_bit) {
+		this.external_bit = external_bit;
+	}
+
+
+	public Inet4Address getArea_id() {
+		return area_id;
+	}
+
+	public void setArea_id(Inet4Address area_id) {
+		this.area_id = area_id;
+	}
+
+	public boolean isAbr_bit() {
+		return abr_bit;
+	}
+
+
+	public void setAbr_bit(boolean abr_bit) {
+		this.abr_bit = abr_bit;
+	}
+
+
+	public Inet4Address getIpv4Address() {
+		return igp_ident;
+	}
+
+
+	public void setIpv4Address(Inet4Address ipv4Address_ospf) {
+		this.igp_ident = ipv4Address_ospf;
+	}
+
+
+	public Inet4Address getIpv4AddressLocalNode() {
+		return ipv4AddressLocalNode;
+	}
+	
+	public void setIpv4AddressLocalNode(Inet4Address ipv4AddressLocalNode) {
+		this.ipv4AddressLocalNode = ipv4AddressLocalNode;
+	}
+
+	public DataPathID getDataPathLocalNode() {
+		return dataPathIDLocalNode;
+	}
+	
+	public void setDataPathLocalNode(DataPathID dataPathLocalNode) {
+		this.dataPathIDLocalNode = dataPathLocalNode;
+	}
+	
+	public Inet4Address getAs_number() {
+		return as_number;
+	}
+
+
+	public void setAs_number(Inet4Address as_number) {
+		this.as_number = as_number;
+	}
+
+	public Inet4Address getBgpls_ident() {
+		return bgpls_ident;
+	}
+
+	public void setBgpls_ident(Inet4Address bgpls_ident) {
+		this.bgpls_ident = bgpls_ident;
+	}
+
+	public String getLearntFrom() {
+		return learntFrom;
+	}
+
+	public void setLearntFrom(String learntFrom) {
+		this.learntFrom = learntFrom;
+	}
+
+	public void setSID(int sid) {
+		this.sid = sid;
+	}
+
+	public int getSid(){
+		return sid;
+	}
+	public String toString(){
+		String ret = "";
+
+		if(igp_ident!=null)
+			ret = ret + "IGP-ID:" + this.getIpv4Address() +"\t";
+		if(as_number!=null)
+			ret = ret + "as_num:" + this.getAs_number() +"\t";
+		if(bgpls_ident != null)
+			ret = ret + "BGPLS-ident:" + this.getBgpls_ident() +"\t";
+		if(name != null)
+			ret = ret + "Name :" + this.getName() +"\t";
+		if(ipv4AddressLocalNode!=null)
+			ret = ret +"Local Node IP Address: " + this.getIpv4AddressLocalNode() + "\t";
+		if(sid!=0)
+			ret = ret + "SID:" + this.getSid() +"\t";
+
+		return ret;
+
+	}
+
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityEntry.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityEntry.java
new file mode 100644
index 0000000000000000000000000000000000000000..d51896c0e133c5b1c11da64fed586b2fc5678c90
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityEntry.java
@@ -0,0 +1,85 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import java.net.Inet4Address;
+
+public class ReachabilityEntry {
+
+	public Inet4Address domainId;
+	public byte[] mask;
+	public int prefix;
+
+	//public byte[] aggregatedIPRange;
+	public Inet4Address aggregatedIPRange;
+
+	public ReachabilityEntry(){
+		mask = new byte[4];
+		
+	}
+	public ReachabilityEntry(Inet4Address domainId){
+		mask = new byte[4];
+	
+	}
+	
+	public int getPrefix() {
+		return prefix;
+	}
+
+	public Inet4Address getAggregatedIPRange() {
+		return aggregatedIPRange;
+	}
+
+	public void setAggregatedIPRange(Inet4Address aggregatedIPRange) {
+		this.aggregatedIPRange = aggregatedIPRange;
+	}
+	
+	public byte[] getMask() {
+		return mask;
+	}
+
+
+	public Inet4Address getDomainId() {
+		return domainId;
+	}
+
+	public void setDomainId(Inet4Address domainId) {
+		this.domainId = domainId;
+	}
+
+	public void setMask(byte[] mask) {
+		this.mask = mask;
+	}
+	public void setPrefix(int prefix) {
+		this.prefix = prefix;
+	}
+	public String toString(){
+		String ret=aggregatedIPRange.toString()+"\\"+prefix+" ("+domainId.toString()+")";
+		return ret;
+	}
+	
+	@Override
+	public boolean equals(Object reachabilityObject) {
+		if ((domainId.equals(((ReachabilityEntry)reachabilityObject).getDomainId()))&&
+				(aggregatedIPRange.equals(((ReachabilityEntry)reachabilityObject).getAggregatedIPRange()))&&
+				(prefix == ((ReachabilityEntry)reachabilityObject).getPrefix())){
+			return true;
+		}
+			
+		return false;
+	}
+	
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityManager.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityManager.java
new file mode 100644
index 0000000000000000000000000000000000000000..cf2f3c5c324ebde570a7932563a8379804dab21b
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/ReachabilityManager.java
@@ -0,0 +1,162 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import java.net.Inet4Address;
+import java.util.Iterator;
+import java.util.LinkedList;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import es.tid.rsvp.objects.subobjects.EROSubobject;
+import es.tid.rsvp.objects.subobjects.IPv4prefixEROSubobject;
+import es.tid.rsvp.objects.subobjects.SubObjectValues;
+
+/**
+ * Class that maintains a table with Reachability entries.
+ * It has a method to add a reachability entry
+ * It has a method to query the domain of an IPv4 endpoint
+ * It has a method to query if an address begins to a given IP range
+ * KNOWN BUGS: 
+ * * When a reachability entry is added, it is not checked if
+ *   it is already there or not.
+ * * Reachability entries cannot be removed
+ *  
+ * @author ogondio
+ *
+ */
+public class ReachabilityManager {
+	
+	/**
+	 * Table with IP address/prefix --> domain
+	 */
+	LinkedList<ReachabilityEntry> reachability;
+	/**
+	 * The logger
+	 */
+	private Logger log;
+	
+	/**
+	 * ReachabilityManager constructor
+	 */
+	public ReachabilityManager(){
+		log=LoggerFactory.getLogger("PCEServer");
+		reachability=new LinkedList<ReachabilityEntry>();
+	}
+	
+	/**
+	 * gets the domain of an IPv4 EndpointAddress
+	 * @param endpointAddress the address to query
+	 * @return The domain id if the endpointAddress belongs to a domain, null otherwise.
+	 */
+	public Inet4Address getDomain(Inet4Address endpointAddress) {
+		//String domain="0.0.0.1";
+		Iterator<ReachabilityEntry> it=reachability.iterator();
+		while (it.hasNext()){			
+			ReachabilityEntry ra=it.next();
+			//log.info("reachability entry "+ra.aggregatedIPRange+" mask "+(ra.mask[0]&0xFF)+"."+(ra.mask[1]&0xFF)+"."+(ra.mask[2]&0xFF)+"."+(ra.mask[3]&0xFF));			
+			if (belongsToDomain(endpointAddress, ra.mask, ra.aggregatedIPRange)){
+				return ra.domainId;
+			}
+		}
+		return null;
+		
+	}
+	
+	/**
+	 * Method to determine if the address 'nodeAdrress' belongs to the aggregated IP address range given by the mask and the addresss 'aggregatedIPRange'
+	 * @param nodeAddress The address to query
+	 * @param mask The 32 bit network mask
+	 * @param aggregatedIPRange The aggregated IP address
+	 * @return true if it belongs to the range, false if it does not belong to the range
+	 */
+	public boolean belongsToDomain(Inet4Address nodeAddress, byte []mask, Inet4Address aggregatedIPRange){
+		int i;
+		//byte [] networkAddress=new byte[4];
+		byte [] bytesAggregatedIPRange=aggregatedIPRange.getAddress();
+		byte [] bytesNodeAddress=nodeAddress.getAddress();
+		boolean found=true;		
+		for (i=0;i<4;++i){
+			//networkAddress[i]= (byte) ((bytesNodeAddress[i]&mask[i])&0xFF)  ;
+			//log.info("network Node Address[i]: "+(networkAddress[i]&0xFF));
+			//log.info("bytesAggregatedIPRange["+i+"]: "+((bytesAggregatedIPRange[i]&mask[i])&0xFF));
+			//log.info("bytesNodeAddress["+i+"]: "+((bytesNodeAddress[i]&mask[i])&0xFF));
+			if ((byte)((bytesAggregatedIPRange[i]&mask[i])&0xFF)!=(byte)((bytesNodeAddress[i]&mask[i])&0xFF)){
+				found=false;
+				return found;
+			}
+		}
+		return found;		
+	}
+	
+	/**
+	 * Adds a ERO Subobject associated with a given domainId to the reachability table 
+	 * @param domainId Domain ID
+	 * @param eroso ERO Subobject
+	 */
+	public void addEROSubobject(Inet4Address domainId, EROSubobject eroso ){	
+		if (eroso.getType()==SubObjectValues.ERO_SUBOBJECT_IPV4PREFIX){
+			log.info("Adding IPv4 ERO Subobject to the Reachability Database");
+			IPv4prefixEROSubobject ipv4eroso=(IPv4prefixEROSubobject)eroso;
+			//long mask=(long)0xFFFFFFFF-(long)Math.pow(2, 32-ipv4eroso.getPrefix())-1;
+			log.info("prefix "+ipv4eroso.getPrefix());
+			long resta=((long)0x1<<ipv4eroso.getPrefix())-1;
+			long maskLong=resta<<(32-ipv4eroso.getPrefix());
+			byte[] mask=new byte[4];
+			mask[0]=(byte)(maskLong>>>24 & 0xFF);
+			mask[1]=(byte)(maskLong>>>16 & 0xFF);
+			mask[2]=(byte)(maskLong>>>8 & 0xFF);
+			mask[3]=(byte)(maskLong& 0xFF);
+			log.info("mask: "+(mask[0]&0xFF)+"."+(mask[1]&0xFF)+"."+(mask[2]&0xFF)+"."+(mask[3]&0xFF));
+			log.info("Domain ID: "+domainId+" mask "+mask+" IPv4 Address: "+ipv4eroso.getIpv4address());//Pasar a FINE
+			addIPv4Entry(domainId,mask,ipv4eroso.getIpv4address(),ipv4eroso.getPrefix());
+		}
+		
+	}
+	
+	private void addIPv4Entry(Inet4Address domainId,byte [] mask,Inet4Address aggregatedIPRange,int prefix){
+		ReachabilityEntry ra=new ReachabilityEntry();
+		ra.aggregatedIPRange=aggregatedIPRange;
+		ra.mask=mask;
+		ra.domainId=domainId;
+		ra.prefix=prefix;
+		if (!(reachability.contains(ra))){
+			reachability.add(ra);
+		}	
+		return;
+	}
+	
+	/**
+	 * Print the reachability table
+	 * @return String with the reachability information
+	 */
+	public String printReachability(){
+		String reachabilityString;
+		Iterator <ReachabilityEntry> reachabIterator=reachability.iterator();
+		reachabilityString="Reachability entries: \r\n";
+		while (reachabIterator.hasNext()){
+			ReachabilityEntry entry= reachabIterator.next();
+			reachabilityString=reachabilityString+"\t"+entry.toString()+"\r\n";
+		}
+	
+		return reachabilityString;
+	}
+
+	public LinkedList<ReachabilityEntry> getReachability() {
+		return reachability;
+	}
+	
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONInformation.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONInformation.java
new file mode 100644
index 0000000000000000000000000000000000000000..ff69b890128286c63af48c727dccb6e31280b536
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONInformation.java
@@ -0,0 +1,88 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels;
+
+/**
+ * Label information in the special case of a Switched Spectrum Optical Network based on Flexgrid.
+ * @author amll
+ *
+ */
+
+public class SSONInformation {
+	/**
+	 * In case the Network is SSON, this is the list of available Labels
+	 */
+	private AvailableLabels commonAvailableLabels; 
+	
+	/**
+	 * In case the Network is SSON, this is the number of wavelengths. -1 means it is not WSON.
+	 */
+	private int numLambdas=-1;
+	/**
+	 * Spectral Grid of the optical network.
+	 */
+	public int grid=0;
+	/**
+	 *  Channel Spacing
+	 */
+	public int cs=0;
+	/**
+	 * Minimum central frequency available in the spectral grid available to be assigned to a LSP.
+	 */
+	public int nMin=0;
+	
+	public int getGrid() {
+		return grid;
+	}
+
+	public void setGrid(int grid) {
+		this.grid = grid;
+	}
+
+	public int getCs() {
+		return cs;
+	}
+
+	public void setCs(int cs) {
+		this.cs = cs;
+	}
+
+
+	public int getnMin() {
+		return nMin;
+	}
+
+	public void setnMin(int nMin) {
+		this.nMin = nMin;
+	}
+
+	public AvailableLabels getCommonAvailableLabels() {
+		return commonAvailableLabels;
+	}
+
+	public void setCommonAvailableLabels(AvailableLabels commonAvailableLabels) {
+		this.commonAvailableLabels = commonAvailableLabels;
+	}
+
+	public int getNumLambdas() {
+		return numLambdas;
+	}
+
+	public void setNumLambdas(int numLambdas) {
+		this.numLambdas = numLambdas;
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONListener.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONListener.java
new file mode 100644
index 0000000000000000000000000000000000000000..ce769c41c86c94247cd0e00951072f8f9e3c93e9
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SSONListener.java
@@ -0,0 +1,28 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import java.util.LinkedList;
+
+public interface SSONListener extends TEDListener{
+	
+	public void notifyWavelengthReservationSSON(LinkedList<Object> sourceVertexList,
+			LinkedList<Object> targetVertexList, int wavelength, int m);
+	
+	void notifyWavelengthEndReservationSSON(
+			LinkedList<Object> sourceVertexList,
+			LinkedList<Object> targetVertexList, int wavelength, int m);
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SimpleTEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SimpleTEDB.java
new file mode 100644
index 0000000000000000000000000000000000000000..f2d5dbc892bb4f1ff92e6d44bb807afce293f6ae
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/SimpleTEDB.java
@@ -0,0 +1,786 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import java.net.Inet4Address;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.Set;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.jgrapht.graph.SimpleDirectedWeightedGraph;
+
+import es.tid.of.DataPathID;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet;
+
+/**
+ * Traffic Engineering Database of a Domain.
+ * 
+ * 
+ * @author ogondio, mcs, b.mvas
+ *
+ */
+public class SimpleTEDB implements DomainTEDB{
+	
+	private Inet4Address domainID;
+	
+	private IT_Resources itResources;
+
+	/**
+	 * List of algorithms that will be notified when there are significant changes in the TED
+	 */
+	private ArrayList<TEDListener> registeredAlgorithms;
+	/**
+	 * List of algorithms SSON that will be notified when there are significant changes in the TED
+	 */
+	private ArrayList<SSONListener> registeredAlgorithmssson;
+	/**
+	 * Graph of the Network
+	 */
+	private SimpleDirectedWeightedGraph<Object,IntraDomainEdge> networkGraph;
+
+	/**
+	 * List of interdomain Links
+	 */
+	private LinkedList<InterDomainEdge> interDomainLinks = new LinkedList<InterDomainEdge>(); 
+
+	/*
+	 * List of Intradomain Edges
+	 * Please, It's not the same as intraDomainLinks
+	 * This has been created to support multiedges between two nodes
+	 */
+	private LinkedList<IntraDomainEdge> intraDomainEdges = new LinkedList<IntraDomainEdge>(); 
+
+
+	/**
+	 * Reachability information
+	 */
+	private ReachabilityEntry reachabilityEntry;
+	/**
+	 * Information about the labels in a WSON network.
+	 */
+	private WSONInformation WSONinfo=null;
+	/**
+	 * Information about the labels in a SSON network.
+	 */
+	private SSONInformation SSONinfo=null;
+
+	private Lock TEDBlock;
+
+	private Hashtable<Object , Node_Info> NodeTable;
+
+	private boolean multidomain=false;//By default, the TED has only one domain
+	Logger log;
+	public SimpleTEDB(){
+		log=LoggerFactory.getLogger("TEDBParser");		
+		registeredAlgorithms= new ArrayList<TEDListener>();
+		registeredAlgorithmssson= new ArrayList<SSONListener>();
+		TEDBlock=new ReentrantLock();
+		NodeTable = new Hashtable<Object, Node_Info>();
+	}
+
+	public SimpleDirectedWeightedGraph<Object,IntraDomainEdge> getDuplicatedNetworkGraph(){
+		SimpleDirectedWeightedGraph<Object,IntraDomainEdge> graphCopy;
+		TEDBlock.lock();
+		try{
+			graphCopy= (SimpleDirectedWeightedGraph<Object, IntraDomainEdge>) networkGraph.clone();
+		} finally{
+			TEDBlock.unlock();
+		}
+		return graphCopy;
+	}
+	public void createGraph(){
+		networkGraph = new SimpleDirectedWeightedGraph<Object, IntraDomainEdge>(IntraDomainEdge.class);
+		reachabilityEntry = new ReachabilityEntry();
+	}
+
+	public void initializeFromFile(String file){
+		initializeFromFile(file, null, false,0,Integer.MAX_VALUE, false,false);
+	}
+	public void initializeFromFile(String file, String layer){
+		initializeFromFile(file, layer, false,0,Integer.MAX_VALUE, false,false);
+	}
+	public void initializeFromFile(String file, String layer, boolean multidomain){
+		initializeFromFile(file, layer, multidomain,0,Integer.MAX_VALUE, false,false);
+	}
+	public void initializeFromFile(String file, String layer, boolean multidomain, boolean isSSON){
+		initializeFromFile(file, layer, multidomain,0,Integer.MAX_VALUE, isSSON,false);
+	}
+	public void initializeFromFile(String file, String layer, boolean multidomain,int lambdaIni, int lambdaEnd){
+		initializeFromFile(file, layer, multidomain,0,Integer.MAX_VALUE, false,false);
+	}
+	public void initializeFromFile(String file, String layer, boolean multidomain, int lambdaIni, int lambdaEnd, boolean isSSON,boolean readOnlyInterDomainLinks){	
+		initializeFromFile( file,  layer,  multidomain,  lambdaIni,  lambdaEnd,  isSSON, readOnlyInterDomainLinks, false);
+	}
+
+	public void initializeFromFile(String file, String layer, boolean multidomain, int lambdaIni, int lambdaEnd, boolean isSSON,boolean readOnlyInterDomainLinks, boolean isWLAN){
+		domainID=FileTEDBUpdater.getDomainIDfromSimpleDomain(file);
+		if (readOnlyInterDomainLinks){
+			log.info("Read Only Inter Domain Links");
+			networkGraph = new SimpleDirectedWeightedGraph<Object, IntraDomainEdge>(IntraDomainEdge.class);
+			if (!multidomain){
+				interDomainLinks = FileTEDBUpdater.readInterDomainLinks(file);	
+			}
+			reachabilityEntry = new ReachabilityEntry();
+			if (!multidomain){
+				FileTEDBUpdater.getDomainReachabilityFromFile(file,reachabilityEntry);
+			}
+			if((isSSON==true)&(!isWLAN)){
+				SSONinfo = FileTEDBUpdater.getSSONInformation(file);
+			}else if (isWLAN)
+			{
+
+			}
+			else
+			{
+				WSONinfo = FileTEDBUpdater.getWSONInformation(file);
+			}
+		}else{
+			if((isSSON==true)&&(!isWLAN)){
+				networkGraph=FileTEDBUpdater.readNetwork(file,layer, multidomain,lambdaIni,lambdaEnd, isSSON);
+				SSONinfo = FileTEDBUpdater.getSSONInformation(file);
+			}
+			else if (isWLAN)
+			{
+				networkGraph=FileTEDBUpdater.readNetwork(file,layer, multidomain,lambdaIni,lambdaEnd, isSSON);
+			}
+			else{
+				networkGraph=FileTEDBUpdater.readNetwork(file,layer, multidomain,lambdaIni,lambdaEnd);
+				WSONinfo = FileTEDBUpdater.getWSONInformation(file);
+			}
+			//		if (lambdaEnd!=Integer.MAX_VALUE){
+			//			notifyAlgorithms( lambdaIni, lambdaEnd);
+			//		}
+			Iterator<Object> itervertex=networkGraph.vertexSet().iterator();
+
+			/** Se podrian sacar a una funcion externa ambos 'while'
+			 *  Rellenar info table
+			 *  Rellenar info edge
+			 *  Preguntar a Oscar
+			 */
+			while (itervertex.hasNext()) {
+				Object address = itervertex.next();
+				Node_Info ni = new Node_Info();
+				if (address instanceof Inet4Address){
+					ni.setIpv4AddressLocalNode((Inet4Address)address);
+					ni.setIpv4Address((Inet4Address)address);//de momento asumimos que aprendemos ospf					
+				} else if (address instanceof DataPathID) {
+					ni.setDataPathLocalNode((DataPathID)address); 
+				}
+				ni.setLearntFrom("Fom XML");
+				ni.setAs_number(domainID);
+				NodeTable.put(address, ni);	
+			}
+
+			Iterator<IntraDomainEdge> iteredge=networkGraph.edgeSet().iterator();
+			while (iteredge.hasNext()) {
+				IntraDomainEdge id =  (IntraDomainEdge) iteredge.next();
+				try{
+					Inet4Address ipSource = (Inet4Address) (id.getSource());
+					Inet4Address ipDest = (Inet4Address) (id.getTarget());
+					id.setLearntFrom("From XML");
+					Node_Info origin = new Node_Info();
+					Node_Info destination = new Node_Info();
+					origin.setIpv4AddressLocalNode(ipSource);
+					origin.setAs_number(domainID);
+					origin.setLearntFrom("FromXML");
+					destination.setIpv4AddressLocalNode(ipDest);
+					destination.setAs_number(domainID);
+					destination.setLearntFrom("FromXML");
+					id.setLocal_Node_Info(origin);
+					id.setRemote_Node_Info(destination);
+					NodeTable.get(ipSource).setSID(id.getSrc_sid());
+					NodeTable.get(ipDest).setSID(id.getDst_sid());
+				}catch (Exception e1){
+					DataPathID dpSource = (DataPathID) (id.getSource());
+					DataPathID dpDest = (DataPathID) (id.getTarget());
+					id.setLearntFrom("From XML");
+					Node_Info origin = new Node_Info();
+					Node_Info destination = new Node_Info();
+					origin.setDataPathLocalNode(dpSource);
+					origin.setAs_number(domainID);
+					origin.setLearntFrom("FromXML");
+					destination.setDataPathLocalNode(dpDest);
+					destination.setAs_number(domainID);
+					destination.setLearntFrom("FromXML");
+					id.setLocal_Node_Info(origin);
+					id.setRemote_Node_Info(destination);
+					//NodeTableDataPath.get(dpSource).setSID(id.getSrc_sid());
+					//NodeTableDataPath.get(dpDest).setSID(id.getDst_sid());
+				}
+
+			}
+		}
+
+
+		if (!multidomain){
+			interDomainLinks = FileTEDBUpdater.readInterDomainLinks(file);	
+		}
+		else {
+			interDomainLinks = new LinkedList<InterDomainEdge>();	
+		}
+		reachabilityEntry = new ReachabilityEntry();
+		if (!multidomain){
+			FileTEDBUpdater.getDomainReachabilityFromFile(file,reachabilityEntry);
+		}
+
+		Iterator<InterDomainEdge> edgeIt = interDomainLinks.iterator();
+		while (edgeIt.hasNext()) {
+			InterDomainEdge id =  (InterDomainEdge) edgeIt.next();
+			try {
+				Inet4Address ipSource = (Inet4Address) (id.src_router_id);
+				Inet4Address ipDest = (Inet4Address) (id.dst_router_id);
+				id.setLearntFrom("From XML");
+				Node_Info origin = new Node_Info();
+				Node_Info destination = new Node_Info();
+				origin.setIpv4AddressLocalNode(ipSource);
+				origin.setAs_number(domainID);
+				origin.setLearntFrom("FromXML");
+				destination.setIpv4AddressLocalNode(ipDest);
+				destination.setAs_number((Inet4Address) id.domain_dst_router);
+				destination.setLearntFrom("FromXML");
+				id.setLocal_Node_Info(origin);
+				id.setRemote_Node_Info(destination);
+			} catch (Exception e) {
+				DataPathID dpSource = (DataPathID) (id.src_router_id);
+				DataPathID dpDest = (DataPathID) (id.dst_router_id);
+				id.setLearntFrom("From XML");
+				Node_Info origin = new Node_Info();
+				Node_Info destination = new Node_Info();
+				origin.setDataPathLocalNode(dpSource);
+				origin.setAs_number(domainID);
+				origin.setLearntFrom("FromXML");
+				destination.setDataPathLocalNode(dpDest);
+				destination.setAs_number((Inet4Address) id.domain_dst_router);
+				destination.setLearntFrom("FromXML");
+				id.setLocal_Node_Info(origin);
+				id.setRemote_Node_Info(destination);
+			}
+		}
+
+	}	
+
+	public void notifyAlgorithms( int lambdaIni,int lambdaEnd){	
+		LinkedList<Object>  ipListScr = new  LinkedList<Object> ();
+		LinkedList<Object>  ipListDst = new  LinkedList<Object> ();
+		Set<IntraDomainEdge> it =this.networkGraph.edgeSet();
+		int numLabels=0;
+		for (IntraDomainEdge edge:it){	
+			numLabels=edge.TE_info.getAvailableLabels().getLabelSet().getNumLabels();
+			for (int i=0;i<lambdaIni;i++){		
+				ipListScr.add(edge.getSource());
+				ipListDst.add(edge.getTarget());
+				for (int j=0;j<registeredAlgorithms.size();++j){
+					registeredAlgorithms.get(j).notifyWavelengthReservation(ipListScr, ipListDst, i);
+				}
+				for (int j=0;j<registeredAlgorithmssson.size();++j){
+					registeredAlgorithmssson.get(j).notifyWavelengthReservation(ipListScr, ipListDst, i);
+				}
+				this.notifyWavelengthReservation(ipListScr,ipListDst,i,false);
+				ipListScr.remove();
+				ipListDst.remove();
+			}
+
+			for (int i=lambdaEnd;i<numLabels;i++){				
+				ipListScr.add(edge.getSource());
+				ipListDst.add(edge.getTarget());
+				for (int j=0;j<registeredAlgorithms.size();++j){
+					registeredAlgorithms.get(j).notifyWavelengthReservation(ipListScr, ipListDst, i);
+				}
+				for (int j=0;j<registeredAlgorithmssson.size();++j){
+					registeredAlgorithmssson.get(j).notifyWavelengthReservation(ipListScr, ipListDst, i);
+				}
+				this.notifyWavelengthReservation(ipListScr,ipListDst,i,false);
+				ipListScr.remove();
+				ipListDst.remove();
+			}
+		}
+	}
+	public boolean belongsToDomain(Object addr){
+		int i;
+		byte[] addrbytes=((Inet4Address)addr).getAddress();
+		//log.info("Entramos en belong to domain: "+ reachabilityEntry.getMask());
+		//UtilsFunctions.printByte(reachabilityEntry.getMask(), "Entramos en belong to domain: ", log);
+		for (i=0;i<4;++i){
+			addrbytes[i]=(byte) (addrbytes[i]&(reachabilityEntry.getMask())[i]);
+		}
+		//UtilsFunctions.printByte(addrbytes, "addrbytes", log);
+		//UtilsFunctions.printByte(reachabilityEntry.getAggregatedIPRange().getAddress(), "reachabilityEntry.getAggregatedIPRange", log);
+		//log.info("addrbytes "+addrbytes+" reachabilityEntry.getAggregatedIPRange().getAddress()"+reachabilityEntry.getAggregatedIPRange().getAddress());
+		log.info("Belongs to domain retunrs: "+Arrays.equals(addrbytes,reachabilityEntry.getAggregatedIPRange().getAddress()));
+		return Arrays.equals(addrbytes,reachabilityEntry.getAggregatedIPRange().getAddress());
+
+	}
+
+
+	public LinkedList<IntraDomainEdge> getIntraDomainEdges() {
+		return intraDomainEdges;
+	}
+
+	public void setIntraDomainEdges(LinkedList<IntraDomainEdge> intraDomainEdges) {
+		this.intraDomainEdges = intraDomainEdges;
+	}
+
+	public ReachabilityEntry getReachabilityEntry() {
+		return reachabilityEntry;
+	}
+
+	public void setReachabilityEntry(ReachabilityEntry reachabilityEntry) {
+		this.reachabilityEntry = reachabilityEntry;
+	}
+
+	public SimpleDirectedWeightedGraph<Object, IntraDomainEdge> getNetworkGraph() {
+		return networkGraph;
+	}
+
+	public void setNetworkGraph(
+			SimpleDirectedWeightedGraph<Object, IntraDomainEdge> networkGraph) {
+		this.networkGraph = networkGraph;
+	}
+
+	public LinkedList<InterDomainEdge> getInterDomainLinks() {
+		return interDomainLinks;
+	}
+	public void setInterDomainLinks(LinkedList<InterDomainEdge> interDomainLinks) {
+		this.interDomainLinks = interDomainLinks;
+	}
+	
+	/**
+	 * Return true if scr and dst are linked by an InterDomainLink
+	 * @param src Source 
+	 * @param dst Destination
+	 * @return  true if scr and dst are linked by an InterDomainLink
+	 */
+	public InterDomainEdge getInterdomainLink(Object src, Object dst){
+
+		int size = interDomainLinks.size();
+		InterDomainEdge edge= new InterDomainEdge(src,dst);
+		for (int i=0;i<size;i++){    		
+			//por pantalla  
+			InterDomainEdge edge_i = interDomainLinks.get(i);
+			if (edge_i.equals(edge)){
+				return edge_i;
+			}
+		}
+		return null;
+	}
+
+	public String printTopology(){
+		String topoString;
+		Set<Object> vetexSet= networkGraph.vertexSet();
+		Iterator <Object> vertexIterator=vetexSet.iterator();
+		topoString="Nodes: \r\n";
+		while (vertexIterator.hasNext()){
+			Object vertex= vertexIterator.next();
+			topoString=topoString+"\t"+vertex.toString()+"\r\n";
+		}
+		topoString=topoString+"Node Information Table::: \r\n"+NodeTable.toString()+"\r\n";
+		Set<IntraDomainEdge> edgeSet= networkGraph.edgeSet();
+		if (edgeSet != null){
+			Iterator <IntraDomainEdge> edgeIterator=edgeSet.iterator();
+			topoString=topoString+"Intradomain Link list: \r\n";
+			while (edgeIterator.hasNext()){
+				IntraDomainEdge edge= edgeIterator.next();
+				topoString=topoString+"\t"+edge.toString()+"\n";
+			}
+		}
+		if (interDomainLinks != null)
+			topoString=topoString+printInterDomainLinks();
+		return topoString;
+	}
+
+	public String printInterDomainLinks(){
+		String topoString="";
+
+		int size = interDomainLinks.size();
+		log.info("Size of InterDomainLinks: "+size);
+		topoString="Interdomain Link list: \r\n";
+		for (int i=0;i<size;i++){
+			//por pantalla  
+			InterDomainEdge edge = interDomainLinks.get(i);
+			topoString=topoString+"\t"+edge.toString()+"\r\n";
+		}
+		return topoString;
+	}
+
+	@Override
+	public boolean isITtedb() {
+		// TODO Auto-generated method stub
+		return false;
+	}
+
+	@Override
+	public void notifyWavelengthReservationWLAN(LinkedList<Object> sourceVertexList,LinkedList<Object> targetVertexList,LinkedList<Integer> wlans, boolean bidirectional) 
+	{
+		TEDBlock.lock();
+		try {
+			for (int i=0;i<sourceVertexList.size();++i){		
+				IntraDomainEdge edge=networkGraph.getEdge(sourceVertexList.get(i), targetVertexList.get(i));
+				edge.getTE_info().setWavelengthReserved(wlans.get(i));
+				log.info("Reservo: "+sourceVertexList.get(i).toString() + "-"+ targetVertexList.get(i).toString() +" wavelength: "+wlans.get(i)+" bidirectional"+bidirectional);
+				if (bidirectional == true){
+					edge=networkGraph.getEdge(targetVertexList.get(i), sourceVertexList.get(i));
+					edge.getTE_info().setWavelengthReserved(wlans.get(i));
+					//log.info(""+edge.toString());
+				}
+			}
+		}finally{
+			TEDBlock.unlock();
+		}
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			registeredAlgorithms.get(i).notifyWavelengthReservation(sourceVertexList, targetVertexList, wlans.get(i));
+			if (bidirectional == true){
+				registeredAlgorithms.get(i).notifyWavelengthReservation(targetVertexList, sourceVertexList, wlans.get(i));
+			}
+		}
+
+	}
+
+	@Override
+	public void notifyWavelengthReservation(LinkedList<Object> sourceVertexList, LinkedList<Object> targetVertexList, int wavelength, boolean bidirectional){
+		TEDBlock.lock();
+		try {
+			for (int i=0;i<sourceVertexList.size();++i){		
+				IntraDomainEdge edge=networkGraph.getEdge(sourceVertexList.get(i), targetVertexList.get(i));
+				edge.getTE_info().setWavelengthReserved(wavelength);
+				log.info("Reservo: "+sourceVertexList.get(i).toString() + "-"+ targetVertexList.get(i).toString() +" wavelength: "+wavelength+" bidirectional"+bidirectional);
+				if (bidirectional == true){
+					edge=networkGraph.getEdge(targetVertexList.get(i), sourceVertexList.get(i));
+					edge.getTE_info().setWavelengthReserved(wavelength);
+					//log.info(""+edge.toString());
+				}
+			}
+		}finally{
+			TEDBlock.unlock();
+		}
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			registeredAlgorithms.get(i).notifyWavelengthReservation(sourceVertexList, targetVertexList, wavelength);
+			if (bidirectional == true){
+				registeredAlgorithms.get(i).notifyWavelengthReservation(targetVertexList, sourceVertexList, wavelength);
+			}
+		}
+	}
+
+	public void notifyWavelengthReservationSSON(LinkedList<Object> sourceVertexList, LinkedList<Object> targetVertexList, int wavelength, boolean bidirectional, int m){
+		TEDBlock.lock();
+		try {
+			for (int j=0;j<2*m;j++){
+				for (int i=0;i<sourceVertexList.size();++i){		
+					IntraDomainEdge edge=networkGraph.getEdge(sourceVertexList.get(i), targetVertexList.get(i));
+					//log.info("sourceVertexList.size()"+sourceVertexList.size());
+					edge.getTE_info().setWavelengthReserved(wavelength-m+j);
+					//log.info("Reserving in TEDB: "+edge.toString());
+					if (bidirectional == true){
+						edge=networkGraph.getEdge(targetVertexList.get(i), sourceVertexList.get(i));
+						edge.getTE_info().setWavelengthReserved(wavelength-m+j);
+						//log.info("Reserving in TEDB: "+edge.toString());
+					}
+				}
+			}
+		}finally{
+			TEDBlock.unlock();
+		}
+		for (int i=0;i<registeredAlgorithmssson.size();++i){
+			(registeredAlgorithmssson.get(i)).notifyWavelengthReservationSSON(sourceVertexList, targetVertexList, wavelength, m);
+			if (bidirectional == true){
+				(registeredAlgorithmssson.get(i)).notifyWavelengthReservationSSON(targetVertexList, sourceVertexList, wavelength, m);
+			}
+		}
+	}
+
+	@Override
+	public void notifyWavelengthEndReservationSSON(LinkedList<Object> sourceVertexList, LinkedList<Object> targetVertexList, int wavelength, boolean bidirectional, int m){
+		// TODO Auto-generated method stub
+		//Delete the resource reservation
+		TEDBlock.lock();
+		try {
+			for (int j=0;j<2*m;j++){
+				for (int i=0;i<sourceVertexList.size();++i){
+					//			SimpleDirectedWeightedGraph<Object,FiberLinkEdge> graph= ted.getNetworkGraph();
+					IntraDomainEdge edge=networkGraph.getEdge(sourceVertexList.get(i),targetVertexList.get(i) );
+					edge.getTE_info().setWavelengthUnReserved(wavelength-m+j);
+					//log.info("Derreserving in TEDB: "+edge.toString());
+					if (bidirectional == true)
+					{
+						edge=networkGraph.getEdge(targetVertexList.get(i), sourceVertexList.get(i));
+						edge.getTE_info().setWavelengthUnReserved(wavelength-m+j);
+						//log.info("Derreserving in TEDB: "+edge.toString());
+					}
+				}
+			}
+		}finally{
+			TEDBlock.unlock();
+		}
+		for (int i=0;i<registeredAlgorithmssson.size();++i){
+			(registeredAlgorithmssson.get(i)).notifyWavelengthEndReservationSSON(sourceVertexList, targetVertexList, wavelength, m);
+			if (bidirectional == true){
+				(registeredAlgorithmssson.get(i)).notifyWavelengthEndReservationSSON(targetVertexList, sourceVertexList, wavelength, m);
+			}
+		}
+		//FIXME:TEMPORAL!!!!!!
+		//requestDispatcher.moveRetryQueueToComputingRequestQueue();
+		//Call request dispatcher to pass requests to queue?
+	}
+
+	@Override
+	public void notifyWavelengthEndReservation(LinkedList<Object> sourceVertexList, LinkedList<Object> targetVertexList, int wavelength, boolean bidirectional){
+		// TODO Auto-generated method stub
+		//Delete the resource reservation
+		TEDBlock.lock();
+		try {
+			for (int i=0;i<sourceVertexList.size();++i){
+				//			SimpleDirectedWeightedGraph<Object,FiberLinkEdge> graph= ted.getNetworkGraph();
+				IntraDomainEdge edge=networkGraph.getEdge(sourceVertexList.get(i),targetVertexList.get(i) );
+				edge.getTE_info().setWavelengthUnReserved(wavelength);
+				//log.info(""+edge.toString());
+				if (bidirectional == true)
+				{
+					edge=networkGraph.getEdge(targetVertexList.get(i), sourceVertexList.get(i));
+					edge.getTE_info().setWavelengthUnReserved(wavelength);
+					//log.info(""+edge.toString());
+				}
+			}
+		}finally{
+			TEDBlock.unlock();
+		}
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			registeredAlgorithms.get(i).notifyWavelengthEndReservation(sourceVertexList, targetVertexList, wavelength);
+			if (bidirectional == true){
+				registeredAlgorithms.get(i).notifyWavelengthEndReservation(targetVertexList, sourceVertexList, wavelength);
+			}
+		}
+		//FIXME:TEMPORAL!!!!!!
+		//requestDispatcher.moveRetryQueueToComputingRequestQueue();
+		//Call request dispatcher to pass requests to queue?
+	}
+
+	@Override
+	public boolean containsVertex(Object vertex) {
+		return networkGraph.containsVertex(vertex);
+	}
+
+	public Hashtable<Object, Node_Info> getNodeTable() {
+		return NodeTable;
+	}
+
+	public void setNodeTable(Hashtable<Object, Node_Info> nodeTable) {
+		NodeTable = nodeTable;
+	}
+
+	public boolean isMultidomain() {
+		return multidomain;
+	}
+
+	public void setMultidomain(boolean multidomain) {
+		this.multidomain = multidomain;
+	}
+
+	public void registerSSON (SSONListener algo){
+		registeredAlgorithmssson.add(algo);		
+	}
+
+	public void register (TEDListener algo){
+		registeredAlgorithms.add(algo);		
+	}
+
+	@Override
+	public void notifyWavelengthChange(Object localInterfaceIPAddress, Object remoteInterfaceIPAddress,	BitmapLabelSet previousBitmapLabelSet, BitmapLabelSet newBitmapLabelSet) {
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			registeredAlgorithms.get(i).notifyWavelengthStatusChange(localInterfaceIPAddress, remoteInterfaceIPAddress, previousBitmapLabelSet, newBitmapLabelSet);
+		}
+		if (registeredAlgorithms.isEmpty()){
+			for (int i=0;i<registeredAlgorithmssson.size();++i){
+				registeredAlgorithmssson.get(i).notifyWavelengthStatusChange(localInterfaceIPAddress, remoteInterfaceIPAddress, previousBitmapLabelSet, newBitmapLabelSet);
+			}
+		}
+	}
+
+	@Override
+	public void notifyNewVertex(Object vertex) {
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			registeredAlgorithms.get(i).notifyNewVertex(vertex);
+		}	
+		for (int i=0;i<registeredAlgorithmssson.size();++i){
+			registeredAlgorithmssson.get(i).notifyNewVertex(vertex);
+		}	
+	}
+
+	@Override
+	public void notifyNewEdge(Object source, Object destination) {
+		for (int i=0;i<registeredAlgorithms.size();++i){
+			registeredAlgorithms.get(i).notifyNewEdge(source,destination);
+		}
+		for (int i=0;i<registeredAlgorithmssson.size();++i){
+			registeredAlgorithmssson.get(i).notifyNewEdge(source,destination);
+		}	
+	}
+
+	@Override
+	public WSONInformation getWSONinfo() {
+		return WSONinfo;
+	}
+
+	@Override
+	public SSONInformation getSSONinfo() {
+		return SSONinfo;
+	}
+
+	@Override
+	public void clearAllReservations() {
+		if (WSONinfo!=null){
+			TEDBlock.lock();
+			try{	
+				Set<IntraDomainEdge> edgeSet= networkGraph.edgeSet();
+				Iterator <IntraDomainEdge> edgeIterator=edgeSet.iterator();
+				while (edgeIterator.hasNext()){
+					IntraDomainEdge edge= edgeIterator.next();
+					edge.TE_info.setAllWavelengtshUnReserved();
+				}
+			}finally{
+				TEDBlock.unlock();
+			}
+			for (int i=0;i<registeredAlgorithms.size();++i){
+				registeredAlgorithms.get(i).notifyTEDBFullUpdate();
+			}	
+		}
+	}
+
+	public Lock getTEDBlock() {
+		return TEDBlock;
+	}
+
+	public void setTEDBlock(Lock tEDBlock) {
+		TEDBlock = tEDBlock;
+	}
+
+	@Override
+	public void notifyNewEdgeIP(Object source, Object destination,
+			TE_Information informationTEDB) {
+		// TODO Auto-generated method stub
+	}
+
+	public void setWSONinfo(WSONInformation wSONinfo) {
+		WSONinfo = wSONinfo;
+	}
+
+	public void setSSONinfo(SSONInformation sSONinfo) {
+		SSONinfo = sSONinfo;
+	}
+
+	
+	public String printBaseTopology(){
+		String topoString;
+		Set<Object> vetexSet= networkGraph.vertexSet();
+		Iterator <Object> vertexIterator=vetexSet.iterator();
+		topoString="NodesFEO: \r\n";
+		while (vertexIterator.hasNext()){
+			Object vertex= vertexIterator.next();
+			topoString=topoString+"\t"+vertex.toString()+"\r\n";
+		}
+		topoString=topoString+"Intradomain Link list: \r\n";
+		Set<IntraDomainEdge> edgeSet= networkGraph.edgeSet();
+		Iterator <IntraDomainEdge> edgeIterator=edgeSet.iterator();
+		while (edgeIterator.hasNext()){
+			IntraDomainEdge edge= edgeIterator.next();
+			topoString=topoString+"\t"+edge.toString()+"\r\n";
+		}		
+		return topoString;
+	}
+
+	@Override
+	public Inet4Address getDomainID() {
+		// TODO Auto-generated method stub
+		return domainID;
+	}
+
+	public void setDomainID(Inet4Address domainID) {
+		this.domainID = domainID;
+	}
+
+	@Override
+	public Set<IntraDomainEdge> getIntraDomainLinks() {
+		return this.getNetworkGraph().edgeSet();
+	}
+	
+	public Set<Object> getIntraDomainLinksvertexSet() {
+		return this.getNetworkGraph().vertexSet();
+	}
+
+	@Override
+	public int hashCode() {
+		final int prime = 31;
+		int result = 1;
+		result = prime * result + ((domainID == null) ? 0 : domainID.hashCode());
+		result = prime * result + ((intraDomainEdges == null) ? 0 : intraDomainEdges.hashCode());
+		result = prime * result + ((networkGraph == null) ? 0 : networkGraph.hashCode());
+		return result;
+	}
+
+	@Override
+	public boolean equals(Object obj) {
+		if (this == obj)
+			return true;
+		if (obj == null)
+			return false;
+		if (getClass() != obj.getClass())
+			return false;
+		SimpleTEDB other = (SimpleTEDB) obj;
+		if (intraDomainEdges == null) {
+			if (other.intraDomainEdges != null)
+				return false;
+		} else if (!intraDomainEdges.equals(other.intraDomainEdges))
+			return false;
+		if (networkGraph == null) {
+			if (other.networkGraph != null)
+				return false;
+		}
+		for(Object v : networkGraph.vertexSet()){
+			if(!other.networkGraph.containsVertex(v))
+				return false;
+		}
+		
+		for(IntraDomainEdge e :networkGraph.edgeSet()){
+			boolean flagEqual=false;
+			for(IntraDomainEdge otherE : other.networkGraph.edgeSet()){
+				if(e.toString().equals(otherE.toString()))flagEqual=true;
+			}
+			if(flagEqual==false)return false; //edge not present in other
+		}
+		for(IntraDomainEdge e :other.networkGraph.edgeSet()){
+			boolean flagEqual=false;
+			for(IntraDomainEdge otherE : networkGraph.edgeSet()){
+				if(e.toString().equals(otherE.toString()))flagEqual=true;
+			}
+			if(flagEqual==false)return false; //edge not present in other
+		}
+		return true;
+	}
+
+	public IT_Resources getItResources() {
+		return itResources;
+	}
+
+	public void setItResources(IT_Resources itResources) {
+		this.itResources = itResources;
+	}
+	
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDB.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDB.java
new file mode 100644
index 0000000000000000000000000000000000000000..51fc3d8c1beab3bf13175459b5e27fc38780b4ac
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDB.java
@@ -0,0 +1,37 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import java.util.LinkedList;
+
+/**
+ * Base Interface for a Generic Traffic Engineering Database
+ * @author ogondio
+ *
+ */
+public interface TEDB {
+
+	public void initializeFromFile(String file);
+
+	public void initializeFromFile(String file, String learnFrom);
+
+
+	public boolean isITtedb(); //FIXME: Remove!
+	
+	public String printTopology();
+
+	public LinkedList<InterDomainEdge> getInterDomainLinks();
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDBUpdater.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDBUpdater.java
new file mode 100644
index 0000000000000000000000000000000000000000..fe261b80e8dc977e3bfa4cab01d9b64a08b99c3a
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDBUpdater.java
@@ -0,0 +1,19 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+public class TEDBUpdater {
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDListener.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDListener.java
new file mode 100644
index 0000000000000000000000000000000000000000..86e653ed07da9a46c2c63ab269cbeb86f61ef409
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TEDListener.java
@@ -0,0 +1,41 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import java.util.LinkedList;
+
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet;
+
+public interface TEDListener {
+
+	public void notifyNewVertex(Object vertex);
+	
+	public void notifyNewEdge(Object source, Object destination);
+
+	public void notifyWavelengthStatusChange(Object source, Object destination, BitmapLabelSet previousBitmapLabelSet, BitmapLabelSet newBitmapLabelSet);
+
+	public void notifyWavelengthReservation(LinkedList<Object> sourceVertexList, LinkedList<Object> targetVertexList, int wavelength);
+
+	public void notifyWavelengthEndReservation(LinkedList<Object> sourceVertexList, LinkedList<Object> targetVertexList, int wavelength);
+
+	public void notifyTEDBFullUpdate();
+
+	public void notifyNewEdgeIP(Object source, Object destination, TE_Information informationTEDB);
+
+	public void notificationEdgeIP_AuxGraph(Object src, Object dst, TE_Information informationTEDB);
+
+	public void notificationEdgeOPTICAL_AuxGraph(Object src, Object dst, int lambda);
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TE_Information.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TE_Information.java
new file mode 100644
index 0000000000000000000000000000000000000000..0e5476dfe56e4162c96fdf74f26a98478294635f
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/TE_Information.java
@@ -0,0 +1,679 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.DefaultTEMetricLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IPv4RouterIDLocalNodeLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.IPv4RouterIDRemoteNodeLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.LinkProtectionTypeLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MF_OTPAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.MetricLinkAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.linkstate_attribute_tlvs.TransceiverClassAndAppAttribTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.MinMaxUndirectionalLinkDelayDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalAvailableBandwidthDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalDelayVariationDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalLinkDelayDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalLinkLossDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalResidualBandwidthDescriptorSubTLV;
+import es.tid.bgp.bgp4.update.tlv.node_link_prefix_descriptor_subTLVs.UndirectionalUtilizedBandwidthDescriptorSubTLV;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AdministrativeGroup;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.IPv4RemoteASBRID;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.InterfaceSwitchingCapabilityDescriptor;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.LinkLocalRemoteIdentifiers;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.LinkProtectionType;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.MaximumBandwidth;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.MaximumReservableBandwidth;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.RemoteASNumber;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.SharedRiskLinkGroup;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.TrafficEngineeringMetric;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.UnreservedBandwidth;
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.complexFields.BitmapLabelSet;
+import es.tid.rsvp.constructs.gmpls.DWDMWavelengthLabel;
+
+public class TE_Information {
+	
+	private TrafficEngineeringMetric trafficEngineeringMetric;
+	
+	private DefaultTEMetricLinkAttribTLV defaultTEMetric;
+
+	private MaximumBandwidth maximumBandwidth; 
+
+	private MaximumReservableBandwidth maximumReservableBandwidth;
+
+	private UnreservedBandwidth unreservedBandwidth; 
+
+	private AdministrativeGroup administrativeGroup;
+	
+	private LinkLocalRemoteIdentifiers linkLocalRemoteIdentifiers;
+	
+	private LinkProtectionType linkProtectionType;
+	
+	private LinkProtectionTypeLinkAttribTLV linkProtectionBGPLS;
+	
+	private InterfaceSwitchingCapabilityDescriptor interfaceSwitchingCapabilityDescriptor;
+	
+	private SharedRiskLinkGroup sharedRiskLinkGroup;	
+	
+	private RemoteASNumber remoteASNumber;
+	
+	private IPv4RemoteASBRID iPv4RemoteASBRID;
+	
+	private IPv4RouterIDLocalNodeLinkAttribTLV iPv4LocalNode;
+	
+	private IPv4RouterIDRemoteNodeLinkAttribTLV iPv4RemoteNode;
+	
+	
+	private UndirectionalLinkDelayDescriptorSubTLV undirLinkDelay;
+	private MinMaxUndirectionalLinkDelayDescriptorSubTLV minMaxUndirLinkDelay;
+	private UndirectionalDelayVariationDescriptorSubTLV undirDelayVar;
+	private UndirectionalLinkLossDescriptorSubTLV undirLinkLoss;
+	private UndirectionalResidualBandwidthDescriptorSubTLV undirResidualBw;
+	private UndirectionalAvailableBandwidthDescriptorSubTLV undirAvailableBw;
+	private UndirectionalUtilizedBandwidthDescriptorSubTLV undirUtilizedBw;
+	
+	
+	private MetricLinkAttribTLV metric;
+	
+	private AvailableLabels availableLabels;
+	
+	private MF_OTPAttribTLV mfOTF;
+	
+	private TransceiverClassAndAppAttribTLV trans;
+	
+	private int NumberWLANs = 15;
+	
+	private boolean withWLANs = false;
+	
+	private boolean[] occupiedWLANs;
+	private boolean[] reservedWLANs;
+	
+	private boolean vlanLink = false;
+	
+	private int vlan;
+	
+	/**
+	 * TEDB logger
+	 */
+	public TE_Information()
+	{
+		//initWLANs();
+	}
+
+	public AvailableLabels getAvailableLabels() {
+		return availableLabels;
+	}
+
+	public void setAvailableLabels(AvailableLabels availableLabels) {
+		this.availableLabels = availableLabels;
+	}
+
+	public TrafficEngineeringMetric getTrafficEngineeringMetric() {
+		return trafficEngineeringMetric;
+	}
+
+	public void setTrafficEngineeringMetric(
+			TrafficEngineeringMetric trafficEngineeringMetric) {
+		this.trafficEngineeringMetric = trafficEngineeringMetric;
+	}
+
+	public MaximumBandwidth getMaximumBandwidth() {
+		return maximumBandwidth;
+	}
+
+	public void setMaximumBandwidth(MaximumBandwidth maximumBandwidth) {
+		this.maximumBandwidth = maximumBandwidth;
+	}
+
+	public MaximumReservableBandwidth getMaximumReservableBandwidth() {
+		return maximumReservableBandwidth;
+	}
+
+	public IPv4RouterIDRemoteNodeLinkAttribTLV getiPv4RemoteNode() {
+		return iPv4RemoteNode;
+	}
+
+	public void setiPv4RemoteNode(IPv4RouterIDRemoteNodeLinkAttribTLV iPv4RemoteNode) {
+		this.iPv4RemoteNode = iPv4RemoteNode;
+	}
+
+	public void setMaximumReservableBandwidth(
+			MaximumReservableBandwidth maximumReservableBandwidth) {
+		this.maximumReservableBandwidth = maximumReservableBandwidth;
+	}
+
+	public UnreservedBandwidth getUnreservedBandwidth() {
+		return unreservedBandwidth;
+	}
+
+	public void setUnreservedBandwidth(UnreservedBandwidth unreservedBandwidth) {
+		this.unreservedBandwidth = unreservedBandwidth;
+	}
+	
+	public UndirectionalLinkDelayDescriptorSubTLV getUndirLinkDelay() {
+		return undirLinkDelay;
+	}
+
+	public void setUndirLinkDelay(UndirectionalLinkDelayDescriptorSubTLV undirLinkDelay) {
+		this.undirLinkDelay = undirLinkDelay;
+	}
+
+	public MinMaxUndirectionalLinkDelayDescriptorSubTLV getMinMaxUndirLinkDelay() {
+		return minMaxUndirLinkDelay;
+	}
+
+	public void setMinMaxUndirLinkDelay(MinMaxUndirectionalLinkDelayDescriptorSubTLV minMaxUndirLinkDelay) {
+		this.minMaxUndirLinkDelay = minMaxUndirLinkDelay;
+	}
+
+	public UndirectionalDelayVariationDescriptorSubTLV getUndirDelayVar() {
+		return undirDelayVar;
+	}
+
+	public void setUndirDelayVar(UndirectionalDelayVariationDescriptorSubTLV undirDelayVar) {
+		this.undirDelayVar = undirDelayVar;
+	}
+
+	public UndirectionalLinkLossDescriptorSubTLV getUndirLinkLoss() {
+		return undirLinkLoss;
+	}
+
+	public void setUndirLinkLoss(UndirectionalLinkLossDescriptorSubTLV undirLinkLoss) {
+		this.undirLinkLoss = undirLinkLoss;
+	}
+
+	public UndirectionalResidualBandwidthDescriptorSubTLV getUndirResidualBw() {
+		return undirResidualBw;
+	}
+
+	public void setUndirResidualBw(UndirectionalResidualBandwidthDescriptorSubTLV undirResidualBw) {
+		this.undirResidualBw = undirResidualBw;
+	}
+
+	public UndirectionalAvailableBandwidthDescriptorSubTLV getUndirAvailableBw() {
+		return undirAvailableBw;
+	}
+
+	public void setUndirAvailableBw(UndirectionalAvailableBandwidthDescriptorSubTLV undirAvailableBw) {
+		this.undirAvailableBw = undirAvailableBw;
+	}
+
+	public UndirectionalUtilizedBandwidthDescriptorSubTLV getUndirUtilizedBw() {
+		return undirUtilizedBw;
+	}
+
+	public void setUndirUtilizedBw(UndirectionalUtilizedBandwidthDescriptorSubTLV undirUtilizedBw) {
+		this.undirUtilizedBw = undirUtilizedBw;
+	}
+
+	public AdministrativeGroup getAdministrativeGroup() {
+		return administrativeGroup;
+	}
+
+	public void setAdministrativeGroup(AdministrativeGroup administrativeGroup) {
+		this.administrativeGroup = administrativeGroup;
+	}
+
+	public LinkLocalRemoteIdentifiers getLinkLocalRemoteIdentifiers() {
+		return linkLocalRemoteIdentifiers;
+	}
+
+	public void setLinkLocalRemoteIdentifiers(
+			LinkLocalRemoteIdentifiers linkLocalRemoteIdentifiers) {
+		this.linkLocalRemoteIdentifiers = linkLocalRemoteIdentifiers;
+	}
+
+	public LinkProtectionType getLinkProtectionType() {
+		return linkProtectionType;
+	}
+
+	public void setLinkProtectionType(LinkProtectionType linkProtectionType) {
+		this.linkProtectionType = linkProtectionType;
+	}
+
+	public InterfaceSwitchingCapabilityDescriptor getInterfaceSwitchingCapabilityDescriptor() {
+		return interfaceSwitchingCapabilityDescriptor;
+	}
+
+	public void setInterfaceSwitchingCapabilityDescriptor(
+			InterfaceSwitchingCapabilityDescriptor interfaceSwitchingCapabilityDescriptor) {
+		this.interfaceSwitchingCapabilityDescriptor = interfaceSwitchingCapabilityDescriptor;
+	}
+
+	public SharedRiskLinkGroup getSharedRiskLinkGroup() {
+		return sharedRiskLinkGroup;
+	}
+
+	public void setSharedRiskLinkGroup(SharedRiskLinkGroup sharedRiskLinkGroup) {
+		this.sharedRiskLinkGroup = sharedRiskLinkGroup;
+	}
+
+	public RemoteASNumber getRemoteASNumber() {
+		return remoteASNumber;
+	}
+
+	public void setRemoteASNumber(RemoteASNumber remoteASNumber) {
+		this.remoteASNumber = remoteASNumber;
+	}
+
+	public IPv4RemoteASBRID getiPv4RemoteASBRID() {
+		return iPv4RemoteASBRID;
+	}
+
+	public void setiPv4RemoteASBRID(IPv4RemoteASBRID iPv4RemoteASBRID) {
+		this.iPv4RemoteASBRID = iPv4RemoteASBRID;
+	}
+
+	public int getNumberWLANs() {
+		return NumberWLANs;
+	}
+
+	public void setNumberWLANs(int numberWLANs) {
+		NumberWLANs = numberWLANs;
+	}
+	
+	public boolean isWLANFree()
+	{
+		/*
+		for (int i = 0; i < reservedWLANs.length; i++) 
+		{
+			if (reservedWLANs[i] == false)
+			{
+				return true;
+			}
+		}
+		return false;
+		*/
+		return true;
+	}
+	
+	public Integer getFreeWLAN()
+	{
+		for (int i = 0; i < reservedWLANs.length; i++) 
+		{
+			if (reservedWLANs[i] == false)
+			{
+				return i;
+			}
+		}
+		return null;
+	}
+	
+	public void initWLANs()
+	{
+		withWLANs = true;
+		occupiedWLANs = new boolean[NumberWLANs];
+		reservedWLANs = new boolean[NumberWLANs];
+		for (int i = 0 ; i < NumberWLANs ; i++)
+		{
+			occupiedWLANs[i] = false;
+			reservedWLANs[i] = false;
+		}
+	}
+
+	public void createBitmapLabelSet(int numLabels,int grid, int cs,int n){
+		
+		 createBitmapLabelSet(numLabels,grid,cs,n,0,numLabels);
+	}
+	public void createBitmapLabelSet(int numLabels,int grid, int cs,int n,int lambdaIni, int lambdaEnd){
+			//FIXME: no hay problema de que se salga el ancho de banda
+	//log.info("Creamos bit map");
+		BitmapLabelSet bitmapLabelSet = new BitmapLabelSet();
+			DWDMWavelengthLabel dwdmWavelengthLabel = new DWDMWavelengthLabel();
+			dwdmWavelengthLabel.setGrid(grid);
+			dwdmWavelengthLabel.setChannelSpacing(cs);
+			dwdmWavelengthLabel.setN(n);
+			bitmapLabelSet.setDwdmWavelengthLabel(dwdmWavelengthLabel);
+								
+			int numberBytes = 	getNumberBytes(numLabels);
+		
+			byte[] bytesBitMap =  new byte[numberBytes];
+			for (int i=0;i<numberBytes;i++)
+					bytesBitMap[i]=0x00;	
+			
+			bitmapLabelSet.setBytesBitmap(bytesBitMap);
+			byte[] bytesBitMapRes =  new byte[numberBytes];
+			for (int i=0;i<numberBytes;i++)
+				bytesBitMapRes[i]=0x00;	
+			/*----Opcion: LAMBDA SUBSET----*/
+			/*Ponemos a 1 los bytes del BitMap que no maneje el pce. Esto es como poner tiempo de reserva infinito*/
+			/*Traducir lambdaIni a numero de bytes*/
+			int numberBytesLambdaIni = getNumberBytes(lambdaIni);
+			
+			/*Traducir lambdaEnd a numero bytes*/
+			int numberBytesLambdaEnd =getNumberBytes( lambdaEnd);
+			
+			for (int i=0;i<numberBytesLambdaIni;i++){
+				bytesBitMapRes[i]= (byte) 0xff;
+				bytesBitMap[i]= (byte) 0xff;
+				
+			}
+			
+			for (int i=numberBytesLambdaEnd;i<numberBytes;i++){
+				bytesBitMapRes[i]= (byte) 0xff;	
+				bytesBitMap[i]= (byte) 0xff;
+				
+			}
+			System.out.println("Setting Bytes:\n\rBytes: "+numberBytes+"\n\rLambdaIni: "+numberBytesLambdaIni+"\n\rLambdaEnd: "+numberBytesLambdaEnd);
+			//FuncionesUtiles.printByte(bytesBitMap, "bytesBitMap",log);
+			bitmapLabelSet.setBytesBitmapReserved(bytesBitMapRes);
+			bitmapLabelSet.setNumLabels(numLabels);
+			availableLabels = new AvailableLabels();
+			availableLabels.setLabelSet(bitmapLabelSet);
+			
+		
+	}
+	/**
+	 * Funcion que transforma una cantidad de bits en el numero de bytes que necesita 
+	 * @param numBit
+	 */
+	private int getNumberBytes(int numBits){
+		int numberBytes = numBits/8;
+		if ((numberBytes*8)<numBits){
+			numberBytes++;
+		}
+		return numberBytes;
+	}
+	
+	public boolean[] getCopyUnreservedWLANs()
+	{
+		boolean[] ret = new boolean[NumberWLANs];
+
+		System.arraycopy( reservedWLANs, 0, ret, 0, ret.length );
+		return ret;
+	}
+	
+	public void setFreeWLANS (boolean[] orig)
+	{
+		reservedWLANs = orig;
+	}
+	
+	public void setWavelengthOccupied(int num_wavelength)
+	{
+		if (withWLANs)
+		{
+			occupiedWLANs[num_wavelength] = true;
+		}
+		else
+		{
+			int num_byte=num_wavelength/8;
+			((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitMap()[num_byte]=(byte)((((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitMap()[num_byte])|(0x80>>>(num_wavelength%8)));
+		}
+	}
+	public void setWavelengthFree(int num_wavelength)
+	{
+		if (withWLANs)
+		{
+			occupiedWLANs[num_wavelength] = false;
+			reservedWLANs[num_wavelength] = false;
+		}
+		else
+		{
+		int num_byte=num_wavelength/8;
+		((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitMap()[num_byte]=(byte)(((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitMap()[num_byte]&(0xFFFF7F>>>(num_wavelength%8)));
+		}
+	}
+	
+	public void setWavelengthReserved(int num_wavelength){
+		if (withWLANs)
+		{
+			reservedWLANs[num_wavelength] = true;
+		}
+		else
+		{
+			int num_byte=num_wavelength/8;
+//			if ( this.getAvailableLabels()==null){
+//				PCEServer.log.info("AvailableLabels ES NULL");
+//				
+//			}
+//			if ( this.getAvailableLabels().getLabelSet()==null){
+//				PCEServer.log.info("AvailableLabels LABEL SET ES NULL");
+//				
+//			}
+//			if (((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()==null){
+//				PCEServer.log.info("BytesBitmapReserved ES NULL");
+//				
+//			}
+	
+			((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()[num_byte]=(byte)((((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()[num_byte])|(0x80>>>(num_wavelength%8)));
+		}
+	}
+	
+	public void setWavelengthUnReserved(int num_wavelength){
+		if (withWLANs)
+		{
+			reservedWLANs[num_wavelength] = false;
+		}
+		else
+		{
+			int num_byte=num_wavelength/8;
+			((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()[num_byte]=(byte)(((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()[num_byte]&(0xFFFF7F>>>(num_wavelength%8)));
+		}
+	}
+	public void setAllWavelengtshUnReserved(){
+		if (withWLANs)
+		{
+			for (int i = 0; i < reservedWLANs.length; i++) 
+			{
+				reservedWLANs[i] = false;
+			}
+		}
+		else
+		{
+			int num_bytes=((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved().length;
+			for (int i=0;i<num_bytes;++i){
+				((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()[i]=0x00;	
+			}
+		}
+	}
+	
+	public boolean isWavelengthFree(int num_wavelength){
+		if (withWLANs)
+		{
+			return (!occupiedWLANs[num_wavelength]);
+		}
+		else
+		{
+			int num_byte=num_wavelength/8;
+			return ((((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitMap()[num_byte]&(0x80>>>(num_wavelength%8)))==0);				
+		}
+		
+	}
+	public boolean isWavelengthUnreserved(int num_wavelength){//si es true esta unreserved
+		if (withWLANs)
+		{
+			return (!reservedWLANs[num_wavelength]);
+		}
+		else
+		{
+			int num_byte=num_wavelength/8;
+			if (((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()==null){
+				return false;
+			}
+			else{
+				return ((((BitmapLabelSet)this.getAvailableLabels().getLabelSet()).getBytesBitmapReserved()[num_byte]&(0x80>>>(num_wavelength%8)))==0);				
+			}
+		}	
+	}
+	
+	
+	public String toString(){
+		String ret="";
+//		if (linkType!=null){
+//			ret=ret+linkType.toString()+"\t";			
+//		}
+//		if (linkID!=null){
+//			ret=ret+linkID.toString()+"\t";
+//		}
+//		if (localInterfaceIPAddress!=null){
+//			ret=ret+localInterfaceIPAddress.toString()+"\r\n";
+//		}
+//		if (remoteInterfaceIPAddress!=null){
+//			ret=ret+remoteInterfaceIPAddress.toString()+"\r\n";
+//		}
+
+		if (maximumBandwidth!=null){
+			ret=ret+maximumBandwidth.toStringShort()+"\t";
+		}
+		if (maximumReservableBandwidth!=null){
+			ret=ret+maximumReservableBandwidth.toString()+"\t";
+		}
+		
+		if (unreservedBandwidth!=null){
+			ret=ret+unreservedBandwidth.toStringShort()+"\t";
+		}
+		
+		if (administrativeGroup!=null){
+			ret=ret+administrativeGroup.toString()+"\t";
+		}
+
+		if (remoteASNumber!=null){
+			ret=ret+remoteASNumber.toString()+"\t";
+		}
+		
+		if (iPv4RemoteASBRID!=null){
+			ret=ret+iPv4RemoteASBRID.toString()+"\t";
+		}
+		
+		if (availableLabels!= null){
+			ret=ret+availableLabels.toString()+"\r\n";
+		}
+		
+		if (iPv4LocalNode!=null){
+			ret=ret+iPv4LocalNode.toString()+"\r\n";
+		}
+		
+		if (iPv4RemoteNode!=null){
+			ret=ret+iPv4RemoteNode.toString()+"\r\n";
+		}
+		
+		if(linkProtectionBGPLS!=null){
+			ret=ret+linkProtectionBGPLS.toString()+"\r\n";
+		}
+		
+		if(trafficEngineeringMetric!=null){
+			ret=ret+trafficEngineeringMetric.toString()+"\r\n";
+		}
+		
+		if(metric!=null){
+			ret=ret+metric.toString()+"\r\n";
+		}
+		
+		if(defaultTEMetric!=null){
+			ret=ret+defaultTEMetric.toString()+"\r\n";
+		}
+		
+		if(this.mfOTF !=null){
+			ret=ret+mfOTF.toString()+"\r\n";
+		}
+		
+		
+		if(this.trans !=null){
+			ret=ret+trans.toString()+"\r\n";
+		}
+		if(undirLinkDelay!=null){
+			ret=ret+undirLinkDelay.toString()+"\r\n";
+		}
+		if(minMaxUndirLinkDelay!=null){
+			ret=ret+minMaxUndirLinkDelay.toString()+"\r\n";
+		}
+		if(undirDelayVar!=null){
+			ret=ret+undirDelayVar.toString()+"\r\n";
+		}
+		
+		if(undirLinkLoss!=null){
+			ret=ret+undirLinkLoss.toString()+"\r\n";
+		}
+		if(undirResidualBw!=null){
+			ret=ret+undirResidualBw.toString()+"\r\n";
+		}
+		if(undirAvailableBw!=null){
+			ret=ret+undirAvailableBw.toString()+"\r\n";
+		}
+		
+		if(undirUtilizedBw!=null){
+			ret=ret+undirUtilizedBw.toString()+"\r\n";
+		}
+		
+		return ret;
+	}
+
+	public boolean isVlanLink() {
+		return vlanLink;
+	}
+
+	public void setVlanLink(boolean vlanLink) {
+		this.vlanLink = vlanLink;
+	}
+
+	public int getVlan() {
+		return vlan;
+	}
+
+	public void setVlan(int vlan) {
+		this.vlan = vlan;
+	}
+
+	public void setiPv4LocalNode(IPv4RouterIDLocalNodeLinkAttribTLV iPv4RouterIDLocalNode) {	
+		this.iPv4LocalNode = iPv4RouterIDLocalNode;
+	}
+	public IPv4RouterIDLocalNodeLinkAttribTLV getiPv4LocalNode() {	
+		return iPv4LocalNode;
+	}
+
+	public MetricLinkAttribTLV getMetric() {
+		return metric;
+	}
+
+	public void setMetric(MetricLinkAttribTLV metric) {
+		this.metric = metric;
+	}
+
+	public LinkProtectionTypeLinkAttribTLV getLinkProtectionBGPLS() {
+		return linkProtectionBGPLS;
+	}
+
+	public void setLinkProtectionBGPLS(LinkProtectionTypeLinkAttribTLV linkProtectionBGPLS) {
+		this.linkProtectionBGPLS = linkProtectionBGPLS;
+	}
+
+	public DefaultTEMetricLinkAttribTLV getDefaultTEMetric() {
+		return defaultTEMetric;
+	}
+
+	public void setDefaultTEMetric(DefaultTEMetricLinkAttribTLV defaultTEMetric) {
+		this.defaultTEMetric = defaultTEMetric;
+	}
+
+	public MF_OTPAttribTLV getMfOTF() {
+		return mfOTF;
+	}
+
+	public void setMfOTF(MF_OTPAttribTLV mfOTF) {
+		this.mfOTF = mfOTF;
+	}
+
+	public TransceiverClassAndAppAttribTLV getTrans() {
+		return trans;
+	}
+
+	public void setTrans(TransceiverClassAndAppAttribTLV trans) {
+		this.trans = trans;
+	}
+	
+	
+	
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONInformation.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONInformation.java
new file mode 100644
index 0000000000000000000000000000000000000000..c67f3a8262daa218ed0fb2619513cbbb0f2fe07b
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONInformation.java
@@ -0,0 +1,74 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+import es.tid.ospf.ospfv2.lsa.tlv.subtlv.AvailableLabels;
+
+public class WSONInformation {
+	/**
+	 * In case the Network is WSON, this is the list of available Labels
+	 */
+	private AvailableLabels commonAvailableLabels; 
+	
+	/**
+	 * In case the Network is WSON, this is the number of wavelengths. -1 means it is not WSON.
+	 */
+	private int numLambdas=-1;
+	int grid=0;
+	int cs=0;
+	int nMin=0;
+	
+	public int getGrid() {
+		return grid;
+	}
+
+	public void setGrid(int grid) {
+		this.grid = grid;
+	}
+
+	public int getCs() {
+		return cs;
+	}
+
+	public void setCs(int cs) {
+		this.cs = cs;
+	}
+
+
+	public int getnMin() {
+		return nMin;
+	}
+
+	public void setnMin(int nMin) {
+		this.nMin = nMin;
+	}
+
+	public AvailableLabels getCommonAvailableLabels() {
+		return commonAvailableLabels;
+	}
+
+	public void setCommonAvailableLabels(AvailableLabels commonAvailableLabels) {
+		this.commonAvailableLabels = commonAvailableLabels;
+	}
+
+	public int getNumLambdas() {
+		return numLambdas;
+	}
+
+	public void setNumLambdas(int numLambdas) {
+		this.numLambdas = numLambdas;
+	}
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONListener.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONListener.java
new file mode 100644
index 0000000000000000000000000000000000000000..31b35b441e2852547486070da4e1c45ec57682ae
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/WSONListener.java
@@ -0,0 +1,19 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb;
+
+public interface WSONListener {
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterController.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterController.java
new file mode 100644
index 0000000000000000000000000000000000000000..463e300c41b132a59ffad3d8d3fc18f224886582
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterController.java
@@ -0,0 +1,272 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.controllers;
+
+import java.io.File;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.concurrent.locks.Lock;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.jgrapht.graph.SimpleDirectedWeightedGraph;
+import org.w3c.dom.CharacterData;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import eu.teraflow.tid.tedb.DomainTEDB;
+import eu.teraflow.tid.tedb.IntraDomainEdge;
+import eu.teraflow.tid.tedb.SimpleTEDB;
+import eu.teraflow.tid.tedb.TE_Information;
+import eu.teraflow.tid.tedb.elements.RouterInfoPM;
+
+/**
+ * 
+ * @author jaume i la humiltat
+ *
+ *
+ * Class that receives a DomainTED and updates. Then it dies.
+ */
+
+public class TEDUpdaterController extends Thread
+{
+	protected Hashtable<Integer,MyEdge> interDomainLinks = new Hashtable<Integer,MyEdge>();
+	protected ArrayList<String> ips = null;
+	protected ArrayList<String> ports = null;
+	protected String topologyPathNodes = "";
+	protected String topologyPathLinks = "";
+	protected SimpleTEDB TEDB;
+	protected Logger log;
+	protected Lock lock = null;
+	protected String interDomainFile = null;
+	
+	public TEDUpdaterController(){};
+	
+	public TEDUpdaterController(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log)
+	{
+		ips = new ArrayList<String>();
+		ports = new ArrayList<String>();
+		
+		ips.add(ip);
+		ports.add(port);
+		
+		this.topologyPathLinks = topologyPathLinks;
+		this.topologyPathNodes = topologyPathNodes;
+		this.TEDB = (SimpleTEDB)ted;
+		this.log = log;
+	}
+	
+	
+	public TEDUpdaterController(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log, Lock lock)
+	{
+		ips = new ArrayList<String>();
+		ports = new ArrayList<String>();
+		
+		ips.add(ip);
+		ports.add(port);
+		
+		this.topologyPathLinks = topologyPathLinks;
+		this.topologyPathNodes = topologyPathNodes;
+		this.TEDB = (SimpleTEDB)ted;
+		this.log = log;
+		this.lock = lock;
+	}
+	
+	public TEDUpdaterController(ArrayList<String> ips, ArrayList<String>ports , String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log)
+	{
+		this.ips = ips;
+		this.ports = ports;
+		this.topologyPathLinks = topologyPathLinks;
+		this.topologyPathNodes = topologyPathNodes;
+		this.TEDB = (SimpleTEDB)ted;
+		this.log = log;
+	}
+	
+	public static void parseRemainingLinksFromXML(DomainTEDB TEDB, String interDomainFile) 
+	{
+		Hashtable<Integer,MyEdge> interDomainLinks = readInterDomainFile(interDomainFile);
+		Map<Integer, MyEdge> map = interDomainLinks;
+		Iterator<Map.Entry<Integer, MyEdge>> it = map.entrySet().iterator();
+		while (it.hasNext()) 
+		{
+			Map.Entry<Integer, MyEdge> entry = it.next();
+
+			MyEdge edgeAux = entry.getValue(); 
+			
+			IntraDomainEdge edge= new IntraDomainEdge();
+			edge.setSrc_if_id(new Long(edgeAux.source_port));
+			edge.setDst_if_id(new Long(edgeAux.dest_port));
+			
+			TE_Information tE_info = new TE_Information();
+			tE_info.setNumberWLANs(15);
+			tE_info.initWLANs();
+			
+			tE_info.setVlanLink(true);
+			tE_info.setVlan(edgeAux.vlan);
+			
+			edge.setTE_info(tE_info);
+			
+			
+			System.out.println("Adding InterDomain Edge!!::Vlan::"+edgeAux.vlan);
+			
+			
+			SimpleDirectedWeightedGraph sdwg =  ((SimpleTEDB)TEDB).getNetworkGraph();
+			if (!sdwg.containsVertex(new RouterInfoPM(edgeAux.source)))
+			{
+				sdwg.addVertex(new RouterInfoPM(edgeAux.source));
+			}
+			
+			if (!sdwg.containsVertex(new RouterInfoPM(edgeAux.dest)))
+			{
+				sdwg.addVertex(new RouterInfoPM(edgeAux.dest));
+			}
+			
+			
+			((SimpleTEDB)TEDB).getNetworkGraph().addEdge(new RouterInfoPM(edgeAux.source), new RouterInfoPM(edgeAux.dest), edge);
+		}
+	}
+	
+	
+	public static Hashtable<Integer, MyEdge> readInterDomainFile(String interDomainFile) 
+	{
+		System.out.println("Parsing intradomain File");
+		Hashtable<Integer, MyEdge>  interDomainLinks = new Hashtable<Integer,MyEdge>();
+		try 
+		{
+			DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+			File confFile = new File(interDomainFile);		
+			Document doc = builder.parse(confFile);
+			
+			NodeList list_nodes_Edges = doc.getElementsByTagName("edge");
+			System.out.println("num edges: " + list_nodes_Edges.getLength());
+			for (int i = 0; i < list_nodes_Edges.getLength(); i++) 
+			{
+				Element nodes_servers = (Element) list_nodes_Edges.item(i);
+				String source = getCharacterDataFromElement((Element) nodes_servers.getElementsByTagName("source").item(0));
+				String dest = getCharacterDataFromElement((Element) nodes_servers.getElementsByTagName("dest").item(0));
+				Integer vlan = Integer.parseInt(getCharacterDataFromElement((Element) nodes_servers.getElementsByTagName("vlan").item(0)));
+				String direction = getCharacterDataFromElement((Element) nodes_servers.getElementsByTagName("direction").item(0));
+				int source_port = Integer.parseInt(getCharacterDataFromElement((Element) nodes_servers.getElementsByTagName("source_port").item(0)));
+				int dest_port = Integer.parseInt(getCharacterDataFromElement((Element) nodes_servers.getElementsByTagName("dest_port").item(0)));
+				
+				System.out.println("Adding IntraDomain Link! source: "+source+", dest: "+dest+", source_port: "+source_port+", dest_port: "+dest_port);
+				
+				MyEdge auxEdge = new TEDUpdaterController().new MyEdge(source, dest, vlan, source_port, dest_port);
+				interDomainLinks.put(auxEdge.hashCode(), auxEdge);
+				
+				if (direction.equals("bidirectional"))
+				{
+					MyEdge reverseEdge = new TEDUpdaterController().new MyEdge(dest, source, vlan, source_port, dest_port);
+					interDomainLinks.put(reverseEdge.hashCode(), reverseEdge);
+				}
+			}
+		} 
+		catch (Exception e) 
+		{
+			System.out.println(e.toString());
+		}
+		
+		return interDomainLinks;
+	}
+	
+	private static String getCharacterDataFromElement(Element e) 
+	{
+		Node child = e.getFirstChild();
+		if (child instanceof CharacterData) 
+		{
+			CharacterData cd = (CharacterData) child;
+			return cd.getData();
+		}
+		else 
+		{
+			return "?";
+		}
+	}
+	
+	public class MyEdge
+	{
+		String source;
+		String dest;
+		Integer source_port;
+		Integer dest_port;
+		Integer vlan;
+		
+		MyEdge(String source, String dest)
+		{
+			this.source = source;
+			this.dest = dest;
+		}
+		
+		MyEdge(String source, String dest, Integer vlan, Integer source_port, Integer dest_port)
+		{
+			this.source = source;
+			this.dest = dest;
+			this.source_port = source_port;
+			this.dest_port = dest_port; 
+			this.vlan = vlan;
+		}
+
+		@Override
+		public int hashCode() {
+			final int prime = 31;
+			int result = 1;
+			result = prime * result + ((dest == null) ? 0 : dest.hashCode());
+			result = prime * result
+					+ ((source == null) ? 0 : source.hashCode());
+			return result;
+		}
+
+		@Override
+		public boolean equals(Object obj) {
+			if (this == obj)
+				return true;
+			if (obj == null)
+				return false;
+			if (getClass() != obj.getClass())
+				return false;
+			MyEdge other = (MyEdge) obj;
+			if (dest == null) {
+				if (other.dest != null)
+					return false;
+			} else if (!dest.equals(other.dest))
+				return false;
+			if (source == null) {
+				if (other.source != null)
+					return false;
+			} else if (!source.equals(other.source))
+				return false;
+			return true;
+		}		
+		
+	}
+	
+	public String getInterDomainFile() 
+	{
+		return interDomainFile;
+	}
+
+	public void setInterDomainFile(String interDomainFile) 
+	{
+		this.interDomainFile = interDomainFile;
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterFloodlight.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterFloodlight.java
new file mode 100644
index 0000000000000000000000000000000000000000..9bea224fa98cf5655e7154b1677d56bfab85fede
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterFloodlight.java
@@ -0,0 +1,367 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.controllers;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.concurrent.locks.Lock;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.w3c.dom.CharacterData;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import eu.teraflow.tid.tedb.DomainTEDB;
+import eu.teraflow.tid.tedb.IntraDomainEdge;
+import eu.teraflow.tid.tedb.SimpleTEDB;
+import eu.teraflow.tid.tedb.TE_Information;
+import eu.teraflow.tid.tedb.elements.RouterInfoPM;
+
+/**
+ * Thread that reads topology from Openflow controller and from XML if there are intradomain links
+ * @author jaume
+ *
+ */
+
+public class TEDUpdaterFloodlight extends TEDUpdaterController
+{
+	public static String controllerName = "Floodlight";
+	
+	
+	private String topologyPathLinks = "/wm/topology/links/json";
+	private String topologyPathNodes = "/wm/core/controller/switches/json";
+	
+	public TEDUpdaterFloodlight(String ip,String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log)
+	{
+		super();
+		ips = new ArrayList<String>();
+		ports = new ArrayList<String>();
+		
+		ips.add(ip);
+		ports.add(port);
+		this.TEDB = (SimpleTEDB)ted;
+		this.log = log;
+	}
+	
+	public TEDUpdaterFloodlight(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log, Lock lock)
+	{
+		super( ip,  port,  topologyPathLinks,  topologyPathNodes, ted,  log,  lock);
+	}
+	
+	public TEDUpdaterFloodlight(ArrayList<String> ips, ArrayList<String>ports , String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log)
+	{
+		super(ips, ports ,  topologyPathLinks,  topologyPathNodes, ted,  log);
+	}
+	
+	
+	
+	
+	
+	
+	@Override
+	public void run()
+	{	
+		
+		if(interDomainFile != null)
+		{
+			interDomainLinks = TEDUpdaterController.readInterDomainFile(interDomainFile);
+		}
+		
+		String responseLinks = "";
+		String responseNodes = "";
+		
+		try
+		{
+			//log.info("TopologyUpdaterWLAN thread, Updating TEDB");
+			
+			Hashtable<String,RouterInfoPM> nodes = new Hashtable<String,RouterInfoPM>();
+			
+			
+			log.info("ips.size():"+ips.size());
+			
+			for (int i = 0; i < ips.size(); i++)
+			{
+				responseNodes = queryForNodes(ips.get(i), ports.get(i));
+				parseNodes(responseNodes, nodes, ips.get(i), ports.get(i));
+				log.info("responseNodes:::"+responseNodes);
+			}
+			
+			for (int i = 0; i < ips.size(); i++)
+			{			
+				responseLinks = queryForLinks(ips.get(i), ports.get(i));	
+						
+		        log.info("responseLinks:::"+responseLinks);
+		        
+		        lock();
+		        parseLinks(responseLinks, nodes);
+		        unlock();
+	        
+			}
+			
+	        			
+	        //parseJSON("[{\"src-switch\":\"00:14:2c:59:e5:5e:2b:00\",\"src-port\":20,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:64:21:00\",\"dst-port\":19,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:64:21:00\",\"src-port\":19,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:5e:2b:00\",\"dst-port\":20,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:66:ed:00\",\"src-port\":9,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:64:21:00\",\"dst-port\":20,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:64:21:00\",\"src-port\":20,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:66:ed:00\",\"dst-port\":9,\"dst-port-state\":0,\"type\":\"internal\"}]");
+	        //System.out.println(response);
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+	
+	
+
+	private void parseNodes(String response, Hashtable<String,RouterInfoPM> routerInfoList, String ip, String port)
+	{	
+		try
+		{
+			JSONParser parser = new JSONParser();
+			Object obj = parser.parse(response);
+		
+			JSONArray msg = (JSONArray) obj;
+			Iterator<JSONObject> iterator = msg.iterator();
+			while (iterator.hasNext()) 
+			{
+				JSONObject jsonObject = (JSONObject) iterator.next();
+				
+				RouterInfoPM rInfo = new RouterInfoPM();
+				rInfo.setMacAddress((String)jsonObject.get("mac"));
+				rInfo.setRouterID((String)jsonObject.get("dpid"));
+				rInfo.setControllerType(TEDUpdaterFloodlight.controllerName);
+				
+				
+				JSONArray ports = (JSONArray) jsonObject.get("ports");
+				Iterator<JSONObject> portIterator = ports.iterator();
+				while (portIterator.hasNext()) 
+				{
+					JSONObject jsonPortObject = (JSONObject) portIterator.next();
+					rInfo.setMacAddress((String)jsonPortObject.get("hardwareAddress"));
+				}
+				
+				log.info("(String)((JSONObject)jsonObject.get(description)).get(manufacturer)::"+(String)((JSONObject)jsonObject.get("description")).get("manufacturer"));
+				rInfo.setRouterType((String)((JSONObject)jsonObject.get("description")).get("manufacturer"));
+				rInfo.setConfigurationMode("Openflow");
+				
+				rInfo.setControllerIdentifier(ip, port);
+				rInfo.setControllerIP(ip);
+				rInfo.setControllerPort(port);
+				rInfo.setHardware((String)((JSONObject)jsonObject.get("description")).get("hardware"));
+				
+				routerInfoList.put(rInfo.getRouterID(),rInfo);
+				
+				
+				log.info("Adding Vertex::"+rInfo);
+				((SimpleTEDB)TEDB).getNetworkGraph().addVertex(rInfo);
+			}
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+	
+	private void parseLinks(String links,Hashtable<String,RouterInfoPM> nodes)
+	{
+		try {
+			//log.info("Inside parseJSON");
+			JSONParser parser = new JSONParser();
+			Object obj = parser.parse(links);
+		
+			JSONArray msg = (JSONArray) obj;
+			Iterator<JSONObject> iterator = msg.iterator();
+			while (iterator.hasNext()) 
+			{
+				JSONObject jsonObject = (JSONObject) iterator.next();
+				//System.out.println(jsonObject.get("src-switch"));
+				IntraDomainEdge edge= new IntraDomainEdge();
+
+				RouterInfoPM source = nodes.get(jsonObject.get("src-switch"));
+				RouterInfoPM dest = nodes.get(jsonObject.get("dst-switch"));
+				
+				
+				//((SimpleTEDB)TEDB).getNetworkGraph().addVertex(source);
+				//((SimpleTEDB)TEDB).getNetworkGraph().addVertex(dest);
+
+				log.info("Adding Vertex->"+source+" hashcode:"+source.hashCode());
+				log.info("Adding Vertex->"+dest+" hashcode:"+dest.hashCode());
+				
+				edge.setSrc_if_id((Long)jsonObject.get("src-port"));
+				edge.setDst_if_id((Long)jsonObject.get("dst-port"));
+				
+				
+				  // This is a big problem because info is not initialized from file
+				  // and the controller doesn't give information about how many wlans
+				  // the are
+				
+				TE_Information tE_info = new TE_Information();
+				tE_info.setNumberWLANs(15);
+				tE_info.initWLANs();
+				
+				if (interDomainFile != null)
+				{
+					completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID());
+				}
+				
+				edge.setTE_info(tE_info);
+				
+				String isBidirectional = (String)jsonObject.get("direction");
+				
+				
+				
+				//log.info("isBidirectional::"+isBidirectional);
+				
+				if ((1==1)||(isBidirectional != null) && (isBidirectional.equals("bidirectional")))
+				{
+					//((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+					
+					TE_Information tE_infoOtherWay = new TE_Information();
+					tE_infoOtherWay.setNumberWLANs(15);
+					tE_infoOtherWay.initWLANs();
+					IntraDomainEdge edgeOtherWay= new IntraDomainEdge();
+					
+					edgeOtherWay.setSrc_if_id((Long)jsonObject.get("dst-port"));
+					edgeOtherWay.setDst_if_id((Long)jsonObject.get("src-port"));
+					edgeOtherWay.setTE_info(tE_infoOtherWay);
+					
+					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(dest, source, edgeOtherWay);
+					
+					completeTE_Information(tE_info, dest.getRouterID(), source.getRouterID());
+					
+					log.info("source::"+source);
+					log.info("dest::"+dest);
+					log.info("edgeOtherWay::"+edgeOtherWay);
+					log.info("edge::"+edge);
+					//log.info("Adding two!");
+				}
+				else
+				{
+					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+				}
+				
+				//log.info("Edge added:"+edge);
+				//log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString());
+			}
+			//parseRemainingLinksFromXML(nodes);
+	 
+		} 
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+
+	private void completeTE_Information(TE_Information tE_info, String source, String dest) 
+	{
+		MyEdge auxEdge = new MyEdge(source, dest);
+		MyEdge completEdge = interDomainLinks.get(auxEdge.hashCode());
+		if ((completEdge != null)&&(completEdge.vlan != null))
+		{
+			tE_info.setVlanLink(true);
+			tE_info.setVlan(completEdge.vlan);
+			//If it has been found it will be removed so the rest can be proccessed later
+			interDomainLinks.remove(completEdge.vlan);
+		}
+		else
+		{
+			tE_info.setVlanLink(false);
+		}
+	}
+
+	private String queryForLinks(String ip, String port)
+	{
+		String response = ""; 
+		try
+		{
+			URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathLinks);
+			
+			//log.info("URL::"+"http://"+ip+":"+port+topologyPathLinks);
+			
+	        URLConnection yc = topoplogyURL.openConnection();
+	        BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
+	        String inputLine;
+	
+	        while ((inputLine = in.readLine()) != null) 
+	        {
+	        	response = response + inputLine;
+	        }
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+        return response;
+	}
+	
+	private String queryForNodes(String ip, String port)
+	{
+        String response = "";
+		try
+		{
+			URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathNodes);
+			
+			log.info("http://+port+topologyPathNodes:::"+"http://"+ip+":"+port+topologyPathNodes);
+			
+	        URLConnection yc = topoplogyURL.openConnection();
+	        BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
+	        
+	        String inputLine;	
+	        while ((inputLine = in.readLine()) != null) 
+	        {
+	        	response = response + inputLine;
+	        }
+	        in.close();
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+        return response;
+	}
+	
+	private void lock()
+	{
+		if (lock != null)
+		{
+			lock.lock();
+		}
+	}
+	
+	private void unlock()
+	{
+		if (lock != null)
+		{
+			lock.unlock();
+		}
+	}
+	
+	private String getCharacterDataFromElement(Element e) {
+		Node child = e.getFirstChild();
+		if (child instanceof CharacterData) {
+			CharacterData cd = (CharacterData) child;
+			return cd.getData();
+		} else {
+			return "?";
+		}
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterNOX.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterNOX.java
new file mode 100644
index 0000000000000000000000000000000000000000..fb2c3c51d0c05299f501b1112779a6a54737caa9
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterNOX.java
@@ -0,0 +1,419 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.controllers;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.concurrent.locks.Lock;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import eu.teraflow.tid.tedb.DomainTEDB;
+import eu.teraflow.tid.tedb.IntraDomainEdge;
+import eu.teraflow.tid.tedb.SimpleTEDB;
+import eu.teraflow.tid.tedb.TE_Information;
+import eu.teraflow.tid.tedb.elements.RouterInfoPM;
+
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+
+public class TEDUpdaterNOX extends TEDUpdaterController
+{
+	public static String controllerName = "NOX";
+	private Hashtable<Integer,MyEdge> interDomainLinks = new Hashtable<Integer,MyEdge>();
+	
+	
+	//Overwritten father variables and fixing the topology urls in code
+	private String topologyPathNodes = "/get_vtopology/";
+	private String topologyPathLinks = "/get_graph/";//??
+	
+	public TEDUpdaterNOX(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log)
+	{
+		super( ip,  port,  topologyPathLinks,  topologyPathNodes, ted,  log);
+	}
+	
+	public TEDUpdaterNOX(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log, Lock lock)
+	{
+		super( ip,  port,  topologyPathLinks,  topologyPathNodes, ted,  log,  lock);
+	}
+	
+	public TEDUpdaterNOX(ArrayList<String> ips, ArrayList<String>ports , String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log)
+	{
+		super(ips, ports ,  topologyPathLinks,  topologyPathNodes, ted,  log);
+	}
+	
+	
+	@Override
+	public void run()
+	{	
+		
+		if(interDomainFile != null)
+		{
+			interDomainLinks = TEDUpdaterController.readInterDomainFile(interDomainFile);
+		}
+		
+		String responseLinks = "";
+		String responseNodes = "";
+		
+		try
+		{
+			
+			Hashtable<String,RouterInfoPM> nodes = new Hashtable<String,RouterInfoPM>();
+			
+			for (int i = 0; i < ips.size(); i++)
+			{
+				responseNodes = queryForNodes(ips.get(i), ports.get(i));//query for topology
+				parseNodes(responseNodes, nodes, ips.get(i), ports.get(i));
+				log.info("responseNodes:::"+responseNodes);
+			}
+			
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+	
+	
+	private String BristoltoFloodlight(String BristolFormat)
+	{
+		String floodFormat = new String(BristolFormat);
+		//Por algo se me conoce como el hacker
+		for (int i = 2; i < floodFormat.length(); i += 3)
+		{
+			floodFormat =  floodFormat.substring(0, i) + ":" + floodFormat.substring(i, floodFormat.length());
+		}
+		log.info("BristolFormat--> " + BristolFormat + ", floodFormat-->" + floodFormat);
+		return floodFormat;
+	}
+
+	private void parseNodes(String response, Hashtable<String,RouterInfoPM> routerInfoList, String ip, String port)
+	{	
+		try
+		{
+			JSONParser parser = new JSONParser();
+			Object obj = parser.parse(response);
+		
+			JSONObject jsonaux=(JSONObject) obj;
+			Iterator<String> iterkeys=jsonaux.keySet().iterator();
+			Hashtable<String,RouterInfoPM> nodes= new Hashtable<String,RouterInfoPM>();
+			while (iterkeys.hasNext()) {
+					String dpid = iterkeys.next();
+					System.out.println("Key: "+dpid.replace("-", ":"));
+					RouterInfoPM rInfo = new RouterInfoPM();
+					
+					rInfo.setRouterID(dpid.replace("-", ":"));//Bristol to floodlight?
+					rInfo.setConfigurationMode("Openflow");
+					rInfo.setControllerType(TEDUpdaterNOX.controllerName);
+					
+					rInfo.setControllerIdentifier(ip, port);
+					rInfo.setControllerIP(ip);
+					rInfo.setControllerPort(port);
+					
+					routerInfoList.put(rInfo.getRouterID(),rInfo);
+					nodes.put(dpid.replace("-", ":"),rInfo);				
+					((SimpleTEDB)TEDB).getNetworkGraph().addVertex(rInfo);
+			}
+			//Getting Links
+			Iterator<String> nodeiter=nodes.keySet().iterator();
+			while (nodeiter.hasNext()){
+				String node= nodeiter.next();
+				parseLinks(node, (String)jsonaux.get(node.replace(":", "-")).toString(), nodes);
+			}
+			//parseLinks(dpid, jsonarray)
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+	
+	private void parseLinks(String dpid,String links, Hashtable<String,RouterInfoPM> nodes)
+	{
+		try {
+			//log.info("Inside parseJSON");
+			JSONParser parser = new JSONParser();
+			Object obj = parser.parse(links);
+		
+			JSONArray msg = (JSONArray) obj;
+			Iterator<JSONObject> iterator = msg.iterator();
+			while (iterator.hasNext()) 
+			{
+				JSONObject jsonObject = (JSONObject) iterator.next();
+				//System.out.println(jsonObject.get("src-switch"));
+				IntraDomainEdge edge= new IntraDomainEdge();
+				
+				String labels = (String) jsonObject.get("labels");//??
+				String destnode = ((String) jsonObject.get("peer_node")).replace("-", ":");
+				String type = (String) jsonObject.get("port_type");
+
+				RouterInfoPM source = nodes.get(dpid);
+				RouterInfoPM dest = nodes.get(destnode);
+					
+				//((SimpleTEDB)TEDB).getNetworkGraph().addVertex(source);
+				//((SimpleTEDB)TEDB).getNetworkGraph().addVertex(dest);
+				
+				System.out.println("Srcnode: "+dpid);
+				System.out.println("Dstnode: "+destnode);
+				
+				System.out.println("Srcport: "+jsonObject.get("port_id"));
+				System.out.println("Dstport: "+jsonObject.get("peer_port"));
+				
+				if ((dest!= null)&&(source!=null)){
+					
+				
+					edge.setSrc_if_id(Long.parseLong((String)jsonObject.get("port_id")));
+					edge.setDst_if_id(Long.parseLong((String)jsonObject.get("peer_port")));
+					
+					edge.setType(type);
+					
+					// This is a big problem because info is not initialized from file
+					// and the controller doesn't give information about how many wlans
+					// the are
+					
+					TE_Information tE_info = new TE_Information();
+					System.out.println("Labels: Original ("+labels+") and Parsed ("+labels.substring(labels.indexOf(",")+1,labels.indexOf("]"))+")");
+					tE_info.setNumberWLANs(Integer.parseInt(labels.substring(labels.indexOf(",")+1,labels.indexOf("]"))));
+					tE_info.initWLANs();
+					
+					if (interDomainFile != null)
+					{
+						completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID());
+					}
+					
+					edge.setTE_info(tE_info);
+					
+					
+					edge.setDirectional(true);
+					//Bidirectional case? See other TEDUpdaters.
+				
+					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+				
+				} else {
+					System.out.println("Link with an unknown node. Ingnoring...");
+				}
+				//log.info("Edge added:"+edge);
+				//log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString());
+			}
+			//parseRemainingLinksFromXML(nodes);
+	 
+	 
+		} 
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+
+	
+//	private void parseLinks(String links,Hashtable<String,RouterInfoPM> nodes)
+//	{
+//		try {
+//			//log.info("Inside parseJSON");
+//			JSONParser parser = new JSONParser();
+//			Object obj = parser.parse(links);
+//		
+//			JSONArray msg = (JSONArray) obj;
+//			Iterator<JSONObject> iterator = msg.iterator();
+//			while (iterator.hasNext()) 
+//			{
+//				JSONObject jsonObject = (JSONObject) iterator.next();
+//				//System.out.println(jsonObject.get("src-switch"));
+//				IntraDomainEdge edge= new IntraDomainEdge();
+//				
+//				JSONObject jsonObject_src = (JSONObject) jsonObject.get("src");
+//				JSONObject jsonObject_dst = (JSONObject) jsonObject.get("dst");
+//
+//				RouterInfoPM source = nodes.get(BristoltoFloodlight((String)jsonObject_src.get("dpid")));
+//				RouterInfoPM dest = nodes.get(BristoltoFloodlight((String)jsonObject_dst.get("dpid")));
+//					
+//				//((SimpleTEDB)TEDB).getNetworkGraph().addVertex(source);
+//				//((SimpleTEDB)TEDB).getNetworkGraph().addVertex(dest);
+//
+//				log.info("Adding Vertex->"+source+" hashcode:"+source.hashCode());
+//				log.info("Adding Vertex->"+dest+" hashcode:"+dest.hashCode());
+//				
+//				edge.setSrc_if_id((Long)jsonObject_src.get("port_no"));
+//				edge.setDst_if_id((Long)jsonObject_dst.get("port_no"));
+//				
+//				
+//				// This is a big problem because info is not initialized from file
+//				// and the controller doesn't give information about how many wlans
+//				// the are
+//				
+//				TE_Information tE_info = new TE_Information();
+//				tE_info.setNumberWLANs(15);
+//				tE_info.initWLANs();
+//				
+//				if (interDomainFile != null)
+//				{
+//					completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID());
+//				}
+//				
+//				edge.setTE_info(tE_info);
+//				
+//				String isBidirectional = (String)jsonObject.get("direction");
+//				
+//				
+//				// En Bristol los enlaces son unidirecctionales, pero asumimos que hay uno en una direccion
+//				// esta el otro
+//				isBidirectional = "bidirectional";
+//				
+//				//log.info("isBidirectional::"+isBidirectional);
+//				
+//				if ((1==1)||(isBidirectional != null) && (isBidirectional.equals("bidirectional")))
+//				{
+//					//((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+//					
+//					TE_Information tE_infoOtherWay = new TE_Information();
+//					tE_infoOtherWay.setNumberWLANs(15);
+//					tE_infoOtherWay.initWLANs();
+//					IntraDomainEdge edgeOtherWay= new IntraDomainEdge();
+//					
+//					edgeOtherWay.setSrc_if_id((Long)jsonObject_src.get("port_no"));
+//					edgeOtherWay.setDst_if_id((Long)jsonObject_dst.get("port_no"));
+//					edgeOtherWay.setTE_info(tE_infoOtherWay);
+//					
+//					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+//					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(dest, source, edgeOtherWay);
+//					
+//					completeTE_Information(tE_info, dest.getRouterID(), source.getRouterID());
+//					
+//					log.info("source::"+source);
+//					log.info("dest::"+dest);
+//					log.info("edgeOtherWay::"+edgeOtherWay);
+//					log.info("edge::"+edge);
+//					//log.info("Adding two!");
+//				}
+//				else
+//				{
+//					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+//				}
+//				
+//				//log.info("Edge added:"+edge);
+//				//log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString());
+//			}
+//			//parseRemainingLinksFromXML(nodes);
+//	 
+//	 
+//		} 
+//		catch (Exception e)
+//		{
+//			log.info(UtilsFunctions.exceptionToString(e));
+//		}
+//	}
+
+	private void completeTE_Information(TE_Information tE_info, String source, String dest) 
+	{
+		MyEdge auxEdge = new MyEdge(source, dest);
+		MyEdge completEdge = interDomainLinks.get(auxEdge.hashCode());
+		if ((completEdge != null)&&(completEdge.vlan != null))
+		{
+			tE_info.setVlanLink(true);
+			tE_info.setVlan(completEdge.vlan);
+			//If it has been found it will be removed so the rest can be proccessed later
+			interDomainLinks.remove(completEdge.vlan);
+		}
+		else
+		{
+			tE_info.setVlanLink(false);
+		}
+	}
+
+	private String queryForLinks(String ip, String port)
+	{
+		String response = ""; 
+		try
+		{
+			URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathLinks);
+			
+			log.info("URL::"+"http://"+ip+":"+port+topologyPathLinks);
+			
+	        URLConnection yc = topoplogyURL.openConnection();
+	        BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
+	        String inputLine;
+	
+	        while ((inputLine = in.readLine()) != null) 
+	        {
+	        	response = response + inputLine;
+	        }
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+        return response;
+	}
+	
+	private String queryForNodes(String ip, String port)
+	{
+        String response = "";
+		try
+		{
+			URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathNodes);
+			
+			log.info("http://+port+topologyPathNodes:::"+"http://"+ip+":"+port+topologyPathNodes);
+			
+	        URLConnection yc = topoplogyURL.openConnection();
+	        BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
+	        
+	        String inputLine;	
+	        while ((inputLine = in.readLine()) != null) 
+	        {
+	        	response = response + inputLine;
+	        }
+	        in.close();
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+        return response;
+	}
+	
+	public String getInterDomainFile() 
+	{
+		return interDomainFile;
+	}
+
+	public void setInterDomainFile(String interDomainFile) 
+	{
+		this.interDomainFile = interDomainFile;
+	}
+	
+	
+	private void lock()
+	{
+		if (lock != null)
+		{
+			lock.lock();
+		}
+	}
+	
+	private void unlock()
+	{
+		if (lock != null)
+		{
+			lock.unlock();
+		}
+	}
+}
+
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterODL.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterODL.java
new file mode 100644
index 0000000000000000000000000000000000000000..a1a8c0e6fdbad5a4aa7e5f31338f5ca150451587
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterODL.java
@@ -0,0 +1,351 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.controllers;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.concurrent.locks.Lock;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+import org.w3c.dom.CharacterData;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import eu.teraflow.tid.tedb.DomainTEDB;
+import eu.teraflow.tid.tedb.IntraDomainEdge;
+import eu.teraflow.tid.tedb.SimpleTEDB;
+import eu.teraflow.tid.tedb.TE_Information;
+import eu.teraflow.tid.tedb.elements.RouterInfoPM;
+
+
+
+/**
+ * Thread that reads topology from Openflow controller and from XML if there are intradomain links
+ * @author jaume
+ *
+ */
+
+public class TEDUpdaterODL extends TEDUpdaterController
+{
+	public static String controllerName = "ODL";
+
+
+	private String topologyPathLinks = "/controller/nb/v2/topology/default";
+	private String topologyPathNodes = "/controller/nb/v2/switchmanager/default/nodes";
+
+	public TEDUpdaterODL(String ip,String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log)
+	{
+		super();
+		ips = new ArrayList<String>();
+		ports = new ArrayList<String>();
+
+		ips.add(ip);
+		ports.add(port);
+		this.TEDB = (SimpleTEDB)ted;
+		this.log = log;
+	}
+
+	public TEDUpdaterODL(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log, Lock lock)
+	{
+		super( ip,  port,  topologyPathLinks,  topologyPathNodes, ted,  log,  lock);
+	}
+
+	public TEDUpdaterODL(ArrayList<String> ips, ArrayList<String>ports , String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log)
+	{
+		super(ips, ports ,  topologyPathLinks,  topologyPathNodes, ted,  log);
+	}
+
+
+
+
+
+
+	@Override
+	public void run()
+	{	
+
+		if(interDomainFile != null)
+		{
+			interDomainLinks = TEDUpdaterController.readInterDomainFile(interDomainFile);
+		}
+
+		String responseLinks = "";
+		String responseNodes = "";
+
+		try
+		{
+
+			Hashtable<String,RouterInfoPM> nodes = new Hashtable<String,RouterInfoPM>();
+
+
+			log.info("ips.size():"+ips.size());
+			log.info("ODL updates_______________________________________________________START____");
+			for (int i = 0; i < ips.size(); i++)
+			{
+				responseNodes = queryForNodes(ips.get(i), ports.get(i));
+				parseNodes(responseNodes, nodes, ips.get(i), ports.get(i));
+			}
+
+			for (int i = 0; i < ips.size(); i++)
+			{			
+				responseLinks = queryForLinks(ips.get(i), ports.get(i));			        
+				lock();
+				parseLinks(responseLinks, nodes);
+				unlock();
+
+			}
+			log.info("ODL updates_______________________________________________________END____");
+
+
+			//parseJSON("[{\"src-switch\":\"00:14:2c:59:e5:5e:2b:00\",\"src-port\":20,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:64:21:00\",\"dst-port\":19,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:64:21:00\",\"src-port\":19,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:5e:2b:00\",\"dst-port\":20,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:66:ed:00\",\"src-port\":9,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:64:21:00\",\"dst-port\":20,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:64:21:00\",\"src-port\":20,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:66:ed:00\",\"dst-port\":9,\"dst-port-state\":0,\"type\":\"internal\"}]");
+			//System.out.println(response);
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+
+
+
+	private void parseNodes(String response, Hashtable<String,RouterInfoPM> routerInfoList, String ip, String port)
+	{	
+		try
+		{
+			JSONParser parser = new JSONParser();
+			Object obj = parser.parse(response);
+
+			JSONArray msg = (JSONArray) ((JSONObject) obj).get("nodeProperties");
+			Iterator<JSONObject> iterator = msg.iterator();
+			while (iterator.hasNext()) 
+			{
+				JSONObject jsonObject = iterator.next();
+
+				RouterInfoPM rInfo = new RouterInfoPM();
+
+				String dpid = (String) (((JSONObject) jsonObject.get("node")).get("id"));
+
+				rInfo.setRouterID(dpid);
+				rInfo.setConfigurationMode("Openflow");
+				rInfo.setControllerType(TEDUpdaterODL.controllerName);								
+				rInfo.setControllerIdentifier(ip, port);
+				rInfo.setControllerIP(ip);
+				rInfo.setControllerPort(port);
+
+				routerInfoList.put(rInfo.getRouterID(),rInfo);
+				log.info("Adding Vertex::"+rInfo);
+				((SimpleTEDB)TEDB).getNetworkGraph().addVertex(rInfo);				
+
+
+
+			}
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+
+	private void parseLinks(String links,Hashtable<String,RouterInfoPM> nodes)
+	{
+		try {
+			JSONParser parser = new JSONParser();
+			Object obj = parser.parse(links);
+
+			JSONArray msg = (JSONArray) ((JSONObject) obj).get("edgeProperties");
+			Iterator<JSONObject> iterator = msg.iterator();
+			while (iterator.hasNext()) 
+			{
+				JSONObject jsonObject = (JSONObject) iterator.next().get("edge");
+				JSONObject jSrc = (JSONObject) jsonObject.get("headNodeConnector");
+				JSONObject jDst = (JSONObject) jsonObject.get("tailNodeConnector");
+
+
+
+				IntraDomainEdge edge= new IntraDomainEdge();
+
+				RouterInfoPM source = nodes.get(((JSONObject) jSrc.get("node")).get("id"));//            jsonObject.get("src-switch"));
+				RouterInfoPM dest = nodes.get(((JSONObject) jDst.get("node")).get("id"));//				jsonObject.get("dst-switch"));
+
+
+
+				edge.setSrc_if_id(Long.parseLong((String)jSrc.get("id")));				//jsonObject.get("src-port"));
+				edge.setDst_if_id(Long.parseLong((String)jDst.get("id")));				//jsonObject.get("dst-port"));
+
+				// This is a big problem because info is not initialized from file
+				// and the controller doesn't give information about how many wlans
+				// the are
+
+				TE_Information tE_info = new TE_Information();
+				tE_info.setNumberWLANs(15);
+				tE_info.initWLANs();
+
+				if (interDomainFile != null)
+				{
+					completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID());
+				}
+
+				edge.setTE_info(tE_info);
+
+				String isBidirectional = (String)jsonObject.get("direction");
+
+
+
+				//log.info("isBidirectional::"+isBidirectional);
+
+				if ((1==1)||(isBidirectional != null) && (isBidirectional.equals("bidirectional")))
+				{
+					//((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+
+					TE_Information tE_infoOtherWay = new TE_Information();
+					tE_infoOtherWay.setNumberWLANs(15);
+					tE_infoOtherWay.initWLANs();
+					IntraDomainEdge edgeOtherWay= new IntraDomainEdge();
+
+					edgeOtherWay.setSrc_if_id(Long.parseLong((String)jDst.get("id")));
+					edgeOtherWay.setDst_if_id(Long.parseLong((String)jSrc.get("id")));
+					edgeOtherWay.setTE_info(tE_infoOtherWay);
+
+					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(dest, source, edgeOtherWay);
+
+					completeTE_Information(tE_info, dest.getRouterID(), source.getRouterID());
+
+					log.info("________EDGE_____");
+					log.info("source::"+source);
+					log.info("dest::"+dest);
+					log.info("edgeOtherWay::"+edgeOtherWay);
+					log.info("edge::"+edge);
+					log.info("--------EDGE-----");
+				}
+				else
+				{
+					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+				}
+
+				//log.info("Edge added:"+edge);
+				//log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString());
+			}
+			//parseRemainingLinksFromXML(nodes);
+
+		} 
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+
+	private void completeTE_Information(TE_Information tE_info, String source, String dest) 
+	{
+		MyEdge auxEdge = new MyEdge(source, dest);
+		MyEdge completEdge = interDomainLinks.get(auxEdge.hashCode());
+		if ((completEdge != null)&&(completEdge.vlan != null))
+		{
+			tE_info.setVlanLink(true);
+			tE_info.setVlan(completEdge.vlan);
+			//If it has been found it will be removed so the rest can be proccessed later
+			interDomainLinks.remove(completEdge.vlan);
+		}
+		else
+		{
+			tE_info.setVlanLink(false);
+		}
+	}
+
+	private String queryForLinks(String ip, String port)
+	{
+		return query("http://"+ip+":"+port+topologyPathLinks);
+	}
+
+	private String queryForNodes(String ip, String port)
+	{
+		return query("http://"+ip+":"+port+topologyPathNodes);
+	}
+
+	private String query(String url)
+	{
+		log.info("Attempting to curl: "+url);
+		String response = "";
+		try
+		{
+			String credentials = "admin:admin";
+			String credentialsEncoded = "YWRtaW46YWRtaW4=";
+
+			URL topoplogyURL = new URL(url);
+			URLConnection yc = topoplogyURL.openConnection();
+
+			HttpURLConnection httpcon = (HttpURLConnection) yc;
+			httpcon.setDoOutput(true);
+			httpcon.setRequestProperty("Content-Type", "application/json");
+			httpcon.setRequestProperty("Authorization", "Basic "+credentialsEncoded);				
+
+			BufferedReader in = new BufferedReader(
+					new InputStreamReader(
+							httpcon.getInputStream()));
+			String inputLine;
+
+			while ((inputLine = in.readLine()) != null) 
+			{
+				response = response + inputLine;
+			}
+			in.close();
+			return response;
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}	
+
+		return "";
+
+	}
+
+
+	private void lock()
+	{
+		if (lock != null)
+		{
+			lock.lock();
+		}
+	}
+
+	private void unlock()
+	{
+		if (lock != null)
+		{
+			lock.unlock();
+		}
+	}
+
+	private String getCharacterDataFromElement(Element e) {
+		Node child = e.getFirstChild();
+		if (child instanceof CharacterData) {
+			CharacterData cd = (CharacterData) child;
+			return cd.getData();
+		} else {
+			return "?";
+		}
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterRYU.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterRYU.java
new file mode 100644
index 0000000000000000000000000000000000000000..c1383b8b2e7c13de155163cf2f53622ea2d70003
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterRYU.java
@@ -0,0 +1,355 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.controllers;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.concurrent.locks.Lock;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import eu.teraflow.tid.tedb.DomainTEDB;
+import eu.teraflow.tid.tedb.IntraDomainEdge;
+import eu.teraflow.tid.tedb.SimpleTEDB;
+import eu.teraflow.tid.tedb.TE_Information;
+import eu.teraflow.tid.tedb.elements.RouterInfoPM;
+
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+
+/**
+ * Thread that reads topology from Openflow controller and from XML if there are intradomain links
+ * @author jaume
+ *
+ */
+
+
+public class TEDUpdaterRYU extends TEDUpdaterController
+{
+	public static String controllerName = "RYU";
+	private Hashtable<Integer,MyEdge> interDomainLinks = new Hashtable<Integer,MyEdge>();
+	
+	
+	//Overwritten father variables and fixing the topology urls in code
+	private String topologyPathNodes = "/v1.0/topology/switches";
+	private String topologyPathLinks = "/v1.0/topology/links";
+	
+	public TEDUpdaterRYU(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log)
+	{
+		super( ip,  port,  topologyPathLinks,  topologyPathNodes, ted,  log);
+	}
+	
+	public TEDUpdaterRYU(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log, Lock lock)
+	{
+		super( ip,  port,  topologyPathLinks,  topologyPathNodes, ted,  log,  lock);
+	}
+	
+	public TEDUpdaterRYU(ArrayList<String> ips, ArrayList<String>ports , String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log)
+	{
+		super(ips, ports ,  topologyPathLinks,  topologyPathNodes, ted,  log);
+	}
+	
+	
+	@Override
+	public void run()
+	{	
+		
+		if(interDomainFile != null)
+		{
+			interDomainLinks = TEDUpdaterController.readInterDomainFile(interDomainFile);
+		}
+		
+		String responseLinks = "";
+		String responseNodes = "";
+		
+		try
+		{
+			
+			Hashtable<String,RouterInfoPM> nodes = new Hashtable<String,RouterInfoPM>();
+			
+			for (int i = 0; i < ips.size(); i++)
+			{
+				responseNodes = queryForNodes(ips.get(i), ports.get(i));
+				parseNodes(responseNodes, nodes, ips.get(i), ports.get(i));
+				log.info("responseNodes:::"+responseNodes);
+			}
+			
+			for (int i = 0; i < ips.size(); i++)
+			{			
+				responseLinks = queryForLinks(ips.get(i), ports.get(i));	
+						
+		        log.info("responseLinks:::"+responseLinks);
+		        
+		        lock();
+		        parseLinks(responseLinks, nodes);
+		        unlock();
+	        
+			}
+	        			
+	        //parseJSON("[{\"src-switch\":\"00:14:2c:59:e5:5e:2b:00\",\"src-port\":20,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:64:21:00\",\"dst-port\":19,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:64:21:00\",\"src-port\":19,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:5e:2b:00\",\"dst-port\":20,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:66:ed:00\",\"src-port\":9,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:64:21:00\",\"dst-port\":20,\"dst-port-state\":0,\"type\":\"internal\"},{\"src-switch\":\"00:14:2c:59:e5:64:21:00\",\"src-port\":20,\"src-port-state\":0,\"dst-switch\":\"00:14:2c:59:e5:66:ed:00\",\"dst-port\":9,\"dst-port-state\":0,\"type\":\"internal\"}]");
+	        //System.out.println(response);
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+	
+	
+	private String RYUtoFloodlight(String RYUFormat)
+	{
+		String floodFormat = new String(RYUFormat);
+		//Por algo se me conoce como el hacker
+		for (int i = 2; i < floodFormat.length(); i += 3)
+		{
+			floodFormat =  floodFormat.substring(0, i) + ":" + floodFormat.substring(i, floodFormat.length());
+		}
+		log.info("RYUFormat--> " + RYUFormat + ", floodFormat-->" + floodFormat);
+		return floodFormat;
+}
+
+	private void parseNodes(String response, Hashtable<String,RouterInfoPM> routerInfoList, String ip, String port)
+	{	
+		try
+		{
+			JSONParser parser = new JSONParser();
+			Object obj = parser.parse(response);
+		
+			JSONArray msg = (JSONArray) obj;
+			Iterator<JSONObject> iterator = msg.iterator();
+			while (iterator.hasNext()) 
+			{	
+				JSONObject jsonObject = (JSONObject) iterator.next();
+				
+				log.info("(String)jsonObject.get(dpid)::"+(String)jsonObject.get("dpid"));
+				
+				RouterInfoPM rInfo = new RouterInfoPM();
+
+				rInfo.setRouterID(RYUtoFloodlight((String)jsonObject.get("dpid")));
+				rInfo.setConfigurationMode("Openflow");
+				rInfo.setControllerType(TEDUpdaterRYU.controllerName);
+				
+				rInfo.setControllerIdentifier(ip, port);
+				rInfo.setControllerIP(ip);
+				rInfo.setControllerPort(port);
+				
+				routerInfoList.put(rInfo.getRouterID(),rInfo);
+								
+				((SimpleTEDB)TEDB).getNetworkGraph().addVertex(rInfo);
+			}
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+	
+	private void parseLinks(String links,Hashtable<String,RouterInfoPM> nodes)
+	{
+		try {
+			//log.info("Inside parseJSON");
+			JSONParser parser = new JSONParser();
+			Object obj = parser.parse(links);
+		
+			JSONArray msg = (JSONArray) obj;
+			Iterator<JSONObject> iterator = msg.iterator();
+			while (iterator.hasNext()) 
+			{
+				JSONObject jsonObject = (JSONObject) iterator.next();
+				//System.out.println(jsonObject.get("src-switch"));
+				IntraDomainEdge edge= new IntraDomainEdge();
+				
+				JSONObject jsonObject_src = (JSONObject) jsonObject.get("src");
+				JSONObject jsonObject_dst = (JSONObject) jsonObject.get("dst");
+
+				RouterInfoPM source = nodes.get(RYUtoFloodlight((String)jsonObject_src.get("dpid")));
+				RouterInfoPM dest = nodes.get(RYUtoFloodlight((String)jsonObject_dst.get("dpid")));
+					
+				//((SimpleTEDB)TEDB).getNetworkGraph().addVertex(source);
+				//((SimpleTEDB)TEDB).getNetworkGraph().addVertex(dest);
+
+				log.info("Adding Vertex->"+source+" hashcode:"+source.hashCode());
+				log.info("Adding Vertex->"+dest+" hashcode:"+dest.hashCode());
+					
+				edge.setSrc_if_id(Long.parseLong((String) jsonObject_src.get("port_no")));
+				edge.setDst_if_id(Long.parseLong((String) jsonObject_dst.get("port_no")));
+				
+				
+				// This is a big problem because info is not initialized from file
+				// and the controller doesn't give information about how many wlans
+				// the are
+				
+				TE_Information tE_info = new TE_Information();
+				tE_info.setNumberWLANs(15);
+				tE_info.initWLANs();
+				
+				if (interDomainFile != null)
+				{
+					completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID());
+				}
+				
+				edge.setTE_info(tE_info);
+				
+				String isBidirectional = (String)jsonObject.get("direction");
+				
+				
+				// En RYU los enlaces son unidirecctionales, pero asumimos que hay uno en una direccion
+				// esta el otro
+				isBidirectional = "bidirectional";
+				
+				//log.info("isBidirectional::"+isBidirectional);
+				
+				if ((1==1)||(isBidirectional != null) && (isBidirectional.equals("bidirectional")))
+				{
+					//((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+					
+					TE_Information tE_infoOtherWay = new TE_Information();
+					tE_infoOtherWay.setNumberWLANs(15);
+					tE_infoOtherWay.initWLANs();
+					IntraDomainEdge edgeOtherWay= new IntraDomainEdge();
+
+					edgeOtherWay.setSrc_if_id(Long.parseLong((String) jsonObject_src.get("port_no"))); 
+					edgeOtherWay.setDst_if_id(Long.parseLong((String) jsonObject_dst.get("port_no"))); 
+					edgeOtherWay.setTE_info(tE_infoOtherWay);
+					
+					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(dest, source, edgeOtherWay);
+					
+					completeTE_Information(tE_info, dest.getRouterID(), source.getRouterID());
+					
+					log.info("source::"+source);
+					log.info("dest::"+dest);
+					log.info("edgeOtherWay::"+edgeOtherWay);
+					log.info("edge::"+edge);
+				}
+				else
+				{
+					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+				}
+				
+				//log.info("Edge added:"+edge);
+				//log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString());
+			}
+			//parseRemainingLinksFromXML(nodes);
+	 
+	 
+		} 
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+
+	private void completeTE_Information(TE_Information tE_info, String source, String dest) 
+	{
+		MyEdge auxEdge = new MyEdge(source, dest);
+		MyEdge completEdge = interDomainLinks.get(auxEdge.hashCode());
+		if ((completEdge != null)&&(completEdge.vlan != null))
+		{
+			tE_info.setVlanLink(true);
+			tE_info.setVlan(completEdge.vlan);
+			//If it has been found it will be removed so the rest can be proccessed later
+			interDomainLinks.remove(completEdge.vlan);
+		}
+		else
+		{
+			tE_info.setVlanLink(false);
+		}
+	}
+
+	private String queryForLinks(String ip, String port)
+	{
+		String response = ""; 
+		try
+		{
+			URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathLinks);
+			
+			log.info("URL::"+"http://"+ip+":"+port+topologyPathLinks);
+			
+	        URLConnection yc = topoplogyURL.openConnection();
+	        BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
+	        String inputLine;
+	
+	        while ((inputLine = in.readLine()) != null) 
+	        {
+	        	response = response + inputLine;
+	        }
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+        return response;
+	}
+	
+	private String queryForNodes(String ip, String port)
+	{
+        String response = "";
+		try
+		{
+			URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathNodes);
+			
+			log.info("http://+port+topologyPathNodes:::"+"http://"+ip+":"+port+topologyPathNodes);
+			
+	        URLConnection yc = topoplogyURL.openConnection();
+	        BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
+	        
+	        String inputLine;	
+	        while ((inputLine = in.readLine()) != null) 
+	        {
+	        	response = response + inputLine;
+	        }
+	        in.close();
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+        return response;
+	}
+	
+	public String getInterDomainFile() 
+	{
+		return interDomainFile;
+	}
+
+	public void setInterDomainFile(String interDomainFile) 
+	{
+		this.interDomainFile = interDomainFile;
+	}
+	
+	
+	private void lock()
+	{
+		if (lock != null)
+		{
+			lock.lock();
+		}
+	}
+	
+	private void unlock()
+	{
+		if (lock != null)
+		{
+			lock.unlock();
+		}
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterTREMA.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterTREMA.java
new file mode 100644
index 0000000000000000000000000000000000000000..a87fc3790b39b0aea1e25b56e235acc8a09b5cb6
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/controllers/TEDUpdaterTREMA.java
@@ -0,0 +1,449 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.controllers;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.concurrent.locks.Lock;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.json.simple.JSONArray;
+import org.json.simple.JSONObject;
+import org.json.simple.parser.JSONParser;
+
+import com.metaparadigm.jsonrpc.JSONSerializer;
+
+import eu.teraflow.tid.tedb.DomainTEDB;
+import eu.teraflow.tid.tedb.IntraDomainEdge;
+import eu.teraflow.tid.tedb.SimpleTEDB;
+import eu.teraflow.tid.tedb.TE_Information;
+import eu.teraflow.tid.tedb.controllers.TEDUpdaterController.MyEdge;
+import eu.teraflow.tid.tedb.elements.RouterInfoPM;
+
+public class TEDUpdaterTREMA extends TEDUpdaterController
+{
+	public static String controllerName = "TREMA";
+	private Hashtable<Integer,MyEdge> interDomainLinks = new Hashtable<Integer,MyEdge>();
+	
+	
+	//Overwritten father variables and fixing the topology urls in code
+	private String topologyPathNodes = "/get_topology/";
+	private String topologyPathLinks = "/get_graph/";//??
+	
+	public TEDUpdaterTREMA(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log)
+	{
+		super( ip,  port,  topologyPathLinks,  topologyPathNodes, ted,  log);
+	}
+	
+	public TEDUpdaterTREMA(String ip, String port, String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log, Lock lock)
+	{
+		super( ip,  port,  topologyPathLinks,  topologyPathNodes, ted,  log,  lock);
+	}
+	
+	public TEDUpdaterTREMA(ArrayList<String> ips, ArrayList<String>ports , String topologyPathLinks, String topologyPathNodes,DomainTEDB ted, Logger log)
+	{
+		super(ips, ports ,  topologyPathLinks,  topologyPathNodes, ted,  log);
+	}
+	
+	
+	@Override
+	public void run()
+	{	
+		
+		if(interDomainFile != null)
+		{
+			interDomainLinks = TEDUpdaterController.readInterDomainFile(interDomainFile);
+		}
+		
+		String responseLinks = "";
+		String responseNodes = "";
+		
+		try
+		{
+			
+			Hashtable<String,RouterInfoPM> nodes = new Hashtable<String,RouterInfoPM>();
+			
+			for (int i = 0; i < ips.size(); i++)
+			{
+				responseNodes = queryForNodes(ips.get(i), ports.get(i));//query for topology
+				parseNodes(responseNodes, nodes, ips.get(i), ports.get(i));
+				log.info("responseNodes:::"+responseNodes);
+			}
+			
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+	
+	
+	private String KDDItoFloodlight(String BristolFormat)
+	{
+		String floodFormat = new String(BristolFormat);
+		//Por algo se me conoce como el hacker
+		for (int i = 2; i < floodFormat.length(); i += 3)
+		{
+			floodFormat =  floodFormat.substring(0, i) + ":" + floodFormat.substring(i, floodFormat.length());
+		}
+		log.info("BristolFormat--> " + BristolFormat + ", floodFormat-->" + floodFormat);
+		return floodFormat;
+	}
+
+	private void parseNodes(String response, Hashtable<String,RouterInfoPM> routerInfoList, String ip, String port)
+	{	
+		try
+		{
+			JSONParser parser = new JSONParser();
+			Object obj = parser.parse(response);
+		
+			JSONObject jsonaux=(JSONObject) obj;
+			String host=(String)jsonaux.get("hostConfig").toString();
+			obj=parser.parse(host);
+			JSONObject jsonhost=(JSONObject) obj;
+			
+			//FIXME: This info has been taken from TREMA controller but is not used. Take a look if it's necessary
+			String OPS_Label=(String)jsonhost.get("OPS label");
+			String Port_id=(String)jsonhost.get("Port_id");
+			String reach_nodes=(String)jsonhost.get("Reachable nodes");
+			String node_type=(String)jsonhost.get("nodeType");//Used for RouterType
+			
+			RouterInfoPM rInfo = new RouterInfoPM();
+			String dpid=((String)jsonhost.get("Virtual_node_id")).replace("-", ":");
+			rInfo.setRouterID(dpid);//Bristol to floodlight?
+			rInfo.setConfigurationMode("Openflow");
+			rInfo.setControllerType(TEDUpdaterNOX.controllerName);
+			rInfo.setRouterType(node_type);
+			
+			rInfo.setReachable_nodes(parseReachability(reach_nodes));
+			
+			rInfo.setControllerIdentifier(ip, port);
+			rInfo.setControllerIP(ip);
+			rInfo.setControllerPort(port);
+			
+			routerInfoList.put(rInfo.getRouterID(),rInfo);
+			((SimpleTEDB)TEDB).getNetworkGraph().addVertex(rInfo);
+			//Getting Links
+			//parseLinks(???);
+			//parseLinks(dpid, jsonarray)
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+	
+	private LinkedList<String> parseReachability(String reach_nodes) {
+		boolean end=false;
+		int beginIndex=0;
+		LinkedList<String> nodes= new LinkedList<String>();
+		reach_nodes=reach_nodes.replace(" ", "");
+		System.out.println("Reachable Nodes:"+reach_nodes);
+		while (!end){
+			int pointer=reach_nodes.indexOf(",");
+			if (pointer==-1)
+				end=true;
+			else {
+				String node=reach_nodes.substring(beginIndex, pointer);
+				System.out.println("Reachable Node:"+node);
+				reach_nodes=reach_nodes.substring(pointer+1);
+				nodes.add(node);
+			}
+		}
+		if (reach_nodes.length()>0){
+			System.out.println("Reachable Node:"+reach_nodes);
+			nodes.add(reach_nodes);
+		}
+		return nodes;
+	}
+
+	private void parseLinks(String dpid,String links, Hashtable<String,RouterInfoPM> nodes) //NOX Parse Links. it's not used in TREMA
+	{
+		try {
+			//log.info("Inside parseJSON");
+			JSONParser parser = new JSONParser();
+			Object obj = parser.parse(links);
+		
+			JSONArray msg = (JSONArray) obj;
+			Iterator<JSONObject> iterator = msg.iterator();
+			while (iterator.hasNext()) 
+			{
+				JSONObject jsonObject = (JSONObject) iterator.next();
+				//System.out.println(jsonObject.get("src-switch"));
+				IntraDomainEdge edge= new IntraDomainEdge();
+				
+				String labels = (String) jsonObject.get("labels");//??
+				String destnode = ((String) jsonObject.get("peer_node")).replace("-", ":");
+				String type = (String) jsonObject.get("port_type");
+
+				RouterInfoPM source = nodes.get(dpid);
+				RouterInfoPM dest = nodes.get(destnode);
+					
+				//((SimpleTEDB)TEDB).getNetworkGraph().addVertex(source);
+				//((SimpleTEDB)TEDB).getNetworkGraph().addVertex(dest);
+				
+				System.out.println("Srcnode: "+dpid);
+				System.out.println("Dstnode: "+destnode);
+				
+				System.out.println("Srcport: "+jsonObject.get("port_id"));
+				System.out.println("Dstport: "+jsonObject.get("peer_port"));
+				
+				if ((dest!= null)&&(source!=null)){
+					
+				
+					edge.setSrc_if_id(Long.parseLong((String)jsonObject.get("port_id")));
+					edge.setDst_if_id(Long.parseLong((String)jsonObject.get("peer_port")));
+					
+					edge.setType(type);
+					
+					// This is a big problem because info is not initialized from file
+					// and the controller doesn't give information about how many wlans
+					// the are
+					
+					TE_Information tE_info = new TE_Information();
+					System.out.println("Labels: Original ("+labels+") and Parsed ("+labels.substring(labels.indexOf(",")+1,labels.indexOf("]"))+")");
+					tE_info.setNumberWLANs(Integer.parseInt(labels.substring(labels.indexOf(",")+1,labels.indexOf("]"))));
+					tE_info.initWLANs();
+					
+					if (interDomainFile != null)
+					{
+						completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID());
+					}
+					
+					edge.setTE_info(tE_info);
+					
+					
+					edge.setDirectional(true);
+					//Bidirectional case? See other TEDUpdaters.
+				
+					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+				
+				} else {
+					System.out.println("Link with an unknown node. Ingnoring...");
+				}
+				//log.info("Edge added:"+edge);
+				//log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString());
+			}
+			//parseRemainingLinksFromXML(nodes);
+	 
+	 
+		} 
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+	}
+
+	
+//	private void parseLinks(String links,Hashtable<String,RouterInfoPM> nodes)
+//	{
+//		try {
+//			//log.info("Inside parseJSON");
+//			JSONParser parser = new JSONParser();
+//			Object obj = parser.parse(links);
+//		
+//			JSONArray msg = (JSONArray) obj;
+//			Iterator<JSONObject> iterator = msg.iterator();
+//			while (iterator.hasNext()) 
+//			{
+//				JSONObject jsonObject = (JSONObject) iterator.next();
+//				//System.out.println(jsonObject.get("src-switch"));
+//				IntraDomainEdge edge= new IntraDomainEdge();
+//				
+//				JSONObject jsonObject_src = (JSONObject) jsonObject.get("src");
+//				JSONObject jsonObject_dst = (JSONObject) jsonObject.get("dst");
+//
+//				RouterInfoPM source = nodes.get(BristoltoFloodlight((String)jsonObject_src.get("dpid")));
+//				RouterInfoPM dest = nodes.get(BristoltoFloodlight((String)jsonObject_dst.get("dpid")));
+//					
+//				//((SimpleTEDB)TEDB).getNetworkGraph().addVertex(source);
+//				//((SimpleTEDB)TEDB).getNetworkGraph().addVertex(dest);
+//
+//				log.info("Adding Vertex->"+source+" hashcode:"+source.hashCode());
+//				log.info("Adding Vertex->"+dest+" hashcode:"+dest.hashCode());
+//				
+//				edge.setSrc_if_id((Long)jsonObject_src.get("port_no"));
+//				edge.setDst_if_id((Long)jsonObject_dst.get("port_no"));
+//				
+//				
+//				// This is a big problem because info is not initialized from file
+//				// and the controller doesn't give information about how many wlans
+//				// the are
+//				
+//				TE_Information tE_info = new TE_Information();
+//				tE_info.setNumberWLANs(15);
+//				tE_info.initWLANs();
+//				
+//				if (interDomainFile != null)
+//				{
+//					completeTE_Information(tE_info, source.getRouterID(), dest.getRouterID());
+//				}
+//				
+//				edge.setTE_info(tE_info);
+//				
+//				String isBidirectional = (String)jsonObject.get("direction");
+//				
+//				
+//				// En Bristol los enlaces son unidirecctionales, pero asumimos que hay uno en una direccion
+//				// esta el otro
+//				isBidirectional = "bidirectional";
+//				
+//				//log.info("isBidirectional::"+isBidirectional);
+//				
+//				if ((1==1)||(isBidirectional != null) && (isBidirectional.equals("bidirectional")))
+//				{
+//					//((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+//					
+//					TE_Information tE_infoOtherWay = new TE_Information();
+//					tE_infoOtherWay.setNumberWLANs(15);
+//					tE_infoOtherWay.initWLANs();
+//					IntraDomainEdge edgeOtherWay= new IntraDomainEdge();
+//					
+//					edgeOtherWay.setSrc_if_id((Long)jsonObject_src.get("port_no"));
+//					edgeOtherWay.setDst_if_id((Long)jsonObject_dst.get("port_no"));
+//					edgeOtherWay.setTE_info(tE_infoOtherWay);
+//					
+//					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+//					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(dest, source, edgeOtherWay);
+//					
+//					completeTE_Information(tE_info, dest.getRouterID(), source.getRouterID());
+//					
+//					log.info("source::"+source);
+//					log.info("dest::"+dest);
+//					log.info("edgeOtherWay::"+edgeOtherWay);
+//					log.info("edge::"+edge);
+//					//log.info("Adding two!");
+//				}
+//				else
+//				{
+//					((SimpleTEDB)TEDB).getNetworkGraph().addEdge(source, dest, edge);
+//				}
+//				
+//				//log.info("Edge added:"+edge);
+//				//log.info(((SimpleTEDB)TEDB).getIntraDomainLinks().toString());
+//			}
+//			//parseRemainingLinksFromXML(nodes);
+//	 
+//	 
+//		} 
+//		catch (Exception e)
+//		{
+//			log.info(UtilsFunctions.exceptionToString(e));
+//		}
+//	}
+
+	private void completeTE_Information(TE_Information tE_info, String source, String dest) 
+	{
+		MyEdge auxEdge = new MyEdge(source, dest);
+		MyEdge completEdge = interDomainLinks.get(auxEdge.hashCode());
+		if ((completEdge != null)&&(completEdge.vlan != null))
+		{
+			tE_info.setVlanLink(true);
+			tE_info.setVlan(completEdge.vlan);
+			//If it has been found it will be removed so the rest can be proccessed later
+			interDomainLinks.remove(completEdge.vlan);
+		}
+		else
+		{
+			tE_info.setVlanLink(false);
+		}
+	}
+
+	private String queryForLinks(String ip, String port)
+	{
+		String response = ""; 
+		try
+		{
+			URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathLinks);
+			
+			log.info("URL::"+"http://"+ip+":"+port+topologyPathLinks);
+			
+	        URLConnection yc = topoplogyURL.openConnection();
+	        BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
+	        String inputLine;
+	
+	        while ((inputLine = in.readLine()) != null) 
+	        {
+	        	response = response + inputLine;
+	        }
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+        return response;
+	}
+	
+	private String queryForNodes(String ip, String port)
+	{
+        String response = "";
+		try
+		{
+			URL topoplogyURL = new URL("http://"+ip+":"+port+topologyPathNodes);
+			
+			log.info("http://+port+topologyPathNodes:::"+"http://"+ip+":"+port+topologyPathNodes);
+			
+	        URLConnection yc = topoplogyURL.openConnection();
+	        BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
+	        
+	        String inputLine;	
+	        while ((inputLine = in.readLine()) != null) 
+	        {
+	        	response = response + inputLine;
+	        }
+	        in.close();
+		}
+		catch (Exception e)
+		{
+			log.info(e.toString());
+		}
+        return response;
+	}
+	
+	public String getInterDomainFile() 
+	{
+		return interDomainFile;
+	}
+
+	public void setInterDomainFile(String interDomainFile) 
+	{
+		this.interDomainFile = interDomainFile;
+	}
+	
+	
+	private void lock()
+	{
+		if (lock != null)
+		{
+			lock.lock();
+		}
+	}
+	
+	private void unlock()
+	{
+		if (lock != null)
+		{
+			lock.unlock();
+		}
+	}
+}
+
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/AuthInfo.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/AuthInfo.java
new file mode 100644
index 0000000000000000000000000000000000000000..aec4c98c0c0eb4ef4c8ea884deec66face342b18
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/AuthInfo.java
@@ -0,0 +1,52 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+public class AuthInfo {
+	/**User ID to be used for authentication */
+	private String userID;
+	
+	/**password assicoated with the user ID*/
+	private String passwd;
+
+	/**
+	 * @return the userID
+	 */
+	public String getUserID() {
+		return userID;
+	}
+
+	/**
+	 * @param userID the userID to set
+	 */
+	public void setUserID(String userID) {
+		this.userID = userID;
+	}
+
+	/**
+	 * @return the passwd
+	 */
+	public String getPasswd() {
+		return passwd;
+	}
+
+	/**
+	 * @param passwd the passwd to set
+	 */
+	public void setPasswd(String passwd) {
+		this.passwd = passwd;
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Bandwidth.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Bandwidth.java
new file mode 100644
index 0000000000000000000000000000000000000000..0fb657e279d384cb1b3bfe8847bf4bea0deb8977
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Bandwidth.java
@@ -0,0 +1,63 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+	public class Bandwidth {
+
+		double maxBandwidth;
+		double unreservedBw;
+
+		
+		public Bandwidth (double initBandwidth){
+			maxBandwidth = initBandwidth;
+			unreservedBw = initBandwidth;
+		}
+		
+		
+		public Bandwidth (double max, double unresv){
+			maxBandwidth = max;
+			unreservedBw = unresv;
+		}
+		
+		
+		public String toString(){
+			return "Unreserved Bw = " + unreservedBw + ", Max Bandwidth = " + maxBandwidth;
+		}
+		
+		/**
+		 * @return the maxBandwidth
+		 */
+		public double getMaxBandwidth() {
+			return maxBandwidth;
+		}
+		/**
+		 * @param maxBandwidth the maxBandwidth to set
+		 */
+		public void setMaxBandwidth(double maxBandwidth) {
+			this.maxBandwidth = maxBandwidth;
+		}
+		/**
+		 * @return the unreservedBw
+		 */
+		public double getUnreservedBw() {
+			return unreservedBw;
+		}
+		/**
+		 * @param unreservedBw the unreservedBw to set
+		 */
+		public void setUnreservedBw(double unreservedBw) {
+			this.unreservedBw = unreservedBw;
+		}
+	}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/BgpParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/BgpParams.java
new file mode 100644
index 0000000000000000000000000000000000000000..98c529e6524d1a81717f57688eccbfbebbc3ac73
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/BgpParams.java
@@ -0,0 +1,19 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+public class BgpParams {
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/EndPoint.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/EndPoint.java
new file mode 100644
index 0000000000000000000000000000000000000000..27a4c0ffcf76fd7ba02e449bd7f45d078e70c623
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/EndPoint.java
@@ -0,0 +1,81 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+public class EndPoint {
+	String node;
+	
+	String intf;
+
+	public EndPoint(String node, String intf){
+		this.node = node;
+		this.intf = intf;
+	}
+
+	/**
+	 * @return the node
+	 */
+	public String getNode() {
+		return node;
+	}
+
+	/**
+	 * @param node the node to set
+	 */
+	public void setNode(String node) {
+		this.node = node;
+	}
+
+	/**
+	 * @return the intf
+	 */
+	public String getIntf() {
+		return intf;
+	}
+
+	/**
+	 * @param intf the intf to set
+	 */
+	public void setIntf(String intf) {
+		this.intf = intf;
+	}
+	
+
+	public int compareTo(EndPoint arg0) {
+		if ((arg0.intf.compareTo(this.intf)==0) && (arg0.node.compareTo(this.node)==0)) 
+			return 0;
+		else
+			return 1;
+	}
+	@Override
+	public boolean equals(Object obj) {
+		if ((this.node.equals(((EndPoint)obj).getNode()))&&
+				(this.intf.equals(((EndPoint)obj).getIntf())))
+			return true;
+		return false;
+	}
+
+	@Override
+	public String toString() {
+		// TODO Auto-generated method stub
+		String temp="";
+		temp += "Node = " + node + " - ";
+		temp += "Interface = " + intf ;
+		return temp;
+	}
+	
+	
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IPNodeParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IPNodeParams.java
new file mode 100644
index 0000000000000000000000000000000000000000..6bd26cf484aaa8ed6f3407936dc94a5c351eaccb
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IPNodeParams.java
@@ -0,0 +1,23 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+import java.util.ArrayList;
+
+public class IPNodeParams {
+	ArrayList<StaticRoutingParams> staticRoutingParams;
+	ArrayList<BgpParams> bgpParams;
+	ArrayList<IsisParams> isisParams;
+	ArrayList<OspfParams> ospfParams;
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Intf.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Intf.java
new file mode 100644
index 0000000000000000000000000000000000000000..23f619fa5c71a7debf843e1a2753f191aff90662
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Intf.java
@@ -0,0 +1,211 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+import java.util.ArrayList;
+
+public class Intf {
+
+	String name;
+	
+	//TODO should the address not be mapped to a layer ??
+	ArrayList<String> address;
+
+	//TODO should the list of layers in an interface be selected using an ENUM
+	ArrayList <String> layering;
+	
+	//TODO should the list of supported Counters be an ENUM
+	ArrayList<String> supportedCounters;
+
+	Boolean isPhysical;
+	
+	//TODO for a virtual interface, should there be an association with a parent interface
+	String parentInterfaceName;
+	
+	Boolean intfUp;
+	
+	int label;
+	
+	public int getLabel() {
+		return label;
+	}
+
+	public void setLabel(int label) {
+		this.label = label;
+	}
+
+	/**
+	 * @return the name
+	 */
+	public String getName() {
+		return name;
+	}
+
+	/**
+	 * @param name the name to set
+	 */
+	public void setName(String name) {
+		this.name = name;
+	}
+
+	/**
+	 * @return the address
+	 */
+	public ArrayList<String> getAddress() {
+		return address;
+	}
+
+	/**
+	 * @param address the address to set
+	 */
+	public void setAddress(ArrayList<String> address) {
+		this.address = address;
+	}
+
+	/**
+	 * @return the layering
+	 */
+	public ArrayList<String> getLayering() {
+		return layering;
+	}
+
+	/**
+	 * @param layering the layering to set
+	 */
+	public void setLayering(ArrayList<String> layering) {
+		this.layering = layering;
+	}
+
+	/**
+	 * @return the supportedCounters
+	 */
+	public ArrayList<String> getSupportedCounters() {
+		return supportedCounters;
+	}
+
+	/**
+	 * @param supportedCounters the supportedCounters to set
+	 */
+	public void setSupportedCounters(ArrayList<String> supportedCounters) {
+		this.supportedCounters = supportedCounters;
+	}
+
+	/**
+	 * @return the isPhysical
+	 */
+	public Boolean isPhysical() {
+		return isPhysical;
+	}
+
+	/**
+	 * @param isPhysical the isPhysical to set
+	 */
+	public void setPhysical(Boolean isPhysical) {
+		this.isPhysical = isPhysical;
+	}
+
+	/**
+	 * @return the parentInterfaceName
+	 */
+	public String getParentInterfaceName() {
+		return parentInterfaceName;
+	}
+
+	/**
+	 * @param parentInterfaceName the parentInterfaceName to set
+	 */
+	public void setParentInterfaceName(String parentInterfaceName) {
+		this.parentInterfaceName = parentInterfaceName;
+	}
+
+	public Boolean isIntfUp() {
+		return intfUp;
+	}
+
+	public void setIntfUp(Boolean intfUp) {
+		this.intfUp = intfUp;
+	}
+
+	@Override
+	public boolean equals(Object arg0) {
+		// TODO Auto-generated method stub
+		if (((Intf)arg0).getName().equals(this.name) 
+				//&&((Intf)arg0).isPhysical() == (this.isPhysical)
+				//&&((Intf)arg0).getParentInterfaceName().equals(this.parentInterfaceName) 
+				&&(this.address.size() == ((Intf)arg0).getAddress().size())){
+			for (int i =0; i< address.size();i++){							
+				if (!((Intf)arg0).getAddress().get(i).equals(address.get(i))){					
+					return false;				
+				}
+			}
+			if((supportedCounters!= null)&&(((Intf)arg0).getSupportedCounters() != null)){				
+				if (supportedCounters.size() == (((Intf)arg0).getSupportedCounters().size()))
+					for (int i =0; i< supportedCounters.size(); i++){
+						if (!((Intf)arg0).getSupportedCounters().get(i).equals(supportedCounters.get(i))){
+							return false;
+						}
+					}
+				else{
+					return false;
+				}
+				}
+			if (((Intf)arg0).getLayering() != null){
+				if (layering.size() == (((Intf)arg0).getLayering().size())){
+				for (int i =0; i< layering.size(); i++){
+					if (!((Intf)arg0).getLayering().get(i).equals(layering.get(i))){
+						return false;
+					}
+				}
+				}
+			else
+				return false;
+				}
+			
+		}
+		else{
+			return false;
+		}
+		return true;
+		
+	}
+
+	public String toString(){
+		String temp="";
+		temp += "Name = " + name + " ";
+		temp += "Address = (";
+		for (int i=0;i<address.size();i++){
+			temp += address.get(i) + ", ";
+		}
+		temp = temp.substring(0, temp.length()-2);
+		temp +=  ") ";
+		temp += "Layering = (";
+		for (int i=0;i<layering.size();i++){
+			temp += layering.get(i) + ", ";
+		}
+		temp = temp.substring(0, temp.length()-2);
+		temp +=  ") ";
+		if (supportedCounters!= null){
+		temp += "Supported Counters = (";
+		for (int i=0;i<supportedCounters.size();i++){
+			temp += supportedCounters.get(i) + ", ";
+		}
+		}
+		temp = temp.substring(0, temp.length()-2);
+		temp +=  ") ";
+		temp += "isPhysical = " + isPhysical;
+		temp +="intfUp = " +intfUp;
+		return temp;
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IsisParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IsisParams.java
new file mode 100644
index 0000000000000000000000000000000000000000..0cdc583a98d6b13a5148436cece33e1e974d707e
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/IsisParams.java
@@ -0,0 +1,19 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+public class IsisParams {
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Link.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Link.java
new file mode 100644
index 0000000000000000000000000000000000000000..cd2ab812c6ba41ee527973061ec60e8d1b2918fe
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Link.java
@@ -0,0 +1,190 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+public class Link {
+
+	String linkID;
+	Boolean isDirectional;
+	EndPoint source;
+	EndPoint dest;
+	//TODO change to enumeration physical or service;
+	String type;//interlayer, interdomain, intradomain
+	Service service;
+	PhyLinkParams phyLinkParams;
+	double teMetric;
+	Bandwidth bandwidth;
+	String sourceId=null;
+	String destID=null;
+	String sourceIntf=null;
+	String destIntf=null;
+	
+	
+	
+	
+	public String getSourceId() {
+		return sourceId;
+	}
+	public void setSourceId(String sourceId) {
+		this.sourceId = sourceId;
+	}
+	public String getDestID() {
+		return destID;
+	}
+	public void setDestID(String destID) {
+		this.destID = destID;
+	}
+	public String getSourceIntf() {
+		return sourceIntf;
+	}
+	public void setSourceIntf(String sourceIntf) {
+		this.sourceIntf = sourceIntf;
+	}
+	public String getDestIntf() {
+		return destIntf;
+	}
+	public void setDestIntf(String destIntf) {
+		this.destIntf = destIntf;
+	}
+	public Boolean getIsDirectional() {
+		return isDirectional;
+	}
+	public void setIsDirectional(Boolean isDirectional) {
+		this.isDirectional = isDirectional;
+	}
+	public Bandwidth getBandwidth() {
+		return bandwidth;
+	}
+	public void setBandwidth(Bandwidth bandwidth) {
+		this.bandwidth = bandwidth;
+	}
+	public String getLinkID() {
+		return linkID;
+	}
+	public void setLinkID(String linkID) {
+		this.linkID = linkID;
+	}
+	/**
+	 * @return the isDirectional
+	 */
+	public Boolean isDirectional() {
+		return isDirectional;
+	}
+	/**
+	 * @param isDirectional the isDirectional to set
+	 */
+	public void setDirectional(Boolean isDirectional) {
+		this.isDirectional = isDirectional;
+	}
+	/**
+	 * @return the source
+	 */
+	public EndPoint getSource() {
+		return source;
+	}
+	/**
+	 * @param source the source to set
+	 */
+	public void setSource(EndPoint source) {
+		this.source = source;
+	}
+	/**
+	 * @return the dest
+	 */
+	public EndPoint getDest() {
+		return dest;
+	}
+	/**
+	 * @param dest the dest to set
+	 */
+	public void setDest(EndPoint dest) {
+		this.dest = dest;
+	}
+	/**
+	 * @return the type
+	 */
+	public String getType() {
+		return type;
+	}
+	/**
+	 * @param type the type to set
+	 */
+	public void setType(String type) {
+		this.type = type;
+	}
+	/**
+	 * @return the service
+	 */
+	public Service getService() {
+		return service;
+	}
+	/**
+	 * @param service the service to set
+	 */
+	public void setService(Service service) {
+		this.service = service;
+	}
+	/**
+	 * @return the phyLinkParams
+	 */
+	public PhyLinkParams getPhyLinkParams() {
+		return phyLinkParams;
+	}
+	/**
+	 * @param phyLinkParams the phyLinkParams to set
+	 */
+	public void setPhyLinkParams(PhyLinkParams phyLinkParams) {
+		this.phyLinkParams = phyLinkParams;
+	}
+	/**
+	 * @return the teMetric
+	 */
+	public double getTeMetric() {
+		return teMetric;
+	}
+	/**
+	 * @param teMetric the teMetric to set
+	 */
+	public void setTeMetric(double teMetric) {
+		this.teMetric = teMetric;
+	}
+	
+	@Override
+	public boolean equals(Object arg0) {
+		// TODO Auto-generated method stub
+		if ((linkID.equals(((Link)arg0).linkID))
+				&&(this.isDirectional == ((Link)arg0).isDirectional)
+				&&(this.source.equals(((Link)arg0).getSource()))
+				&&(this.dest.equals(((Link)arg0).getDest()))
+			//	&&(this.type.equals(((Link)arg0).getType()))
+			//	&&(this.service.equals(((Link)arg0).getService()))
+			//	&&(this.phyLinkParams.equals(((Link)arg0).getPhyLinkParams()))
+			//	&&(this.teMetric == ((Link)arg0).getTeMetric())
+				)
+			return true;
+		return false;
+	}
+	public String toString(){
+		String temp = "";
+		temp += "Source = (" + source.getNode() + ", " + source.getIntf() + ") " ;
+		temp += "Dest = (" + dest.getNode() + ", " + dest.getIntf() + ") " ;
+		temp += "isDirectional = " + isDirectional + " ";
+		temp += "Type = " + type+ " ";
+		if (phyLinkParams !=null)
+			temp += "Phy Link Params (Delay = " +  phyLinkParams.getTransmissionDelay() + " isActive = " + phyLinkParams.getTransmissionDelay() + ") " ;
+		temp += "TE Metric = " + teMetric;
+		return temp;
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Location.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Location.java
new file mode 100644
index 0000000000000000000000000000000000000000..7e6453682e51adf52d205499658064a2b70535af
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Location.java
@@ -0,0 +1,57 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+public class Location {
+	double xCoord;
+	double yCoord;
+
+	/**Constructor to set the location 
+	 * 
+	 * @param x X coordinate of the location
+	 * @param y Y coordinate of the location
+	 */
+	public Location (double x, double y){
+		xCoord=x;
+		yCoord=y;
+	}
+	
+	/**
+	 * @return the xCoord
+	 */
+	public double getxCoord() {
+		return xCoord;
+	}
+	/**
+	 * @param xCoord the xCoord to set
+	 */
+	public void setxCoord(double xCoord) {
+		this.xCoord = xCoord;
+	}
+	/**
+	 * @return the yCoord
+	 */
+	public double getyCoord() {
+		return yCoord;
+	}
+	/**
+	 * @param yCoord the yCoord to set
+	 */
+	public void setyCoord(double yCoord) {
+		this.yCoord = yCoord;
+	}
+
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Node.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Node.java
new file mode 100644
index 0000000000000000000000000000000000000000..bd3350a6670010858bf8fbf4d9509ebedbf784d5
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Node.java
@@ -0,0 +1,211 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+import java.util.ArrayList;
+
+public class Node {
+	String nodeID;
+	ArrayList<String> address;
+	boolean isPhysical;
+	ArrayList<Intf> intfList;
+	int domain;
+	Location location;
+	IPNodeParams ipParams;
+	String parentRouter;
+	String layer;
+	String configurationMode;
+	String dataPathID;
+	/**Router Vendor Type*/
+	String routerType;
+	String controllerIP;
+	String controllerPort;
+	/**IOS version*/
+	String rotuerModel;
+	ArrayList<String> unnumberedIntfList=null;
+	
+	public ArrayList<String> getUnnumberedIntfList() {
+		return unnumberedIntfList;
+	}
+	public void setUnnumberedIntfList(ArrayList<String> unnumberedIntfList) {
+		this.unnumberedIntfList = unnumberedIntfList;
+	}
+	public String getDataPathID() {
+		return dataPathID;
+	}
+	public void setDataPathID(String dpid) {
+		this.dataPathID = dpid;
+	}
+	public String getConfigurationMode() {
+		return configurationMode;
+	}
+	public void setConfigurationMode(String configurationMode) {
+		this.configurationMode = configurationMode;
+	}
+	public String getRouterType() {
+		return routerType;
+	}
+	public void setRouterType(String routerType) {
+		this.routerType = routerType;
+	}
+	public Object getControllerIP() {
+		return controllerIP;
+	}
+	public void setControllerIP(String controllerIP) {
+		this.controllerIP = controllerIP;
+	}
+	public Object getControllerPort() {
+		return controllerPort;
+	}
+	public void setControllerPort(String controllerPort) {
+		this.controllerPort = controllerPort;
+	}
+	public String getRotuerModel() {
+		return rotuerModel;
+	}
+	public void setRotuerModel(String iosVersion) {
+		this.rotuerModel = iosVersion;
+	}
+	/**
+	 * @return the nodeID
+	 */
+	public String getNodeID() {
+		return nodeID;
+	}
+	/**
+	 * @param nodeID the nodeID to set
+	 */
+	public void setNodeID(String nodeID) {
+		this.nodeID = nodeID;
+	}
+	/**
+	 * @return the address
+	 */
+	public ArrayList<String> getAddress() {
+		return address;
+	}
+	/**
+	 * @param address the address to set
+	 */
+	public void setAddress(ArrayList<String> address) {
+		this.address = address;
+	}
+	/**
+	 * @return the isPhysical
+	 */
+	public boolean isPhysical() {
+		return isPhysical;
+	}
+	/**
+	 * @param isPhysical the isPhysical to set
+	 */
+	public void setPhysical(boolean isPhysical) {
+		this.isPhysical = isPhysical;
+	}
+	/**
+	 * @return the intfList
+	 */
+	public ArrayList<Intf> getIntfList() {
+		return intfList;
+	}
+	/**
+	 * @param intfList the intfList to set
+	 */
+	public void setIntfList(ArrayList<Intf> intfList) {
+		this.intfList = intfList;
+	}
+	/**
+	 * @return the domain
+	 */
+	public int getDomain() {
+		return domain;
+	}
+	/**
+	 * @param domain the domain to set
+	 */
+	public void setDomain(int domain) {
+		this.domain = domain;
+	}
+	/**
+	 * @return the location
+	 */
+	public Location getLocation() {
+		return location;
+	}
+	/**
+	 * @param location the location to set
+	 */
+	public void setLocation(Location location) {
+		this.location = location;
+	}
+	/**
+	 * @return the ipParams
+	 */
+	public IPNodeParams getIpParams() {
+		return ipParams;
+	}
+	/**
+	 * @param ipParams the ipParams to set
+	 */
+	public void setIpParams(IPNodeParams ipParams) {
+		this.ipParams = ipParams;
+	}
+	/**
+	 * @return the parentRouter
+	 */
+	public String getParentRouter() {
+		return parentRouter;
+	}
+	/**
+	 * @param parentRouter the parentRouter to set
+	 */
+	public void setParentRouter(String parentRouter) {
+		this.parentRouter = parentRouter;
+	}
+
+	public String getLayer() {
+		return layer;
+	}
+	public void setLayer(String layer) {
+		this.layer = layer;
+	}
+	public String toString(){
+		String temp = "";
+		temp += "NodeID = " + nodeID +" " ;
+		if (location!=null)
+			temp += "Location = (" + location.xCoord + ", " + location.yCoord + ")" + " " ;
+		temp+= "Addresses (";
+		for (int i=0;i<address.size();i++){
+			temp +=address.get(i) + ", ";
+		}
+		temp=temp.substring(0, temp.length()-2);
+		temp += ") ";
+		temp += "Domain = " + domain + " " ;
+		temp += "ParentRouter = " + parentRouter + " " ;
+		temp += "\nInterfaces = {";
+		for (int i=0;i<intfList.size();i++){
+			temp += "\n\t" + intfList.get(i).toString();
+		}
+		temp += "configurationMode = " + configurationMode + " " ;
+		temp += " }";
+		return temp;
+	}
+	
+	public Node(){
+		intfList = new ArrayList<Intf> ();
+		address = new ArrayList<String> ();
+	}
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/OspfParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/OspfParams.java
new file mode 100644
index 0000000000000000000000000000000000000000..3e383487e9eb8084e9eca04e416ecc05551eb3f6
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/OspfParams.java
@@ -0,0 +1,19 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+public class OspfParams {
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Path.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Path.java
new file mode 100644
index 0000000000000000000000000000000000000000..1ff00d3c662a35a346e40494e210c82114426e2f
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Path.java
@@ -0,0 +1,67 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+import java.util.ArrayList;
+
+public class Path {
+	//TODO change to enumeration with values working/protection
+	String pathType;
+	
+	ArrayList<Link> links;
+	
+	public String toString(){
+		String temp = "";
+		if (links!=null){
+			for (int i=0;i<links.size();i++)
+				temp +=  "\n\t\t" + links.get(i).getSource() + "-->" + links.get(i).getDest() ;
+		}
+		return temp;
+	}
+	
+	public Path(ArrayList<Link> links){
+		this.links = links;
+	}
+
+	/**
+	 * @return the pathType
+	 */
+	public String getPathType() {
+		return pathType;
+	}
+
+	/**
+	 * @param pathType the pathType to set
+	 */
+	public void setPathType(String pathType) {
+		this.pathType = pathType;
+	}
+
+	/**
+	 * @return the links
+	 */
+	public ArrayList<Link> getLinks() {
+		return links;
+	}
+
+	/**
+	 * @param links the links to set
+	 */
+	public void setLinks(ArrayList<Link> links) {
+		this.links = links;
+	}
+	
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/PhyLinkParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/PhyLinkParams.java
new file mode 100644
index 0000000000000000000000000000000000000000..7c6e003c8a6b4a6cd5e5613cb4cce3e40576f003
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/PhyLinkParams.java
@@ -0,0 +1,55 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+public class PhyLinkParams {
+ //Create parameters for Physical Link
+	double transmissionDelay; 
+
+	boolean isActive;
+
+	public PhyLinkParams(double delay, boolean active){
+		isActive = active;
+		transmissionDelay = delay;
+	}
+	
+	/**
+	 * @return the transmissionDelay
+	 */
+	public double getTransmissionDelay() {
+		return transmissionDelay;
+	}
+
+	/**
+	 * @param transmissionDelay the transmissionDelay to set
+	 */
+	public void setTransmissionDelay(double transmissionDelay) {
+		this.transmissionDelay = transmissionDelay;
+	}
+
+	/**
+	 * @return the isActive
+	 */
+	public boolean isActive() {
+		return isActive;
+	}
+
+	/**
+	 * @param isActive the isActive to set
+	 */
+	public void setActive(boolean isActive) {
+		this.isActive = isActive;
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterDesc.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterDesc.java
new file mode 100644
index 0000000000000000000000000000000000000000..4bfc3e9fa718c3f029f66601b92ea92433839672
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterDesc.java
@@ -0,0 +1,133 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+import java.net.Inet4Address;
+
+public class RouterDesc {
+
+	/**ID for the router*/
+	protected String routerID;
+	
+	/**Description of the physical Location */
+	private String phyDesc; 
+	
+	/**Addres for the configuration of the router*/
+	private Inet4Address managementAddress;
+	
+	private int configurationPort;
+	
+	/**Authentication Info for configuring the router*/
+	private AuthInfo authInfo; 
+	
+	/**Router Vendor Type*/
+	private String routerType;
+	
+	/**IOS version*/
+	private String iosVersion;
+	
+	private String macAddress;
+	/**
+	 * @return the routerID
+	 */
+	public String getRouterID() {
+		return routerID;
+	}
+	/**
+	 * @param routerID the routerID to set
+	 */
+	public void setRouterID(String routerID) {
+		this.routerID = routerID;
+	}
+	/**
+	 * @return the phyDesc
+	 */
+	public String getPhyDesc() {
+		return phyDesc;
+	}
+	/**
+	 * @param phyDesc the phyDesc to set
+	 */
+	public void setPhyDesc(String phyDesc) {
+		this.phyDesc = phyDesc;
+	}
+/*	*//**
+	 * @return the confAddress
+	 *//*
+	public Address getConfAddress() {
+		return confAddress;
+	}
+	*//**
+	 * @param confAddress the confAddress to set
+	 *//*
+	public void setConfAddress(Address confAddress) {
+		this.confAddress = confAddress;
+	}*/
+	/**
+	 * @return the authInfo
+	 */
+	public AuthInfo getAuthInfo() {
+		return authInfo;
+	}
+	/**
+	 * @param authInfo the authInfo to set
+	 */
+	public void setAuthInfo(AuthInfo authInfo) {
+		this.authInfo = authInfo;
+	}
+	/**
+	 * @return the routerType
+	 */
+	public String getRouterType() {
+		return routerType;
+	}
+	/**
+	 * @param routerType the routerType to set
+	 */
+	public void setRouterType(String routerType) {
+		this.routerType = routerType;
+	}
+	/**
+	 * @return the iosVersion
+	 */
+	public String getIosVersion() {
+		return iosVersion;
+	}
+	/**
+	 * @param iosVersion the iosVersion to set
+	 */
+	public void setIosVersion(String iosVersion) {
+		this.iosVersion = iosVersion;
+	}
+	public Inet4Address getManagementAddress() {
+		return managementAddress;
+	}
+	public void setManagementAddress(Inet4Address managementAddress) {
+		this.managementAddress = managementAddress;
+	}
+	public int getConfigurationPort() {
+		return configurationPort;
+	}
+	public void setConfigurationPort(int configurationPort) {
+		this.configurationPort = configurationPort;
+	}
+	public String getMacAddress() {
+		return macAddress;
+	}
+	public void setMacAddress(String macAddress) {
+		this.macAddress = macAddress;
+	}
+	
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterInfoPM.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterInfoPM.java
new file mode 100644
index 0000000000000000000000000000000000000000..a967ef88ff71657545bdbc3cdc5ed11528692c03
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/RouterInfoPM.java
@@ -0,0 +1,243 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+import java.net.Inet4Address;
+import java.net.UnknownHostException;
+import java.util.LinkedList;
+
+/**
+ * 
+ * @author Anonimo
+ *
+ */
+
+public class RouterInfoPM extends RouterDesc
+{
+  private String configurationMode;
+  private Inet4Address oppositeInterface;
+  private String controllerId;
+  private String controllerIP;
+  private String controllerPort;
+  private String controllerType;
+  private String routerModel;
+  private String routerType_Son;
+  private String layer;
+  private Intf srcIntf;
+  private String hardware;
+  private LinkedList<String> reachable_nodes;
+  private Intf dstIntf;
+  
+  public void logAllInfo(){
+	  System.out.println("configurationMode: "+this.getConfigurationMode()+" Reachable_nodes: "+this.getReachable_nodes()+" SrcIntf: "+this.getSrcIntf()+" DstIntf: "+this.getDstIntf()+" OppositeInterface: "+this.getOppositeInterface()+" RouterModel: "+this.getRouterModel()+" Layer: "+this.getLayer()+" getControllerId: "+this.getControllerId()+" getControllerIP: "+this.getControllerIP()+" ControllerPort: "+this.getControllerPort()+" Hardware: "+this.getHardware()+" ControllerType: "+this.getControllerType());
+  }
+
+  public LinkedList<String> getReachable_nodes()
+  {
+    return this.reachable_nodes;
+  }
+
+  public void setReachable_nodes(LinkedList<String> reachable_nodes) {
+    this.reachable_nodes = reachable_nodes;
+  }
+
+  public Intf getSrcIntf() {
+    return this.srcIntf;
+  }
+
+  public void setSrcIntf(Intf srcIntf) {
+    this.srcIntf = srcIntf;
+  }
+
+  public Intf getDstIntf() {
+    return this.dstIntf;
+  }
+
+  public void setDstIntf(Intf dstIntf) {
+    this.dstIntf = dstIntf;
+  }
+
+  public RouterInfoPM()
+  {
+  }
+
+  public RouterInfoPM(String id)
+  {
+    this.routerID = id;
+  }
+
+  public String getConfigurationMode() {
+    return this.configurationMode;
+  }
+
+  public void setConfigurationMode(String configurationMode) {
+    this.configurationMode = configurationMode;
+  }
+
+  public Inet4Address getOppositeInterface() {
+    return this.oppositeInterface;
+  }
+
+  public void setOppositeInterface(Inet4Address oppositeInterface) {
+    this.oppositeInterface = oppositeInterface;
+  }
+
+  public void fromNode(Node node) {
+    this.configurationMode = node.getConfigurationMode();
+    this.routerType_Son = node.getRouterType();
+    this.routerModel = node.getRotuerModel();
+    this.layer = node.getLayer();
+    setConfigurationMode(node.getConfigurationMode());
+    setRouterID(node.getNodeID());
+    try
+    {
+      setManagementAddress((Inet4Address)Inet4Address.getByName((String)node.getAddress().get(0)));
+    }
+    catch (UnknownHostException e) {
+      e.printStackTrace();
+    }
+  }
+
+  public String getRouterModel() {
+    return this.routerModel;
+  }
+
+  public void setRouterModel(String routerModel) {
+    this.routerModel = routerModel;
+  }
+
+  public String getRouterType() {
+    return this.routerType_Son;
+  }
+
+  public void setRouterType(String routerType) {
+    this.routerType_Son = routerType;
+  }
+
+  public String getLayer() {
+    return this.layer;
+  }
+
+  public void setLayer(String layer) {
+    this.layer = layer;
+  }
+
+  public int hashCode()
+  {
+    int prime = 31;
+    int result = 1;
+    if (this.routerID == null)
+    {
+      return 0;
+    }
+    String idAux = this.routerID.substring(0, 17);
+
+    result = 31 * result + (idAux == null ? 0 : idAux.hashCode());
+
+    return result;
+  }
+
+  public boolean equals(Object obj)
+  {
+    if (this == obj)
+      return true;
+    if (obj == null)
+      return false;
+    if (getClass() != obj.getClass())
+      return false;
+    RouterInfoPM other = (RouterInfoPM)obj;
+
+    if ((this.routerID.contains(other.getRouterID())) || (other.getRouterID().contains(this.routerID)))
+    {
+      return true;
+    }
+
+    if (this.routerID == null)
+    {
+      if (other.routerID != null)
+      {
+        return false;
+      }
+    }
+    else if (!this.routerID.equals(other.routerID))
+    {
+      return false;
+    }
+
+    return true;
+  }
+
+  public String toString()
+  {
+    if (this.oppositeInterface != null)
+      return "[RouterInfoPM]->" + this.routerID + " [OppositeInterface]->" + this.oppositeInterface;
+    return "[RouterInfoPM]->" + this.routerID;
+  }
+
+  public void setControllerIdentifier(String ip, String port)
+  {
+    this.controllerId = getUniqueIdentifierForController(ip, port);
+  }
+
+  public void setControllerIP(String ip)
+  {
+    this.controllerIP = ip;
+  }
+
+  public void setControllerPort(String port)
+  {
+    this.controllerPort = port;
+  }
+
+  public String getControllerId()
+  {
+    return this.controllerId;
+  }
+
+  public String getControllerIP()
+  {
+    return this.controllerIP;
+  }
+
+  public String getControllerPort()
+  {
+    return this.controllerPort;
+  }
+
+  private String getUniqueIdentifierForController(String ip, String port)
+  {
+    return ip + ":" + port;
+  }
+
+  public String getHardware()
+  {
+    return this.hardware;
+  }
+
+  public void setHardware(String hardware)
+  {
+    this.hardware = hardware;
+  }
+
+  public String getControllerType()
+  {
+    return this.controllerType;
+  }
+
+  public void setControllerType(String controllerType)
+  {
+    this.controllerType = controllerType;
+  }
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Service.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Service.java
new file mode 100644
index 0000000000000000000000000000000000000000..423b71ee3af1a531982de1faf46b5b234e6d3e03
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/Service.java
@@ -0,0 +1,177 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+import java.util.ArrayList;
+
+public class Service {
+	
+	//TODO change to enumeration with possible values active/potential
+	String status;
+	
+	//TODO change to enumeration with possible services like Ethernet/OTN etc. (or based on the layering available in interfaces
+	String serviceType;
+	
+	Bandwidth bw;
+	
+	//Change to Enumeration based on protection types
+	String protection;
+	
+	EndPoint source;
+	
+	EndPoint dest;
+	
+	Path servicePath;
+	
+	ArrayList<Integer> srlg;
+	
+	String baseEncapsulation;
+
+	/**
+	 * @return the status
+	 */
+	public String getStatus() {
+		return status;
+	}
+
+	public String toString(){
+		String temp = "";
+		temp += "\n\t ServiceType = " + serviceType;
+		temp += "\n\t Status = " + status;
+		temp += "\n\t Protection = " + protection;
+		temp += "\n\t Path = " + servicePath;
+		temp += "\n\t Bandwidth = " + bw;
+		return temp;
+	}
+	
+	/**
+	 * @param status the status to set
+	 */
+	public void setStatus(String status) {
+		this.status = status;
+	}
+
+	/**
+	 * @return the serviceType
+	 */
+	public String getServiceType() {
+		return serviceType;
+	}
+
+	/**
+	 * @param serviceType the serviceType to set
+	 */
+	public void setServiceType(String serviceType) {
+		this.serviceType = serviceType;
+	}
+
+	/**
+	 * @return the bw
+	 */
+	public Bandwidth getBw() {
+		return bw;
+	}
+
+	/**
+	 * @param bw the bw to set
+	 */
+	public void setBw(Bandwidth bw) {
+		this.bw = bw;
+	}
+
+	/**
+	 * @return the protection
+	 */
+	public String getProtection() {
+		return protection;
+	}
+
+	/**
+	 * @param protection the protection to set
+	 */
+	public void setProtection(String protection) {
+		this.protection = protection;
+	}
+
+	/**
+	 * @return the source
+	 */
+	public EndPoint getSource() {
+		return source;
+	}
+
+	/**
+	 * @param source the source to set
+	 */
+	public void setSource(EndPoint source) {
+		this.source = source;
+	}
+
+	/**
+	 * @return the dest
+	 */
+	public EndPoint getDest() {
+		return dest;
+	}
+
+	/**
+	 * @param dest the dest to set
+	 */
+	public void setDest(EndPoint dest) {
+		this.dest = dest;
+	}
+
+	/**
+	 * @return the servicePath
+	 */
+	public Path getServicePath() {
+		return servicePath;
+	}
+
+	/**
+	 * @param servicePath the servicePath to set
+	 */
+	public void setServicePath(Path servicePath) {
+		this.servicePath = servicePath;
+	}
+
+	/**
+	 * @return the srlg
+	 */
+	public ArrayList<Integer> getSrlg() {
+		return srlg;
+	}
+
+	/**
+	 * @param srlg the srlg to set
+	 */
+	public void setSrlg(ArrayList<Integer> srlg) {
+		this.srlg = srlg;
+	}
+
+	/**
+	 * @return the baseEncapsulation
+	 */
+	public String getBaseEncapsulation() {
+		return baseEncapsulation;
+	}
+
+	/**
+	 * @param baseEncapsulation the baseEncapsulation to set
+	 */
+	public void setBaseEncapsulation(String baseEncapsulation) {
+		this.baseEncapsulation = baseEncapsulation;
+	}
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/StaticRoutingParams.java b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/StaticRoutingParams.java
new file mode 100644
index 0000000000000000000000000000000000000000..c6db597fcfe26d408932acb461d4c8be0f747276
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/java/eu/teraflow/tid/tedb/elements/StaticRoutingParams.java
@@ -0,0 +1,19 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package eu.teraflow.tid.tedb.elements;
+
+public class StaticRoutingParams {
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto b/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto
new file mode 100644
index 0000000000000000000000000000000000000000..ec8accd8b29b84bc4493bf2bebdfac04cd19e093
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/proto/grpcService.proto
@@ -0,0 +1,80 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+package src.main.proto;
+
+message updateRequest {
+
+	string addressFamilyID = 1;
+	string nextHop = 2;
+	string asPathSegment = 3;
+
+  	repeated nodeInfo node = 4;
+  	// repeated : se da la posibilidad de mandar 0 o varios
+  	repeated linkInfo link = 5;
+
+	}
+
+message nodeInfo{
+	string nodeName=1;
+	string igpID=2;
+	string bgplsID=3;
+	int32 asID=4;
+	string learntFrom = 5;
+}
+
+message linkInfo{
+
+	string remoteID=1;
+	string localID=2;
+
+	string remoteIPv4ID=3;
+	string localIPv4ID=4;
+
+	NodeDescriptors local=5;
+	NodeDescriptors remote=6;
+
+	float availableBw=7;
+	float residualBw = 8;
+	float utilized = 9;
+
+	float maxLinkDelay = 10;
+	float minLinkDelay = 11;
+	float delayVariation = 12;
+	float delay = 13;
+
+	int32 TEDefaultMetric = 14;
+	string adjacencySid = 15;
+
+	string learntFrom = 16;
+
+}
+
+message NodeDescriptors{
+
+	string asNumber=1;
+	string bgplsID=2;
+
+}
+
+message updateResponse {
+  string ack = 1;
+}
+
+// Defining a Service, a Service can have multiple RPC operations
+service updateService {
+  // MODIFY HERE: Update the return to streaming return.
+  rpc update(updateRequest) returns (updateResponse);
+}
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/TMConfCOP.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/TMConfCOP.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e048daf06f442c06652e1f16fb0b64d2d1ec14b1
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/TMConfCOP.xml
@@ -0,0 +1,27 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5008</managementPort>
+    <COP>
+       <serve_port>8089</serve_port>
+    </COP>
+    <XML_Plugin>
+     	<mode>TM</mode>
+     	<Identifier>fromXML</Identifier>
+        <XMLFileTopology>target/TM_COP_example1/network1.xml</XMLFileTopology>
+    </XML_Plugin>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/network1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ab5cd50d99ef306f8bd10a9fe482a89423fab6df
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_COP_example1/network1.xml
@@ -0,0 +1,220 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+
+<network>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.1</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.101.0</ipv4_address>
+			<prefix>29</prefix>
+		</reachability_entry>
+
+		<node>
+			<router_id>172.16.101.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.102</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.103</router_id>
+		</node>
+
+		<node>
+			<router_id>172.16.101.104</router_id>
+		</node>
+
+		<edgeCommon>
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>43</max>
+			</undir_min_max_delay>	
+			<undir_delay_variation>1</undir_delay_variation>
+			<undir_link_loss>102</undir_link_loss>
+			<undir_residual_bandwidth>802</undir_residual_bandwidth>
+			<undir_available_bandwidth>500</undir_available_bandwidth>
+			<undir_utilized_bandwidth>436</undir_utilized_bandwidth>	
+		</edgeCommon>
+
+		<edge>
+			<source>
+				<router_id>172.16.101.101</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<maximum_bandwidth>3.35</maximum_bandwidth>
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>43</max>
+			</undir_min_max_delay>	
+			<undir_delay_variation>1</undir_delay_variation>
+			<undir_link_loss>102</undir_link_loss>
+			<undir_residual_bandwidth>802</undir_residual_bandwidth>
+			<undir_available_bandwidth>500</undir_available_bandwidth>
+			<undir_utilized_bandwidth>436</undir_utilized_bandwidth>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.101</router_id>
+				<if_id>1</if_id>
+			</destination>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.101</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>1</if_id>
+			</destination>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.101</router_id>
+				<if_id>2</if_id>
+			</destination>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>102103</undir_delay_link>
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>2</if_id>
+			</destination>				
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>2</if_id>
+			</destination>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>2</if_id>
+			</destination>				
+		</edge>
+
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>3</if_id>
+			</destination>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>3</if_id>
+			</destination>				
+		</edge>
+
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.101</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>1</undir_delay_link>		
+		</edge>
+	</domain>
+
+
+	
+
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.2</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.102.0</ipv4_address>
+			<prefix>29</prefix>
+		</reachability_entry>
+
+
+        <it_resources>
+        	<controller_it>https://UC3MController.5Gex.com/url</controller_it>
+        	<cpu>222</cpu>
+            <mem>222Gbyte</mem>
+            <storage>222Tbyte</storage>
+        </it_resources>
+
+		<node>
+			<router_id>172.16.102.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.102.102</router_id>
+		</node>
+		<edge>
+			<source>
+				<router_id>172.16.102.101</router_id>
+				<if_id>14</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.102</router_id>
+				<if_id>13</if_id>
+			</destination>	
+			<undir_delay_link>2</undir_delay_link>			
+		</edge>
+	</domain>
+
+</network>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/TMConfTAPI.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/TMConfTAPI.xml
new file mode 100644
index 0000000000000000000000000000000000000000..26b41837f925b217c2799445739f57a047522660
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/TMConfTAPI.xml
@@ -0,0 +1,27 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5008</managementPort>
+    <TAPI>
+       <server_port>8089</server_port>
+    </TAPI>
+    <XML_Plugin>
+     	<mode>TM</mode>
+     	<Identifier>fromXML</Identifier>
+        <XMLFileTopology>target/TM_TAPI_example1/network1.xml</XMLFileTopology>
+    </XML_Plugin>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/network1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..1ddfdb1ab15613b55e0afe7c22e88c617dc9f2c9
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/TM_TAPI_example1/network1.xml
@@ -0,0 +1,171 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+
+<network>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.1</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.101.0</ipv4_address>
+			<prefix>29</prefix>
+		</reachability_entry>
+
+		<node>
+			<router_id>172.16.101.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.102</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.103</router_id>
+		</node>
+
+		<node>
+			<router_id>172.16.101.104</router_id>
+		</node>
+
+		<edgeCommon>
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>43</max>
+			</undir_min_max_delay>	
+			<undir_delay_variation>1</undir_delay_variation>
+			<undir_link_loss>102</undir_link_loss>
+			<undir_residual_bandwidth>802</undir_residual_bandwidth>
+			<undir_available_bandwidth>500</undir_available_bandwidth>
+			<undir_utilized_bandwidth>436</undir_utilized_bandwidth>	
+		</edgeCommon>
+
+		<edge>
+			<source>
+				<router_id>172.16.101.101</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<maximum_bandwidth>3.35</maximum_bandwidth>
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>43</max>
+			</undir_min_max_delay>	
+			<undir_delay_variation>1</undir_delay_variation>
+			<undir_link_loss>102</undir_link_loss>
+			<undir_residual_bandwidth>802</undir_residual_bandwidth>
+			<undir_available_bandwidth>500</undir_available_bandwidth>
+			<undir_utilized_bandwidth>436</undir_utilized_bandwidth>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.101</router_id>
+				<if_id>1</if_id>
+			</destination>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.101</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>1</if_id>
+			</destination>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.101</router_id>
+				<if_id>2</if_id>
+			</destination>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>102103</undir_delay_link>
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>2</if_id>
+			</destination>				
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>2</if_id>
+			</destination>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>2</if_id>
+			</destination>				
+		</edge>
+
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>3</if_id>
+			</destination>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>3</if_id>
+			</destination>				
+		</edge>
+
+	</domain>
+
+
+</network>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..fa47d6172dfa24ace6602daab8d1cf29646ce43c
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_1.xml
@@ -0,0 +1,67 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>11179</BGP4Port>
+	<BGPIdentifier>10.95.205.12</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1111</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>localhost</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>22179</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromXML</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<topologyFile>target/bgpls_example1/network1.xml</topologyFile>
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..a5ceea7e7921709b1a758a11f707200b4cec4506
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/BGP4Parameters_2.xml
@@ -0,0 +1,66 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>22179</BGP4Port>
+	<BGPIdentifier>1.1.1.1</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1112</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>localhost</peer>
+                <export>false</export>
+                <import>true</import>
+                <peerPort>11179</peerPort>
+    </configPeer>
+
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser2.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client2.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server2.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>true</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>false</sendTopology>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromBGP</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--<topologyFile>src/test/resources/network1.xml</topologyFile>-->
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/network1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ab5cd50d99ef306f8bd10a9fe482a89423fab6df
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/bgpls_example1/network1.xml
@@ -0,0 +1,220 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+
+<network>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.1</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.101.0</ipv4_address>
+			<prefix>29</prefix>
+		</reachability_entry>
+
+		<node>
+			<router_id>172.16.101.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.102</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.103</router_id>
+		</node>
+
+		<node>
+			<router_id>172.16.101.104</router_id>
+		</node>
+
+		<edgeCommon>
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>43</max>
+			</undir_min_max_delay>	
+			<undir_delay_variation>1</undir_delay_variation>
+			<undir_link_loss>102</undir_link_loss>
+			<undir_residual_bandwidth>802</undir_residual_bandwidth>
+			<undir_available_bandwidth>500</undir_available_bandwidth>
+			<undir_utilized_bandwidth>436</undir_utilized_bandwidth>	
+		</edgeCommon>
+
+		<edge>
+			<source>
+				<router_id>172.16.101.101</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<maximum_bandwidth>3.35</maximum_bandwidth>
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>43</max>
+			</undir_min_max_delay>	
+			<undir_delay_variation>1</undir_delay_variation>
+			<undir_link_loss>102</undir_link_loss>
+			<undir_residual_bandwidth>802</undir_residual_bandwidth>
+			<undir_available_bandwidth>500</undir_available_bandwidth>
+			<undir_utilized_bandwidth>436</undir_utilized_bandwidth>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.101</router_id>
+				<if_id>1</if_id>
+			</destination>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.101</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>1</if_id>
+			</destination>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.101</router_id>
+				<if_id>2</if_id>
+			</destination>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>102103</undir_delay_link>
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>2</if_id>
+			</destination>				
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>2</if_id>
+			</destination>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>2</if_id>
+			</destination>				
+		</edge>
+
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>3</if_id>
+			</destination>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>3</if_id>
+			</destination>				
+		</edge>
+
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.101</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>1</undir_delay_link>		
+		</edge>
+	</domain>
+
+
+	
+
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.2</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.102.0</ipv4_address>
+			<prefix>29</prefix>
+		</reachability_entry>
+
+
+        <it_resources>
+        	<controller_it>https://UC3MController.5Gex.com/url</controller_it>
+        	<cpu>222</cpu>
+            <mem>222Gbyte</mem>
+            <storage>222Tbyte</storage>
+        </it_resources>
+
+		<node>
+			<router_id>172.16.102.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.102.102</router_id>
+		</node>
+		<edge>
+			<source>
+				<router_id>172.16.102.101</router_id>
+				<if_id>14</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.102</router_id>
+				<if_id>13</if_id>
+			</destination>	
+			<undir_delay_link>2</undir_delay_link>			
+		</edge>
+	</domain>
+
+</network>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..14c471570c0f1a26829bb3816f9ac7a7980e0408
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS1.xml
@@ -0,0 +1,74 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>179</BGP4Port>
+	<BGPIdentifier>10.0.0.2</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1111</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <!--configPeer>
+                <peer>localhost</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>44179</peerPort>
+    </configPeer-->
+	<configPeer>
+                <peer>10.0.0.1</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>1790</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser-BGPLS1.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client-BGPLS1.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server-BGPLS1.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<isTest>true</isTest>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>65522</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromBGP</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--topologyFile>conf/network1.xml</topologyFile-->
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..fe2668c5dbdeb8b0212466c1b769d9edc9882029
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS2.xml
@@ -0,0 +1,80 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>22179</BGP4Port>
+	<BGPIdentifier>2.2.2.2</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1112</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <!--configPeer>
+                <peer>localhost</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>44179</peerPort>
+    </configPeer-->
+	<configPeer>
+                <peer>localhost</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>11179</peerPort>
+    </configPeer>
+	<configPeer>
+                <peer>localhost</peer>
+                <export>false</export>
+                <import>true</import>
+                <peerPort>33179</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser-BGPLS2.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client-BGPLS2.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server-BGPLS2.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<isTest>true</isTest>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromBGP</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--topologyFile>conf/network2.xml</topologyFile-->
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS3.xml
new file mode 100644
index 0000000000000000000000000000000000000000..37913a907b1b740adae20c75c7ae639d383fdf01
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/BGPLS3.xml
@@ -0,0 +1,80 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>33179</BGP4Port>
+	<BGPIdentifier>3.3.3.3</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1113</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <!--configPeer>
+                <peer>localhost</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>44179</peerPort>
+    </configPeer-->
+	<configPeer>
+                <peer>localhost</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>11179</peerPort>
+    </configPeer>
+	<configPeer>
+                <peer>localhost</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>22179</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser-BGPLS3.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client-BGPLS3.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server-BGPLS3.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<isTest>true</isTest>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromBGP</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!-- topologyFile>conf/network3.xml</topologyFile-->
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..2f48b1c27f183f14c0ece5c057d3b4e26f92fcd4
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM1.xml
@@ -0,0 +1,41 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5001</managementPort>
+
+    <XML>
+        <mode>TM</mode>
+        <XMLFileTopology>target/conf1wayTest/network1.xml</XMLFileTopology>
+        <Identifier>1.1.1.1</Identifier>>
+    </XML>
+     <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+    <!--WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld-->
+    <UNIFY>
+        <serve_port>8087</serve_port>
+    </UNIFY>
+    <BGPLS>
+        <Reader>True</Reader>
+        <Writer>True</Writer>
+        <BGPLSconfigFile>target/conf1wayTest/BGPLS1.xml</BGPLSconfigFile>
+    </BGPLS>
+   
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..50bcc73a671a3e279b0cdfcd4d479889fae385bb
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM2.xml
@@ -0,0 +1,41 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5002</managementPort>
+
+    <XML>
+        <mode>TM</mode>
+    	<XMLFileTopology>target/conf1wayTest/network2.xml</XMLFileTopology>
+        <Identifier>2.2.2.2</Identifier>>
+    </XML>
+     <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+    <!--WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld-->
+    <UNIFY>
+        <serve_port>8088</serve_port>
+    </UNIFY>
+    <BGPLS>
+        <Reader>True</Reader>
+        <Writer>True</Writer>
+        <BGPLSconfigFile>target/conf1wayTest/BGPLS2.xml</BGPLSconfigFile>
+    </BGPLS>
+   
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM3.xml
new file mode 100644
index 0000000000000000000000000000000000000000..fa2eed81180fa403d9bfb5ef669b3b27802ee3c1
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TM3.xml
@@ -0,0 +1,41 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5003</managementPort>
+
+    <XML>
+        <mode>TM</mode>
+        <XMLFileTopology>target/conf1wayTest/network3.xml</XMLFileTopology>
+        <Identifier>3.3.3.3</Identifier>>
+    </XML>
+     <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+    <!--WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld-->
+    <UNIFY>
+        <serve_port>8089</serve_port>
+    </UNIFY>
+    <BGPLS>
+        <Reader>True</Reader>
+        <Writer>True</Writer>
+        <BGPLSconfigFile>target/conf1wayTest/BGPLS3.xml</BGPLSconfigFile>
+    </BGPLS>
+   
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TMConfiguration_BGPLSreader_UNIFYwriter.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TMConfiguration_BGPLSreader_UNIFYwriter.xml
new file mode 100644
index 0000000000000000000000000000000000000000..7e14e7a008b9cad875a83a03fda1269b9410533b
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/TMConfiguration_BGPLSreader_UNIFYwriter.xml
@@ -0,0 +1,40 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5001</managementPort>
+
+    <!--XML>
+        <mode>IP</mode>
+	    <XMLFileTopology>src/test/resources/EmulatedTopology.xml</XMLFileTopology>
+    </XML-->
+     <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+    <WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld>
+    <UNIFY>
+        <serve_port>8088</serve_port>
+    </UNIFY>
+    <BGPLS>
+        <Reader>True</Reader>
+        <Writer>False</Writer>
+        <BGPLSconfigFile>conf/TM1.xml</BGPLSconfigFile>
+    </BGPLS>
+   
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..700e9b9da1cf882a42d02b17995218a599d6bc7e
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network1.xml
@@ -0,0 +1,233 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+
+<network>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.1</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.101.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+
+
+		<node>
+			<router_id>172.16.101.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.102</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.103</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.104</router_id>
+		</node>
+		<edge>
+			<source>
+				<router_id>172.16.101.101</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>250</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.101</router_id>
+				<if_id>1</if_id>
+			</destination>		
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>250</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.101</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>1</if_id>
+			</destination>		
+			<undir_delay_link>3000</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.101</router_id>
+				<if_id>2</if_id>
+			</destination>		
+			<undir_delay_link>3000</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>1003</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>2</if_id>
+			</destination>				
+			<undir_delay_link>1003</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>2</if_id>
+			</destination>	
+			<undir_delay_link>323</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>2</if_id>
+			</destination>				
+			<undir_delay_link>323</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>3</if_id>
+			</destination>
+			<undir_delay_link>2232</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>3</if_id>
+			</destination>			
+			<undir_delay_link>2232</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.101</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>102</undir_delay_link>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.102</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>230</undir_delay_link>		
+		</edge>
+	</domain>
+
+
+	
+
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.2</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.102.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+        <node>
+			<router_id>172.16.102.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.102.102</router_id>
+		</node>
+	</domain>
+
+</network>
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..db0918d26eb30303edc6452a0069055a2ed0f946
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network2.xml
@@ -0,0 +1,274 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+
+<network>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.2</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.102.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+
+        <it_resources>
+        	<controller_it>https://openstack2.5Gex.com/url</controller_it>
+        	<cpu>200</cpu>
+            <mem>200GByte</mem>
+            <storage>200TByte</storage>
+        </it_resources>
+
+		<node>
+			<router_id>172.16.102.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.102.102</router_id>
+		</node>
+		<node>
+			<router_id>172.16.102.103</router_id>
+		</node>
+		<node>
+			<router_id>172.16.102.104</router_id>
+		</node>
+		<edge>
+			<source>
+				<router_id>172.16.102.101</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.104</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>250</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.104</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.101</router_id>
+				<if_id>1</if_id>
+			</destination>		
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>250</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.101</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.102</router_id>
+				<if_id>1</if_id>
+			</destination>		
+			<undir_delay_link>3000</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.102</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.101</router_id>
+				<if_id>2</if_id>
+			</destination>		
+			<undir_delay_link>3000</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.102</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.103</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>1003</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.103</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.102</router_id>
+				<if_id>2</if_id>
+			</destination>				
+			<undir_delay_link>1003</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.103</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.104</router_id>
+				<if_id>2</if_id>
+			</destination>	
+			<undir_delay_link>323</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.104</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.103</router_id>
+				<if_id>2</if_id>
+			</destination>				
+			<undir_delay_link>323</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.102</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.104</router_id>
+				<if_id>3</if_id>
+			</destination>
+			<undir_delay_link>2232</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.104</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.102</router_id>
+				<if_id>3</if_id>
+			</destination>			
+			<undir_delay_link>2232</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.101</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>102</undir_delay_link>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.102</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>230</undir_delay_link>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.104</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.101</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>102</undir_delay_link>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.103</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.102</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>230</undir_delay_link>		
+		</edge>
+
+	</domain>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.1</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.101.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+        <node>
+			<router_id>172.16.101.103</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.104</router_id>
+		</node>
+	</domain>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.3</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.103.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+        <node>
+			<router_id>172.16.103.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.103.102</router_id>
+		</node>
+	</domain>
+
+	
+</network>
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network3.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6ab738a970e4f023e5790012cd235d358c35d380
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf1wayTest/network3.xml
@@ -0,0 +1,239 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+
+<network>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.3</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.103.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+
+        <it_resources>
+        	<controller_it>https://openstack3.5Gex.com/url</controller_it>
+        	<cpu>300</cpu>
+            <mem>300Gbyte</mem>
+            <storage>300Tbyte</storage>
+        </it_resources>
+
+		<node>
+			<router_id>172.16.103.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.103.102</router_id>
+		</node>
+		<node>
+			<router_id>172.16.103.103</router_id>
+		</node>
+		<node>
+			<router_id>172.16.103.104</router_id>
+		</node>
+		<edge>
+			<source>
+				<router_id>172.16.103.101</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.104</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>250</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.104</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.101</router_id>
+				<if_id>1</if_id>
+			</destination>		
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>250</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.101</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.102</router_id>
+				<if_id>1</if_id>
+			</destination>		
+			<undir_delay_link>3000</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.102</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.101</router_id>
+				<if_id>2</if_id>
+			</destination>		
+			<undir_delay_link>3000</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.102</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.103</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>1003</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.103</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.102</router_id>
+				<if_id>2</if_id>
+			</destination>				
+			<undir_delay_link>1003</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.103</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.104</router_id>
+				<if_id>2</if_id>
+			</destination>	
+			<undir_delay_link>323</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.104</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.103</router_id>
+				<if_id>2</if_id>
+			</destination>				
+			<undir_delay_link>323</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.102</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.104</router_id>
+				<if_id>3</if_id>
+			</destination>
+			<undir_delay_link>2232</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.104</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.102</router_id>
+				<if_id>3</if_id>
+			</destination>			
+			<undir_delay_link>2232</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.101</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.104</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>102</undir_delay_link>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.102</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.103</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>230</undir_delay_link>		
+		</edge>
+	</domain>
+
+
+	
+
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.2</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.102.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+        <node>
+			<router_id>172.16.102.103</router_id>
+		</node>
+		<node>
+			<router_id>172.16.102.104</router_id>
+		</node>
+	</domain>
+
+</network>
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS1_2way.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS1_2way.xml
new file mode 100644
index 0000000000000000000000000000000000000000..09258d6385c0053ed5821c956defa266929875b1
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS1_2way.xml
@@ -0,0 +1,68 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>179</BGP4Port>
+	<BGPIdentifier>172.17.11.201</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1111</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+	<configPeer>
+                <peer>172.17.11.202</peer>
+                <export>true</export>
+                <import>true</import>
+                <peerPort>179</peerPort>
+ 	</configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser-BGPLS1.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client-BGPLS1.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server-BGPLS1.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<isTest>false</isTest>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromBGP</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--topologyFile>conf/network1.xml</topologyFile-->
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS2_2way.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS2_2way.xml
new file mode 100644
index 0000000000000000000000000000000000000000..482e8410e83ca2f17fbece53bd7fbd884e852c64
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS2_2way.xml
@@ -0,0 +1,74 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>179</BGP4Port>
+	<BGPIdentifier>172.17.11.202</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1112</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    	<configPeer>
+                <peer>172.17.11.201</peer>
+                <export>true</export>
+                <import>true</import>
+                <peerPort>179</peerPort>
+   	</configPeer>
+	<configPeer>
+                <peer>172.17.11.203</peer>
+                <export>true</export>
+                <import>true</import>
+                <peerPort>179</peerPort>
+    	</configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser-BGPLS2.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client-BGPLS2.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server-BGPLS2.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<isTest>false</isTest>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>2</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromBGP</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--topologyFile>target/conf2waysReal/network2.xml</topologyFile-->
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS3_2way.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS3_2way.xml
new file mode 100644
index 0000000000000000000000000000000000000000..09cc365fa9710987308ba5be99472337ccbfe2f0
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/BGPLS3_2way.xml
@@ -0,0 +1,68 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>179</BGP4Port>
+	<BGPIdentifier>172.17.11.203</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1113</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    	<configPeer>
+                <peer>172.17.11.202</peer>
+                <export>true</export>
+                <import>true</import>
+                <peerPort>179</peerPort>
+    	</configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser-BGPLS3.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client-BGPLS3.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server-BGPLS3.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<isTest>false</isTest>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>3</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromBGP</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--topologyFile>conf/network3.xml</topologyFile-->
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/README b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/README
new file mode 100644
index 0000000000000000000000000000000000000000..000493f681b3b0bc339f7be17181796a8e0dd8e0
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/README
@@ -0,0 +1,37 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#      http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+#put the conf folder in the root directory of topology project
+mv conf/ ~/netphony-topology/
+
+cd ~/netphony-topology/
+
+#update the BGP4SessionsInformation.java file to permit multiple connection with the same ip address
+cp conf/BGP4SessionsInformation.java src/main/java/es/tid/bgp/bgp4Peer/bgp4session/
+
+#compile again the project
+mvn clean package -P generate-full-jar -P bgp-ls-speaker assembly:single
+
+#run the Topology Module for MdO1, only a TM can be present within a single VM
+java -jar target/topology-1.3.2-shaded.jar conf/TMConfiguration_BGPLSreader_UNIFYwriter.xml
+
+#run the BGPLS speaker for MdO1
+java -Dlog4j.configurationFile=log4j2.xml -jar target/bgp-ls-speaker-jar-with-dependencies.jar conf/BGPLS1.xml 
+
+#run the BGPLS speaker for MdO2
+java -Dlog4j.configurationFile=log4j2.xml -jar target/bgp-ls-speaker-jar-with-dependencies.jar conf/BGPLS2.xml 
+
+#run the BGPLS speaker for MdO3
+java -Dlog4j.configurationFile=log4j2.xml -jar target/bgp-ls-speaker-jar-with-dependencies.jar conf/BGPLS3.xml 
+
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..21fe573ee7f1dcdc52ecd7b633bb77169fabc692
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM1.xml
@@ -0,0 +1,41 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5001</managementPort>
+
+    <XML>
+        <mode>TM</mode>
+        <XMLFileTopology>target/conf2waysReal/network1.xml</XMLFileTopology>
+        <Identifier>172.17.11.201</Identifier>
+    </XML>
+     <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+    <!--WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld-->
+    <UNIFY>
+        <serve_port>8088</serve_port>
+    </UNIFY>
+    <BGPLS>
+        <Reader>True</Reader>
+        <Writer>True</Writer>
+        <BGPLSconfigFile>target/conf2waysReal/BGPLS1_2way.xml</BGPLSconfigFile>
+    </BGPLS>
+   
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..5fec256fce82b7328572ffdde605ff49f553be52
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM2.xml
@@ -0,0 +1,41 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5001</managementPort>
+
+    <XML>
+        <mode>TM</mode>
+        <XMLFileTopology>target/conf2waysReal/network2.xml</XMLFileTopology>
+        <Identifier>172.17.11.202</Identifier>
+    </XML>
+     <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+    <!--WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld-->
+    <UNIFY>
+        <serve_port>8088</serve_port>
+    </UNIFY>
+    <BGPLS>
+        <Reader>True</Reader>
+        <Writer>True</Writer>
+        <BGPLSconfigFile>target/conf2waysReal/BGPLS2_2way.xml</BGPLSconfigFile>
+    </BGPLS>
+   
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM3.xml
new file mode 100644
index 0000000000000000000000000000000000000000..4c7281a242ed18f977107fd4bf10d464c312059e
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/TM3.xml
@@ -0,0 +1,41 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5001</managementPort>
+
+    <XML>
+        <mode>TM</mode>
+        <XMLFileTopology>target/conf2waysReal/network3.xml</XMLFileTopology>
+        <Identifier>172.17.11.203</Identifier>
+    </XML>
+     <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+    <!--WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld-->
+    <UNIFY>
+        <serve_port>8088</serve_port>
+    </UNIFY>
+    <BGPLS>
+        <Reader>True</Reader>
+        <Writer>True</Writer>
+        <BGPLSconfigFile>target/conf2waysReal/BGPLS3_2way.xml</BGPLSconfigFile>
+    </BGPLS>
+   
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..98703fb52a318aedf258034c93959004f91695b1
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network1.xml
@@ -0,0 +1,239 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+
+<network>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.1</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.101.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+
+        <it_resources>
+        	<controller_it>https://openstack.5Gex.com/url</controller_it>
+        	<cpu>100</cpu>
+            <mem>100Gbyte</mem>
+            <storage>100Tbyte</storage>
+        </it_resources>
+
+		<node>
+			<router_id>172.16.101.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.102</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.103</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.104</router_id>
+		</node>
+		<edge>
+			<source>
+				<router_id>172.16.101.101</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>250</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.101</router_id>
+				<if_id>1</if_id>
+			</destination>		
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>250</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.101</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>1</if_id>
+			</destination>		
+			<undir_delay_link>3000</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.101</router_id>
+				<if_id>2</if_id>
+			</destination>		
+			<undir_delay_link>3000</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>1003</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>2</if_id>
+			</destination>				
+			<undir_delay_link>1003</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>2</if_id>
+			</destination>	
+			<undir_delay_link>323</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>2</if_id>
+			</destination>				
+			<undir_delay_link>323</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>3</if_id>
+			</destination>
+			<undir_delay_link>2232</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>3</if_id>
+			</destination>			
+			<undir_delay_link>2232</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.101</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>102</undir_delay_link>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.102</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>230</undir_delay_link>		
+		</edge>
+	</domain>
+
+
+	
+
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.2</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.102.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+        <node>
+			<router_id>172.16.102.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.102.102</router_id>
+		</node>
+	</domain>
+
+</network>
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..db0918d26eb30303edc6452a0069055a2ed0f946
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network2.xml
@@ -0,0 +1,274 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+
+<network>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.2</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.102.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+
+        <it_resources>
+        	<controller_it>https://openstack2.5Gex.com/url</controller_it>
+        	<cpu>200</cpu>
+            <mem>200GByte</mem>
+            <storage>200TByte</storage>
+        </it_resources>
+
+		<node>
+			<router_id>172.16.102.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.102.102</router_id>
+		</node>
+		<node>
+			<router_id>172.16.102.103</router_id>
+		</node>
+		<node>
+			<router_id>172.16.102.104</router_id>
+		</node>
+		<edge>
+			<source>
+				<router_id>172.16.102.101</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.104</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>250</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.104</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.101</router_id>
+				<if_id>1</if_id>
+			</destination>		
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>250</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.101</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.102</router_id>
+				<if_id>1</if_id>
+			</destination>		
+			<undir_delay_link>3000</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.102</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.101</router_id>
+				<if_id>2</if_id>
+			</destination>		
+			<undir_delay_link>3000</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.102</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.103</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>1003</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.103</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.102</router_id>
+				<if_id>2</if_id>
+			</destination>				
+			<undir_delay_link>1003</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.103</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.104</router_id>
+				<if_id>2</if_id>
+			</destination>	
+			<undir_delay_link>323</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.104</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.103</router_id>
+				<if_id>2</if_id>
+			</destination>				
+			<undir_delay_link>323</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.102</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.104</router_id>
+				<if_id>3</if_id>
+			</destination>
+			<undir_delay_link>2232</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.104</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.102</router_id>
+				<if_id>3</if_id>
+			</destination>			
+			<undir_delay_link>2232</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.101</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>102</undir_delay_link>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.102</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>230</undir_delay_link>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.104</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.101</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>102</undir_delay_link>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.102.103</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.102</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>230</undir_delay_link>		
+		</edge>
+
+	</domain>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.1</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.101.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+        <node>
+			<router_id>172.16.101.103</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.104</router_id>
+		</node>
+	</domain>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.3</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.103.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+        <node>
+			<router_id>172.16.103.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.103.102</router_id>
+		</node>
+	</domain>
+
+	
+</network>
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network3.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network3.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6ab738a970e4f023e5790012cd235d358c35d380
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/conf2waysReal/network3.xml
@@ -0,0 +1,239 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+
+<network>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.3</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.103.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+
+        <it_resources>
+        	<controller_it>https://openstack3.5Gex.com/url</controller_it>
+        	<cpu>300</cpu>
+            <mem>300Gbyte</mem>
+            <storage>300Tbyte</storage>
+        </it_resources>
+
+		<node>
+			<router_id>172.16.103.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.103.102</router_id>
+		</node>
+		<node>
+			<router_id>172.16.103.103</router_id>
+		</node>
+		<node>
+			<router_id>172.16.103.104</router_id>
+		</node>
+		<edge>
+			<source>
+				<router_id>172.16.103.101</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.104</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>250</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.104</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.101</router_id>
+				<if_id>1</if_id>
+			</destination>		
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>250</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.101</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.102</router_id>
+				<if_id>1</if_id>
+			</destination>		
+			<undir_delay_link>3000</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.102</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.101</router_id>
+				<if_id>2</if_id>
+			</destination>		
+			<undir_delay_link>3000</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.102</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.103</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>1003</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.103</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.102</router_id>
+				<if_id>2</if_id>
+			</destination>				
+			<undir_delay_link>1003</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+			</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.103</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.104</router_id>
+				<if_id>2</if_id>
+			</destination>	
+			<undir_delay_link>323</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.104</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.103</router_id>
+				<if_id>2</if_id>
+			</destination>				
+			<undir_delay_link>323</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.102</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.104</router_id>
+				<if_id>3</if_id>
+			</destination>
+			<undir_delay_link>2232</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.104</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.103.102</router_id>
+				<if_id>3</if_id>
+			</destination>			
+			<undir_delay_link>2232</undir_delay_link>
+			<undir_min_max_delay>
+				<min>150</min>
+				<max>4000</max>
+			</undir_min_max_delay>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.101</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.104</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>102</undir_delay_link>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.103.102</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.103</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>230</undir_delay_link>		
+		</edge>
+	</domain>
+
+
+	
+
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.2</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.102.0</ipv4_address>
+			<prefix>24</prefix>
+		</reachability_entry>
+        <node>
+			<router_id>172.16.102.103</router_id>
+		</node>
+		<node>
+			<router_id>172.16.102.104</router_id>
+		</node>
+	</domain>
+
+</network>
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c76e035f4fde6fc299766133bb19de27fd130390
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters.xml
@@ -0,0 +1,69 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>179</BGP4Port>
+	<BGPIdentifier>10.95.205.12</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1111</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>10.95.86.37</peer>
+                <export>false</export>
+                <import>true</import>
+                <peerPort>179</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>false</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromXML</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<topologyFile>network1.xml</topologyFile>
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--<topologyFile>src/test/resources/network1.xml</topologyFile>-->
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersRX.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersRX.xml
new file mode 100644
index 0000000000000000000000000000000000000000..fd8c7bb2be7ba090edc62dec24d33ead35cae12e
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersRX.xml
@@ -0,0 +1,68 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>11179</BGP4Port>
+	<BGPIdentifier>1.1.1.1</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1111</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>localhost</peer>
+                <export>false</export>
+                <import>true</import>
+                <peerPort>22179</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromXML</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--topologyFile>src/test/resources/network1.xml</topologyFile-->
+	<topologyFile>total.xml</topologyFile>
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTX.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTX.xml
new file mode 100644
index 0000000000000000000000000000000000000000..9bd3f7b265f4adb91fcd7503123116d1d3aab453
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTX.xml
@@ -0,0 +1,68 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>33179</BGP4Port>
+	<BGPIdentifier>3.3.3.3</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1113</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>localhost</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>22179</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromXML</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--topologyFile>src/test/resources/network1.xml</topologyFile-->
+	<topologyFile>total101.xml</topologyFile>
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTXRX.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTXRX.xml
new file mode 100644
index 0000000000000000000000000000000000000000..559d7dabd78028ce06ade69f524d72b49f1eb3fe
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4ParametersTXRX.xml
@@ -0,0 +1,74 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>22179</BGP4Port>
+	<BGPIdentifier>2.2.2.2</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1112</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>localhost</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>11179</peerPort>
+    </configPeer>
+    <configPeer>
+                <peer>localhost</peer>
+                <export>false</export>
+                <import>true</import>
+                <peerPort>33179</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromXML</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--topologyFile>src/test/resources/network1.xml</topologyFile-->
+	<topologyFile>total10v2.xml</topologyFile>
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..07dc3b377d36712f76ff182ef7df9d1c16cd39c5
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1.xml
@@ -0,0 +1,67 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>11179</BGP4Port>
+	<BGPIdentifier>10.95.205.12</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1111</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>localhost</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>22179</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromXML</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<topologyFile>src/test/resources/network1.xml</topologyFile>
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1_IT.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1_IT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..1774fccc9c5fb85538718ca70d0b284b2ddd7181
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_1_IT.xml
@@ -0,0 +1,67 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>11179</BGP4Port>
+	<BGPIdentifier>10.95.205.12</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1111</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>docker_host</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>22179</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromXML</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<topologyFile>src/test/resources/network1.xml</topologyFile>
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..a5ceea7e7921709b1a758a11f707200b4cec4506
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_2.xml
@@ -0,0 +1,66 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>22179</BGP4Port>
+	<BGPIdentifier>1.1.1.1</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1112</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>localhost</peer>
+                <export>false</export>
+                <import>true</import>
+                <peerPort>11179</peerPort>
+    </configPeer>
+
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser2.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client2.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server2.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>true</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>false</sendTopology>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromBGP</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--<topologyFile>src/test/resources/network1.xml</topologyFile>-->
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_PCE.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_PCE.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c6390f73a90ed558d54693c77404cdad5d8c187f
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_PCE.xml
@@ -0,0 +1,67 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>11179</BGP4Port>
+	<BGPIdentifier>10.95.205.12</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1111</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>localhost</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>22179</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromXML</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<topologyFile>src/test/resources/network1_pce.xml</topologyFile>
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_TM.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_TM.xml
new file mode 100644
index 0000000000000000000000000000000000000000..de0ea84b82238253d2e839f991b54c46063a45f5
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/BGP4Parameters_TM.xml
@@ -0,0 +1,67 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>11179</BGP4Port>
+	<BGPIdentifier>10.95.205.12</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1111</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>localhost</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>22179</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>10000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology></learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--topologyFile>src/test/resources/network1.xml</topologyFile-->
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopology.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopology.xml
new file mode 100644
index 0000000000000000000000000000000000000000..f8dd4933ff6d20f5d981117d00ccfb37359a47a7
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopology.xml
@@ -0,0 +1,604 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<network>
+		
+        <domain>
+                <!--<layer type="mpls" ></layer>-->
+                <domain_id>0.0.0.1</domain_id>
+                <reachability_entry>
+                        <ipv4_address>192.168.0.0</ipv4_address>
+                         <prefix>12</prefix>
+                </reachability_entry>
+				
+				<!-- Node Source -->
+                <node>
+                        <nodeName>Source</nodeName>
+                        <addressList>
+                                <address>10.0.50.3</address>  
+                        </addressList>
+                        <dpid>10.0.50.3</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Discus</routerType>
+						<controllerIP>localhost</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>                               
+                                        <addressIntfList>
+                                                <addressIntf>50.50.50.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>                               
+                                        <addressIntfList>
+                                                <addressIntf>50.50.50.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+                <!-- Node TN1 -->
+                <node>
+                        <nodeName>TN1</nodeName>
+                        <addressList>
+                                <address>192.168.1.1</address>      
+                        </addressList>
+                        <dpid>192.168.1.1</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Idealist</routerType>
+						<controllerIP>pceserver</controllerIP>
+						<controllerPort>4445</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+				
+                <!-- Node TN2 -->
+                <node>
+                        <nodeName>TN2</nodeName>
+                        <addressList>
+                                <address>192.168.1.2</address>      
+                        </addressList>
+                        <dpid>192.168.1.2</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Idealist</routerType>
+                        <controllerIP>pceserver</controllerIP>
+                        <controllerPort>4445</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+                <!-- Node TN3 -->
+                <node>
+                        <nodeName>TN3</nodeName>
+                        <addressList>
+                                <address>192.168.1.3</address>      
+                        </addressList>
+                        <dpid>192.168.1.3</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Idealist</routerType>
+                        <controllerIP>pceserver</controllerIP>
+                        <controllerPort>4445</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+				<!-- Node OLT1 -->
+                <node>
+                        <nodeName>OLT1</nodeName>
+                        <addressList>
+                                <address>10.0.50.2</address>  
+                        </addressList>
+                        <dpid>00:00:00:00:00:00:03:04</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Discus</routerType>
+						<controllerIP>localhost</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>                               
+                                        <addressIntfList>
+                                                <addressIntf>50.50.50.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>                               
+                                        <addressIntfList>
+                                                <addressIntf>50.50.50.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+				
+
+                <!-- Node ONU -->
+                <node>
+                        <nodeName>ONU</nodeName>
+                        <addressList>
+                                <address>10.0.50.1</address>
+                        </addressList>
+                        <dpid>00:00:00:00:00:00:03:03</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Discus</routerType>
+						<controllerIP>localhost</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+
+                <!-- Node GPU_rendition -->
+                <node>
+                        <nodeName>GPU_rendition</nodeName>
+                        <addressList>
+                                <address>10.0.50.4</address>
+                        </addressList>
+                        <dpid>00:00:00:00:00:00:00:10</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Discus</routerType>
+						<controllerIP>localhost</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+
+
+                
+
+				
+
+
+
+            
+
+                <!-- Source - TN1 -->
+                <link>
+                        <linkID>Source_1_TN1_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>Source</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>TN1</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				
+				<link>
+                        <linkID>TN1_1_Source_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>TN1</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>Source</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+
+                <!-- TN1 - TN2-->
+                <link>
+                        <linkID>TN1_2_TN2_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>TN1</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>TN2</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>TN2_1_TN1_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>TN2</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>TN1</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				
+				<!-- TN2 - OLT1-->
+                <link>
+                        <linkID>TN2_2_OLT1_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>TN2</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>OLT1</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>OLT1_1_TN2_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>OLT1</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>TN2</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				
+				<!-- OLT1 - ONU-->
+                <link>
+                        <linkID>OLT1_2_ONU_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>OLT1</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>ONU</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>ADVA_1_OLT1_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>ONU</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>OLT1</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				
+				<!-- ONU - GPU_rendition-->
+                <link>
+                        <linkID>ONU_2_GPU_rendition_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>ONU</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>GPU_rendition</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>CTTC_2_ONU_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>GPU_rendition</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>ONU</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+
+               
+        </domain>
+</network>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopologyECOC.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopologyECOC.xml
new file mode 100644
index 0000000000000000000000000000000000000000..50dde5f86834d05718dd2550ecb23daaa6d0dc4c
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/EmulatedTopologyECOC.xml
@@ -0,0 +1,340 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<network>
+		
+        <domain>
+                <!--<layer type="mpls" ></layer>-->
+                <domain_id>0.0.0.1</domain_id>
+                <reachability_entry>
+                        <ipv4_address>192.168.0.0</ipv4_address>
+                         <prefix>12</prefix>
+                </reachability_entry>
+				
+				
+				<!-- Node UNIVBRIS -->
+                <node>
+                        <nodeName>UNIVBRIS</nodeName>
+                        <addressList>
+                                <address>200.0.0.3</address>  
+                        </addressList>
+                        <dpid>00:00:00:00:00:00:03:04</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>BRISTOL</routerType>
+						<controllerIP>10.0.34.106</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>                               
+                                        <addressIntfList>
+                                                <addressIntf>50.50.50.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>                               
+                                        <addressIntfList>
+                                                <addressIntf>50.50.50.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+				
+
+                <!-- Node CTTC1 -->
+                <node>
+                        <nodeName>CTTC</nodeName>
+                        <addressList>
+                                <address>200.0.0.4</address>
+                        </addressList>
+                        <dpid>00:00:00:00:00:00:03:03</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>CTTC</routerType>
+						<controllerIP>10.0.34.128</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+
+                <!-- Node ADVA1 -->
+                <node>
+                        <nodeName>ADVA</nodeName>
+                        <addressList>
+                                <address>20.0.0.5</address>
+                        </addressList>
+                        <dpid>00:00:00:00:00:00:00:10</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>ADVA</routerType>
+						<controllerIP>10.0.34.104</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+
+
+                
+
+				
+
+
+
+            
+
+               
+
+                <!-- KDDI - UNIVBRIS-->
+                <!--link>
+                        <linkID>KDDI_2_UNIVBRIS_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>KDDI</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>UNIVBRIS</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>UNIVBRIS_1_KDDI_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>UNIVBRIS</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>KDDI</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link-->
+				
+				<!-- UNIVBRIS - CTTC-->
+                <link>
+                        <linkID>UNIVBRIS_2_CTTC_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>UNIVBRIS</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>CTTC</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>CTTC_1_UNIVBRIS_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>CTTC</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>UNIVBRIS</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				
+				<!-- LIGHTNESS - ADVA-->
+                <!--link>
+                        <linkID>LIGHTNESS_2_ADVA_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>LIGHTNESS</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>ADVA</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>ADVA_1_LIGHTNESS_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>ADVA</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>LIGHTNESS</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link-->
+				
+				<!-- ADVA - CTTC-->
+                <link>
+                        <linkID>ADVA_2_CTTC_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>ADVA</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>CTTC</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>CTTC_2_ADVA_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>CTTC</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>ADVA</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+
+               
+        </domain>
+</network>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration.xml
new file mode 100644
index 0000000000000000000000000000000000000000..5754c00aca9b5e494eca102fccc96c92bdc902cd
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration.xml
@@ -0,0 +1,40 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5007</managementPort>
+
+    <XML>
+        <mode>IP</mode>
+	    <XMLFileTopology>src/test/resources/EmulatedTopology.xml</XMLFileTopology>
+    </XML>
+     <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+    <WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld>
+    <COP>
+        <serve_port>8087</serve_port>
+    </COP>
+    <!--BGPLS>
+        <Reader>False</Reader>
+        <Writer>True</Writer>
+        <BGPLSconfigFile>src/test/resources/BGP4Parameters_TM.xml</BGPLSconfigFile>
+    </BGPLS-->
+   
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..2aa0cc84d9d1df8f6e5311557a60975c5cf2b3e1
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration2.xml
@@ -0,0 +1,34 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5007</managementPort>
+
+    <XML>
+        <mode>IP</mode>
+	<XMLFileTopology>src/test/resources/EmulatedTopology.xml</XMLFileTopology>
+    </XML>
+    <COP>
+      	<serve_port>8086</serve_port>
+    </COP>
+    <WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld>
+    <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfigurationCOP.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfigurationCOP.xml
new file mode 100644
index 0000000000000000000000000000000000000000..11d63ed1a41b3402212132de7aa04ee08c99de6b
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfigurationCOP.xml
@@ -0,0 +1,36 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5008</managementPort>
+
+    <COP>
+        <import_ip>localhost</import_ip>
+    	<import_port>8087</import_port>
+    	<serve_port>8088</serve_port>
+    </COP>
+    <COP>
+    	<import_ip>localhost</import_ip>
+     	<import_port>8086</import_port>
+    </COP>
+    <WSOld>
+    	<ip>localhost</ip>
+    	<port>9877</port>
+    </WSOld>
+    <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_COPwriter.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_COPwriter.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c6bd97b73b5f09fc9190c9c6b9c40baea52dabce
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_COPwriter.xml
@@ -0,0 +1,40 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5008</managementPort>
+
+    <!--XML>
+        <mode>IP</mode>
+	    <XMLFileTopology>src/test/resources/EmulatedTopology.xml</XMLFileTopology>
+    </XML-->
+     <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+    <WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld>
+    <COP>
+        <serve_port>8088</serve_port>
+    </COP>
+    <BGPLS>
+        <Reader>True</Reader>
+        <Writer>False</Writer>
+        <BGPLSconfigFile>src/test/resources/BGP4Parameters_2.xml</BGPLSconfigFile>
+    </BGPLS>
+   
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_IETFwriter.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_IETFwriter.xml
new file mode 100644
index 0000000000000000000000000000000000000000..f7b09d91b17908ac3a3e751f69d7ed5412571dc9
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_IETFwriter.xml
@@ -0,0 +1,40 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5008</managementPort>
+
+    <!--XML>
+        <mode>IP</mode>
+	    <XMLFileTopology>src/test/resources/EmulatedTopology.xml</XMLFileTopology>
+    </XML-->
+     <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+    <WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld>
+    <IETF>
+        <serve_port>8088</serve_port>
+    </IETF>
+    <BGPLS>
+        <Reader>True</Reader>
+        <Writer>False</Writer>
+        <BGPLSconfigFile>src/test/resources/BGP4Parameters_2.xml</BGPLSconfigFile>
+    </BGPLS>
+   
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_UNIFYwriter.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_UNIFYwriter.xml
new file mode 100644
index 0000000000000000000000000000000000000000..729c7295de93551784fcea40eb62efd689557f60
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_BGPLSreader_UNIFYwriter.xml
@@ -0,0 +1,40 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5008</managementPort>
+
+    <!--XML>
+        <mode>IP</mode>
+	    <XMLFileTopology>src/test/resources/EmulatedTopology.xml</XMLFileTopology>
+    </XML-->
+     <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+    <WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld>
+    <UNIFY>
+        <serve_port>8088</serve_port>
+    </UNIFY>
+    <BGPLS>
+        <Reader>True</Reader>
+        <Writer>False</Writer>
+        <BGPLSconfigFile>src/test/resources/BGP4Parameters_2.xml</BGPLSconfigFile>
+    </BGPLS>
+   
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPreader_BGPLSsender.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPreader_BGPLSsender.xml
new file mode 100644
index 0000000000000000000000000000000000000000..2f5ce356d40102414d93621cca0114751ed1f6e8
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPreader_BGPLSsender.xml
@@ -0,0 +1,42 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5008</managementPort>
+
+    <!--XML>
+        <mode>IP</mode>
+	    <XMLFileTopology>src/test/resources/EmulatedTopology.xml</XMLFileTopology>
+    </XML-->
+     <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+    <WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld>
+    <COP>
+        <serve_port>8088</serve_port>
+        <import_ip>10.95.86.27</import_ip>
+        <import_port>8070</import_port>
+    </COP>
+    <BGPLS>
+        <Reader>False</Reader>
+        <Writer>True</Writer>
+        <BGPLSconfigFile>src/test/resources/BGP4Parameters_TM.xml</BGPLSconfigFile>
+    </BGPLS>
+   
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPsender.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPsender.xml
new file mode 100644
index 0000000000000000000000000000000000000000..5754c00aca9b5e494eca102fccc96c92bdc902cd
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/TMConfiguration_COPsender.xml
@@ -0,0 +1,40 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+    <managementIP>localhost</managementIP>
+    <managementPort>5007</managementPort>
+
+    <XML>
+        <mode>IP</mode>
+	    <XMLFileTopology>src/test/resources/EmulatedTopology.xml</XMLFileTopology>
+    </XML>
+     <InitFrom>
+        <Init>initFromXML</Init>
+    </InitFrom>
+    <WSOld>
+	<ip>localhost</ip>
+	<port>9876</port>
+    </WSOld>
+    <COP>
+        <serve_port>8087</serve_port>
+    </COP>
+    <!--BGPLS>
+        <Reader>False</Reader>
+        <Writer>True</Writer>
+        <BGPLSconfigFile>src/test/resources/BGP4Parameters_TM.xml</BGPLSconfigFile>
+    </BGPLS-->
+   
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/log4j2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/log4j2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e07970922e4b3d3d56dc469b4ef2bd6768770fd5
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/log4j2.xml
@@ -0,0 +1,30 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+    <Configuration status="WARN">
+      <Appenders>
+        <Console name="Console" target="SYSTEM_OUT">
+          <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+        </Console>
+      </Appenders>
+      <Loggers>
+        <Logger name="BGP4Peer" level="trace" additivity="false">
+          <AppenderRef ref="Console"/>
+        </Logger>
+        <Root level="error">
+          <AppenderRef ref="Console"/>
+        </Root>
+      </Loggers>
+    </Configuration>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/network1_pce.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/network1_pce.xml
new file mode 100644
index 0000000000000000000000000000000000000000..69ea53d28b2c2750347f3bc871f2e1f39c5dff80
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/network1_pce.xml
@@ -0,0 +1,172 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<network>
+	<domain>
+		<layer type="mpls" ></layer>
+		
+		<domain_id>0.0.0.1</domain_id>
+		<reachability_entry>
+			<ipv4_address>192.168.1.0</ipv4_address>
+			<prefix>12</prefix>
+		</reachability_entry>
+
+		<node>
+			<router_id>192.168.1.1</router_id>
+		</node>
+		<node>
+			<router_id>192.168.1.2</router_id>
+		</node>
+		<node>
+			<router_id>192.168.1.3</router_id>
+		</node>		
+		<edgeCommon>
+			<AvailableLabels>
+				<LabelSetField type="4">
+					<numLabels>160</numLabels>
+					<!--<baseLabel grid="1" cs="2" min_frequency="1561.4" ></baseLabel>-->
+					<baseLabel grid="3" cs="5" n="0"></baseLabel>
+				</LabelSetField>
+			</AvailableLabels>
+		</edgeCommon>
+
+		
+		<!-- 1 al 3 -->
+		<edge type="intradomain">
+			<source>
+				<router_id>192.168.1.1</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>192.168.1.3</router_id>
+				<if_id>1</if_id>
+			</destination>
+			<delay>
+				3.14
+			</delay>
+			<maximum_bandwidth>
+				100
+			</maximum_bandwidth>
+			<unreserved_bandwidth priority="0">
+				100
+			</unreserved_bandwidth>		
+		</edge>
+
+		<!-- 3 al 1 -->
+		<edge>
+			<source>
+				<router_id>192.168.1.3</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>192.168.1.1</router_id>
+				<if_id>2</if_id>
+			</destination>
+			<delay>
+				3.14
+			</delay>
+			<maximum_bandwidth>
+				100
+			</maximum_bandwidth>
+			<unreserved_bandwidth priority="0">
+				100
+			</unreserved_bandwidth>		
+		</edge>
+		
+		<!-- 2 al 3 -->
+		<edge>
+			<source>
+				<router_id>192.168.1.2</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>192.168.1.3</router_id>
+				<if_id>2</if_id>
+			</destination>
+			<delay>
+				3.13
+			</delay>				
+			<maximum_bandwidth>
+				100
+			</maximum_bandwidth>
+			<unreserved_bandwidth priority="0">
+				100
+			</unreserved_bandwidth>			
+		</edge>
+		
+		<!-- 3 al 2 -->
+		<edge>
+			<source>
+				<router_id>192.168.1.3</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>192.168.1.2</router_id>
+				<if_id>2</if_id>
+			</destination>
+			<delay>
+				3.13
+			</delay>	
+			<maximum_bandwidth>
+				100
+			</maximum_bandwidth>
+			<unreserved_bandwidth priority="0">
+				100
+			</unreserved_bandwidth>	
+		</edge>
+
+		<!-- 1 al 2 -->
+		<edge>
+			<source>
+				<router_id>192.168.1.1</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>192.168.1.2</router_id>
+				<if_id>1</if_id>
+			</destination>
+			<delay>
+				3.12	
+			</delay>
+			<maximum_bandwidth>
+				100
+			</maximum_bandwidth>
+			<unreserved_bandwidth priority="0">
+				100
+			</unreserved_bandwidth>		
+		</edge>
+
+		<!-- 2 al 1 -->
+		<edge>
+			<source>
+				<router_id>192.168.1.2</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>192.168.1.1</router_id>
+				<if_id>1</if_id>
+			</destination>
+			<delay>
+				3.12
+			</delay>
+			<maximum_bandwidth>
+				100
+			</maximum_bandwidth>
+			<unreserved_bandwidth priority="0">
+				100
+			</unreserved_bandwidth>			
+		</edge>
+	</domain>
+</network>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total.xml
new file mode 100644
index 0000000000000000000000000000000000000000..3d9767c7be47d0ea37a9f64b8043b73882c67841
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total.xml
@@ -0,0 +1,213 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<network>
+<domain>
+<layer type="transport" >
+</layer>
+<domain_id>1.0.0.103</domain_id>
+<reachability_entry>
+<ipv4_address>172.16.0.0</ipv4_address>
+<prefix>24</prefix>
+</reachability_entry>
+
+<it_resources>
+      <controller_it>https://openstack1.5Gex.com/url</controller_it>
+      <cpu>111</cpu>
+      <mem>111Gbyte</mem>
+      <storage>111Tbyte</storage>
+</it_resources>
+
+
+
+<node>
+<router_id>172.16.0.1</router_id>
+</node>
+<node>
+<router_id>172.16.0.2</router_id>
+</node>
+<node>
+<router_id>172.16.0.3</router_id>
+</node>
+<node>
+<router_id>172.16.0.4</router_id>
+</node>
+<edge>
+<source>
+<router_id>172.16.0.1</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.10.1</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>72</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>172.16.0.2</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.10.2</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>150</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>172.16.0.1</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.0.3</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>303</undir_delay_link>
+<unidir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</unidir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>172.16.0.3</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.0.1</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>303</undir_delay_link>
+<unidir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</unidir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>172.16.0.1</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.0.4</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>542</undir_delay_link>
+<unidir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</unidir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>172.16.0.4</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.0.1</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>542</undir_delay_link>
+<unidir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</unidir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>172.16.0.2</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.0.3</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>221</undir_delay_link>
+<unidir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</unidir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>172.16.0.3</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.0.2</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>221</undir_delay_link>
+<unidir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</unidir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>172.16.0.2</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.0.4</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>198</undir_delay_link>
+<unidir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</unidir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>172.16.0.4</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.0.2</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>198</undir_delay_link>
+<unidir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</unidir_min_max_delay>
+</edge>
+</domain>
+
+<domain>
+<layer type="transport" >
+</layer>
+<domain_id>0.0.0.10</domain_id>
+<reachability_entry>
+<ipv4_address>172.16.10.0</ipv4_address>
+<prefix>24</prefix>
+</reachability_entry>
+<node>
+<router_id>172.16.10.1</router_id>
+</node>
+<node>
+<router_id>172.16.10.2</router_id>
+</node>
+</domain>
+</network>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total101.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total101.xml
new file mode 100644
index 0000000000000000000000000000000000000000..8f2eb49f9501e7239e2792240aa964ab29b5ae23
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total101.xml
@@ -0,0 +1,144 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<network>
+<domain>
+<layer type="transport" >
+</layer>
+<domain_id>0.0.0.101</domain_id>
+<reachability_entry>
+<ipv4_address>10.19.1.0</ipv4_address>
+<prefix>24</prefix>
+</reachability_entry>
+<node>
+<router_id>10.19.1.1</router_id>
+</node>
+<node>
+<router_id>10.19.1.2</router_id>
+</node>
+<node>
+<router_id>10.19.1.5</router_id>
+</node>
+<edge>
+<source>
+<router_id>10.19.1.1</router_id>
+	<if_id>1</if_id>
+</source>
+<destination>
+<router_id>10.19.1.5</router_id>
+	<if_id>1</if_id>
+</destination>
+<undir_delay_link>422</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>10.19.1.5</router_id>
+	<if_id>1</if_id>
+</source>
+<destination>
+<router_id>10.19.1.1</router_id>
+	<if_id>1</if_id>
+</destination>
+<undir_delay_link>422</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+
+<edge>
+<source>
+<router_id>10.19.1.2</router_id>
+	<if_id>1</if_id>
+</source>
+<destination>
+<router_id>10.19.1.5</router_id>
+	<if_id>1</if_id>
+</destination>
+<undir_delay_link>722</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>10.19.1.5</router_id>
+	<if_id>1</if_id>
+</source>
+<destination>
+<router_id>10.19.1.2</router_id>
+	<if_id>1</if_id>
+</destination>
+<undir_delay_link>722</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+
+<edge>
+<source>
+<router_id>10.19.1.1</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.10.3</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>123</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+
+<edge>
+<source>
+<router_id>10.19.1.2</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.10.4</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>55</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+
+
+</domain>
+<domain>
+<layer type="transport" >
+</layer>
+<domain_id>0.0.0.10</domain_id>
+<reachability_entry>
+<ipv4_address>172.16.10.0</ipv4_address>
+<prefix>24</prefix>
+</reachability_entry>
+<node>
+<router_id>172.16.10.3</router_id>
+</node>
+<node>
+<router_id>172.16.10.4</router_id>
+</node>
+</domain>
+</network>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total10v2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total10v2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b308b56cdb239a0c323af89814bc1802e3605910
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/main/sample-config-files/examples/total10v2.xml
@@ -0,0 +1,261 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<network>
+<domain>
+<layer type="transport" >
+</layer>
+<domain_id>0.0.0.10</domain_id>
+<reachability_entry>
+<ipv4_address>172.16.10.0</ipv4_address>
+<prefix>24</prefix>
+</reachability_entry>
+<node>
+<router_id>172.16.10.1</router_id>
+</node>
+<node>
+<router_id>172.16.10.2</router_id>
+</node>
+<node>
+<router_id>172.16.10.3</router_id>
+</node>
+<node>
+<router_id>172.16.10.4</router_id>
+</node>
+<edge>
+<source>
+<router_id>172.16.10.1</router_id>
+	<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.10.3</router_id>
+	<if_id>1</if_id>
+</destination>
+<undir_delay_link>422</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>172.16.10.3</router_id>
+	<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.10.1</router_id>
+	<if_id>1</if_id>
+</destination>
+<undir_delay_link>422</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+
+<edge>
+<source>
+<router_id>172.16.10.1</router_id>
+	<if_id>1</if_id>
+</source>
+<destination>
+
+<router_id>172.16.10.4</router_id>
+	<if_id>1</if_id>
+</destination>
+<undir_delay_link>722</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>172.16.10.4</router_id>
+	<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.10.1</router_id>
+	<if_id>1</if_id>
+</destination>
+<undir_delay_link>722</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+
+
+<edge>
+<source>
+<router_id>172.16.10.2</router_id>
+	<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.10.3</router_id>
+	<if_id>1</if_id>
+</destination>
+<undir_delay_link>122</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>172.16.10.3</router_id>
+	<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.10.2</router_id>
+	<if_id>1</if_id>
+</destination>
+<undir_delay_link>122</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+
+<edge>
+<source>
+<router_id>172.16.10.2</router_id>
+	<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.10.4</router_id>
+	<if_id>1</if_id>
+</destination>
+<undir_delay_link>200</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+<edge>
+<source>
+<router_id>172.16.10.4</router_id>
+	<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.10.2</router_id>
+	<if_id>1</if_id>
+</destination>
+<undir_delay_link>200</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+
+
+<edge>
+<source>
+<router_id>172.16.10.1</router_id>
+
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.0.1</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>72</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+
+<edge>
+<source>
+<router_id>172.16.10.2</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>172.16.0.2</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>150</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+
+<edge>
+<source>
+<router_id>172.16.10.3</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>10.19.1.1</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>123</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+
+<edge>
+<source>
+<router_id>172.16.10.4</router_id>
+<if_id>1</if_id>
+</source>
+<destination>
+<router_id>10.19.1.2</router_id>
+<if_id>1</if_id>
+</destination>
+<undir_delay_link>55</undir_delay_link>
+<undir_min_max_delay>
+<min>100</min>
+<max>3560</max>
+</undir_min_max_delay>
+</edge>
+
+
+</domain>
+<domain>
+<layer type="transport" >
+</layer>
+<domain_id>0.0.0.101</domain_id>
+<reachability_entry>
+<ipv4_address>10.19.1.0</ipv4_address>
+<prefix>24</prefix>
+</reachability_entry>
+<node>
+<router_id>10.19.1.1</router_id>
+</node>
+<node>
+<router_id>10.19.1.2</router_id>
+</node>
+
+</domain>
+<domain>
+<layer type="transport" >
+</layer>
+<domain_id>0.0.0.103</domain_id>
+<reachability_entry>
+<ipv4_address>172.16.0.0</ipv4_address>
+<prefix>24</prefix>
+</reachability_entry>
+<node>
+<router_id>172.16.0.1</router_id>
+</node>
+<node>
+<router_id>172.16.0.2</router_id>
+</node>
+</domain>
+</network>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/java/es/tid/bgp/bgp4Peer/tests/BGP4PeerTest.java b/src/bgpls_speaker/service/java/netphony-topology/src/test/java/es/tid/bgp/bgp4Peer/tests/BGP4PeerTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..e742908bcca7305c1bb6b254d1feaf5439cb1f57
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/java/es/tid/bgp/bgp4Peer/tests/BGP4PeerTest.java
@@ -0,0 +1,130 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package es.tid.bgp.bgp4Peer.tests;
+
+import static org.junit.Assert.*;
+
+import java.net.Inet4Address;
+import java.util.Set;
+
+import eu.teraflow.tid.bgp4Peer.peer.BGPPeer;
+import eu.teraflow.tid.tedb.MDTEDB;
+
+public class BGP4PeerTest {
+	
+	public BGP4PeerTest(){
+		
+	}
+	
+	/**
+	 * This tests starts a BGL-LS Speaker, reads the topology from a File and Sends it.
+	 * A second speaker is started and reads the topology.
+	 * The first speaker is configured to read only the multidomain topology and send the 
+	 * multidomain topology
+	 * The second speaker is configured as Consumer. 
+	 * The speakers are launched in separated non-standard ports for testing purposes.
+	 * Both speakers talk and the topology is sent from BGP-Speaker 1 to BGP-Speaker 2
+	 * It checks after 10 seconds if the topology of BGP-Speaker 2 is the same as BGP
+	 * Speaker 1. 
+	 */
+	@org.junit.Test
+	public void testPeer(){
+		try {
+		//Create BGP4Peer 1 
+		BGPPeer bgpPeer = new BGPPeer();
+		bgpPeer.configure("src/test/resources/BGP4Parameters_1.xml");
+		//Create the TEDB
+		//bgpPeer.createTEDB("test"); //did it in configure
+		assertTrue("MD Topology has not 2 domains",((MDTEDB)bgpPeer.getMultiDomainTEDB()).getNetworkDomainGraph().vertexSet().size()==2);
+		bgpPeer.createUpdateDispatcher();
+		bgpPeer.startClient();		
+		bgpPeer.startServer();
+		bgpPeer.startSaveTopology();
+		bgpPeer.startManagementServer();
+		bgpPeer.startSendTopology();
+		String topoOriginal=bgpPeer.getMultiDomainTEDB().printTopology();
+		
+		System.out.println("Topology1: ");
+		System.out.println(topoOriginal);
+		
+		
+		//Launch BGP4Peer
+		//bgpPeer.stopPeer();
+		try {
+			Thread.sleep(1000);
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		
+		BGPPeer bgpPeer2 = new BGPPeer();
+		bgpPeer2.configure("src/test/resources/BGP4Parameters_2.xml");
+		//Create the TEDB
+		//bgpPeer2.createTEDB("test"); //did it in configure
+		bgpPeer2.createUpdateDispatcher();
+		//bgpPeer2.startClient();		
+		bgpPeer2.startServer();
+		bgpPeer2.startSaveTopology();
+		bgpPeer2.startManagementServer();
+		//bgpPeer2.startSendTopology();
+		try {
+			Thread.sleep(10000);
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}
+		String topo2=bgpPeer2.getMultiDomainTEDB().printTopology();
+		
+		System.out.println("---------------------------------------");
+		System.out.println("---------------------------------------");
+		System.out.println("---------------------------------------");
+		System.out.println("Topology of BGP-LS Speaker 1: ");
+		System.out.println("---------------------------------------");
+		System.out.println(topoOriginal);
+		Set<String> keySet = bgpPeer.getIntraTEDBs().keySet();
+		for(String key : keySet){
+			System.out.println("---IntraTEDB: domain_id= "+key);
+			System.out.println(bgpPeer.getIntraTEDBs().get(key).printTopology());
+		}
+		System.out.println("---------------------------------------");
+		System.out.println("Topology of  BGP-LS Speaker 2: ");
+		System.out.println("---------------------------------------");		
+		System.out.println(topo2);
+		System.out.println("---------------------------------------");
+		Set<String> keySet2 = bgpPeer2.getIntraTEDBs().keySet();
+		for(String key : keySet2){
+			System.out.println("---IntraTEDB: domain_id= "+key);
+			System.out.println(bgpPeer2.getIntraTEDBs().get(key).printTopology());
+		}
+		/*try {
+			Thread.sleep(10000);
+		} catch (InterruptedException e) {
+			// TODO Auto-generated catch block
+			e.printStackTrace();
+		}*/
+		for(String key : keySet){
+			//assertTrue("Checking if topos are equals, IntraTEDBs, don't have the same domains", bgpPeer2.getIntraTEDBs().keySet().contains(key));
+			//assertTrue("->Checking if topos are equals, IntraTEDB (domains="+key+") are not equal:\nTED1:\n"+bgpPeer.getIntraTEDBs().get(key).printTopology()+"\nTED2:\n"+bgpPeer.getIntraTEDBs().get(key).printTopology(), bgpPeer.getIntraTEDBs().get(key).equals(bgpPeer2.getIntraTEDBs().get(key)));
+		}
+		assertTrue("Checking if topos are equal",topoOriginal.equals(topo2));
+		} catch (Exception exc){
+			exc.printStackTrace();
+			assertTrue("Exception "+exc.getMessage(),false);
+		}
+			
+		
+	}
+
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..07dc3b377d36712f76ff182ef7df9d1c16cd39c5
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1.xml
@@ -0,0 +1,67 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>11179</BGP4Port>
+	<BGPIdentifier>10.95.205.12</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1111</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>localhost</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>22179</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromXML</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<topologyFile>src/test/resources/network1.xml</topologyFile>
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1_IT.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1_IT.xml
new file mode 100644
index 0000000000000000000000000000000000000000..1774fccc9c5fb85538718ca70d0b284b2ddd7181
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_1_IT.xml
@@ -0,0 +1,67 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>11179</BGP4Port>
+	<BGPIdentifier>10.95.205.12</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1111</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>docker_host</peer>
+                <export>true</export>
+                <import>false</import>
+                <peerPort>22179</peerPort>
+    </configPeer>
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>false</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>true</sendTopology>
+	<!-- Delay between topology updates sent in ms -->
+	<sendTopoDelay>5000</sendTopoDelay>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromXML</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<topologyFile>src/test/resources/network1.xml</topologyFile>
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..a5ceea7e7921709b1a758a11f707200b4cec4506
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/BGP4Parameters_2.xml
@@ -0,0 +1,66 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<config>
+	<!-- TCP port where the BGP is listening for incoming bgp4 connections. Optional Parameter. Default value: 179 (BGP Port)  --> 
+	<BGP4Port>22179</BGP4Port>
+	<BGPIdentifier>1.1.1.1</BGPIdentifier>
+<!-- TCP port to connect to manage the BGP connection. Default value: 1112 -->
+	<BGP4ManagementPort>1112</BGP4ManagementPort> 
+	<!-- Peers to which this Peer is going to establish connection -->
+    <configPeer>
+                <peer>localhost</peer>
+                <export>false</export>
+                <import>true</import>
+                <peerPort>11179</peerPort>
+    </configPeer>
+
+	<!-- Ficheros log (servidor, protocolo PCEP y OSPF). Campos opcionales-->
+	<BGP4LogFile>BGP4Parser2.log</BGP4LogFile><!-- Default value: BGP4Parser.log -->
+	<BGP4LogFileClient>BGP4Client2.log</BGP4LogFileClient><!-- Default value: BGP4Client.log-->
+	<BGP4LogFileServer>BGP4Server2.log</BGP4LogFileServer><!-- Default value: BGP4Server.log-->
+	<!-- If the tcp no delay option is used or not. Optional Parameter. Default value: false. -->
+	<nodelay>true</nodelay>
+	<!-- Waiting Time to re-connect to clients. Default value: 6000 ms. -->
+	<delay>40000</delay>
+	<setTraces>true</setTraces>
+	<!-- OPEN Parameters -->
+	<!-- RFC 4271. This 2-octet unsigned integer indicates the number of seconds the sender proposes for the value of the Hold Timer.  
+		Upon receipt of an OPEN message, a BGP speaker MUST calculate the value of the Hold Timer by using the smaller of its configured
+         Hold Time and the Hold Time received in the OPEN message.  The Hold Time MUST be either zero or at least three seconds.  An
+         implementation MAY reject connections on the basis of the Hold Time.  The calculated value indicates the maximum number of
+         seconds that may elapse between the receipt of successive KEEPALIVE and/or UPDATE messages from the sender. -->
+	<holdTime>180</holdTime><!-- Optional Parameter. Default value: 3. -->
+	<!-- RFC 4271. This 1-octet unsigned integer indicates the protocol version number of the message.  The current BGP version number is 4. -->
+	<version>4</version><!-- Optional Parameter. Default value: 4. -->
+	<!-- RFC 4271.  This 2-octet unsigned integer indicates the Autonomous System number of the sender.-->
+	<myAutonomousSystem>1</myAutonomousSystem>
+	<!-- RFC 4271. This 4-octet unsigned integer indicates the BGP Identifier of the sender.  A given BGP speaker sets the value of its BGP
+         Identifier to an IP address that is assigned to that BGP speaker.  The value of the BGP Identifier is determined upon
+         startup and is the same for every local interface and BGP peer. --> 
+	<!--<BGPIdentifier>192.168.1.200</BGPIdentifier> -->
+	<!-- If the peer is in charge of sending its topology (only the interdomain Links) to the other BGP peer it is connected to. Default: false -->
+	<sendTopology>false</sendTopology>
+	<!-- If the peer is in charge of sending its whole topology to the other BGP peer it is connected to. Default: false -->
+	<sendIntradomainLinks>true</sendIntradomainLinks>
+	<!-- Optional Parameter. How to learn the topology. Possibilities: fromXML, fromBGP. Default: fromBGP -->
+	<learnTopology>fromBGP</learnTopology>	
+	<!-- Topology network to read. It is mandatory if and only if learnTopology parameter is fromXML. -->
+	<!--<topologyFile>src/test/resources/network1.xml</topologyFile>-->
+	<!-- Optional Parameter. Instance Identifier for node and link NLRI. See rfc 6549. Default value: 0-->
+	<!--<instanceID>0</instanceID>-->
+	<!-- Optional Parameter. Default value: localhost -->
+	<localBGPAddress>0.0.0.0</localBGPAddress>
+</config>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopology.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopology.xml
new file mode 100644
index 0000000000000000000000000000000000000000..f8dd4933ff6d20f5d981117d00ccfb37359a47a7
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopology.xml
@@ -0,0 +1,604 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<network>
+		
+        <domain>
+                <!--<layer type="mpls" ></layer>-->
+                <domain_id>0.0.0.1</domain_id>
+                <reachability_entry>
+                        <ipv4_address>192.168.0.0</ipv4_address>
+                         <prefix>12</prefix>
+                </reachability_entry>
+				
+				<!-- Node Source -->
+                <node>
+                        <nodeName>Source</nodeName>
+                        <addressList>
+                                <address>10.0.50.3</address>  
+                        </addressList>
+                        <dpid>10.0.50.3</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Discus</routerType>
+						<controllerIP>localhost</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>                               
+                                        <addressIntfList>
+                                                <addressIntf>50.50.50.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>                               
+                                        <addressIntfList>
+                                                <addressIntf>50.50.50.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+                <!-- Node TN1 -->
+                <node>
+                        <nodeName>TN1</nodeName>
+                        <addressList>
+                                <address>192.168.1.1</address>      
+                        </addressList>
+                        <dpid>192.168.1.1</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Idealist</routerType>
+						<controllerIP>pceserver</controllerIP>
+						<controllerPort>4445</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+				
+                <!-- Node TN2 -->
+                <node>
+                        <nodeName>TN2</nodeName>
+                        <addressList>
+                                <address>192.168.1.2</address>      
+                        </addressList>
+                        <dpid>192.168.1.2</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Idealist</routerType>
+                        <controllerIP>pceserver</controllerIP>
+                        <controllerPort>4445</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+                <!-- Node TN3 -->
+                <node>
+                        <nodeName>TN3</nodeName>
+                        <addressList>
+                                <address>192.168.1.3</address>      
+                        </addressList>
+                        <dpid>192.168.1.3</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Idealist</routerType>
+                        <controllerIP>pceserver</controllerIP>
+                        <controllerPort>4445</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+				<!-- Node OLT1 -->
+                <node>
+                        <nodeName>OLT1</nodeName>
+                        <addressList>
+                                <address>10.0.50.2</address>  
+                        </addressList>
+                        <dpid>00:00:00:00:00:00:03:04</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Discus</routerType>
+						<controllerIP>localhost</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>                               
+                                        <addressIntfList>
+                                                <addressIntf>50.50.50.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>                               
+                                        <addressIntfList>
+                                                <addressIntf>50.50.50.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+				
+
+                <!-- Node ONU -->
+                <node>
+                        <nodeName>ONU</nodeName>
+                        <addressList>
+                                <address>10.0.50.1</address>
+                        </addressList>
+                        <dpid>00:00:00:00:00:00:03:03</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Discus</routerType>
+						<controllerIP>localhost</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+
+                <!-- Node GPU_rendition -->
+                <node>
+                        <nodeName>GPU_rendition</nodeName>
+                        <addressList>
+                                <address>10.0.50.4</address>
+                        </addressList>
+                        <dpid>00:00:00:00:00:00:00:10</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>Discus</routerType>
+						<controllerIP>localhost</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+
+
+                
+
+				
+
+
+
+            
+
+                <!-- Source - TN1 -->
+                <link>
+                        <linkID>Source_1_TN1_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>Source</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>TN1</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				
+				<link>
+                        <linkID>TN1_1_Source_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>TN1</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>Source</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+
+                <!-- TN1 - TN2-->
+                <link>
+                        <linkID>TN1_2_TN2_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>TN1</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>TN2</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>TN2_1_TN1_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>TN2</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>TN1</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				
+				<!-- TN2 - OLT1-->
+                <link>
+                        <linkID>TN2_2_OLT1_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>TN2</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>OLT1</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>OLT1_1_TN2_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>OLT1</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>TN2</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				
+				<!-- OLT1 - ONU-->
+                <link>
+                        <linkID>OLT1_2_ONU_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>OLT1</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>ONU</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>ADVA_1_OLT1_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>ONU</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>OLT1</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				
+				<!-- ONU - GPU_rendition-->
+                <link>
+                        <linkID>ONU_2_GPU_rendition_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>ONU</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>GPU_rendition</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>CTTC_2_ONU_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>GPU_rendition</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>ONU</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+
+               
+        </domain>
+</network>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopologyECOC.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopologyECOC.xml
new file mode 100644
index 0000000000000000000000000000000000000000..50dde5f86834d05718dd2550ecb23daaa6d0dc4c
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/EmulatedTopologyECOC.xml
@@ -0,0 +1,340 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<network>
+		
+        <domain>
+                <!--<layer type="mpls" ></layer>-->
+                <domain_id>0.0.0.1</domain_id>
+                <reachability_entry>
+                        <ipv4_address>192.168.0.0</ipv4_address>
+                         <prefix>12</prefix>
+                </reachability_entry>
+				
+				
+				<!-- Node UNIVBRIS -->
+                <node>
+                        <nodeName>UNIVBRIS</nodeName>
+                        <addressList>
+                                <address>200.0.0.3</address>  
+                        </addressList>
+                        <dpid>00:00:00:00:00:00:03:04</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>BRISTOL</routerType>
+						<controllerIP>10.0.34.106</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>                               
+                                        <addressIntfList>
+                                                <addressIntf>50.50.50.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>                               
+                                        <addressIntfList>
+                                                <addressIntf>50.50.50.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+				
+
+                <!-- Node CTTC1 -->
+                <node>
+                        <nodeName>CTTC</nodeName>
+                        <addressList>
+                                <address>200.0.0.4</address>
+                        </addressList>
+                        <dpid>00:00:00:00:00:00:03:03</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>CTTC</routerType>
+						<controllerIP>10.0.34.128</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+
+                <!-- Node ADVA1 -->
+                <node>
+                        <nodeName>ADVA</nodeName>
+                        <addressList>
+                                <address>20.0.0.5</address>
+                        </addressList>
+                        <dpid>00:00:00:00:00:00:00:10</dpid>
+                        <isPhysical>true</isPhysical>
+                        <layerNode>transport</layerNode>
+                        <configurationMode>COPMode</configurationMode>
+                        <routerType>ADVA</routerType>
+						<controllerIP>10.0.34.104</controllerIP>
+						<controllerPort>8080</controllerPort>
+                        <interfacesList>
+                                <interface>
+                                        <nameIntf>1</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                                <interface>
+                                        <nameIntf>2</nameIntf>
+                                        <label>7</label>
+                                        <addressIntfList>
+                                                <addressIntf>51.51.51.1</addressIntf>
+                                        </addressIntfList>
+                                        <layeringList>
+                                                <layering>transport</layering>                                  
+                                        </layeringList>
+                                        <!--<supportedCountersList>
+                                                <supportedCounters></supportedCounters>
+                                        </supportedCountersList>-->
+                                        <isPhysical>true</isPhysical>
+                                        <!--<parentInterfaceName></parentInterfaceName>-->
+                                </interface>
+                        </interfacesList>
+                        <domainID>1</domainID>
+                        <location>
+                                <Xcord>2</Xcord>
+                                <Ycord>1</Ycord>
+                        </location>
+                        <!--<ipParams>
+                                <staticRoutingParamsList><staticRoutingParams></staticRoutingParams><staticRoutingParamsList>
+                                <bgpParamsList><bgpParams></bgpParams></bgpParamsList>
+                                <isisParamsList> <isisParams></isisParams></isisParamsList>
+                                <ospfParamsList><ospfParams></ospfParams></ospfParamsList>
+                        </ipParams>-->
+                        <!--<parentRouter></parentRouter>       -->                     
+                </node> 
+
+
+
+                
+
+				
+
+
+
+            
+
+               
+
+                <!-- KDDI - UNIVBRIS-->
+                <!--link>
+                        <linkID>KDDI_2_UNIVBRIS_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>KDDI</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>UNIVBRIS</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>UNIVBRIS_1_KDDI_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>UNIVBRIS</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>KDDI</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link-->
+				
+				<!-- UNIVBRIS - CTTC-->
+                <link>
+                        <linkID>UNIVBRIS_2_CTTC_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>UNIVBRIS</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>CTTC</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>CTTC_1_UNIVBRIS_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>CTTC</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>UNIVBRIS</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				
+				<!-- LIGHTNESS - ADVA-->
+                <!--link>
+                        <linkID>LIGHTNESS_2_ADVA_1</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>LIGHTNESS</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>ADVA</nodeLink>
+                                <intfLink>1</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>ADVA_1_LIGHTNESS_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>ADVA</nodeLink>
+                                <intfLink>1</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>LIGHTNESS</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link-->
+				
+				<!-- ADVA - CTTC-->
+                <link>
+                        <linkID>ADVA_2_CTTC_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>ADVA</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>CTTC</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+				<link>
+                        <linkID>CTTC_2_ADVA_2</linkID>
+                        <isDirectional>true</isDirectional>
+                        <source>
+                                <nodeLink>CTTC</nodeLink>
+                                <intfLink>2</intfLink>
+                        </source>                       
+                        <destination>
+                                <nodeLink>ADVA</nodeLink>
+                                <intfLink>2</intfLink>
+                        </destination>
+                        <typeLink>transport</typeLink>
+                        <layerLink>transport</layerLink>                          
+                </link>
+
+               
+        </domain>
+</network>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/log4j2.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/log4j2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b284eba81e4d28d27f32042684d7f5c6b06ce632
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/log4j2.xml
@@ -0,0 +1,27 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<Configuration status="WARN">
+   <Appenders>
+     <Console name="Console" target="SYSTEM_OUT">
+       <PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n"/>
+     </Console>
+   </Appenders>
+   <Loggers>
+     <Root level="error">
+       <AppenderRef ref="Console"/>
+     </Root>
+   </Loggers>
+</Configuration>
diff --git a/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/network1.xml b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/network1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..e36714d55b196971b9d9141f2b0d1e25a4ce6ff2
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/src/test/resources/network1.xml
@@ -0,0 +1,227 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+
+<network>
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.1</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.101.0</ipv4_address>
+			<prefix>29</prefix>
+		</reachability_entry>
+
+        <it_resources>
+        	<controller_it>https://openstack.5Gex.com/url</controller_it>
+        	<cpu>100</cpu>
+            <mem>100Gbyte</mem>
+            <storage>100Tbyte</storage>
+        </it_resources>
+
+		<node>
+			<router_id>172.16.101.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.102</router_id>
+		</node>
+		<node>
+			<router_id>172.16.101.103</router_id>
+		</node>
+
+		<node>
+			<router_id>172.16.101.104</router_id>
+		</node>
+
+		<edgeCommon>
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>43</max>
+			</undir_min_max_delay>	
+			<undir_delay_variation>1</undir_delay_variation>
+			<undir_link_loss>102</undir_link_loss>
+			<undir_residual_bandwidth>802</undir_residual_bandwidth>
+			<undir_available_bandwidth>500</undir_available_bandwidth>
+			<undir_utilized_bandwidth>436</undir_utilized_bandwidth>	
+		</edgeCommon>
+
+		<edge>
+			<source>
+				<router_id>172.16.101.101</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<maximum_bandwidth>3.35</maximum_bandwidth>
+			<undir_delay_link>99</undir_delay_link>
+			<undir_min_max_delay>
+				<min>23</min>
+				<max>43</max>
+			</undir_min_max_delay>	
+			<undir_delay_variation>1</undir_delay_variation>
+			<undir_link_loss>102</undir_link_loss>
+			<undir_residual_bandwidth>802</undir_residual_bandwidth>
+			<undir_available_bandwidth>500</undir_available_bandwidth>
+			<undir_utilized_bandwidth>436</undir_utilized_bandwidth>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.101</router_id>
+				<if_id>1</if_id>
+			</destination>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.101</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>1</if_id>
+			</destination>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.101</router_id>
+				<if_id>2</if_id>
+			</destination>		
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>1</if_id>
+			</destination>	
+			<undir_delay_link>102103</undir_delay_link>
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>1</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>2</if_id>
+			</destination>				
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.103</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>2</if_id>
+			</destination>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>2</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.103</router_id>
+				<if_id>2</if_id>
+			</destination>				
+		</edge>
+
+		<edge>
+			<source>
+				<router_id>172.16.101.102</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.104</router_id>
+				<if_id>3</if_id>
+			</destination>	
+		</edge>
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>3</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.101.102</router_id>
+				<if_id>3</if_id>
+			</destination>				
+		</edge>
+
+		<edge>
+			<source>
+				<router_id>172.16.101.104</router_id>
+				<if_id>13</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.101</router_id>
+				<if_id>11</if_id>
+			</destination>	
+			<undir_delay_link>1</undir_delay_link>		
+		</edge>
+	</domain>
+
+
+	
+
+	<domain>
+		<layer type="transport" ></layer>
+
+		<domain_id>0.0.0.2</domain_id>
+		<reachability_entry>
+			<ipv4_address>172.16.102.0</ipv4_address>
+			<prefix>29</prefix>
+		</reachability_entry>
+
+
+        <it_resources>
+        	<controller_it>https://UC3MController.5Gex.com/url</controller_it>
+        	<cpu>222</cpu>
+            <mem>222Gbyte</mem>
+            <storage>222Tbyte</storage>
+        </it_resources>
+
+		<node>
+			<router_id>172.16.102.101</router_id>
+		</node>
+		<node>
+			<router_id>172.16.102.102</router_id>
+		</node>
+		<edge>
+			<source>
+				<router_id>172.16.102.101</router_id>
+				<if_id>14</if_id>
+			</source>			
+			<destination>
+				<router_id>172.16.102.102</router_id>
+				<if_id>13</if_id>
+			</destination>	
+			<undir_delay_link>2</undir_delay_link>			
+		</edge>
+	</domain>
+
+</network>
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java b/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java
new file mode 100644
index 0000000000000000000000000000000000000000..7b6ef8da0462513deb943714447ce4238ae3dea1
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/target/generated-sources/protobuf/grpc-java/src/main/proto/updateServiceGrpc.java
@@ -0,0 +1,320 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+
+//      http://www.apache.org/licenses/LICENSE-2.0
+
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package src.main.proto;
+
+import static io.grpc.MethodDescriptor.generateFullMethodName;
+import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
+import static io.grpc.stub.ClientCalls.asyncUnaryCall;
+import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
+import static io.grpc.stub.ClientCalls.blockingUnaryCall;
+import static io.grpc.stub.ClientCalls.futureUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncUnaryCall;
+import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
+import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
+
+/**
+ * <pre>
+ * Defining a Service, a Service can have multiple RPC operations
+ * </pre>
+ */
+@javax.annotation.Generated(
+    value = "by gRPC proto compiler (version 1.24.0)",
+    comments = "Source: grpcService.proto")
+public final class updateServiceGrpc {
+
+  private updateServiceGrpc() {}
+
+  public static final String SERVICE_NAME = "src.main.proto.updateService";
+
+  // Static method descriptors that strictly reflect the proto.
+  private static volatile io.grpc.MethodDescriptor<src.main.proto.GrpcService.updateRequest,
+      src.main.proto.GrpcService.updateResponse> getUpdateMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "update",
+      requestType = src.main.proto.GrpcService.updateRequest.class,
+      responseType = src.main.proto.GrpcService.updateResponse.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<src.main.proto.GrpcService.updateRequest,
+      src.main.proto.GrpcService.updateResponse> getUpdateMethod() {
+    io.grpc.MethodDescriptor<src.main.proto.GrpcService.updateRequest, src.main.proto.GrpcService.updateResponse> getUpdateMethod;
+    if ((getUpdateMethod = updateServiceGrpc.getUpdateMethod) == null) {
+      synchronized (updateServiceGrpc.class) {
+        if ((getUpdateMethod = updateServiceGrpc.getUpdateMethod) == null) {
+          updateServiceGrpc.getUpdateMethod = getUpdateMethod =
+              io.grpc.MethodDescriptor.<src.main.proto.GrpcService.updateRequest, src.main.proto.GrpcService.updateResponse>newBuilder()
+              .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName(generateFullMethodName(SERVICE_NAME, "update"))
+              .setSampledToLocalTracing(true)
+              .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+                  src.main.proto.GrpcService.updateRequest.getDefaultInstance()))
+              .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
+                  src.main.proto.GrpcService.updateResponse.getDefaultInstance()))
+              .setSchemaDescriptor(new updateServiceMethodDescriptorSupplier("update"))
+              .build();
+        }
+      }
+    }
+    return getUpdateMethod;
+  }
+
+  /**
+   * Creates a new async stub that supports all call types for the service
+   */
+  public static updateServiceStub newStub(io.grpc.Channel channel) {
+    return new updateServiceStub(channel);
+  }
+
+  /**
+   * Creates a new blocking-style stub that supports unary and streaming output calls on the service
+   */
+  public static updateServiceBlockingStub newBlockingStub(
+      io.grpc.Channel channel) {
+    return new updateServiceBlockingStub(channel);
+  }
+
+  /**
+   * Creates a new ListenableFuture-style stub that supports unary calls on the service
+   */
+  public static updateServiceFutureStub newFutureStub(
+      io.grpc.Channel channel) {
+    return new updateServiceFutureStub(channel);
+  }
+
+  /**
+   * <pre>
+   * Defining a Service, a Service can have multiple RPC operations
+   * </pre>
+   */
+  public static abstract class updateServiceImplBase implements io.grpc.BindableService {
+
+    /**
+     * <pre>
+     * MODIFY HERE: Update the return to streaming return.
+     * </pre>
+     */
+    public void update(src.main.proto.GrpcService.updateRequest request,
+        io.grpc.stub.StreamObserver<src.main.proto.GrpcService.updateResponse> responseObserver) {
+      asyncUnimplementedUnaryCall(getUpdateMethod(), responseObserver);
+    }
+
+    @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
+      return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
+          .addMethod(
+            getUpdateMethod(),
+            asyncUnaryCall(
+              new MethodHandlers<
+                src.main.proto.GrpcService.updateRequest,
+                src.main.proto.GrpcService.updateResponse>(
+                  this, METHODID_UPDATE)))
+          .build();
+    }
+  }
+
+  /**
+   * <pre>
+   * Defining a Service, a Service can have multiple RPC operations
+   * </pre>
+   */
+  public static final class updateServiceStub extends io.grpc.stub.AbstractStub<updateServiceStub> {
+    private updateServiceStub(io.grpc.Channel channel) {
+      super(channel);
+    }
+
+    private updateServiceStub(io.grpc.Channel channel,
+        io.grpc.CallOptions callOptions) {
+      super(channel, callOptions);
+    }
+
+    @java.lang.Override
+    protected updateServiceStub build(io.grpc.Channel channel,
+        io.grpc.CallOptions callOptions) {
+      return new updateServiceStub(channel, callOptions);
+    }
+
+    /**
+     * <pre>
+     * MODIFY HERE: Update the return to streaming return.
+     * </pre>
+     */
+    public void update(src.main.proto.GrpcService.updateRequest request,
+        io.grpc.stub.StreamObserver<src.main.proto.GrpcService.updateResponse> responseObserver) {
+      asyncUnaryCall(
+          getChannel().newCall(getUpdateMethod(), getCallOptions()), request, responseObserver);
+    }
+  }
+
+  /**
+   * <pre>
+   * Defining a Service, a Service can have multiple RPC operations
+   * </pre>
+   */
+  public static final class updateServiceBlockingStub extends io.grpc.stub.AbstractStub<updateServiceBlockingStub> {
+    private updateServiceBlockingStub(io.grpc.Channel channel) {
+      super(channel);
+    }
+
+    private updateServiceBlockingStub(io.grpc.Channel channel,
+        io.grpc.CallOptions callOptions) {
+      super(channel, callOptions);
+    }
+
+    @java.lang.Override
+    protected updateServiceBlockingStub build(io.grpc.Channel channel,
+        io.grpc.CallOptions callOptions) {
+      return new updateServiceBlockingStub(channel, callOptions);
+    }
+
+    /**
+     * <pre>
+     * MODIFY HERE: Update the return to streaming return.
+     * </pre>
+     */
+    public src.main.proto.GrpcService.updateResponse update(src.main.proto.GrpcService.updateRequest request) {
+      return blockingUnaryCall(
+          getChannel(), getUpdateMethod(), getCallOptions(), request);
+    }
+  }
+
+  /**
+   * <pre>
+   * Defining a Service, a Service can have multiple RPC operations
+   * </pre>
+   */
+  public static final class updateServiceFutureStub extends io.grpc.stub.AbstractStub<updateServiceFutureStub> {
+    private updateServiceFutureStub(io.grpc.Channel channel) {
+      super(channel);
+    }
+
+    private updateServiceFutureStub(io.grpc.Channel channel,
+        io.grpc.CallOptions callOptions) {
+      super(channel, callOptions);
+    }
+
+    @java.lang.Override
+    protected updateServiceFutureStub build(io.grpc.Channel channel,
+        io.grpc.CallOptions callOptions) {
+      return new updateServiceFutureStub(channel, callOptions);
+    }
+
+    /**
+     * <pre>
+     * MODIFY HERE: Update the return to streaming return.
+     * </pre>
+     */
+    public com.google.common.util.concurrent.ListenableFuture<src.main.proto.GrpcService.updateResponse> update(
+        src.main.proto.GrpcService.updateRequest request) {
+      return futureUnaryCall(
+          getChannel().newCall(getUpdateMethod(), getCallOptions()), request);
+    }
+  }
+
+  private static final int METHODID_UPDATE = 0;
+
+  private static final class MethodHandlers<Req, Resp> implements
+      io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
+      io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
+      io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
+      io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
+    private final updateServiceImplBase serviceImpl;
+    private final int methodId;
+
+    MethodHandlers(updateServiceImplBase serviceImpl, int methodId) {
+      this.serviceImpl = serviceImpl;
+      this.methodId = methodId;
+    }
+
+    @java.lang.Override
+    @java.lang.SuppressWarnings("unchecked")
+    public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
+      switch (methodId) {
+        case METHODID_UPDATE:
+          serviceImpl.update((src.main.proto.GrpcService.updateRequest) request,
+              (io.grpc.stub.StreamObserver<src.main.proto.GrpcService.updateResponse>) responseObserver);
+          break;
+        default:
+          throw new AssertionError();
+      }
+    }
+
+    @java.lang.Override
+    @java.lang.SuppressWarnings("unchecked")
+    public io.grpc.stub.StreamObserver<Req> invoke(
+        io.grpc.stub.StreamObserver<Resp> responseObserver) {
+      switch (methodId) {
+        default:
+          throw new AssertionError();
+      }
+    }
+  }
+
+  private static abstract class updateServiceBaseDescriptorSupplier
+      implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
+    updateServiceBaseDescriptorSupplier() {}
+
+    @java.lang.Override
+    public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
+      return src.main.proto.GrpcService.getDescriptor();
+    }
+
+    @java.lang.Override
+    public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
+      return getFileDescriptor().findServiceByName("updateService");
+    }
+  }
+
+  private static final class updateServiceFileDescriptorSupplier
+      extends updateServiceBaseDescriptorSupplier {
+    updateServiceFileDescriptorSupplier() {}
+  }
+
+  private static final class updateServiceMethodDescriptorSupplier
+      extends updateServiceBaseDescriptorSupplier
+      implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
+    private final String methodName;
+
+    updateServiceMethodDescriptorSupplier(String methodName) {
+      this.methodName = methodName;
+    }
+
+    @java.lang.Override
+    public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
+      return getServiceDescriptor().findMethodByName(methodName);
+    }
+  }
+
+  private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
+
+  public static io.grpc.ServiceDescriptor getServiceDescriptor() {
+    io.grpc.ServiceDescriptor result = serviceDescriptor;
+    if (result == null) {
+      synchronized (updateServiceGrpc.class) {
+        result = serviceDescriptor;
+        if (result == null) {
+          serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
+              .setSchemaDescriptor(new updateServiceFileDescriptorSupplier())
+              .addMethod(getUpdateMethod())
+              .build();
+        }
+      }
+    }
+    return result;
+  }
+}
diff --git a/src/bgpls_speaker/service/java/netphony-topology/topology.iml b/src/bgpls_speaker/service/java/netphony-topology/topology.iml
new file mode 100644
index 0000000000000000000000000000000000000000..1c913f39aea1a0ef850529a04fc0a331470d3c48
--- /dev/null
+++ b/src/bgpls_speaker/service/java/netphony-topology/topology.iml
@@ -0,0 +1,87 @@
+<!-- Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License. -->
+
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_6" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" type="java-test-resource" />
+      <excludeFolder url="file://$MODULE_DIR$/target" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-jersey-jaxrs:1.5.4" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-jaxrs:1.5.4" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.4.5" level="project" />
+    <orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.12" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.4.5" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.4.5" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.woodstox:stax2-api:3.1.4" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-core:1.5.4" level="project" />
+    <orderEntry type="library" name="Maven: org.apache.commons:commons-lang3:3.2.1" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-models:1.5.4" level="project" />
+    <orderEntry type="library" name="Maven: io.swagger:swagger-annotations:1.5.4" level="project" />
+    <orderEntry type="library" name="Maven: javax.validation:validation-api:1.1.0.Final" level="project" />
+    <orderEntry type="library" name="Maven: javax.ws.rs:jsr311-api:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.reflections:reflections:0.9.10" level="project" />
+    <orderEntry type="library" name="Maven: org.javassist:javassist:3.19.0-GA" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.findbugs:annotations:2.0.1" level="project" />
+    <orderEntry type="library" name="Maven: com.google.guava:guava:18.0" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.4.5" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.jaxrs:jackson-jaxrs-base:2.4.5" level="project" />
+    <orderEntry type="library" name="Maven: javax.servlet:servlet-api:2.5" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.jersey:jersey-client:1.18.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.jersey:jersey-json:1.19" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jettison:jettison:1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.xml.bind:jaxb-impl:2.2.3-1" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.bind:jaxb-api:2.2.2" level="project" />
+    <orderEntry type="library" name="Maven: javax.xml.stream:stax-api:1.0-2" level="project" />
+    <orderEntry type="library" name="Maven: javax.activation:activation:1.1" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-core-asl:1.9.2" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-mapper-asl:1.9.2" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-jaxrs:1.9.2" level="project" />
+    <orderEntry type="library" name="Maven: org.codehaus.jackson:jackson-xc:1.9.2" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.jersey:jersey-core:1.18.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.jersey:jersey-servlet:1.18.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.jersey:jersey-server:1.18.1" level="project" />
+    <orderEntry type="library" name="Maven: com.sun.jersey.contribs:jersey-multipart:1.18.1" level="project" />
+    <orderEntry type="library" name="Maven: org.jvnet.mimepull:mimepull:1.9.3" level="project" />
+    <orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.21" level="project" />
+    <orderEntry type="library" name="Maven: es.tid.netphony:network-protocols:1.3.3" level="project" />
+    <orderEntry type="library" name="Maven: org.jgrapht:jgrapht-core:0.9.1" level="project" />
+    <orderEntry type="library" name="Maven: com.google.code.gson:gson:2.2.2" level="project" />
+    <orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
+    <orderEntry type="library" name="Maven: junit:junit:4.10" level="project" />
+    <orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
+    <orderEntry type="library" name="Maven: com.metaparadigm:json-rpc:1.0" level="project" />
+    <orderEntry type="library" name="Maven: redis.clients:jedis:2.1.0" level="project" />
+    <orderEntry type="library" name="Maven: commons-pool:commons-pool:1.5.5" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.4.2" level="project" />
+    <orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-joda:2.1.5" level="project" />
+    <orderEntry type="library" name="Maven: joda-time:joda-time:2.3" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-server:9.3.8.v20160314" level="project" />
+    <orderEntry type="library" name="Maven: javax.servlet:javax.servlet-api:3.1.0" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.3.8.v20160314" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.3.8.v20160314" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.3.8.v20160314" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-servlet:9.3.8.v20160314" level="project" />
+    <orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-security:9.3.8.v20160314" level="project" />
+  </component>
+</module>
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/tools/DiscoveredDBManager.py b/src/bgpls_speaker/service/tools/DiscoveredDBManager.py
new file mode 100644
index 0000000000000000000000000000000000000000..ecd46347f729cd569999abd910e53825b550f69d
--- /dev/null
+++ b/src/bgpls_speaker/service/tools/DiscoveredDBManager.py
@@ -0,0 +1,265 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#      http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from typing import List
+from bgpls_speaker.service.tools.Tools import UpdateRequest,NodeInfo,LinkInfo
+from common.proto.bgpls_pb2 import NodeDescriptors
+from common.proto.context_pb2 import ContextId, ContextList,Topology,TopologyId,Device,DeviceDriverEnum,ContextId,Empty, TopologyList
+from common.Constants import DEFAULT_CONTEXT_NAME
+from common.tools.object_factory.Context import json_context_id
+from context.client.ContextClient import ContextClient
+
+import logging
+LOGGER = logging.getLogger(__name__)
+
+class DiscoveredDBManager:
+    def __init__(self):
+        self.discoveredDB=[]
+        # Añadir topoDB
+
+    def AddToDB(self,update_request : UpdateRequest):
+        """
+        Add BGP Update message to discoveredDB. Checks if node exists in discoveredDB.
+        TODO: check if node exists in context
+        """
+        # TODO: with self.lock
+        # Check if node info message
+        if(self.checkIfNodeInUpdate(update_request)):
+            # Check if node exists
+            to_add=True
+            for node in update_request.nodes:
+                if(self.CheckIfNodeNameInDb(node) or CheckIfNodeInContext(node.node_name)):
+                    # Replace info from node if exists
+                    LOGGER.debug("(AddToDB) Node already in DB!!!")
+                    to_add=False
+                else:
+                    LOGGER.debug("(AddToDB) Node NOT in DB!!!")
+            if(to_add):
+                self.discoveredDB.append(update_request)
+        else:
+            # is a link
+            # Compare and update
+            self.discoveredDB.append(update_request)
+            LOGGER.debug("(AddToDB) Actual DB: ")
+            LOGGER.debug("%s", [up.toString() for up in self.discoveredDB])
+        return True
+    
+    def GetDiscoveredDB(self):
+        return self.discoveredDB
+    
+    def checkIfNodeInUpdate(self,update_request : UpdateRequest):
+        """
+        Returns true if the update message contains a node info type .
+        """
+        if(update_request.nodes):
+            return True
+        return False
+    
+    
+    def CheckIfNodeNameInDb(self,new_node : NodeInfo) -> bool:
+        """
+        Returns true if new node is in the discovered data base already
+        """
+        for update in self.discoveredDB:
+            for node in update.nodes:
+                if(node.igp_id==new_node.igp_id):
+                    return True
+        return False
+    
+    def GetNodeNamesFromDiscoveredDB(self):
+        """
+        Return a list of node_names from the current discovered devices
+        saved in the discoveredDB
+        """
+        node_list =[update_request.nodes for update_request in self.discoveredDB if update_request.nodes]
+        # LOGGER.info("nodes (GetNodeNamesFromDiscoveredDB) %s",node_list )
+        # Inside an update there is a list of nodes , TODO posible FIX:
+        node_info= [node for nodes in node_list for node in nodes]
+        return [node.node_name for node in node_info]
+    
+    def GetNodesFromDiscoveredDB(self):
+        """
+        Return a list of nodes of class type: tools.NodeInfo from the current discovered devices
+        saved in the discoveredDB. Skips the ones already addded to context.
+        """
+
+        node_list =[update_request.nodes for update_request in self.discoveredDB if update_request.nodes]
+        return [node for nodes in node_list for node in nodes if (not CheckIfNodeInContext(node.node_name))]
+    
+    def GetLinksFromDiscoveredDB(self):
+        """
+        Return a list of links of class type: tools.LinkInfo from the current discovered links
+        saved in the discoveredDB
+        """
+        link_list= [update_request.links for update_request in self.discoveredDB if update_request.links]
+        return [link for links in link_list for link in links]
+    
+    def UpdateDiscoveredDBWithContext(self):
+        """
+        Check if device discovered by bgpls is already in the topology.
+        """
+        # device_names,device_ips=AddContextDevices(context_client)
+        return True
+    
+    def GetNodeNameFromLinkId(self,link_igpid):
+        """
+        Return the node name given an igp id if exists in the discoveredDB.   
+        """
+        for update in self.discoveredDB:
+            for node in update.nodes:
+                if(node.igp_id==link_igpid):
+                    return node.node_name
+        return None
+    
+    def GetIgpIdFromNodeName(self,name):
+        """
+        Return the IGP ID given a node name if exists in the discoveredDB.   
+        """
+        for update in self.discoveredDB:
+            for node in update.nodes:
+                if(node.node_name==name):
+                    return node.igp_id
+        return None
+    
+    def UpdateNodeNameInLink(self):
+        """
+        Check if the igp id has a node name asigned in the discoveredDB and
+        assign it to the NodeDescriptor name.
+        """
+        for update in self.discoveredDB:
+            for link in update.links:
+                if(self.GetNodeNameFromLinkId(link.local_id) is not None):
+                    LOGGER.info("(UpdateNodeNameInLink) local %s:  %s",link.local_id, self.GetNodeNameFromLinkId(link.local_id))
+                    link.local.node_name=self.GetNodeNameFromLinkId(link.local_id)
+                else:
+                     link.local.node_name=link.local_id
+                if(self.GetNodeNameFromLinkId(link.remote_id) is not None):
+                    LOGGER.info("(UpdateNodeNameInLink) remote %s:  %s",link.remote_id, self.GetNodeNameFromLinkId(link.remote_id))
+                    link.remote.node_name=self.GetNodeNameFromLinkId(link.remote_id)
+                else:
+                    link.remote.node_name=link.remote_id
+        return True
+
+    def RemoveLinkFromDB(self):
+        """
+        Removes a link from the DB if matches the source and the destination.
+        """
+        return True
+    
+    def FindConnectedNodes(self,new_node):
+        """
+        Returns a list of nodes connected to the actual node using the discovered 
+        link list and comparing de IGP ID. Returns None in case there are no connections.
+        """
+        # find links where the node appears
+        links_to_node=[]
+        nodes_conected=[]
+        for update in self.discoveredDB:
+            for link in update.links:
+                LOGGER.debug("(FindConnectedNodes) link in up:%s %s",
+                             link.local_id, link.remote_id)
+                LOGGER.debug("(FindConnectedNodes) comparing ...:%s",new_node)
+                if(link.local_id == new_node):
+                    links_to_node.append(link)
+                    nodes_conected.append(link.remote.node_name)
+                if(link.remote_id == new_node):
+                    links_to_node.append(link)
+                    nodes_conected.append(link.local.node_name)
+        
+        if(nodes_conected):
+            LOGGER.debug("(FindConnectedNodes) links to local node:%s",new_node)
+            LOGGER.debug("(FindConnectedNodes) %s", nodes_conected)
+            return nodes_conected
+        LOGGER.debug("(FindConnectedNodes) NO LINKS TO OTHER NODES")
+        return None
+
+    def DeleteNodeFromDiscoveredDB(self, node_name) -> bool:
+        """
+        Deletes a node from de DiscoveredDB given the node name. TODO: igpid¿
+        """
+        LOGGER.info("(DeleteNodeFromDiscoveredDB)")
+        
+        for i,update in enumerate(self.discoveredDB):
+            for node in update.nodes:
+                if(node_name==node.node_name):
+                    del self.discoveredDB[i]
+        return True
+
+def AddContextDevicesFull(context_client : ContextClient) -> bool:
+    """
+    debug purposes
+    """
+    LOGGER.info("(AddContextDevices)")
+    contexts : ContextList = context_client.ListContexts(Empty())
+    for context_ in contexts.contexts:
+        context_uuid : str = context_.context_id.context_uuid.uuid
+        context_name : str = context_.name
+        topologies : TopologyList = context_client.ListTopologies(context_.context_id)
+    # topologies : TopologyList=context_client.ListTopologies(context_client)
+        for topology_ in topologies.topologies:
+            #topology_uuid : str = topology_.topology_id.topology_uuid.uuid
+            topology_name : str = topology_.name
+            context_topology_name  = 'Context({:s}):Topology({:s})'.format(context_name, topology_name)
+            # Topos=context.GetTopology(list_topo.topology_id)
+            LOGGER.debug("topo (AddContextDevices) %s",topology_)
+            # details=context_client.GetTopologyDetails(topology_.topology_id)
+            # LOGGER.info("details (AddContextDevices) %s",details)
+            devices=context_client.ListDevices(Empty())
+            # LOGGER.info("devices (driverSettings) %s",devices)
+            device_names=[]
+            device_ips=[]
+            for device_ in devices.devices:
+                LOGGER.info("device_ (AddContextDevices) %s",device_.name)
+                device_names.append(device_.name)
+                for config_rule_ in device_.device_config.config_rules:
+                    if config_rule_.custom.resource_key == "_connect/address":
+                        LOGGER.info("device_.resource_value-addr (driverSettings) %s",
+                        config_rule_.custom.resource_value)
+                        device_ips=config_rule_.custom.resource_value
+                        
+        return device_names,device_ips
+
+def GetContextDevices(context_client : ContextClient) -> bool:
+    """
+    Returns de device name and its corresponding device_ip existing in context.
+    """
+    LOGGER.info("(AddContextDevices)")
+    devices=context_client.ListDevices(Empty())
+    device_names=[]
+    device_ips=[]
+    for device_ in devices.devices:
+        LOGGER.debug("device_ (AddContextDevices) %s",device_.name)
+        device_names.append(device_.name)
+        for config_rule_ in device_.device_config.config_rules:
+            if config_rule_.custom.resource_key == "_connect/address":
+                # LOGGER.info("device_.resource_value-addr (driverSettings) %s",
+                # config_rule_.custom.resource_value)
+                device_ips=config_rule_.custom.resource_value
+                    
+    return device_names,device_ips
+
+def CheckIfNodeInContext(node_name) -> bool:
+    """
+    Returns true if the node exists in the context.
+    """
+    context_client=ContextClient()
+    context_client.connect()
+    device_names,device_ips=GetContextDevices(context_client)
+    LOGGER.info("(CheckIfNodeInContext) device_names: %s nodena %s",device_names,node_name)
+    for node in device_names:
+        if(node==node_name):
+            LOGGER.info("(CheckIfNodeInContext) Node already in context")
+            return True
+    LOGGER.info("(CheckIfNodeInContext) Node NOT in context")
+    return False
diff --git a/src/bgpls_speaker/service/tools/GrpcServer.py b/src/bgpls_speaker/service/tools/GrpcServer.py
new file mode 100644
index 0000000000000000000000000000000000000000..edcede6d96034192f62e8eae30528b229d0db512
--- /dev/null
+++ b/src/bgpls_speaker/service/tools/GrpcServer.py
@@ -0,0 +1,170 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import json, logging,threading, queue,time,signal
+from datetime import datetime, timedelta
+from typing import Any, Iterator, List, Optional, Tuple, Union
+
+import logging,threading
+import grpc
+
+from bgpls_speaker.service.tools.DiscoveredDBManager import DiscoveredDBManager
+from .protos import grpcService_pb2_grpc
+from .protos import grpcService_pb2
+from .Tools import UpdateRequest
+
+from concurrent import futures
+import os
+import subprocess
+from multiprocessing import Pool
+import logging
+
+from .JavaRunner import JavaRunner
+
+LOGGER = logging.getLogger(__name__)
+
+_ONE_DAY_IN_SECONDS = 60 * 60 * 24
+SERVER_ADDRESS = 'localhost:2021'
+
+class GrpcServer():
+
+    """
+    This class gets the current topology from a bgps speaker module in java 
+    and updates the posible new devices to add in the context topology.
+    Needs the address, port and as_number from the device that will provide the information via bgpls
+    to the java module.
+    """
+    def __init__(self,DiscoveredDB : DiscoveredDBManager) -> None: # pylint: disable=super-init-not-called
+        self.__lock = threading.Lock()
+        self.__started = threading.Event()
+        self.__terminate = threading.Event()
+        self.__out_samples = queue.Queue()
+        self.__server=grpc.aio.server()
+        self.__javaLocalPort=0 
+        self.__mngPort=0 
+        self.__runnerList=[]
+        self.__discoveredDB=DiscoveredDB
+    
+    def ConnectThread(self) -> bool:
+        if self.__started.is_set(): return True
+        self.__started.set() 
+        self.__server = grpc.server(futures.ThreadPoolExecutor(max_workers=10))
+        grpcService_pb2_grpc.add_updateServiceServicer_to_server(self, self.__server)
+        self.__server.add_insecure_port(SERVER_ADDRESS)
+        LOGGER.info("Starting server on %s", SERVER_ADDRESS)
+        self.__server.start()
+        try:
+            while True:
+                time.sleep(_ONE_DAY_IN_SECONDS)
+        except KeyboardInterrupt:
+            LOGGER.info("DISCONNECT")
+            self.Disconnect()
+        return True
+
+    def Connect(self):
+        grpcThread = threading.Thread(target=self.ConnectThread)
+        grpcThread.start()
+        return True
+
+    def Disconnect(self) -> bool:
+        self.__terminate.set()
+        if not self.__started.is_set(): return True
+        LOGGER.info("Keyboard interrupt, stop server")
+        self.__server.stop(0)
+        return True
+
+    def update(self,request, context) -> bool:
+        """
+        Processes the messages recived by de grpc server
+        """
+        with self.__lock:
+            LOGGER.info("(server) Update message from bgpls speaker: \n %s" % (request))
+            response = grpcService_pb2.updateResponse(ack="OK")
+            update_request = UpdateRequest.from_proto(request)
+            self.__discoveredDB.AddToDB(update_request)
+            return response
+    
+    def connectToJavaBgpls(self, address : str = "10.95.86.214", port : str = "179", asNumber : str = "65006"):
+        self.setLocalPort()
+        runner = JavaRunner(self.__javaLocalPort,address,self.__mngPort)
+        runner.setAsNumber(asNumber)
+        runner.setPort(port)
+        runner.setPeer()
+        process=runner.execBGPLSpeaker()
+        self.__runnerList.append(runner)
+
+        return process.pid
+
+    def terminateRunners(self):
+        for runner in self.__runnerList:
+            runner.endBGPSpeaker()
+        return True
+    
+    def terminateGrpcServer(self):
+        LOGGER.debug("Terminating java programs...")
+        self.terminateRunners()
+        LOGGER.debug("Disconnecting grpc server...")
+        self.Disconnect() 
+        return True
+
+    def terminateRunnerById(self,speaker_id):
+        """
+        Disconnect from BGP-LS speaker given an speaker Id. Its the same
+        as the java running proccess PID.
+        """
+        for runner in self.__runnerList:
+            if(runner.getPid()==speaker_id):
+                runner.endBGPSpeaker()
+                self.__runnerList.remove(runner)
+        return True
+        
+    def setLocalPort(self,initPort=12179):
+        """
+        If java already running add 1 to current used port,
+        else initialize port .
+        initPort --> BGP4Port, usually 179 corresponding to BGP
+        """
+        with self.__lock:
+            if(self.__runnerList):
+                LOGGER.debug("Port exists %s",self.__javaLocalPort)
+                lastRunner=self.__runnerList[-1]
+                self.__javaLocalPort=lastRunner.getCurrentLocalPort()+1
+                self.__mngPort=lastRunner.getCurrentMngPort()+1
+            else:
+                LOGGER.debug("Port DONT exists %s",self.__javaLocalPort)
+                self.__javaLocalPort=initPort
+                self.__mngPort=1112
+            return self.__javaLocalPort
+        
+    def getSpeakerListIds(self):
+        return [runner.getPid() for runner in self.__runnerList]
+
+    def getSpeakerFromId(self,speaker_id):
+        """
+        Returns address,as_number,peer_port
+        """
+        for runner in self.__runnerList:
+            if(runner.getPid()==speaker_id):
+                return runner.getRunnerInfo()
+        return None
+    
+    def getSpeakerIdFromIpAddr(self,addr):
+        """
+        Returns Id from the speaker IP Address
+        """
+        for runner in self.__runnerList:
+            ip_addr,asN,port=runner.getRunnerInfo()
+            if(ip_addr==addr):
+                return runner.getPid()
+        return
diff --git a/src/bgpls_speaker/service/tools/JavaRunner.py b/src/bgpls_speaker/service/tools/JavaRunner.py
new file mode 100644
index 0000000000000000000000000000000000000000..7bc99e3dd3fcc2c3059626b166536b6f0a696772
--- /dev/null
+++ b/src/bgpls_speaker/service/tools/JavaRunner.py
@@ -0,0 +1,107 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import json, logging,threading, queue,time,signal
+from datetime import datetime, timedelta
+from typing import Any, Iterator, List, Optional, Tuple, Union
+import logging
+import grpc
+
+from concurrent import futures
+from lxml import etree
+import os
+import subprocess
+from multiprocessing import Pool
+
+SERVER_ADDRESS = 'localhost:2021'
+SERVER_ID = 1
+_ONE_DAY_IN_SECONDS = 60 * 60 * 24
+
+XML_FILE="/var/teraflow/bgpls_speaker/service/java/BGP4Parameters_3.xml"
+XML_CONFIG_FILE="BGP4Parameters_3.xml"
+
+LOGGER = logging.getLogger(__name__)
+
+class JavaRunner:
+
+    def __init__(self,localPort : int, address : str ="", mngPort : int = 1112):
+        self.__peerPort=179
+        self.__localPort=localPort 
+        self.__managementPort=mngPort
+        self.__configFile=XML_CONFIG_FILE
+        self.__process=0
+        self.__lock = threading.Lock()
+        self.__address = address
+        self.__portConf=5007
+        self.__asNumber=65000
+
+    def getCurrentLocalPort(self):
+        with self.__lock:
+            return self.__localPort
+
+    def getCurrentMngPort(self):
+        with self.__lock:
+            return self.__managementPort
+    def getPid(self):
+        return self.__process.pid
+
+    def execBGPLSpeaker(self) -> bool:
+            """
+            Executes java BGPLS speaker in non-blocking process
+            """
+            LOGGER.debug("Before exec")
+            os.chdir("/var/teraflow/bgpls_speaker/service/java/")
+            self.__process=subprocess.Popen(['java' , '-jar' , 'bgp_ls.jar' , XML_CONFIG_FILE],
+                shell=False,start_new_session=True)
+            return self.__process
+
+    def setPort(self,port):
+         self.__peerPort=port
+         return True
+    def setAsNumber(self,asNumber):
+         self.__asNumber=asNumber
+         return True
+
+    def setPeer(self) -> bool:
+            """
+            Sets XML existing config file with peer address and port. TODO: as_number
+            """
+
+            XMLParser = etree.XMLParser(remove_blank_text=False)
+            tree = etree.parse(XML_FILE, parser=XMLParser)
+            root = tree.getroot()
+            peerAddress = root.find(".//peer")
+            peerAddress.text=self.__address
+            peerPort = root.find(".//peerPort")
+            peerPort.text=str(self.__peerPort)
+            localPort = root.find(".//BGP4Port")
+            localPort.text=str(self.__localPort)
+            myAutonomousSystem = root.find(".//myAutonomousSystem")
+            myAutonomousSystem.text=str(self.__asNumber)
+            managePort = root.find(".//BGP4ManagementPort")
+            managePort.text=str(self.__managementPort)
+            tree.write(XML_FILE) #with ... as ..
+            return True
+
+    def endBGPSpeaker(self) -> bool:
+            """
+            Kills java program connected to BGPLS Speaker with SIGKILL signal
+            """
+            LOGGER.debug("sending kill signal to process %s",self.__process.pid)
+            LOGGER.debug("PID: %d",self.__process.pid)
+            self.__process.kill()
+            return True
+    
+    def getRunnerInfo(self):
+         return self.__address,self.__asNumber,self.__peerPort
diff --git a/src/bgpls_speaker/service/tools/Tools.py b/src/bgpls_speaker/service/tools/Tools.py
new file mode 100644
index 0000000000000000000000000000000000000000..adf7dcb44d777c2a06e32f69493c2e8d5a4972f5
--- /dev/null
+++ b/src/bgpls_speaker/service/tools/Tools.py
@@ -0,0 +1,193 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#      http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from .protos import grpcService_pb2_grpc
+from .protos import grpcService_pb2
+
+import logging
+LOGGER = logging.getLogger(__name__)
+import os
+
+# AUTOGENERATED
+class UpdateRequest:
+    def __init__(self, address_family_id, next_hop, as_path_segment, nodes, links):
+        self.address_family_id = address_family_id
+        self.next_hop = next_hop
+        self.as_path_segment = as_path_segment
+        self.nodes = nodes
+        self.links = links
+    
+    @classmethod
+    def from_proto(cls, update_request):
+        nodes = []
+        for node in update_request.node:
+            nodes.append(NodeInfo.from_proto(node))
+
+        links = []
+        for link in update_request.link:
+            links.append(LinkInfo.from_proto(link))
+
+        return cls(
+            address_family_id=update_request.addressFamilyID,
+            next_hop=update_request.nextHop,
+            as_path_segment=update_request.asPathSegment,
+            nodes=nodes,
+            links=links
+        )
+    def toString(self):
+      # Debug purposes
+      out = ""
+      out+=self.address_family_id
+      out+=self.next_hop
+      out+=self.as_path_segment
+
+      for node in self.nodes:
+          out+=node.node_name
+          out+=node.igp_id
+          out+=str(node.bgpls_id)
+          out+=str(node.as_id)
+      for link in self.links:
+          out+=link.remote_id
+          out+=link.local_id
+          out+=link.remote_ipv4_id
+          out+=link.local_ipv4_id
+          out+=str(link.local.as_number)
+          out+=link.local.bgpls_id
+          out+=link.remote.as_number
+          out+=link.remote.bgpls_id
+          out+=str(link.available_bw)
+          out+=str(link.residual_bw)
+          out+=str(link.utilized)
+          out+=str(link.max_link_delay)
+          out+=str(link.min_link_delay)
+          out+=str(link.delay_variation)
+          out+=str(link.delay)
+          out+=str(link.te_default_metric)
+          out+=str(link.adjacency_sid)
+      return out
+
+class NodeInfo:
+    def __init__(self, node_name, igp_id, bgpls_id, as_id,learnt_from):
+        self.node_name = node_name.strip("/")
+        self.igp_id = igp_id.strip("/")
+        self.bgpls_id = bgpls_id.strip("/")
+        self.as_id = as_id
+        self.learnt_from=learnt_from
+    
+    @classmethod
+    def from_proto(cls, proto_node):
+        return cls(
+            node_name=proto_node.nodeName,
+            igp_id=proto_node.igpID,
+            bgpls_id=proto_node.bgplsID,
+            as_id=proto_node.asID,
+            learnt_from=proto_node.learntFrom
+        )
+
+class LinkInfo:
+    def __init__(self, remote_id, local_id, remote_ipv4_id, local_ipv4_id, local, remote, available_bw, residual_bw, utilized, max_link_delay, min_link_delay, delay_variation, delay, te_default_metric, adjacency_sid,learnt_from):
+        self.remote_id = remote_id.strip("/")
+        self.local_id = local_id.strip("/")
+        self.remote_ipv4_id = remote_ipv4_id.strip("/")
+        self.local_ipv4_id = local_ipv4_id.strip("/")
+        self.local = local
+        self.remote = remote
+        self.available_bw = available_bw
+        self.residual_bw = residual_bw
+        self.utilized = utilized
+        self.max_link_delay = max_link_delay
+        self.min_link_delay = min_link_delay
+        self.delay_variation = delay_variation
+        self.delay = delay
+        self.te_default_metric = te_default_metric
+        self.adjacency_sid = adjacency_sid
+        self.learnt_from=learnt_from
+    
+    @classmethod
+    def from_proto(cls, proto_link):
+        return cls(
+            remote_id=proto_link.remoteID,
+            local_id=proto_link.localID,
+            remote_ipv4_id=proto_link.remoteIPv4ID,
+            local_ipv4_id=proto_link.localIPv4ID,
+            local=NodeDescriptors.from_proto(proto_link.local),
+            remote=NodeDescriptors.from_proto(proto_link.remote),
+            available_bw=proto_link.availableBw,
+            residual_bw=proto_link.residualBw,
+            utilized=proto_link.utilized,
+            max_link_delay=proto_link.maxLinkDelay,
+            min_link_delay=proto_link.minLinkDelay,
+            delay_variation=proto_link.delayVariation,
+            delay=proto_link.delay,
+            te_default_metric=proto_link.TEDefaultMetric,
+            adjacency_sid=proto_link.adjacencySid,
+            learnt_from=proto_link.learntFrom
+        )
+
+class NodeDescriptors:
+    def __init__(self, as_number, bgpls_id):
+        self.as_number = as_number
+        self.bgpls_id = bgpls_id
+        self.node_name=None
+    @classmethod
+    def from_proto(cls, descriptor):
+        return cls(
+            as_number=descriptor.asNumber,
+            bgpls_id=descriptor.bgplsID
+        )
+
+
+
+"""
+message Device {
+  DeviceId device_id = 1;
+  string name = 2;
+  string device_type = 3;
+  DeviceConfig device_config = 4;
+  DeviceOperationalStatusEnum device_operational_status = 5;
+  repeated DeviceDriverEnum device_drivers = 6;
+  repeated EndPoint device_endpoints = 7;
+  repeated Component component = 8; // Used for inventory
+}
+message DeviceId {
+  Uuid device_uuid = 1;
+}
+message TopologyId {
+  ContextId context_id = 1;
+  Uuid topology_uuid = 2;
+}
+
+message Topology {
+  TopologyId topology_id = 1;
+  string name = 2;
+  repeated DeviceId device_ids = 3;
+  repeated LinkId link_ids = 4;
+}
+
+message TopologyDetails {
+  TopologyId topology_id = 1;
+  string name = 2;
+  repeated Device devices = 3;
+  repeated Link links = 4;
+}
+message LinkId {
+  Uuid link_uuid = 1;
+}
+
+message Link {
+  LinkId link_id = 1;
+  string name = 2;
+  repeated EndPointId link_endpoint_ids = 3;
+}
+"""
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/tools/__init__.py b/src/bgpls_speaker/service/tools/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..38d04994fb0fa1951fb465bc127eb72659dc2eaf
--- /dev/null
+++ b/src/bgpls_speaker/service/tools/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/src/bgpls_speaker/service/tools/json_loader.py b/src/bgpls_speaker/service/tools/json_loader.py
new file mode 100644
index 0000000000000000000000000000000000000000..21670f685e0061f7a192cc79f31fdb5d19a600fd
--- /dev/null
+++ b/src/bgpls_speaker/service/tools/json_loader.py
@@ -0,0 +1,42 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+
+#      http://www.apache.org/licenses/LICENSE-2.0
+
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import json
+
+def getInterfaceFromJson():
+    json_file = open('interfaces.json', 'r',encoding='utf-8')
+    interface_data = json.load(json_file)
+    return interface_data
+
+def getInterfaceFromNodeNames(json_file,node_name_src,node_name_dst):
+
+    interface_src=[]
+    interface_dst=[]
+    for device in json_file['devices']:
+        print("dev: %s",device.keys())
+        if device['name'] == node_name_src:
+            interface_src=list(device['links'].keys())[list(device['links'].values()).index(node_name_dst)]
+        if device['name'] == node_name_dst:
+            interface_dst=list(device['links'].keys())[list(device['links'].values()).index(node_name_src)]
+
+    return interface_src,interface_dst
+    
+
+if __name__ == "__main__":
+    data=getInterfaceFromJson()
+    print("data: %s",data['devices'])
+    # for device in data['devices']:
+    #     print(device['interfaces'].keys())
+
+    print(getInterfaceFromNodeNames(data,"HL2-2-1","HL2-2-2"))
\ No newline at end of file
diff --git a/src/bgpls_speaker/service/tools/protos/grpcService.proto b/src/bgpls_speaker/service/tools/protos/grpcService.proto
new file mode 100644
index 0000000000000000000000000000000000000000..7aba63912a394c83647cd65d947b500f9230f27a
--- /dev/null
+++ b/src/bgpls_speaker/service/tools/protos/grpcService.proto
@@ -0,0 +1,81 @@
+// Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+package src.main.proto;
+
+//el modulo java abre la comunicacion
+//cliente(java) manda la info al servidor(python)
+//el modulo en python responde con ok
+
+message updateRequest {
+
+	string addressFamilyID = 1;
+	string nextHop = 2;
+	string asPathSegment = 3;
+
+  	repeated nodeInfo node = 4;
+  	// repeated : se da la posibilidad de mandar 0 o varios
+  	repeated linkInfo link = 5;
+	}
+
+message nodeInfo{
+	string nodeName=1;
+	string igpID=2;
+	string bgplsID=3;
+	int32 asID=4;
+	string learntFrom = 5;
+}
+
+message linkInfo{
+
+	string remoteID=1;
+	string localID=2;
+
+	string remoteIPv4ID=3;
+	string localIPv4ID=4;
+
+	NodeDescriptors local=5;
+	NodeDescriptors remote=6;
+
+	float availableBw=7;
+	float residualBw = 8;
+	float utilized = 9;
+
+	float maxLinkDelay = 10;
+	float minLinkDelay = 11;
+	float delayVariation = 12;
+	float delay = 13;
+
+	int32 TEDefaultMetric = 14;
+	string adjacencySid = 15;
+
+	string learntFrom = 16;
+
+}
+
+message NodeDescriptors{
+	string asNumber=1;
+	string bgplsID=2;
+}
+
+message updateResponse {
+  string ack = 1;
+}
+
+// Defining a Service, a Service can have multiple RPC operations
+service updateService {
+  // MODIFY HERE: Update the return to streaming return.
+  rpc update(updateRequest) returns (updateResponse);
+}
diff --git a/src/bgpls_speaker/service/tools/protos/grpcService_pb2.py b/src/bgpls_speaker/service/tools/protos/grpcService_pb2.py
new file mode 100644
index 0000000000000000000000000000000000000000..f219859999a97087966886770d4208b8bcb71464
--- /dev/null
+++ b/src/bgpls_speaker/service/tools/protos/grpcService_pb2.py
@@ -0,0 +1,77 @@
+# -*- coding: utf-8 -*-
+# Generated by the protocol buffer compiler.  DO NOT EDIT!
+# source: grpcService.proto
+"""Generated protocol buffer code."""
+from google.protobuf import descriptor as _descriptor
+from google.protobuf import descriptor_pool as _descriptor_pool
+from google.protobuf import message as _message
+from google.protobuf import reflection as _reflection
+from google.protobuf import symbol_database as _symbol_database
+# @@protoc_insertion_point(imports)
+
+_sym_db = _symbol_database.Default()
+
+
+
+
+DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x11grpcService.proto\x12\x0esrc.main.proto\"\xa0\x01\n\rupdateRequest\x12\x17\n\x0f\x61\x64\x64ressFamilyID\x18\x01 \x01(\t\x12\x0f\n\x07nextHop\x18\x02 \x01(\t\x12\x15\n\rasPathSegment\x18\x03 \x01(\t\x12&\n\x04node\x18\x04 \x03(\x0b\x32\x18.src.main.proto.nodeInfo\x12&\n\x04link\x18\x05 \x03(\x0b\x32\x18.src.main.proto.linkInfo\"^\n\x08nodeInfo\x12\x10\n\x08nodeName\x18\x01 \x01(\t\x12\r\n\x05igpID\x18\x02 \x01(\t\x12\x0f\n\x07\x62gplsID\x18\x03 \x01(\t\x12\x0c\n\x04\x61sID\x18\x04 \x01(\x05\x12\x12\n\nlearntFrom\x18\x05 \x01(\t\"\x8a\x03\n\x08linkInfo\x12\x10\n\x08remoteID\x18\x01 \x01(\t\x12\x0f\n\x07localID\x18\x02 \x01(\t\x12\x14\n\x0cremoteIPv4ID\x18\x03 \x01(\t\x12\x13\n\x0blocalIPv4ID\x18\x04 \x01(\t\x12.\n\x05local\x18\x05 \x01(\x0b\x32\x1f.src.main.proto.NodeDescriptors\x12/\n\x06remote\x18\x06 \x01(\x0b\x32\x1f.src.main.proto.NodeDescriptors\x12\x13\n\x0b\x61vailableBw\x18\x07 \x01(\x02\x12\x12\n\nresidualBw\x18\x08 \x01(\x02\x12\x10\n\x08utilized\x18\t \x01(\x02\x12\x14\n\x0cmaxLinkDelay\x18\n \x01(\x02\x12\x14\n\x0cminLinkDelay\x18\x0b \x01(\x02\x12\x16\n\x0e\x64\x65layVariation\x18\x0c \x01(\x02\x12\r\n\x05\x64\x65lay\x18\r \x01(\x02\x12\x17\n\x0fTEDefaultMetric\x18\x0e \x01(\x05\x12\x14\n\x0c\x61\x64jacencySid\x18\x0f \x01(\t\x12\x12\n\nlearntFrom\x18\x10 \x01(\t\"4\n\x0fNodeDescriptors\x12\x10\n\x08\x61sNumber\x18\x01 \x01(\t\x12\x0f\n\x07\x62gplsID\x18\x02 \x01(\t\"\x1d\n\x0eupdateResponse\x12\x0b\n\x03\x61\x63k\x18\x01 \x01(\t2X\n\rupdateService\x12G\n\x06update\x12\x1d.src.main.proto.updateRequest\x1a\x1e.src.main.proto.updateResponseb\x06proto3')
+
+
+
+_UPDATEREQUEST = DESCRIPTOR.message_types_by_name['updateRequest']
+_NODEINFO = DESCRIPTOR.message_types_by_name['nodeInfo']
+_LINKINFO = DESCRIPTOR.message_types_by_name['linkInfo']
+_NODEDESCRIPTORS = DESCRIPTOR.message_types_by_name['NodeDescriptors']
+_UPDATERESPONSE = DESCRIPTOR.message_types_by_name['updateResponse']
+updateRequest = _reflection.GeneratedProtocolMessageType('updateRequest', (_message.Message,), {
+  'DESCRIPTOR' : _UPDATEREQUEST,
+  '__module__' : 'grpcService_pb2'
+  # @@protoc_insertion_point(class_scope:src.main.proto.updateRequest)
+  })
+_sym_db.RegisterMessage(updateRequest)
+
+nodeInfo = _reflection.GeneratedProtocolMessageType('nodeInfo', (_message.Message,), {
+  'DESCRIPTOR' : _NODEINFO,
+  '__module__' : 'grpcService_pb2'
+  # @@protoc_insertion_point(class_scope:src.main.proto.nodeInfo)
+  })
+_sym_db.RegisterMessage(nodeInfo)
+
+linkInfo = _reflection.GeneratedProtocolMessageType('linkInfo', (_message.Message,), {
+  'DESCRIPTOR' : _LINKINFO,
+  '__module__' : 'grpcService_pb2'
+  # @@protoc_insertion_point(class_scope:src.main.proto.linkInfo)
+  })
+_sym_db.RegisterMessage(linkInfo)
+
+NodeDescriptors = _reflection.GeneratedProtocolMessageType('NodeDescriptors', (_message.Message,), {
+  'DESCRIPTOR' : _NODEDESCRIPTORS,
+  '__module__' : 'grpcService_pb2'
+  # @@protoc_insertion_point(class_scope:src.main.proto.NodeDescriptors)
+  })
+_sym_db.RegisterMessage(NodeDescriptors)
+
+updateResponse = _reflection.GeneratedProtocolMessageType('updateResponse', (_message.Message,), {
+  'DESCRIPTOR' : _UPDATERESPONSE,
+  '__module__' : 'grpcService_pb2'
+  # @@protoc_insertion_point(class_scope:src.main.proto.updateResponse)
+  })
+_sym_db.RegisterMessage(updateResponse)
+
+_UPDATESERVICE = DESCRIPTOR.services_by_name['updateService']
+if _descriptor._USE_C_DESCRIPTORS == False:
+
+  DESCRIPTOR._options = None
+  _UPDATEREQUEST._serialized_start=38
+  _UPDATEREQUEST._serialized_end=198
+  _NODEINFO._serialized_start=200
+  _NODEINFO._serialized_end=294
+  _LINKINFO._serialized_start=297
+  _LINKINFO._serialized_end=691
+  _NODEDESCRIPTORS._serialized_start=693
+  _NODEDESCRIPTORS._serialized_end=745
+  _UPDATERESPONSE._serialized_start=747
+  _UPDATERESPONSE._serialized_end=776
+  _UPDATESERVICE._serialized_start=778
+  _UPDATESERVICE._serialized_end=866
+# @@protoc_insertion_point(module_scope)
diff --git a/src/bgpls_speaker/service/tools/protos/grpcService_pb2_grpc.py b/src/bgpls_speaker/service/tools/protos/grpcService_pb2_grpc.py
new file mode 100644
index 0000000000000000000000000000000000000000..c8bbda558d60b1108bfcb1ff60fbe755bb2d75c3
--- /dev/null
+++ b/src/bgpls_speaker/service/tools/protos/grpcService_pb2_grpc.py
@@ -0,0 +1,70 @@
+# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
+"""Client and server classes corresponding to protobuf-defined services."""
+import grpc
+
+from . import grpcService_pb2 as grpcService__pb2
+
+
+class updateServiceStub(object):
+    """Defining a Service, a Service can have multiple RPC operations
+    """
+
+    def __init__(self, channel):
+        """Constructor.
+
+        Args:
+            channel: A grpc.Channel.
+        """
+        self.update = channel.unary_unary(
+                '/src.main.proto.updateService/update',
+                request_serializer=grpcService__pb2.updateRequest.SerializeToString,
+                response_deserializer=grpcService__pb2.updateResponse.FromString,
+                )
+
+
+class updateServiceServicer(object):
+    """Defining a Service, a Service can have multiple RPC operations
+    """
+
+    def update(self, request, context):
+        """MODIFY HERE: Update the return to streaming return.
+        """
+        context.set_code(grpc.StatusCode.UNIMPLEMENTED)
+        context.set_details('Method not implemented!')
+        raise NotImplementedError('Method not implemented!')
+
+
+def add_updateServiceServicer_to_server(servicer, server):
+    rpc_method_handlers = {
+            'update': grpc.unary_unary_rpc_method_handler(
+                    servicer.update,
+                    request_deserializer=grpcService__pb2.updateRequest.FromString,
+                    response_serializer=grpcService__pb2.updateResponse.SerializeToString,
+            ),
+    }
+    generic_handler = grpc.method_handlers_generic_handler(
+            'src.main.proto.updateService', rpc_method_handlers)
+    server.add_generic_rpc_handlers((generic_handler,))
+
+
+ # This class is part of an EXPERIMENTAL API.
+class updateService(object):
+    """Defining a Service, a Service can have multiple RPC operations
+    """
+
+    @staticmethod
+    def update(request,
+            target,
+            options=(),
+            channel_credentials=None,
+            call_credentials=None,
+            insecure=False,
+            compression=None,
+            wait_for_ready=None,
+            timeout=None,
+            metadata=None):
+        return grpc.experimental.unary_unary(request, target, '/src.main.proto.updateService/update',
+            grpcService__pb2.updateRequest.SerializeToString,
+            grpcService__pb2.updateResponse.FromString,
+            options, channel_credentials,
+            insecure, call_credentials, compression, wait_for_ready, timeout, metadata)
diff --git a/src/bgpls_speaker/tests/.gitignore b/src/bgpls_speaker/tests/.gitignore
new file mode 100644
index 0000000000000000000000000000000000000000..6b97d6fe3ad32f39097745229ab7f547f26ecb12
--- /dev/null
+++ b/src/bgpls_speaker/tests/.gitignore
@@ -0,0 +1 @@
+# Add here your files containing confidential testbed details such as IP addresses, ports, usernames, passwords, etc.
diff --git a/src/bgpls_speaker/tests/__init__.py b/src/bgpls_speaker/tests/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..38d04994fb0fa1951fb465bc127eb72659dc2eaf
--- /dev/null
+++ b/src/bgpls_speaker/tests/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/src/bgpls_speaker/tests/test_unitary.py b/src/bgpls_speaker/tests/test_unitary.py
new file mode 100644
index 0000000000000000000000000000000000000000..b8aae5c680e2fe65796fb4417e72a0ae4f925510
--- /dev/null
+++ b/src/bgpls_speaker/tests/test_unitary.py
@@ -0,0 +1,18 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import logging
+
+LOGGER = logging.getLogger(__name__)
+LOGGER.setLevel(logging.DEBUG)
diff --git a/src/common/Constants.py b/src/common/Constants.py
index 30aa09b4caa34a54dd54126195b3f322c07c932e..c7ba01f69978fd3c601dcfe30180015d524b1100 100644
--- a/src/common/Constants.py
+++ b/src/common/Constants.py
@@ -59,6 +59,7 @@ class ServiceNameEnum(Enum):
     TE                     = 'te'
     FORECASTER             = 'forecaster'
     E2EORCHESTRATOR        = 'e2eorchestrator'
+    BGPLS                  = 'bgpls-speaker'
 
     # Used for test and debugging only
     DLT_GATEWAY    = 'dltgateway'
@@ -86,6 +87,7 @@ DEFAULT_SERVICE_GRPC_PORTS = {
     ServiceNameEnum.TE                     .value : 10030,
     ServiceNameEnum.FORECASTER             .value : 10040,
     ServiceNameEnum.E2EORCHESTRATOR        .value : 10050,
+    ServiceNameEnum.BGPLS                  .value : 20030,
 
     # Used for test and debugging only
     ServiceNameEnum.DLT_GATEWAY   .value : 50051,
diff --git a/src/device/Dockerfile b/src/device/Dockerfile
index 909ae3bd31817401412629cbc04b5c0577b40355..b230350c7b331eefbb6d4ac0f9bf3b5b46364254 100644
--- a/src/device/Dockerfile
+++ b/src/device/Dockerfile
@@ -62,9 +62,11 @@ RUN python3 -m pip install -r requirements.txt
 
 # Add component files into working directory
 WORKDIR /var/teraflow
-COPY src/context/. context/
+COPY src/context/__init__.py context/__init__.py
+COPY src/context/client/. context/client/
+COPY src/monitoring/__init__.py monitoring/__init__.py
+COPY src/monitoring/client/. monitoring/client/
 COPY src/device/. device/
-COPY src/monitoring/. monitoring/
 
 RUN mkdir -p tests/tools/mock_ietf_actn_sdn_ctrl
 RUN touch tests/__init__.py
diff --git a/src/pathcomp/frontend/Dockerfile b/src/pathcomp/frontend/Dockerfile
index 955844cf4d80b39fc0913c9c523fd1267ca0fb1d..b54a49cabab79112e65b28a7e5e28d5a17056d67 100644
--- a/src/pathcomp/frontend/Dockerfile
+++ b/src/pathcomp/frontend/Dockerfile
@@ -54,26 +54,28 @@ RUN rm *.proto
 RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
 
 # Create component sub-folders, get specific Python packages
-RUN mkdir -p /var/teraflow/pathcomp
-WORKDIR /var/teraflow/pathcomp
+RUN mkdir -p /var/teraflow/pathcomp/frontend
+WORKDIR /var/teraflow/pathcomp/frontend
 COPY src/pathcomp/frontend/requirements.in requirements.in
 RUN pip-compile --quiet --output-file=requirements.txt requirements.in
 RUN python3 -m pip install -r requirements.txt
 
 # Add component files into working directory
 WORKDIR /var/teraflow
+COPY src/pathcomp/__init__.py pathcomp/__init__.py
+COPY src/pathcomp/frontend/. pathcomp/frontend/
 COPY src/context/__init__.py context/__init__.py
 COPY src/context/client/. context/client/
 COPY src/device/__init__.py device/__init__.py
 COPY src/device/client/. device/client/
-COPY src/forecaster/. forecaster/
+COPY src/forecaster/__init__.py forecaster/__init__.py
+COPY src/forecaster/client/. forecaster/client/
 COPY src/monitoring/__init__.py monitoring/__init__.py
 COPY src/monitoring/client/. monitoring/client/
 COPY src/service/__init__.py service/__init__.py
 COPY src/service/client/. service/client/
 COPY src/slice/__init__.py slice/__init__.py
 COPY src/slice/client/. slice/client/
-COPY src/pathcomp/. pathcomp/
 
 # Start the service
 ENTRYPOINT ["python", "-m", "pathcomp.frontend.service"]
diff --git a/src/service/Dockerfile b/src/service/Dockerfile
index 85454350f1eb9413af0ef995386868d09222121c..aed4ce64c60a7cfca5b80dc46e03bad18a017ca9 100644
--- a/src/service/Dockerfile
+++ b/src/service/Dockerfile
@@ -62,7 +62,6 @@ RUN python3 -m pip install -r requirements.txt
 
 # Add component files into working directory
 WORKDIR /var/teraflow
-COPY src/service/. service/
 COPY src/context/__init__.py context/__init__.py
 COPY src/context/client/. context/client/
 COPY src/device/__init__.py device/__init__.py
@@ -71,6 +70,7 @@ COPY src/pathcomp/frontend/__init__.py pathcomp/frontend/__init__.py
 COPY src/pathcomp/frontend/client/. pathcomp/frontend/client/
 COPY src/e2e_orchestrator/__init__.py e2e_orchestrator/__init__.py
 COPY src/e2e_orchestrator/client/. e2e_orchestrator/client/
+COPY src/service/. service/
 
 # Start the service
 ENTRYPOINT ["python", "-m", "service.service"]
diff --git a/src/slice/Dockerfile b/src/slice/Dockerfile
index 94d5fc040dff083407cae514ed0363b5d2ea9bb1..da380eabc7f8a54b235b87b338ad82a4ead88b4d 100644
--- a/src/slice/Dockerfile
+++ b/src/slice/Dockerfile
@@ -62,10 +62,15 @@ RUN python3 -m pip install -r requirements.txt
 
 # Add component files into working directory
 WORKDIR /var/teraflow
-COPY src/context/. context/
-COPY src/interdomain/. interdomain/
-COPY src/pathcomp/. pathcomp/
-COPY src/service/. service/
+COPY src/context/__init__.py context/__init__.py
+COPY src/context/client/. context/client/
+COPY src/interdomain/__init__.py interdomain/__init__.py
+COPY src/interdomain/client/. interdomain/client/
+COPY src/pathcomp/__init__.py pathcomp/__init__.py
+COPY src/pathcomp/frontend/__init__.py pathcomp/frontend/__init__.py
+COPY src/pathcomp/frontend/client/. pathcomp/frontend/client/
+COPY src/service/__init__.py service/__init__.py
+COPY src/service/client/. service/client/
 COPY src/slice/. slice/
 
 # Start the service
diff --git a/src/webui/Dockerfile b/src/webui/Dockerfile
index ab0b2c4418dab4004792d4d8932d635cb42f734b..fd749ac128632461d2faa43e723777c84356062b 100644
--- a/src/webui/Dockerfile
+++ b/src/webui/Dockerfile
@@ -85,6 +85,8 @@ COPY --chown=webui:webui src/service/client/. service/client/
 COPY --chown=webui:webui src/slice/__init__.py slice/__init__.py
 COPY --chown=webui:webui src/slice/client/. slice/client/
 COPY --chown=webui:webui src/webui/. webui/
+COPY --chown=webui:webui src/bgpls_speaker/__init__.py bgpls_speaker/__init__.py
+COPY --chown=webui:webui src/bgpls_speaker/client/. bgpls_speaker/client/
 
 # Start the service
 ENTRYPOINT ["python", "-m", "webui.service"]
diff --git a/src/webui/service/__init__.py b/src/webui/service/__init__.py
index 05b2eeaf0b7277b960259950ec099b9517124c17..63192016cbb34e53332d1af2ab455bfea5b45a78 100644
--- a/src/webui/service/__init__.py
+++ b/src/webui/service/__init__.py
@@ -92,6 +92,9 @@ def create_app(use_config=None, web_app_root=None):
 
     from webui.service.device.routes import device          # pylint: disable=import-outside-toplevel
     app.register_blueprint(device)
+    
+    from webui.service.bgpls.routes import bgpls          # pylint: disable=import-outside-toplevel
+    app.register_blueprint(bgpls)
 
     from webui.service.link.routes import link              # pylint: disable=import-outside-toplevel
     app.register_blueprint(link)
diff --git a/src/webui/service/bgpls/__init__.py b/src/webui/service/bgpls/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..38d04994fb0fa1951fb465bc127eb72659dc2eaf
--- /dev/null
+++ b/src/webui/service/bgpls/__init__.py
@@ -0,0 +1,13 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
diff --git a/src/webui/service/bgpls/forms.py b/src/webui/service/bgpls/forms.py
new file mode 100644
index 0000000000000000000000000000000000000000..fc78ec311b7a059ea8622b867d15f848f5d89f14
--- /dev/null
+++ b/src/webui/service/bgpls/forms.py
@@ -0,0 +1,86 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# external imports
+from flask_wtf import FlaskForm
+from flask_wtf.file import FileAllowed
+from wtforms import SelectField, FileField, SubmitField
+
+from wtforms import StringField, SelectField, TextAreaField, SubmitField, BooleanField, Form
+from wtforms.validators import DataRequired, Length, NumberRange, Regexp, ValidationError
+from common.proto.context_pb2 import DeviceOperationalStatusEnum
+from webui.utils.form_validators import key_value_validator
+
+class AddDeviceForm(FlaskForm):
+    device_id = StringField('ID', 
+                           validators=[DataRequired(), Length(min=5)])
+    device_type = SelectField('Type', choices = [])                                                     
+    operational_status = SelectField('Operational Status',
+                        #    choices=[(-1, 'Select...'), (0, 'Undefined'), (1, 'Disabled'), (2, 'Enabled')],
+                           coerce=int,
+                           validators=[NumberRange(min=0)])
+    device_drivers_undefined = BooleanField('UNDEFINED / EMULATED')
+    device_drivers_openconfig = BooleanField('OPENCONFIG')
+    device_drivers_transport_api = BooleanField('TRANSPORT_API')
+    device_drivers_p4 = BooleanField('P4')
+    device_drivers_ietf_network_topology = BooleanField('IETF_NETWORK_TOPOLOGY')
+    device_drivers_onf_tr_532 = BooleanField('ONF_TR_352')
+    device_drivers_xr = BooleanField('XR')
+    device_config_address = StringField('connect/address',default='127.0.0.1',validators=[DataRequired(), Length(min=5)])
+    device_config_port = StringField('connect/port',default='0',validators=[DataRequired(), Length(min=1)])
+    device_config_settings = TextAreaField('connect/settings',default='{}',validators=[DataRequired(), Length(min=2)])
+    submit = SubmitField('Add')
+
+    def validate_operational_status(form, field):
+        if field.data not in DeviceOperationalStatusEnum.DESCRIPTOR.values_by_number:
+            raise ValidationError('The operational status value selected is incorrect!')
+
+class ConfigForm(FlaskForm):
+    device_key_config = StringField('Key configuration')
+    device_value_config = StringField('Value configuration')    
+    submit = SubmitField('Add')
+
+
+class UpdateDeviceForm(FlaskForm):
+    update_operational_status = SelectField('Operational Status',
+                           choices=[(-1, 'Select...'), (0, 'Undefined'), (1, 'Disabled'), (2, 'Enabled')],
+                           coerce=int,
+                           validators=[NumberRange(min=0)])
+                        
+    submit = SubmitField('Update')
+
+class ContextTopologyForm(FlaskForm):
+    context_topology = SelectField(
+        'Ctx/Topo',
+        choices=[],
+        validators=[
+            DataRequired(),
+            Length(min=1)
+        ])
+    submit = SubmitField('Submit')
+    
+class DescriptorForm(FlaskForm):
+    descriptors = FileField(
+        'Descriptors',
+        validators=[
+            FileAllowed(['json'], 'JSON Descriptors only!')
+        ])
+    submit = SubmitField('Submit')
+
+class SpeakerForm(FlaskForm):
+    
+    speaker_address = StringField('ip',default='127.0.0.1',validators=[DataRequired(), Length(min=5)])
+    speaker_port = StringField('port',default='179',validators=[DataRequired(), Length(min=1)])
+    speaker_as = StringField('as',default='65000',validators=[DataRequired(), Length(min=1)])
+    submit = SubmitField('Submit')
\ No newline at end of file
diff --git a/src/webui/service/bgpls/routes.py b/src/webui/service/bgpls/routes.py
new file mode 100644
index 0000000000000000000000000000000000000000..67e75e495fecc80fef3b9c1995720ea1d4d46804
--- /dev/null
+++ b/src/webui/service/bgpls/routes.py
@@ -0,0 +1,244 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import json,logging
+from flask import current_app, render_template, Blueprint, flash, session, redirect, url_for, request
+from common.proto.context_pb2 import (
+    ConfigActionEnum, ConfigRule, ConfigRule_Custom, Device, DeviceConfig, DeviceDriverEnum, DeviceId, DeviceList, DeviceOperationalStatusEnum, 
+    Empty, EndPoint, EndPointId, TopologyId, Uuid)
+from common.tools.object_factory.Context import json_context_id
+from common.tools.object_factory.Topology import json_topology_id
+from context.client.ContextClient import ContextClient
+from device.client.DeviceClient import DeviceClient
+from webui.service.device.forms import AddDeviceForm
+from common.DeviceTypes import DeviceTypeEnum
+from webui.service.bgpls.forms import ConfigForm, SpeakerForm, UpdateDeviceForm
+
+from bgpls_speaker.client.BgplsClient import BgplsClient
+from common.proto.bgpls_pb2 import (BgplsSpeaker, DiscoveredDeviceList,DiscoveredDevice,DiscoveredLinkList,DiscoveredLink, NodeDescriptors)
+
+bgpls = Blueprint('bgpls', __name__, url_prefix='/bgpls')
+context_client = ContextClient()
+device_client = DeviceClient()
+bgpls_client = BgplsClient()
+logger = logging.getLogger(__name__)
+
+@bgpls.get('/')
+def home():
+    if 'context_uuid' not in session or 'topology_uuid' not in session:
+        flash("Please select a context!", "warning")
+        return redirect(url_for("main.home"))
+
+    context_uuid = session['context_uuid']
+    topology_uuid = session['topology_uuid']
+
+    context_client.connect()
+    json_topo_id = json_topology_id(topology_uuid, context_id=json_context_id(context_uuid))
+    grpc_topology = context_client.GetTopology(TopologyId(**json_topo_id))
+    topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids}
+    
+    if grpc_topology is None:
+        flash('Context({:s})/Topology({:s}) not found'.format(str(context_uuid), str(topology_uuid)), 'danger')
+        devices = []
+    else:
+        topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids}
+        grpc_devices: DeviceList = context_client.ListDevices(Empty())
+        devices = [
+            device for device in grpc_devices.devices
+            if device.device_id.device_uuid.uuid in topo_device_uuids
+        ]
+
+    # ListNewDevices discovered from bgpls
+    logger.info('bgpls/home')
+    bgpls_client.connect()
+    logger.info('bgpls_client.connect %s',bgpls_client)
+    discovered_device_list = bgpls_client.ListDiscoveredDevices(Empty())
+    logger.info('discoveredDeviceList %s',discovered_device_list)
+    # List Links discovered from bgpls
+    discovered_link_list = bgpls_client.ListDiscoveredLinks(Empty())
+    logger.info('discoveredLinkList %s',discovered_link_list)
+    # List current open speaker connections
+    speaker_list=bgpls_client.ListBgplsSpeakers(Empty())
+
+
+    context_client.close()
+    bgpls_client.close()
+
+    return render_template(
+        'bgpls/home.html', devices=devices, dde=DeviceDriverEnum,
+        dose=DeviceOperationalStatusEnum,disdev=discovered_device_list.discovereddevices,
+        dislink=discovered_link_list.discoveredlinks,speakers=speaker_list.speakers)
+
+@bgpls.route('add/<path:device_name>', methods=['GET', 'POST'])
+def add(device_name):
+    """"
+    Add a discovered device from bgpls protocol. Populate form from
+    existent info in bgpls. 
+    """
+    # TODO: Conect to device and get necessary info
+    form = AddDeviceForm()
+
+    logger.info('bgpls/add')    
+    
+    # listing enum values
+    form.operational_status.choices = []
+    for key, _ in DeviceOperationalStatusEnum.DESCRIPTOR.values_by_name.items():
+        form.operational_status.choices.append(
+            (DeviceOperationalStatusEnum.Value(key), key.replace('DEVICEOPERATIONALSTATUS_', '')))
+        
+    form.device_type.choices = []
+    # items for Device Type field
+    for device_type in DeviceTypeEnum:
+        form.device_type.choices.append((device_type.value,device_type.value))    
+
+    if form.validate_on_submit():
+        device_obj = Device()
+        # Device UUID: 
+        device_obj.device_id.device_uuid.uuid = form.device_id.data # pylint: disable=no-member
+
+        # Device type: 
+        device_obj.device_type = str(form.device_type.data)
+
+        # Device configurations: 
+        config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member
+        config_rule.action = ConfigActionEnum.CONFIGACTION_SET
+        config_rule.custom.resource_key = '_connect/address'
+        config_rule.custom.resource_value = form.device_config_address.data
+
+        config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member
+        config_rule.action = ConfigActionEnum.CONFIGACTION_SET
+        config_rule.custom.resource_key = '_connect/port'
+        config_rule.custom.resource_value = form.device_config_port.data
+
+        config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member
+        config_rule.action = ConfigActionEnum.CONFIGACTION_SET
+        config_rule.custom.resource_key = '_connect/settings'
+
+        try:
+            device_config_settings = json.loads(form.device_config_settings.data)
+        except: # pylint: disable=bare-except
+            device_config_settings = form.device_config_settings.data
+        logger.info('(bgpls/add) config settings %s', form.device_config_settings.data)    
+        if isinstance(device_config_settings, dict):
+            config_rule.custom.resource_value = json.dumps(device_config_settings)
+            logger.info('(bgpls/add) config settings is instance to json')
+        else:
+            config_rule.custom.resource_value = str(device_config_settings)
+
+        # Device status: 
+        device_obj.device_operational_status = form.operational_status.data
+
+        # Device drivers: 
+        if form.device_drivers_undefined.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_UNDEFINED)
+        if form.device_drivers_openconfig.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_OPENCONFIG)
+        if form.device_drivers_transport_api.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_TRANSPORT_API)
+        if form.device_drivers_p4.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_P4)
+        if form.device_drivers_ietf_network_topology.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY)
+        if form.device_drivers_onf_tr_532.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_ONF_TR_532)
+        if form.device_drivers_xr.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_XR)
+
+        try:
+            device_client.connect()
+            logger.info('add device from speaker:%s',device_obj)
+            response: DeviceId = device_client.AddDevice(device_obj)
+            device_client.close()
+            flash(f'New device was created with ID "{response.device_uuid.uuid}".', 'success')
+            bgpls_client.connect()
+            bgpls_client.NotifyAddNodeToContext(NodeDescriptors(nodeName=device_obj.device_id.device_uuid.uuid))
+            bgpls_client.close()
+            return redirect(url_for('device.home'))
+        except Exception as e:
+            flash(f'Problem adding the device. {e.details()}', 'danger')
+        
+    # Prefill data with discovered info from speaker
+    # Device Name from bgpls
+    form.device_name=device_name
+    device=device_name
+    form.device_id.data=device_name
+    # Default values (TODO: NOT WORKING)
+    form.device_type.data=DeviceTypeEnum.EMULATED_PACKET_ROUTER
+    form.device_config_settings.data=str('{"username": "admin", "password": "admin"}')
+
+    return render_template('bgpls/add.html', form=form, device=device,
+                        submit_text='Add New Device')
+
+@bgpls.route('detail/<path:device_uuid>', methods=['GET', 'POST'])
+def detail(device_uuid: str):
+    request = DeviceId()
+    request.device_uuid.uuid = device_uuid
+    context_client.connect()
+    response = context_client.GetDevice(request)
+    context_client.close()
+    return render_template('bgpls/detail.html', device=response,
+                                                 dde=DeviceDriverEnum,
+                                                 dose=DeviceOperationalStatusEnum)
+
+@bgpls.route('addSpeaker', methods=['GET', 'POST'])
+def addSpeaker():
+    # Conectar con bgpls¿
+    bgpls_client.connect()
+    form = SpeakerForm()
+    if form.validate_on_submit():
+        logger.info('addSpeaker ip:%s',form.speaker_address.data)
+        bgpls_client.AddBgplsSpeaker(BgplsSpeaker(address=form.speaker_address.data,port=form.speaker_port.data,asNumber=form.speaker_as.data))
+        flash(f'Speaker "{form.speaker_address.data}:{form.speaker_port.data}" added successfully!', 'success')
+    bgpls_client.close()
+    return render_template('bgpls/addSpeaker.html',form=form)
+
+@bgpls.route('formSpeaker', methods=['GET','POST'])
+def formSpeaker():
+    # Conectar con bgpls¿
+    form = SpeakerForm()
+    if request.method=="POST":
+        address = form.speaker_address.data
+        port = form.speaker_port.data
+        as_ = form.speaker_as.data
+        logger.info("FORM formSpeaker: %s %s %s", address,port,as_)
+        
+        flash(f'Speaker "{address}:{port}" added successfully!', 'success')
+
+    return redirect(url_for('bgpls.home'))
+    # return 'Form submitted'
+
+
+@bgpls.route('editSpeakers', methods=['GET','POST'])
+def editSpeakers():
+
+    speakers=[]
+    bgpls_client.connect()
+    speaker_list=bgpls_client.ListBgplsSpeakers(Empty())
+    speakers_ids=[speaker for speaker in speaker_list.speakers if speaker.id]
+    speakers=[bgpls_client.GetSpeakerInfoFromId(ids) for ids in speakers_ids]
+        
+    bgpls_client.close()
+    return render_template('bgpls/editSpeakers.html',speakers=speakers)
+
+
+@bgpls.route('disconnectSpeaker/<path:speaker_address>', methods=['GET','POST'])
+def disconnectSpeaker(speaker_address):
+
+    bgpls_client.connect()
+    current_speaker=BgplsSpeaker(address=speaker_address)
+    logger.info('Disconnecting speaker: %s...',speaker_address)
+    bgpls_client.DisconnectFromSpeaker(current_speaker)
+    bgpls_client.close()
+
+    return redirect(url_for('bgpls.editSpeakers'))
\ No newline at end of file
diff --git a/src/webui/service/device/routes.py b/src/webui/service/device/routes.py
index b75e9fb9f09bddcb9f321995465fd8cca5263277..8b8bc236af019c4f9d1209013d1f3f2cc8a8eeb0 100644
--- a/src/webui/service/device/routes.py
+++ b/src/webui/service/device/routes.py
@@ -67,7 +67,7 @@ def add():
     # items for Device Type field
     form.device_type.choices = []
     for device_type in DeviceTypeEnum:
-        form.device_type.choices.append((device_type.value,device_type.value))    
+        form.device_type.choices.append((device_type.value,device_type.value))
 
     if form.validate_on_submit():
         device_obj = Device()
diff --git a/src/webui/service/templates/base.html b/src/webui/service/templates/base.html
index e75461885c5eb60c61f3ff58592db1b778293b42..60cd5aebde39019b34c6ff2b763137f5c3d05035 100644
--- a/src/webui/service/templates/base.html
+++ b/src/webui/service/templates/base.html
@@ -103,6 +103,13 @@
                   <a class="nav-link" href="{{ url_for('load_gen.home') }}">Load Generator</a>
                   {% endif %}
                 </li>
+                <li class="nav-item">
+                  {% if '/bgpls/' in request.path %}
+                  <a class="nav-link active" aria-current="page" href="{{ url_for('bgpls.home') }}">BGPLS</a>
+                  {% else %}
+                  <a class="nav-link" href="{{ url_for('bgpls.home') }}">BGPLS</a>
+                  {% endif %}
+                </li>
   
                 <!-- <li class="nav-item">
                   <a class="nav-link" href="#">Context</a>
diff --git a/src/webui/service/templates/bgpls/add.html b/src/webui/service/templates/bgpls/add.html
new file mode 100644
index 0000000000000000000000000000000000000000..5c899aba5359143bb679912248f4fc6941ea815a
--- /dev/null
+++ b/src/webui/service/templates/bgpls/add.html
@@ -0,0 +1,162 @@
+<!--
+ Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+{% extends 'base.html' %}
+
+{% block content %}
+<h1>Add New Device</h1>
+<h3>Node name: {{form.device_name}}</h3>
+<br />
+<form id="add_device" method="POST">
+    {{ form.hidden_tag() }}
+    <fieldset>
+        <div class="row mb-3">
+            {{ form.device_id.label(class="col-sm-2 col-form-label") }}
+            <div class="col-sm-10">
+                {% if form.device_id.errors %}
+                {{ form.device_id(class="form-control is-invalid") }}
+                <div class="invalid-feedback">
+                    {% for error in form.device_id.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.device_id(class="form-control") }}
+                {% endif %}
+            </div>
+        </div>
+        <br />
+        <div class="row mb-3">
+            {{ form.device_type.label(class="col-sm-2 col-form-label") }}
+            <div class="col-sm-10">
+                {% if form.device_type.errors %}
+                {{ form.device_type(class="form-control is-invalid") }}
+                <div class="invalid-feedback">
+                    {% for error in form.device_type.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.device_type(class="form-select")}}
+                {% endif %}
+            </div>
+        </div>
+        <br />
+        <div class="row mb-3">
+            {{ form.operational_status.label(class="col-sm-2 col-form-label") }}
+            <div class="col-sm-10">
+                {% if form.operational_status.errors %}
+                {{ form.operational_status(class="form-control is-invalid") }}
+                <div class="invalid-feedback">
+                    {% for error in form.operational_status.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.operational_status(class="form-select") }}
+                {% endif %}
+            </div>
+        </div>
+        <br />
+        <div class="row mb-3">
+            <div class="col-sm-2 col-form-label">Drivers</div>
+            <div class="col-sm-10">
+                {% if form.device_drivers_undefined.errors %}
+                {{ form.device_drivers_undefined(class="form-control is-invalid") }}
+                <div class="invalid-feedback">
+                    {% for error in form.device_drivers_undefined.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.device_drivers_undefined }} {{ form.device_drivers_undefined.label(class="col-sm-3
+                col-form-label") }}
+                {{ form.device_drivers_openconfig }} {{ form.device_drivers_openconfig.label(class="col-sm-3
+                col-form-label") }}
+                {{ form.device_drivers_transport_api }} {{ form.device_drivers_transport_api.label(class="col-sm-3
+                col-form-label") }}
+                <br />{{ form.device_drivers_p4 }} {{ form.device_drivers_p4.label(class="col-sm-3 col-form-label") }}
+                {{ form.device_drivers_ietf_network_topology }} {{
+                form.device_drivers_ietf_network_topology.label(class="col-sm-3
+                col-form-label") }}
+                {{ form.device_drivers_onf_tr_532 }} {{ form.device_drivers_onf_tr_532.label(class="col-sm-3
+                col-form-label") }}<br />
+                {{ form.device_drivers_xr }} {{ form.device_drivers_xr.label(class="col-sm-3
+                col-form-label") }}
+                {% endif %}
+            </div>
+        </div>
+        <br />
+        Configuration Rules <br />
+        <div class="row mb-3">
+            {{ form.device_config_address.label(class="col-sm-2 col-form-label") }}
+            <div class="col-sm-10">
+                {% if form.device_config_address.errors %}
+                {{ form.device_config_address(class="form-control is-invalid", rows=5) }}
+                <div class="invalid-feedback">
+                    {% for error in form.device_config_address.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.device_config_address(class="form-control", rows=5) }}
+                {% endif %}
+            </div>
+        </div>
+        <div class="row mb-3">
+            {{ form.device_config_port.label(class="col-sm-2 col-form-label") }}
+            <div class="col-sm-10">
+                {% if form.device_config_port.errors %}
+                {{ form.device_config_port(class="form-control is-invalid", rows=5) }}
+                <div class="invalid-feedback">
+                    {% for error in form.device_config_port.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.device_config_port(class="form-control", rows=5) }}
+                {% endif %}
+            </div>
+        </div>
+        <div class="row mb-3">
+            {{ form.device_config_settings.label(class="col-sm-2 col-form-label") }}
+            <div class="col-sm-10">
+                {% if form.device_config_settings.errors %}
+                {{ form.device_config_settings(class="form-control is-invalid", rows=5) }}
+                <div class="invalid-feedback">
+                    {% for error in form.device_config_settings.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.device_config_settings(class="form-control", rows=5) }}
+                {% endif %}
+            </div>
+        </div>
+        <br />
+        <div class="d-grid gap-2 d-md-flex justify-content-md-start">
+            <button type="submit" class="btn btn-primary">
+                <i class="bi bi-plus-circle-fill"></i>
+                {{ submit_text }}
+            </button>
+            <button type="button" class="btn btn-block btn-secondary" onclick="javascript: history.back()">
+                <i class="bi bi-box-arrow-in-left"></i>
+                Cancel
+            </button>
+        </div>
+    </fieldset>
+</form>
+{% endblock %}
\ No newline at end of file
diff --git a/src/webui/service/templates/bgpls/addSpeaker.html b/src/webui/service/templates/bgpls/addSpeaker.html
new file mode 100644
index 0000000000000000000000000000000000000000..47ef2fd55aa1d59d9f9f6f251cb97b20ec9864c6
--- /dev/null
+++ b/src/webui/service/templates/bgpls/addSpeaker.html
@@ -0,0 +1,88 @@
+<!--
+    Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+   
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+   
+         http://www.apache.org/licenses/LICENSE-2.0
+   
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+   -->
+
+{% extends 'base.html' %}
+
+{% block content %}
+     <h1>Add Device </h1>
+     <!-- TEST -->
+     <h5>New bglps speaker</h5>
+     
+      <br />
+     <div>
+          <form action='{{ url_for("bgpls.addSpeaker")}}' method="post">
+               {{ form.hidden_tag() }}
+               <fieldset>
+                    <div class="row mb-3">
+                         {{ form.speaker_address.label(class="col-sm-2 col-form-label") }}
+                         <div class="col-sm-10">
+                         {% if form.speaker_address.errors %}
+                         {{ form.speaker_address(class="form-control is-invalid") }}
+                         <div class="invalid-feedback">
+                              {% for error in form.speaker_address.errors %}
+                              <span>{{ error }}</span>
+                              {% endfor %}
+                         </div>
+                         {% else %}
+                         {{ form.speaker_address(class="form-control") }}
+                         {% endif %}
+                         </div>
+                    </div>
+                    <div class="row mb-3">
+                         {{ form.speaker_port.label(class="col-sm-2 col-form-label") }}
+                         <div class="col-sm-10">
+                         {% if form.speaker_port.errors %}
+                         {{ form.speaker_port(class="form-control is-invalid") }}
+                         <div class="invalid-feedback">
+                              {% for error in form.speaker_port.errors %}
+                              <span>{{ error }}</span>
+                              {% endfor %}
+                         </div>
+                         {% else %}
+                         {{ form.speaker_port(class="form-control") }}
+                         {% endif %}
+                         </div>
+                    </div>
+                    <div class="row mb-3">
+                         {{ form.speaker_as.label(class="col-sm-2 col-form-label") }}
+                         <div class="col-sm-10">
+                         {% if form.speaker_as.errors %}
+                         {{ form.speaker_as(class="form-control is-invalid") }}
+                         <div class="invalid-feedback">
+                              {% for error in form.speaker_as.errors %}
+                              <span>{{ error }}</span>
+                              {% endfor %}
+                         </div>
+                         {% else %}
+                         {{ form.speaker_as(class="form-control") }}
+                         {% endif %}
+                         </div>
+                    </div>
+               </fieldset>
+          <button type="submit" class="btn btn-primary">
+               <i class="bi bi-plus-circle-fill"></i>
+               Add Speaker
+               </button>
+          </form>
+     </div>
+     
+
+     <script src="https://d3js.org/d3.v4.min.js"></script>
+     <div id="topology"></div>
+     <script src="{{ url_for('js.topology_js') }}"></script>
+
+{% endblock %}
+   
\ No newline at end of file
diff --git a/src/webui/service/templates/bgpls/editSpeakers.html b/src/webui/service/templates/bgpls/editSpeakers.html
new file mode 100644
index 0000000000000000000000000000000000000000..9396f61e2f61786e5e2fb1fb25a6e3d14dca5b1b
--- /dev/null
+++ b/src/webui/service/templates/bgpls/editSpeakers.html
@@ -0,0 +1,70 @@
+<!--
+ Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+
+{% extends 'base.html' %}
+{% block content %}
+    <h1>Topology</h1>
+
+    <div class="row">
+       
+        <div class="col">
+            {{ speakers | length }} speakers found in context <i>{{ session['context_uuid'] }}</i>
+        </div>
+    </div>
+    
+    <div class="col">
+        <a href="{{ url_for('bgpls.addSpeaker') }}" class="btn btn-primary" style="margin-bottom: 10px;">
+            <i class="bi bi-plus"></i>
+            Add BGPLS Speaker
+        </a>
+    </div>
+    
+     <table class="table table-striped table-hover">
+          <thead>
+          <tr>
+          <th scope="col">Speaker IP Address</th>
+          <th scope="col">Speaker As Number</th>
+          <th scope="col"></th>
+          </tr>
+          </thead>
+          <tbody>
+          {% if speakers %}
+               {% for speaker in speakers %}
+               <tr>
+                    <td>{{ speaker.address }}</td>
+                    <td>{{ speaker.asNumber }}</td>
+                    <td>
+                         <a type="button" class="btn btn-danger" href="{{ url_for('bgpls.disconnectSpeaker',speaker_address=speaker.address)}}">
+                              <i class="bi bi-x-square"></i>
+                         </a>
+                              
+                    </td>
+               </tr>
+               {% endfor %}
+          {% else %}
+               <tr>
+                    <td colspan="3">No devices found</td>
+               </tr>
+          {% endif %}
+          </tbody>
+     </table>
+
+<script src="https://d3js.org/d3.v4.min.js"></script>
+    <div id="topology"></div>
+    <script src="{{ url_for('js.topology_js') }}"></script>
+
+{% endblock %}
\ No newline at end of file
diff --git a/src/webui/service/templates/bgpls/home.html b/src/webui/service/templates/bgpls/home.html
new file mode 100644
index 0000000000000000000000000000000000000000..15bfc0fcd62a1bf9222ca209b2fd08d9a061fc06
--- /dev/null
+++ b/src/webui/service/templates/bgpls/home.html
@@ -0,0 +1,110 @@
+<!--
+ Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+{% extends 'base.html' %}
+
+{% block content %}
+    <h1>BGPLS Topology</h1>
+
+    <div class="row">
+       
+        <div class="col">
+            {{ speakers | length }} speakers found in context <i>{{ session['context_uuid'] }}</i>
+        </div>
+    </div>
+        <div class="row">
+        <div class="col">
+            <a href="{{ url_for('bgpls.addSpeaker') }}" class="btn btn-primary" style="margin-bottom: 10px;">
+                <i class="bi bi-plus"></i>
+                Add BGPLS Speaker
+            </a>
+        </div>
+
+        <div class="col">
+            <a href="{{ url_for('bgpls.editSpeakers') }}" class="btn btn-primary" style="margin-bottom: 10px;">
+                <i class="bi bi-pencil-square"></i>
+                Edit BGPLS Speakers
+            </a>
+        </div>
+    </div>  
+
+    <table class="table table-striped table-hover">
+        <thead>
+          <tr>
+            <th scope="col">Node name</th>
+            <th scope="col">Local IGP Id</th>
+            <th scope="col">Remote IGP Id</th>
+            <th scope="col">Learnt from</th>
+            <th scope="col"></th>
+          </tr>
+        </thead>
+        <tbody>
+            {% if disdev %}
+                {% for device in disdev %}
+                <tr>
+                    <td>{{ device.nodeName }}</td>
+                    <td>{{ device.igpID }}</td>
+                    <td></td>
+                    <td>{{ device.learntFrom }}</td>
+                    <td>
+                        <div class="col">
+                            <a href='{{ url_for("bgpls.add",device_name=device.nodeName)}}'>
+                                <i class="bi bi-plus"></i>
+                                Add Device
+                            </a>
+                        </div>
+                            
+                    
+                    </td>
+                </tr>
+                {% endfor %}
+            {% else %}
+                <tr>
+                    <td colspan="3">No devices found</td>
+                </tr>
+            {% endif %}
+        </tbody>
+        <tbody>
+            {% if dislink %}
+                {% for link in dislink %}
+                <tr>
+                    <td>{{ link.local_ipv4 }}->{{ link.remote_ipv4 }}</td>
+                    <td>{{ link.local.nodeName }}</td>
+                    <td>{{ link.remote.nodeName }}</td>
+                    <td>{{ link.learntFrom }}</td>
+                    <td>
+                        <div class="col">
+                            <a href=''>
+                                <i class="bi bi-plus"></i>
+                                Add Link
+                            </a>
+                        </div>
+                    </td>
+                </tr>
+                {% endfor %}
+            {% else %}
+                <tr>
+                    <td colspan="3">No devices found</td>
+                </tr>
+            {% endif %}
+        </tbody>
+    </table>
+        
+    <script src="https://d3js.org/d3.v4.min.js"></script>
+    <div id="topology"></div>
+    <script src="{{ url_for('js.topology_js') }}"></script>
+
+{% endblock %}
\ No newline at end of file
diff --git a/src/webui/service/templates/topology/add.html b/src/webui/service/templates/topology/add.html
new file mode 100644
index 0000000000000000000000000000000000000000..317926383e6c2a7b858e1c87938a2c671c1afa49
--- /dev/null
+++ b/src/webui/service/templates/topology/add.html
@@ -0,0 +1,162 @@
+<!--
+ Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+{% extends 'base.html' %}
+
+{% block content %}
+<h1>Add New Device</h1>
+<h3>Node name: {{form.device_name}}</h3>
+<br />
+<form id="add_device" method="POST">
+    {{ form.hidden_tag() }}
+    <fieldset>
+        <div class="row mb-3">
+            {{ form.device_id.label(class="col-sm-2 col-form-label") }}
+            <div class="col-sm-10">
+                {% if form.device_id.errors %}
+                {{ form.device_id(class="form-control is-invalid") }}
+                <div class="invalid-feedback">
+                    {% for error in form.device_id.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.device_id(class="form-control") }}
+                {% endif %}
+            </div>
+        </div>
+        <br />
+        <div class="row mb-3">
+            {{ form.device_type.label(class="col-sm-2 col-form-label") }}
+            <div class="col-sm-10">
+                {% if form.device_type.errors %}
+                {{ form.device_type(class="form-control is-invalid") }}
+                <div class="invalid-feedback">
+                    {% for error in form.device_type.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.device_type(class="form-select")}}
+                {% endif %}
+            </div>
+        </div>
+        <br />
+        <div class="row mb-3">
+            {{ form.operational_status.label(class="col-sm-2 col-form-label") }}
+            <div class="col-sm-10">
+                {% if form.operational_status.errors %}
+                {{ form.operational_status(class="form-control is-invalid") }}
+                <div class="invalid-feedback">
+                    {% for error in form.operational_status.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.operational_status(class="form-select") }}
+                {% endif %}
+            </div>
+        </div>
+        <br />
+        <div class="row mb-3">
+            <div class="col-sm-2 col-form-label">Drivers</div>
+            <div class="col-sm-10">
+                {% if form.device_drivers_undefined.errors %}
+                {{ form.device_drivers_undefined(class="form-control is-invalid") }}
+                <div class="invalid-feedback">
+                    {% for error in form.device_drivers_undefined.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.device_drivers_undefined }} {{ form.device_drivers_undefined.label(class="col-sm-3
+                col-form-label") }}
+                {{ form.device_drivers_openconfig }} {{ form.device_drivers_openconfig.label(class="col-sm-3
+                col-form-label") }}
+                {{ form.device_drivers_transport_api }} {{ form.device_drivers_transport_api.label(class="col-sm-3
+                col-form-label") }}
+                <br />{{ form.device_drivers_p4 }} {{ form.device_drivers_p4.label(class="col-sm-3 col-form-label") }}
+                {{ form.device_drivers_ietf_network_topology }} {{
+                form.device_drivers_ietf_network_topology.label(class="col-sm-3
+                col-form-label") }}
+                {{ form.device_drivers_onf_tr_352 }} {{ form.device_drivers_onf_tr_352.label(class="col-sm-3
+                col-form-label") }}<br />
+                {{ form.device_drivers_xr }} {{ form.device_drivers_xr.label(class="col-sm-3
+                col-form-label") }}
+                {% endif %}
+            </div>
+        </div>
+        <br />
+        Configuration Rules <br />
+        <div class="row mb-3">
+            {{ form.device_config_address.label(class="col-sm-2 col-form-label") }}
+            <div class="col-sm-10">
+                {% if form.device_config_address.errors %}
+                {{ form.device_config_address(class="form-control is-invalid", rows=5) }}
+                <div class="invalid-feedback">
+                    {% for error in form.device_config_address.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.device_config_address(class="form-control", rows=5) }}
+                {% endif %}
+            </div>
+        </div>
+        <div class="row mb-3">
+            {{ form.device_config_port.label(class="col-sm-2 col-form-label") }}
+            <div class="col-sm-10">
+                {% if form.device_config_port.errors %}
+                {{ form.device_config_port(class="form-control is-invalid", rows=5) }}
+                <div class="invalid-feedback">
+                    {% for error in form.device_config_port.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.device_config_port(class="form-control", rows=5) }}
+                {% endif %}
+            </div>
+        </div>
+        <div class="row mb-3">
+            {{ form.device_config_settings.label(class="col-sm-2 col-form-label") }}
+            <div class="col-sm-10">
+                {% if form.device_config_settings.errors %}
+                {{ form.device_config_settings(class="form-control is-invalid", rows=5) }}
+                <div class="invalid-feedback">
+                    {% for error in form.device_config_settings.errors %}
+                    <span>{{ error }}</span>
+                    {% endfor %}
+                </div>
+                {% else %}
+                {{ form.device_config_settings(class="form-control", rows=5) }}
+                {% endif %}
+            </div>
+        </div>
+        <br />
+        <div class="d-grid gap-2 d-md-flex justify-content-md-start">
+            <button type="submit" class="btn btn-primary">
+                <i class="bi bi-plus-circle-fill"></i>
+                {{ submit_text }}
+            </button>
+            <button type="button" class="btn btn-block btn-secondary" onclick="javascript: history.back()">
+                <i class="bi bi-box-arrow-in-left"></i>
+                Cancel
+            </button>
+        </div>
+    </fieldset>
+</form>
+{% endblock %}
\ No newline at end of file
diff --git a/src/webui/service/templates/topology/addSpeaker.html b/src/webui/service/templates/topology/addSpeaker.html
new file mode 100644
index 0000000000000000000000000000000000000000..26ec8c94e59b72d5cc153ac70617ece7ab48119e
--- /dev/null
+++ b/src/webui/service/templates/topology/addSpeaker.html
@@ -0,0 +1,88 @@
+<!--
+    Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+   
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+   
+         http://www.apache.org/licenses/LICENSE-2.0
+   
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+   -->
+
+{% extends 'base.html' %}
+
+{% block content %}
+     <h1>Add Device </h1>
+     <!-- TEST -->
+     <h5>New bglps speaker</h5>
+     
+      <br />
+     <div>
+          <form action='{{ url_for("topology.addSpeaker")}}' method="post">
+               {{ form.hidden_tag() }}
+               <fieldset>
+                    <div class="row mb-3">
+                         {{ form.speaker_address.label(class="col-sm-2 col-form-label") }}
+                         <div class="col-sm-10">
+                         {% if form.speaker_address.errors %}
+                         {{ form.speaker_address(class="form-control is-invalid") }}
+                         <div class="invalid-feedback">
+                              {% for error in form.speaker_address.errors %}
+                              <span>{{ error }}</span>
+                              {% endfor %}
+                         </div>
+                         {% else %}
+                         {{ form.speaker_address(class="form-control") }}
+                         {% endif %}
+                         </div>
+                    </div>
+                    <div class="row mb-3">
+                         {{ form.speaker_port.label(class="col-sm-2 col-form-label") }}
+                         <div class="col-sm-10">
+                         {% if form.speaker_port.errors %}
+                         {{ form.speaker_port(class="form-control is-invalid") }}
+                         <div class="invalid-feedback">
+                              {% for error in form.speaker_port.errors %}
+                              <span>{{ error }}</span>
+                              {% endfor %}
+                         </div>
+                         {% else %}
+                         {{ form.speaker_port(class="form-control") }}
+                         {% endif %}
+                         </div>
+                    </div>
+                    <div class="row mb-3">
+                         {{ form.speaker_as.label(class="col-sm-2 col-form-label") }}
+                         <div class="col-sm-10">
+                         {% if form.speaker_as.errors %}
+                         {{ form.speaker_as(class="form-control is-invalid") }}
+                         <div class="invalid-feedback">
+                              {% for error in form.speaker_as.errors %}
+                              <span>{{ error }}</span>
+                              {% endfor %}
+                         </div>
+                         {% else %}
+                         {{ form.speaker_as(class="form-control") }}
+                         {% endif %}
+                         </div>
+                    </div>
+               </fieldset>
+          <button type="submit" class="btn btn-primary">
+               <i class="bi bi-plus-circle-fill"></i>
+               Add Speaker
+               </button>
+          </form>
+     </div>
+     
+
+     <script src="https://d3js.org/d3.v4.min.js"></script>
+     <div id="topology"></div>
+     <script src="{{ url_for('js.topology_js') }}"></script>
+
+{% endblock %}
+   
\ No newline at end of file
diff --git a/src/webui/service/templates/topology/editSpeakers.html b/src/webui/service/templates/topology/editSpeakers.html
new file mode 100644
index 0000000000000000000000000000000000000000..f98c453199d40865c7d8501344808cecf5a4e1a6
--- /dev/null
+++ b/src/webui/service/templates/topology/editSpeakers.html
@@ -0,0 +1,70 @@
+<!--
+ Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+
+{% extends 'base.html' %}
+{% block content %}
+    <h1>Topology</h1>
+
+    <div class="row">
+       
+        <div class="col">
+            {{ speakers | length }} speakers found in context <i>{{ session['context_uuid'] }}</i>
+        </div>
+    </div>
+    
+    <div class="col">
+        <a href="{{ url_for('topology.addSpeaker') }}" class="btn btn-primary" style="margin-bottom: 10px;">
+            <i class="bi bi-plus"></i>
+            Add BGPLS Speaker
+        </a>
+    </div>
+    
+     <table class="table table-striped table-hover">
+          <thead>
+          <tr>
+          <th scope="col">Speaker IP Address</th>
+          <th scope="col">Speaker As Number</th>
+          <th scope="col"></th>
+          </tr>
+          </thead>
+          <tbody>
+          {% if speakers %}
+               {% for speaker in speakers %}
+               <tr>
+                    <td>{{ speaker.address }}</td>
+                    <td>{{ speaker.asNumber }}</td>
+                    <td>
+                         <a type="button" class="btn btn-danger" href="{{ url_for('topology.disconnectSpeaker',speaker_address=speaker.address)}}">
+                              <i class="bi bi-x-square"></i>
+                         </a>
+                              
+                    </td>
+               </tr>
+               {% endfor %}
+          {% else %}
+               <tr>
+                    <td colspan="3">No devices found</td>
+               </tr>
+          {% endif %}
+          </tbody>
+     </table>
+
+<script src="https://d3js.org/d3.v4.min.js"></script>
+    <div id="topology"></div>
+    <script src="{{ url_for('js.topology_js') }}"></script>
+
+{% endblock %}
\ No newline at end of file
diff --git a/src/webui/service/templates/topology/home.html b/src/webui/service/templates/topology/home.html
new file mode 100644
index 0000000000000000000000000000000000000000..1603699436fb0bdb0e46310c166c8f17c8712110
--- /dev/null
+++ b/src/webui/service/templates/topology/home.html
@@ -0,0 +1,112 @@
+<!--
+ Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+{% extends 'base.html' %}
+
+{% block content %}
+    <h1>Topology</h1>
+
+    <div class="row">
+       
+        <div class="col">
+            {{ speakers | length }} speakers found in context <i>{{ session['context_uuid'] }}</i>
+        </div>
+    </div>
+        <div class="row">
+        <div class="col">
+            <a href="{{ url_for('topology.addSpeaker') }}" class="btn btn-primary" style="margin-bottom: 10px;">
+                <i class="bi bi-plus"></i>
+                Add BGPLS Speaker
+            </a>
+        </div>
+
+        <div class="col">
+            <a href="{{ url_for('topology.editSpeakers') }}" class="btn btn-primary" style="margin-bottom: 10px;">
+                <i class="bi bi-pencil-square"></i>
+                Edit BGPLS Speakers
+            </a>
+        </div>
+    </div>  
+
+    <table class="table table-striped table-hover">
+        <thead>
+          <tr>
+            <th scope="col">Node name</th>
+            <th scope="col">Local IGP Id</th>
+            <th scope="col">Remote IGP Id</th>
+            <th scope="col">Learnt from</th>
+            <th scope="col"></th>
+          </tr>
+        </thead>
+        <tbody>
+            {% if disdev %}
+                {% for device in disdev %}
+                <tr>
+                    <td>{{ device.nodeName }}</td>
+                    <td>{{ device.igpID }}</td>
+                    <td></td>
+                    <td>{{ device.learntFrom }}</td>
+                    <td>
+                        <div class="col">
+                            <a href='{{ url_for("topology.add",device_name=device.nodeName)}}'>
+                                <i class="bi bi-plus"></i>
+                                Add Device
+                            </a>
+                        </div>
+                            
+                    
+                    </td>
+                </tr>
+                {% endfor %}
+            {% else %}
+                <tr>
+                    <td colspan="3">No devices found</td>
+                </tr>
+            {% endif %}
+        </tbody>
+        <tbody>
+            {% if dislink %}
+                {% for link in dislink %}
+                <tr>
+                    <td></td>
+                    <td>{{ link.local.nodeName }}</td>
+                    <td>{{ link.remote.nodeName }}</td>
+                    <td>{{ link.learntFrom }}</td>
+                    <td>
+                        <div class="col">
+                            <a href=''>
+                                <i class="bi bi-plus"></i>
+                                Add Link
+                            </a>
+                        </div>
+                            
+                    
+                    </td>
+                </tr>
+                {% endfor %}
+            {% else %}
+                <tr>
+                    <td colspan="3">No devices found</td>
+                </tr>
+            {% endif %}
+        </tbody>
+    </table>
+        
+    <script src="https://d3js.org/d3.v4.min.js"></script>
+    <div id="topology"></div>
+    <script src="{{ url_for('js.topology_js') }}"></script>
+
+{% endblock %}
\ No newline at end of file
diff --git a/src/webui/service/topology/__init__.py b/src/webui/service/topology/__init__.py
new file mode 100644
index 0000000000000000000000000000000000000000..1549d9811aa5d1c193a44ad45d0d7773236c0612
--- /dev/null
+++ b/src/webui/service/topology/__init__.py
@@ -0,0 +1,14 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
diff --git a/src/webui/service/topology/forms.py b/src/webui/service/topology/forms.py
new file mode 100644
index 0000000000000000000000000000000000000000..55c5d34d1de1e6fc715a99b3d7ceadcdd5d5f6c9
--- /dev/null
+++ b/src/webui/service/topology/forms.py
@@ -0,0 +1,86 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# external imports
+from flask_wtf import FlaskForm
+from flask_wtf.file import FileAllowed
+from wtforms import SelectField, FileField, SubmitField
+
+from wtforms import StringField, SelectField, TextAreaField, SubmitField, BooleanField, Form
+from wtforms.validators import DataRequired, Length, NumberRange, Regexp, ValidationError
+from common.proto.context_pb2 import DeviceOperationalStatusEnum
+from webui.utils.form_validators import key_value_validator
+
+class AddDeviceForm(FlaskForm):
+    device_id = StringField('ID', 
+                           validators=[DataRequired(), Length(min=5)])
+    device_type = SelectField('Type', choices = [])                                                     
+    operational_status = SelectField('Operational Status',
+                        #    choices=[(-1, 'Select...'), (0, 'Undefined'), (1, 'Disabled'), (2, 'Enabled')],
+                           coerce=int,
+                           validators=[NumberRange(min=0)])
+    device_drivers_undefined = BooleanField('UNDEFINED / EMULATED')
+    device_drivers_openconfig = BooleanField('OPENCONFIG')
+    device_drivers_transport_api = BooleanField('TRANSPORT_API')
+    device_drivers_p4 = BooleanField('P4')
+    device_drivers_ietf_network_topology = BooleanField('IETF_NETWORK_TOPOLOGY')
+    device_drivers_onf_tr_352 = BooleanField('ONF_TR_352')
+    device_drivers_xr = BooleanField('XR')
+    device_config_address = StringField('connect/address',default='127.0.0.1',validators=[DataRequired(), Length(min=5)])
+    device_config_port = StringField('connect/port',default='0',validators=[DataRequired(), Length(min=1)])
+    device_config_settings = TextAreaField('connect/settings',default='{}',validators=[DataRequired(), Length(min=2)])
+    submit = SubmitField('Add')
+
+    def validate_operational_status(form, field):
+        if field.data not in DeviceOperationalStatusEnum.DESCRIPTOR.values_by_number:
+            raise ValidationError('The operational status value selected is incorrect!')
+
+class ConfigForm(FlaskForm):
+    device_key_config = StringField('Key configuration')
+    device_value_config = StringField('Value configuration')    
+    submit = SubmitField('Add')
+
+
+class UpdateDeviceForm(FlaskForm):
+    update_operational_status = SelectField('Operational Status',
+                           choices=[(-1, 'Select...'), (0, 'Undefined'), (1, 'Disabled'), (2, 'Enabled')],
+                           coerce=int,
+                           validators=[NumberRange(min=0)])
+                        
+    submit = SubmitField('Update')
+
+class ContextTopologyForm(FlaskForm):
+    context_topology = SelectField(
+        'Ctx/Topo',
+        choices=[],
+        validators=[
+            DataRequired(),
+            Length(min=1)
+        ])
+    submit = SubmitField('Submit')
+    
+class DescriptorForm(FlaskForm):
+    descriptors = FileField(
+        'Descriptors',
+        validators=[
+            FileAllowed(['json'], 'JSON Descriptors only!')
+        ])
+    submit = SubmitField('Submit')
+
+class SpeakerForm(FlaskForm):
+    
+    speaker_address = StringField('ip',default='127.0.0.1',validators=[DataRequired(), Length(min=5)])
+    speaker_port = StringField('port',default='179',validators=[DataRequired(), Length(min=1)])
+    speaker_as = StringField('as',default='65000',validators=[DataRequired(), Length(min=1)])
+    submit = SubmitField('Submit')
\ No newline at end of file
diff --git a/src/webui/service/topology/routes.py b/src/webui/service/topology/routes.py
new file mode 100644
index 0000000000000000000000000000000000000000..498252cfb4665aff1a2cab77d64da5f41ea7bd13
--- /dev/null
+++ b/src/webui/service/topology/routes.py
@@ -0,0 +1,245 @@
+# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import json,logging
+from flask import current_app, render_template, Blueprint, flash, session, redirect, url_for, request
+from common.proto.context_pb2 import (
+    ConfigActionEnum, ConfigRule, ConfigRule_Custom, Device, DeviceConfig, DeviceDriverEnum, DeviceId, DeviceList, DeviceOperationalStatusEnum, 
+    Empty, EndPoint, EndPointId, TopologyId, Uuid)
+from common.tools.object_factory.Context import json_context_id
+from common.tools.object_factory.Topology import json_topology_id
+from context.client.ContextClient import ContextClient
+from device.client.DeviceClient import DeviceClient
+from webui.service.device.forms import AddDeviceForm
+from common.DeviceTypes import DeviceTypeEnum
+from webui.service.topology.forms import ConfigForm, SpeakerForm
+from webui.service.topology.forms import UpdateDeviceForm
+
+from bgpls_speaker.client.BgplsClient import BgplsClient
+from common.proto.bgpls_pb2 import (BgplsSpeaker, DiscoveredDeviceList,DiscoveredDevice,DiscoveredLinkList,DiscoveredLink, NodeDescriptors)
+
+topology = Blueprint('topology', __name__, url_prefix='/topology')
+context_client = ContextClient()
+device_client = DeviceClient()
+bgpls_client = BgplsClient()
+logger = logging.getLogger(__name__)
+
+@topology.get('/')
+def home():
+    if 'context_uuid' not in session or 'topology_uuid' not in session:
+        flash("Please select a context!", "warning")
+        return redirect(url_for("main.home"))
+
+    context_uuid = session['context_uuid']
+    topology_uuid = session['topology_uuid']
+
+    context_client.connect()
+    json_topo_id = json_topology_id(topology_uuid, context_id=json_context_id(context_uuid))
+    grpc_topology = context_client.GetTopology(TopologyId(**json_topo_id))
+    topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids}
+    
+    if grpc_topology is None:
+        flash('Context({:s})/Topology({:s}) not found'.format(str(context_uuid), str(topology_uuid)), 'danger')
+        devices = []
+    else:
+        topo_device_uuids = {device_id.device_uuid.uuid for device_id in grpc_topology.device_ids}
+        grpc_devices: DeviceList = context_client.ListDevices(Empty())
+        devices = [
+            device for device in grpc_devices.devices
+            if device.device_id.device_uuid.uuid in topo_device_uuids
+        ]
+
+    # ListNewDevices discovered from bgpls
+    logger.info('topology/home')
+    bgpls_client.connect()
+    logger.info('bgpls_client.connect %s',bgpls_client)
+    discovered_device_list = bgpls_client.ListDiscoveredDevices(Empty())
+    logger.info('discoveredDeviceList %s',discovered_device_list)
+    # List Links discovered from bgpls
+    discovered_link_list = bgpls_client.ListDiscoveredLinks(Empty())
+    logger.info('discoveredLinkList %s',discovered_link_list)
+    # List current open speaker connections
+    speaker_list=bgpls_client.ListBgplsSpeakers(Empty())
+
+
+    context_client.close()
+    bgpls_client.close()
+
+    return render_template(
+        'topology/home.html', devices=devices, dde=DeviceDriverEnum,
+        dose=DeviceOperationalStatusEnum,disdev=discovered_device_list.discovereddevices,
+        dislink=discovered_link_list.discoveredlinks,speakers=speaker_list.speakers)
+
+@topology.route('add/<path:device_name>', methods=['GET', 'POST'])
+def add(device_name):
+    """"
+    Add a discovered device from bgpls protocol. Populate form from
+    existent info in bgpls. 
+    """
+    # TODO: Conect to device and get necessary info
+    form = AddDeviceForm()
+
+    logger.info('topology/add')    
+    
+    # listing enum values
+    form.operational_status.choices = []
+    for key, _ in DeviceOperationalStatusEnum.DESCRIPTOR.values_by_name.items():
+        form.operational_status.choices.append(
+            (DeviceOperationalStatusEnum.Value(key), key.replace('DEVICEOPERATIONALSTATUS_', '')))
+        
+    form.device_type.choices = []
+    # items for Device Type field
+    for device_type in DeviceTypeEnum:
+        form.device_type.choices.append((device_type.value,device_type.value))    
+
+    if form.validate_on_submit():
+        device_obj = Device()
+        # Device UUID: 
+        device_obj.device_id.device_uuid.uuid = form.device_id.data # pylint: disable=no-member
+
+        # Device type: 
+        device_obj.device_type = str(form.device_type.data)
+
+        # Device configurations: 
+        config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member
+        config_rule.action = ConfigActionEnum.CONFIGACTION_SET
+        config_rule.custom.resource_key = '_connect/address'
+        config_rule.custom.resource_value = form.device_config_address.data
+
+        config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member
+        config_rule.action = ConfigActionEnum.CONFIGACTION_SET
+        config_rule.custom.resource_key = '_connect/port'
+        config_rule.custom.resource_value = form.device_config_port.data
+
+        config_rule = device_obj.device_config.config_rules.add() # pylint: disable=no-member
+        config_rule.action = ConfigActionEnum.CONFIGACTION_SET
+        config_rule.custom.resource_key = '_connect/settings'
+
+        try:
+            device_config_settings = json.loads(form.device_config_settings.data)
+        except: # pylint: disable=bare-except
+            device_config_settings = form.device_config_settings.data
+        logger.info('(topology/add) config settings %s', form.device_config_settings.data)    
+        if isinstance(device_config_settings, dict):
+            config_rule.custom.resource_value = json.dumps(device_config_settings)
+            logger.info('(topology/add) config settings is instance to json')
+        else:
+            config_rule.custom.resource_value = str(device_config_settings)
+
+        # Device status: 
+        device_obj.device_operational_status = form.operational_status.data
+
+        # Device drivers: 
+        if form.device_drivers_undefined.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_UNDEFINED)
+        if form.device_drivers_openconfig.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_OPENCONFIG)
+        if form.device_drivers_transport_api.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_TRANSPORT_API)
+        if form.device_drivers_p4.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_P4)
+        if form.device_drivers_ietf_network_topology.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_IETF_NETWORK_TOPOLOGY)
+        if form.device_drivers_onf_tr_352.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_ONF_TR_352)
+        if form.device_drivers_xr.data:
+            device_obj.device_drivers.append(DeviceDriverEnum.DEVICEDRIVER_XR)
+
+        try:
+            device_client.connect()
+            logger.info('add device from speaker:%s',device_obj)
+            response: DeviceId = device_client.AddDevice(device_obj)
+            device_client.close()
+            flash(f'New device was created with ID "{response.device_uuid.uuid}".', 'success')
+            bgpls_client.connect()
+            bgpls_client.NotifyAddNodeToContext(NodeDescriptors(nodeName=device_obj.device_id.device_uuid.uuid))
+            bgpls_client.close()
+            return redirect(url_for('device.home'))
+        except Exception as e:
+            flash(f'Problem adding the device. {e.details()}', 'danger')
+        
+    # Prefill data with discovered info from speaker
+    # Device Name from bgpls
+    form.device_name=device_name
+    device=device_name
+    form.device_id.data=device_name
+    # Default values (TODO: NOT WORKING)
+    form.device_type.data=DeviceTypeEnum.EMULATED_PACKET_ROUTER
+    form.device_config_settings.data=str('{"username": "admin", "password": "admin"}')
+
+    return render_template('topology/add.html', form=form, device=device,
+                        submit_text='Add New Device')
+
+@topology.route('detail/<path:device_uuid>', methods=['GET', 'POST'])
+def detail(device_uuid: str):
+    request = DeviceId()
+    request.device_uuid.uuid = device_uuid
+    context_client.connect()
+    response = context_client.GetDevice(request)
+    context_client.close()
+    return render_template('topology/detail.html', device=response,
+                                                 dde=DeviceDriverEnum,
+                                                 dose=DeviceOperationalStatusEnum)
+
+@topology.route('addSpeaker', methods=['GET', 'POST'])
+def addSpeaker():
+    # Conectar con bgpls¿
+    bgpls_client.connect()
+    form = SpeakerForm()
+    if form.validate_on_submit():
+        logger.info('addSpeaker ip:%s',form.speaker_address.data)
+        bgpls_client.AddBgplsSpeaker(BgplsSpeaker(address=form.speaker_address.data,port=form.speaker_port.data,asNumber=form.speaker_as.data))
+        flash(f'Speaker "{form.speaker_address.data}:{form.speaker_port.data}" added successfully!', 'success')
+    bgpls_client.close()
+    return render_template('topology/addSpeaker.html',form=form)
+
+@topology.route('formSpeaker', methods=['GET','POST'])
+def formSpeaker():
+    # Conectar con bgpls¿
+    form = SpeakerForm()
+    if request.method=="POST":
+        address = form.speaker_address.data
+        port = form.speaker_port.data
+        as_ = form.speaker_as.data
+        logger.info("FORM formSpeaker: %s %s %s", address,port,as_)
+        
+        flash(f'Speaker "{address}:{port}" added successfully!', 'success')
+
+    return redirect(url_for('topology.home'))
+    # return 'Form submitted'
+
+
+@topology.route('editSpeakers', methods=['GET','POST'])
+def editSpeakers():
+
+    speakers=[]
+    bgpls_client.connect()
+    speaker_list=bgpls_client.ListBgplsSpeakers(Empty())
+    speakers_ids=[speaker for speaker in speaker_list.speakers if speaker.id]
+    speakers=[bgpls_client.GetSpeakerInfoFromId(ids) for ids in speakers_ids]
+        
+    bgpls_client.close()
+    return render_template('topology/editSpeakers.html',speakers=speakers)
+
+
+@topology.route('disconnectSpeaker/<path:speaker_address>', methods=['GET','POST'])
+def disconnectSpeaker(speaker_address):
+
+    bgpls_client.connect()
+    current_speaker=BgplsSpeaker(address=speaker_address)
+    logger.info('Disconnecting speaker: %s...',speaker_address)
+    bgpls_client.DisconnectFromSpeaker(current_speaker)
+    bgpls_client.close()
+
+    return redirect(url_for('topology.editSpeakers'))
\ No newline at end of file