The Network Topology Simulator is a framework that allows simulating devices that expose a management interface through a NETCONF/YANG interface.
The NETCONF/YANG management interface is simulated, and any YANG models can be loaded by the framework to be exposed. Random data is generated based on the specific models, such that each simulated device presents different data on its management interface.
The NTS Manager can be used to specify the simulation details and to manage the simulation environment at runtime.
The NTS framework is based on several open-source projects:
Each simulated device is represented as a docker container, where the NETCONF Server is running. The creation and deletion of docker containers associated with simulated devices is handled by the NTS Manager. The NTS Manager is also running as a docker container and exposes a NETCONF/YANG interface to control the simulation.
The purpose of the NTS Manager is to ease the utilization of the NTS framework. It enables the user to interact with the simulation framework through a NETCONF/YANG interface. The user has the ability to modify the simulation parameters at runtime and to see the status of the current state of the NTS. The NETCONF/YANG interface will be detailed below.
module: network-topology-simulator +--rw simulator-config! | +--rw simulated-devices? uint32 | +--rw mounted-devices? uint32 | +--rw netconf-call-home? boolean | +--rw notification-config | | +--rw fault-notification-delay-period* uint32 | | +--rw ves-heartbeat-period? uint32 | | +--rw is-netconf-available? boolean | | +--rw is-ves-available? boolean | +--rw controller-details | | +--rw controller-ip? inet:ip-address | | +--rw controller-port? inet:port-number | | +--rw netconf-call-home-port? inet:port-number | | +--rw controller-username? string | | +--rw controller-password? string | +--rw ves-endpoint-details | +--rw ves-endpoint-ip? inet:ip-address | +--rw ves-endpoint-port? inet:port-number | +--rw ves-endpoint-auth-method? authentication-method-type | +--rw ves-endpoint-username? string | +--rw ves-endpoint-password? string | +--rw ves-endpoint-certificate? string | +--rw ves-registration? boolean +--ro simulator-status +--ro simulation-usage-details | +--ro running-simulated-devices? uint32 | +--ro running-mounted-devices? uint32 | +--ro ssh-connections? uint32 | +--ro tls-connections? uint32 | +--ro base-netconf-port? uint32 | +--ro cpu-usage? percent | +--ro mem-usage? uint32 +--ro notification-count | +--ro total-ves-notifications | | +--ro normal? uint32 | | +--ro warning? uint32 | | +--ro minor? uint32 | | +--ro major? uint32 | | +--ro critical? uint32 | +--ro total-netconf-notifications | +--ro normal? uint32 | +--ro warning? uint32 | +--ro minor? uint32 | +--ro major? uint32 | +--ro critical? uint32 +--ro simulated-devices-list* [uuid] +--ro uuid string +--ro device-ip? string +--ro device-port* uint32 +--ro is-mounted? boolean +--ro operational-state? operational-state-type +--ro notification-count +--ro ves-notifications | +--ro normal? uint32 | +--ro warning? uint32 | +--ro minor? uint32 | +--ro major? uint32 | +--ro critical? uint32 +--ro netconf-notifications +--ro normal? uint32 +--ro warning? uint32 +--ro minor? uint32 +--ro major? uint32 +--ro critical? uint32 rpcs: +---x restart-simulation +---x add-key-pair-to-odl +---x invoke-notification +---w input | +---w device-id string | +---w yang-module-name string | +---w notification-object string +--ro output +--ro status enumeration
true
, each simulated device will try to use NETCONF Call Home feature and try to reach the ODL Controller. The default value is false
.Each simulated device is represented as a docker container, inside which the NETCONF Server runs. The simulated device exposes the YANG models which are found inside the yang folder. A custom version of the pyang utility is used to generate random data for each of the YANG modules found inside the yang folder.
Each simulated device exposes a number of NETCONF endpoints which represented by the sum of the SshConnections and TlsConnections environment variables, on consecutive ports. The first simulated device uses the ports starting from the NETCONF_BASE environment variable used when starting the NTS Manager, while the next one uses the next ports and so on and so forth. E.g. if the NETCONF_BASE=50000 and SshConnections=5 and TlsConnections=3, the first simulated device will expose ports from 50000 to 50007, the second simulated device will expose ports from 5008 to 50015 etc.
The first SshConnections ports exposed by a simulated device are SSH based. A NETCONF client can connect to the exposed endpoint using one of the SSH ports (e.g. 50000 to 50007, considering the previous example) and the username/password: netconf/netconf.
The last TlsConnections ports exposed by a simulated device are TLS based. A NETCONF client can connect to the exposed endpoint using one of the TLS ports (e.g. 50006 to 50008, considering the previous example), using a valid certificate and the username: netconf.
The docker-build-nts-manager.sh
script can be used to built the docker image associated with the NTS Manager. This will create a docker image named ntsim_manager_light, which will be used to start the simulation framework. Inside the docker image, port 830 will wait for connections for the NETCONF/YANG management interface.
The docker-build-onf-core-model-1-2.sh
script can be used to build the docker image associated with a simulated device, exposing the ONF CoreModel version 1.2.
The docker-build-onf-core-model-1-4.sh
script can be used to build the docker image associated with a simulated device, exposing the ONF CoreModel version 1.4.
The docker-build-openroadm.sh
script can be used to build the docker image associated with a simulated device, exposing the OpenROADM models.
The docker-build-o-ran-device.sh
script can be used to build the docker image associated with a simulated device, exposing the O-RAN models.
The docker-build-o-ran-sc-o-ran-ru.sh
script can be used to build the docker image associated with a simulated device, exposing the O-RAN-SC models.
The docker-build-x-ran-device.sh*
script can be used to build the docker image associated with a simulated device, exposing the X-RAN models.
The NTS Manager can be started using the docker-compose.yml
file that is provided inside tthe scripts folder. Further, the parameters present in this file are explained.
version: '3' services: ntsimulator: image: "ntsim_manager:latest" container_name: NTS_Manager ports: - "8300:830" volumes: - "/var/run/docker.sock:/var/run/docker.sock" - "/var/tmp/NTS_Manager:/opt/dev/scripts" - "/usr/bin/docker:/usr/bin/docker" labels: "NTS-manager": "" environment: NTS_IP: "172.17.0.1" NETCONF_BASE: 50000 DOCKER_ENGINE_VERSION: "1.40" MODELS_IMAGE: "ntsim_oran" VesHeartbeatPeriod: 0 IsVesAvailable: "true" IsNetconfAvailable: "true" VesRegistration: "false" VesEndpointPort: 8080 VesEndpointIp: "172.17.0.1" SshConnections: 1 TlsConnections: 0 K8S_DEPLOYMENT: "false" CONTAINER_NAME: "ntsimulator" NetconfCallHome: "true" NetconfCallHomePort: 6666 ControllerIp: "10.20.11.121" ControllerPort: 8181 ControllerUsername: "admin" ControllerPassword: "admin" IPv6Enabled: "true"
Port mapping:
"8300:830"
- this maps the 830 port from inside the docker container of the NTS Manager to the port 8300 from the host, and binds it to any IP address on the host:Volumes - these map 3 important things:
/var/run/docker.sock:/var/run/docker.sock
- please do not modify the path inside the container!;/var/tmp/NTS_Manager:/opt/dev/scripts
- please do not modify the path inside the container!;/usr/bin/docker:/usr/bin/docker
- please do not modify the path inside the container!;Labels - this associates the NTS-manager label to the docker container where the NTS runs;
Environment variables:
docker version
command in the host, and looking to the API version: #.##
variable from the Server details.true
when the user wants to the NTS Framework in a Kubernetes deployment. The default is false
.ntsim
. E.g.: the first simulated device will be ntsim-0, the second onoe ntsim-1 and so on. Please note that if multiple managers are deployed on the same machine, this environment variable needs to be different for each of the managers!172.17.0.1
.8181
.6666
.admin
.admin
.false
.true
, IPv6 is enabled. Please note that for a working configuration, it is the user responsibility to correctly configure the Docker daemon to work with IPv6, prior to starting the NTS Manager!After modifying the docker-compose.yml
file with values specific to your host, the NTS Manager can be started by running the command docker-compose up
from the scripts folder.
After the NTS Manager is started, it will wait for connections on its NETCONF/YANG management interface. One can connect to this using a NETCONF Client. The username/password for connecting are: netconf/netconf.
Example of docker ps
command result, after the NTS Manager was started:
7ff723b7f794 ntsim_manager:latest "sh -c '/usr/bin/sup…" 5 days ago Up 5 days 0.0.0.0:8300->830/tcp NTS_Manager
When the NTS Manager is started, its default configuration looks like this:
<simulator-config xmlns="urn:onf:params:xml:ns:yang:network-topology-simulator"> <simulated-devices>0</simulated-devices> <mounted-devices>0</mounted-devices> <netconf-call-home>false</netconf-call-home> <notification-config> <fault-notification-delay-period>0</fault-notification-delay-period> <ves-heartbeat-period>0</ves-heartbeat-period> <is-netconf-available>true</is-netconf-available> <is-ves-available>true</is-ves-available> </notification-config> <controller-details> <controller-ip>172.17.0.1</controller-ip> <controller-port>8181</controller-port> <netconf-call-home-port>6666</netconf-call-home-port> <controller-username>admin</controller-username> <controller-password>admin</controller-password> </controller-details> <ves-endpoint-details> <ves-endpoint-ip>172.17.0.1</ves-endpoint-ip> <ves-endpoint-port>30007</ves-endpoint-port> <ves-endpoint-auth-method>no-auth</ves-endpoint-auth-method> <ves-registration>false</ves-registration> </ves-endpoint-details> </simulator-config>
This configuration can be altered by connecting to the NTS Manager with a NETCONF Client.
Example RPC for starting one simulated device:
<?xml version="1.0" encoding="utf-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id=""> <edit-config> <target> <running/> </target> <config> <simulator-config xmlns="urn:onf:params:xml:ns:yang:network-topology-simulator"> <simulated-devices>1</simulated-devices> </simulator-config> </config> </edit-config> </rpc>
If the leaf <simulated-devices>1</simulated-devices>
will be set to a value of 1, the NTS Manager will start a new docker container. We can verify that this was successfull by running the docker ps
command. The results will look like this:
c18eb7a362f5 ntsim_oran "sh -c '/usr/bin/sup…" 4 days ago Up 4 days 172.17.0.1:50000->830/tcp, 172.17.0.1:50001->831/tcp, 172.17.0.1:50002->832/tcp, 172.17.0.1:50003->833/tcp, 172.17.0.1:50004->834/tcp, 172.17.0.1:50005->835/tcp, 172.17.0.1:50006->836/tcp, 172.17.0.1:50007->837/tcp, 172.17.0.1:50008->838/tcp, 172.17.0.1:50009->839/tcp reverent_bhabha
If, after setting the leaf <simulated-devices>1</simulated-devices>
to a value greater that 0, no new containers are created, please make sure that the image name specified in the MODELS_IMAGE environment variable when starting the NTS Manager is present in the host. You can verify that using the docker images
command.
Example of a result of such a command:
ntsim_oran_light latest 57b065de4458 4 days ago 186MB
This means that MODELS_IMAGE: "ntsim_oran_light:latest"
can be used as an environment variable when starting the NTS Manager.
Added features:
Bug fixes and improvements:
Added features:
Bug fixes and improvements:
Added features: