The NSP Topology RESTCONF API services offer GET operations, enable OSS applications to access information regarding network topology. (L2, L3, SAPs, TE and SR-TE). The Internet Engineering Task Force (IETF) creates standard models to support use cases in the northbound Interfaces (NBIs) of IP controllers. The NSP Topology API features an IETF framework that functions as a programmable northbound mediation layer, allowing for the import of IETF-based models into NSP. Imported IETF service or network YANG models are then exposed via the NSP's RESTCONF NBI, which is compliant with the RESTCONF RFC 8040.
NSP supports the use of RESTCONF to retrieve IETF-compliant topology models, including layer 2 and 3 topology aspects, and traffic engineering topology aspects. This is in accordance with RFC8345, RFC8346, RFC8944, and draft-dbwb-opsawg-sap-02, and allows for the retrieval of service attachment points. IETF-compliant topology models are retrieved using the NSP's RESTCONF APIs.
In NSP 23.11, NSP offers an API related with Topology use case, Router to NE Correlation. This API populates the multi-layer topology in the Network Map View and IETF topology.
In order to use the NSP's IETF framework, both the Network Infrastructure Management and Service Activation and Configuration licensed packages must be part of your deployment. Additionally, several artifacts must be installed, such as IETF artifacts, datasync mapping files. Documents delivered with these artifacts provide installation and compatibility information.
For more information, check NSP System Administrator Guide for more information about adding or removing installation options.
Note
This L2, L3 and TE topology API has been tested with and is supported in NSP 22.11.
SR-TE topology has been tested and supported in NSP 23.4.
Router to NE Correlation API has been tested and supported in NSP 23.11.
The followoing IETF L2 YANG model, L3 YANG model and TE Yang model can be found in the NSP Developer Portal under Topology API section. File topology-api.zip contains all the YANG model definition.
You can download the zip file "NSP_IETF_Topology_<version>.zip" from the Nokia ALED. From the download link, choose NSP, release version, and under Beta_Artifacts folder. Contact Nokia Support for more information.
Zip file content:
Mandatory Files: IetfTopologies.json, IetfNodeHandlerForNSPNetworkElement.java, IetfTopologyDeleteObjectFilter.java, L2TopologyHandler.java, L3UnicastTopologyHandler.java, SAPTopologyHandler.java
Optional Files: IetfSapTopology.json
L2/L3 topologies are populated by default with the mandatory files uploaded
SAP topology will be populated if optional mapping file is uploaded.
For L2 and L3 IETF requests to work, the following steps are required to be done on the setup
The following RESTCONF API request with attaching all the required 'json' and 'java' files together as described above, will upload all the files to the MD-converter and the conversion of the data will start.
When the files are successfully loaded, a resync/reload will be generated which will sync all the data in nsp store to the IETF db, the IETF requests for L2 and L3 topologies should return data successfully.
Note
Limitation: Currently, the full resync can only be triggered once.
Limitation: When updating service resources like sites and endpoints though CLI, there is a possibility that some attributes may not be updated in IETF.
The IETF creates standard models to support use cases in the NBI of IP controllers. These model focus primarily on L2NM and L3NM network services, IETF network definitions, and IETF TE functions.
NSP supports the use of RESTCONF to retrieve IETF-compliant topology models, including layer 2 and 3 topology aspects, and traffic engineering topology aspects. This is in accordance with RFC8345, RFC8346, RFC8944 allows for the retrieval of service attachment points. IETF-compliant topology models are retrieved using the NSP's RESTCONF APIs.
The L2 topology layer represents the link layer or Ethernet connection. l2-network-topology defines the YANG data model for Layer 2 network topologies by augmenting the generic network and network topology model with L2 specific topology attributes.
Northbound RESTCONF API are supported in NSP, for retrieval and export of L2 topology and supporting L2 network Attributes, for both MDM and NFMP managed networks.
Example of IETF L2 topology:
/ietf-network:networks/network=L2Topology/ietf-network-topology:link=11.11.11.11:Port 1/1/1--12.12.12.12:Port 1/1/1
/ietf-network:networks/network=L2Topology/node=11.11.11.11
The L3 Topology layer represents the Network layer and IGP layer. l3-network-topology (RFC 8346) defines the YANG data model for Layer 3 network topologies by augmenting the generic network and network topology model with L3 specific topology attributes. Northbound Restconf api are supported for retrieval and export of L3 topology and supporting L3 network Attributes, for both MDM and NFMP managed networks.
Example of IETF L3 topology:
/ietf-network:networks/network=TopologyId-15:0:15-isis/ietf-network-topology:link=12.12.12.12-psn-01:5.0.0.12--12.12.12.12:5.0.0.12–l1
/ietf-network:networks/network=TopologyId-15:0:15-isis/node=12.12.12.12-psn-01
SAP topology is Service Attachment Points topology. A YANG data model for representing an abstract view of the provider network topology containing the points from which its services can be attached (e.g., basic connectivity, VPN, network slices). The data model augments the 'ietf-network' data model by adding the concept of service attachment points (SAPs). The service attachment points are the points to which network services (such as L3VPN or L2VPN) can be attached.
Restconf NBI support is provided for ietf-sap-ntw.yang, for example,
/restconf/data/ietf-network:networks/network=<network-id>/node=<node-id>/ietf-sap-ntw:service=<ietf-vpn-common:service-type>/sap=<sap-id>
i.e: /ietf-network:networks/network=SAPTopology/node=15.15.15.15/ietf-sap-ntw:service=ietf-vpn-common:vpws/sap=/nsp-equipment:network/network-element[ne-id='15.15.15.15']/hardware-component/port[component-id='shelf=1/cardSlot=1/card=1/mdaSlot=1/mda=1/port=1/1/1']
The TE topology defines a YANG data model for representing, retrieving, and manipulating Traffic Engineering (TE) Topologies. The model serves as a base model that other technology-specific TE topology models can augment. It is a collection of all TE information about all TE nodes and TE links in the network.
A TE node represents one or several nodes, or a fraction of a node, which can be a switch or router that is physical or virtual.
A TE link represents one or several (physical) links or a fraction of a link. A TE link belongs to and is fully defined in exactly one TE topology. A TE link is assigned a unique ID within the TE topology scope. TE link attributes include parameters related to the data-plane aspects of the associated link(s) (unreserved bandwidth, resource maps / resource pools, etc.), as well as the configuration data (remote node IDs / link IDs, Shared Risk Link Groups (SRLGs), administrative colors, etc.). A TE link is connected to a TE node, terminating the TE link via exactly one TE Link Termination Point (LTP).
The postman collection samples will list TE nodes, TE links and TE link termination point APIs.
NSP supports the following TE topology:
In this example, it shows the correlation between L3 topology and L2 topology. Using the APIs listed above, it provides step to step guide:
GET https://{{server}}:8545/restconf/data/ietf-network:networks/network=TopologyId-200:100:0-isis/supporting-network
Output:
{
"ietf-network:supporting-network": [
{
"network-ref": "/ietf-network:networks/network[network-id='L2Topology']"
}
]
}
2. Using NSP Inventory Find to retrieve the L2 network topology
POST https://{{server}}:8545/restconf/operations/nsp-inventory:find
Body:
{
"input" : {
"xpath-filter": "/ietf-network:networks/network[network-id='L2Topology']"
}
}
Output:
{
"nsp-inventory:output": {
"data": [
{
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']",
"nsp-model:creation-time": "2023-05-09T17:16:32.462Z",
"nsp-model:last-modified-time": "2023-05-09T17:16:32.462Z"
},
"node-id": "11.50.150.31",
"ietf-te-topology:te-node-id": null,
"ietf-network-topology:termination-point": [
{
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node/ietf-network-topology:termination-point",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']",
"nsp-model:creation-time": "2023-05-09T17:16:36.063Z",
"nsp-model:last-modified-time": "2023-05-09T17:16:36.063Z"
},
"tp-id": "1/1/6",
"ietf-te-topology:te-tp-id": null,
"ietf-l2-topology:l2-termination-point-attributes": {
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node/ietf-network-topology:termination-point/ietf-l2-topology:l2-termination-point-attributes",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']/ietf-l2-topology:l2-termination-point-attributes",
"nsp-model:creation-time": "2023-05-09T17:16:36.063Z",
"nsp-model:last-modified-time": "2023-05-09T17:16:36.063Z"
},
"interface-name": "1/1/6",
"mac-address": "c0:d9:01:01:00:06",
"encapsulation-type": "ietf-l2-topology:ethernet",
"lag": false,
"unnumbered-id": [
6
],
"member-link-tp": [],
"nsp-ietf-network-topology:nsp-attributes": []
},
"ietf-l3-unicast-topology:l3-termination-point-attributes": {
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node/ietf-network-topology:termination-point/ietf-l3-unicast-topology:l3-termination-point-attributes",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']/ietf-l3-unicast-topology:l3-termination-point-attributes"
}
}
},
It will return a list of nodes in the L2 network topology. Here is the API to retrieve a specific node in L2.
3. Get supporting node in L2
GET https://{{server}}:8545/restconf/data/ietf-network:networks/network=TopologyId-200:100:0-isis/node=11.50.150.31/supporting-node
Output:
{
"ietf-network:supporting-node": [
{
"network-ref": "/ietf-network:networks/network[network-id='L2Topology']",
"node-ref": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']"
}
]
}
4. From here, using Find API to retrieve all the termination points information on this specific node.
POST https://{{server}}:8545/restconf/operations/nsp-inventory:find
Body:
{
"input" : {
"xpath-filter": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']"
}
}
Output:
{
"nsp-inventory:output": {
"data": [
{
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']",
"nsp-model:creation-time": "2023-05-09T17:16:32.462Z",
"nsp-model:last-modified-time": "2023-05-09T17:16:32.462Z"
},
"node-id": "11.50.150.31",
"ietf-te-topology:te-node-id": null,
"ietf-network-topology:termination-point": [
{
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node/ietf-network-topology:termination-point",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']",
"nsp-model:creation-time": "2023-05-09T17:16:36.063Z",
"nsp-model:last-modified-time": "2023-05-09T17:16:36.063Z"
},
"tp-id": "1/1/6",
"ietf-te-topology:te-tp-id": null,
"ietf-l2-topology:l2-termination-point-attributes": {
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node/ietf-network-topology:termination-point/ietf-l2-topology:l2-termination-point-attributes",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']/ietf-l2-topology:l2-termination-point-attributes",
"nsp-model:creation-time": "2023-05-09T17:16:36.063Z",
"nsp-model:last-modified-time": "2023-05-09T17:16:36.063Z"
},
"interface-name": "1/1/6",
"mac-address": "c0:d9:01:01:00:06",
"encapsulation-type": "ietf-l2-topology:ethernet",
"lag": false,
"unnumbered-id": [
6
],
"member-link-tp": [],
"nsp-ietf-network-topology:nsp-attributes": []
},
"ietf-l3-unicast-topology:l3-termination-point-attributes": {
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node/ietf-network-topology:termination-point/ietf-l3-unicast-topology:l3-termination-point-attributes",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']/ietf-l3-unicast-topology:l3-termination-point-attributes"
}
}
},
5. Get L3 All Termination Point and Supporting Termination Points on a specific node
GET https://{{server}}:8545/restconf/data/ietf-network:networks/network=TopologyId-200:100:0-isis/node=11.50.150.31/ietf-network-topology:termination-point
Output:
{
"ietf-network-topology:termination-point": [
{
"tp-id": "11.40.4.2",
"ietf-te-topology:te-tp-id": null,
"supporting-termination-point": [
{
"network-ref": "/ietf-network:networks/network[network-id='L2Topology']",
"node-ref": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']",
"tp-ref": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']"
}
],
"ietf-l3-unicast-topology:l3-termination-point-attributes": {
"ip-address": [
"11.40.4.2"
],
"ietf-l3-te-topology:l3-te-tp-attributes": {
"tp-ref": "/ietf-network:networks/network[network-id='TE-TopologyId-200:100:0-isis']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='11.40.4.2']",
"node-ref": "/ietf-network:networks/network[network-id='TE-TopologyId-200:100:0-isis']/node[node-id='11.50.150.31']",
"network-ref": "/ietf-network:networks/network[network-id='TE-TopologyId-200:100:0-isis']"
}
}
}
]
}
6. Get supporting termination points on a specific termination point on a specific node
GET https://{{server}}:8545/restconf/data/ietf-network:networks/network=TopologyId-200:100:0-isis/node=11.50.150.31/ietf-network-topology:termination-point=11.40.4.2/supporting-termination-point
Output:
{
"ietf-network:supporting-termination-point": [
{
"network-ref": "/ietf-network:networks/network[network-id='L2Topology']",
"node-ref": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']",
"tp-ref": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']"
}
]
}
7. From the above output, using the Find API to retrieve L2 termination point.
POST https://{{server}}:8545/restconf/operations/nsp-inventory:find
Body:
{
"input" : {
"xpath-filter": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']"
}
}
Output:
{
"nsp-inventory:output": {
"data": [
{
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node/ietf-network-topology:termination-point",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']",
"nsp-model:creation-time": "2023-05-09T17:16:36.063Z",
"nsp-model:last-modified-time": "2023-05-09T17:16:36.063Z"
},
"tp-id": "1/1/6",
"ietf-te-topology:te-tp-id": null,
"ietf-l2-topology:l2-termination-point-attributes": {
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node/ietf-network-topology:termination-point/ietf-l2-topology:l2-termination-point-attributes",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']/ietf-l2-topology:l2-termination-point-attributes",
"nsp-model:creation-time": "2023-05-09T17:16:36.063Z",
"nsp-model:last-modified-time": "2023-05-09T17:16:36.063Z"
},
"interface-name": "1/1/6",
"mac-address": "c0:d9:01:01:00:06",
"encapsulation-type": "ietf-l2-topology:ethernet",
"lag": false,
"unnumbered-id": [
6
],
"member-link-tp": [],
"nsp-ietf-network-topology:nsp-attributes": []
},
"ietf-l3-unicast-topology:l3-termination-point-attributes": {
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node/ietf-network-topology:termination-point/ietf-l3-unicast-topology:l3-termination-point-attributes",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']/ietf-l3-unicast-topology:l3-termination-point-attributes"
}
}
}
],
"end-index": 0,
"start-index": 0,
"total-count": 1
}
}
8. Get all L3 supporting link on a specific Topology
https://{{server}}:8545/restconf/data/ietf-network:networks/network=TopologyId-200:100:0-isis/ietf-network-topology:link
Output:
{
"ietf-network-topology:link": [
{
"link-id": "11.50.150.31:11.40.4.2--11.50.150.41:11.40.4.1--l1",
"source": {
"source-node": "/ietf-network:networks/network[network-id='TopologyId-200:100:0-isis']/node[node-id='11.50.150.31']",
"source-tp": "/ietf-network:networks/network[network-id='TopologyId-200:100:0-isis']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='11.40.4.2']"
},
"destination": {
"dest-node": "/ietf-network:networks/network[network-id='TopologyId-200:100:0-isis']/node[node-id='11.50.150.41']",
"dest-tp": "/ietf-network:networks/network[network-id='TopologyId-200:100:0-isis']/node[node-id='11.50.150.41']/ietf-network-topology:termination-point[tp-id='11.40.4.1']"
},
"ietf-l3-unicast-topology:l3-link-attributes": {
"name": "0110.5015.0031::0110.5015.0041=>11.40.4.2-ISIS_L1-PointToPoint-Original",
"metric1": 1000,
"metric2": 1000,
"flag": [
"nsp-ietf-network-topology:igp"
],
"nsp-ietf-network-topology:nsp-attributes": [],
"ietf-sr-mpls-topology:sr-mpls": {
"sids": {
"sid": [
{
"sid": 524286,
"address-family": "ipv4",
"is-eligible-for-protection": false,
"is-local": true,
"is-part-of-set": false,
"is-persistent": false,
"is-on-lan": false,
"weight": 0,
"value-type": "absolute"
}
]
}
},
"ietf-l3-te-topology:l3-te-link-attributes": {
"link-ref": "/ietf-network:networks/network[network-id='TE-TopologyId-200:100:0-isis']/ietf-network-topology:link[link-id='11.50.150.31:11.40.4.2--11.50.150.41:11.40.4.1--l1']",
"network-ref": "/ietf-network:networks/network[network-id='TE-TopologyId-200:100:0-isis']"
}
}
},
9. Get a specific L3 supporting link. Use the 'link-id' information from above output to find its supporting link.
GET https://{{server}}:8545/restconf/data/ietf-network:networks/network=TopologyId-200:100:0-isis/ietf-network-topology:link=11.50.150.31:11.40.4.2--11.50.150.41:11.40.4.1--l1/supporting-link
Output:
{
"ietf-network:supporting-link": [
{
"network-ref": "/ietf-network:networks/network[network-id='L2Topology']",
"link-ref": "/ietf-network:networks/network[network-id='L2Topology']/ietf-network-topology:link[link-id='11.50.150.31:1/1/6--11.50.150.41:1/1/6']"
}
]
}
10. From L3 getting support link output, retrieve L2 link information.
POST https://{{server}}:8545/restconf/operations/nsp-inventory:find
Body:
{
"input" : {
"xpath-filter": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']"
}
}
Output:
{
"nsp-inventory:output": {
"data": [
{
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node/ietf-network-topology:termination-point",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']",
"nsp-model:creation-time": "2023-05-09T17:16:36.063Z",
"nsp-model:last-modified-time": "2023-05-09T17:16:36.063Z"
},
"tp-id": "1/1/6",
"ietf-te-topology:te-tp-id": null,
"ietf-l2-topology:l2-termination-point-attributes": {
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node/ietf-network-topology:termination-point/ietf-l2-topology:l2-termination-point-attributes",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']/ietf-l2-topology:l2-termination-point-attributes",
"nsp-model:creation-time": "2023-05-09T17:16:36.063Z",
"nsp-model:last-modified-time": "2023-05-09T17:16:36.063Z"
},
"interface-name": "1/1/6",
"mac-address": "c0:d9:01:01:00:06",
"encapsulation-type": "ietf-l2-topology:ethernet",
"lag": false,
"unnumbered-id": [
6
],
"member-link-tp": [],
"nsp-ietf-network-topology:nsp-attributes": []
},
"ietf-l3-unicast-topology:l3-termination-point-attributes": {
"@": {
"nsp-model:schema-nodeid": "/ietf-network:networks/network/node/ietf-network-topology:termination-point/ietf-l3-unicast-topology:l3-termination-point-attributes",
"nsp-model:identifier": "/ietf-network:networks/network[network-id='L2Topology']/node[node-id='11.50.150.31']/ietf-network-topology:termination-point[tp-id='1/1/6']/ietf-l3-unicast-topology:l3-termination-point-attributes"
}
}
}
],
"end-index": 0,
"start-index": 0,
"total-count": 1
}
}
All steps in this tutorial are provided in the IETF L3 / L2 Correlation Tutorial Postman Collection .
Router to NE correlation feature is added in NSP 23.11 to populate the multi-layer topology in the Network Map View and IETF topology.
Rules:
Example of Router to NE Correlation API:
See examples provided in the Router-NE-Correlation postman collection.