Executing Ping NVE, Traceroute NVE, and Path Trace NVE
An oDN must be created before executing ping NVE, traceroute NVE, or path trace NVE.
Creating an oDn
Creating an oDn
POST http://<mgmt0_IP>/api/node/mo/sys/action/lsubj-[].json
{"actionLSubj":
{"attributes":
{
"oDn": ""
}
}
This example demonstrates how to create an oDn to enable executing ping NVE, traceroute NVE, or path trace NVE.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Executing Ping NVE
Executing Ping NVE
POST http://<mgmt0_IP>/api/node/mo/sys/action/lsubj-[].json
{
"ngoamPingNve":
{"attributes":
{
"session" : "12.0.22.1-2"
"dstIp" : "12.0.22.1"
"vni" : "31000"
"profileId": "1"
"adminSt" : "1"
"count" : "10000"
}
}
}
The following NGOAM commands are the executable commands; these actions will start once POST request is issued. Results for these executable commands are stored as children objects and can be retrieved by a GET request. To start an executable command, a POST must be issued with these mandatory fields:
- session - A character string to identify the unique execution.
- adminSt - Set to 1 to activate the session and specify one of the destination fields such as dstIp, dstIpv6, and dstMAC.
The rest of the fields are optional and need to be specified for a given use case. Different session names create a different instance of the objects with result objects as children. If any other property is changed, it creates new exec request in the backend and results are appended to the the same exec object.
Note: The POST fields are optional. See the GET request for all available fields.
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
ping nve ip 12.0.22.1 profile 1 vni 31000 count 10000
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Querying the Ping NVE
Querying the Ping NVE
GET http://<mgmt0_IP>/api/node/mo/sys/action/lsubj-[].json?rsp-subtree=full
"ngoamPingNveRslt": {
"attributes": {
"ack": "no",
"avgRtt": "4",
"descr": "",
"endTs": "never",
"errorCode": "",
"failReason": "",
"maxRtt": "4",
"minRtt": "4",
"notSentPkts": "0",
"operSt": "scheduled",
"packetSz": "46",
"peerClassId": "unspecified",
"qual": "",
"rSz": "0",
"rTm": "00:00:00:00.000",
"rcvdPkts": "1",
"replyIp": "12.0.22.1",
"replyIpv6": "",
"rn": "pingnverslt-[8]",
"sPort": "54123",
"sentPkts": "1",
"sessionId": "8",
"startTs": "never",
"totalRtt": "5",
"type": "0"
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Executing Traceroute NVE
Executing Traceroute NVE
POST http://<mgmt0_IP>/api/node/mo/sys/action/lsubj-[].json
{
"ngoamTraceRtNve":
{"attributes":
{
"session" : "33.33.33.2-2"
"dstIp" : "33.33.33.2"
"srcIp" : "33.33.33.3"
"vrf" : "vni-31000"
"adminSt" : "1"
}
}
}
The POST fields are optional. See the GET request for all available fields.
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
traceroute nve ip 33.33.33.2 vrf vni-31000 src 33.33.33.3
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Querying the Traceroute NVE
Querying the Traceroute NVE
GET http://<mgmt0_IP>//api/node/mo/sys/action/lsubj-[].json?rsp-subtree=full
{
"ngoamTraceRtNveRslt": {
"attributes": {
"ack": "no",
"descr": "",
"dstIp": "12.0.22.1",
"dstIpv6": "",
"endTs": "never",
"errorCode": "",
"failReason": "",
"maxHops": "3",
"operSt": "scheduled",
"peerClassId": "unspecified",
"qual": "",
"rSz": "0",
"rTm": "00:00:00:00.000",
"rn": "trnverslt-[4]",
"sessionId": "4",
"startTs": "never",
"type": "0"
},
"children": [
{
"ngoamPathTr": {
"attributes": {
"id": "1",
"rn": "pathtr-1"
},
"children": [
{ "ngoamNodeTr": {
"attributes": {
"addr": "55.55.55.2",
"elapsedTime": "00:00:00:00.006",
"order": "1",
"rn": "nodetr-1",
"v6addr": "::"
}}},{
"ngoamNodeTr": {
"attributes": {
"addr": "33.33.33.2",
"elapsedTime": "00:00:00:00.002",
"order": "3",
"rn": "nodetr-3",
"v6addr": "::"
}}},{
"ngoamNodeTr": {
"attributes": {
"addr": "12.0.22.1",
"elapsedTime": "00:00:00:00.002",
"order": "2",
"rn": "nodetr-2",
"v6addr": "::"
}}}]
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Executing Path Trace NVE
Executing Path Trace NVE
POST http://<mgmt0_IP>/api/node/mo/sys/action/lsubj-[].json
{
"ngoamPathTraceNve": {
"attributes": {
"session": "12.0.22.1-3"
"dstIp": "12.0.22.1"
"vni": "31000"
"reqStats": "yes"
"adminSt": "1"
}
}
}
The POST fields are optional. See the GET request for all available fields.
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right.
pathtrace nve ip 12.0.22.1 vni 31000 req-stats
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Querying the Path Trace NVE
Querying the Path Trace NVE
GET http://<mgmt0_IP>/api/node/mo/sys/action/lsubj-[].json?rsp-subtree=full
{
"ngoamPathTraceNveRslt": {
"attributes": {
"ack": "no",
"descr": "",
"dstIp": "12.0.22.1",
"dstIpv6": "",
"endTs": "never",
"errorCode": "",
"failReason": "",
"maxHops": "2",
"operSt": "scheduled",
"peerClassId": "unspecified",
"qual": "",
"rSz": "0",
"rTm": "00:00:00:00.000",
"rn": "ptrnverslt-[6]",
"sessionId": "6",
"startTs": "never",
"type": "0"
},
"children": [
{
"ngoamPathPtr": {
"attributes": {
"id": "1",
"rn": "pathptr-1"
}, "children": [
{
"ngoamNodePtr": {
"attributes": {
"addr": "55.55.55.2",
"ngoamPathTraceNveRslt": {
"attributes": {
"ack": "no",
"descr": "",
"dstIp": "12.0.22.1",
"dstIpv6": "",
"endTs": "never",
"errorCode": "",
"failReason": "",
"maxHops": "2",
"operSt": "scheduled",
"peerClassId": "unspecified",
"qual": "",
"rSz": "0",
"rTm": "00:00:00:00.000",
"rn": "ptrnverslt-[6]",
"sessionId": "6",
"startTs": "never",
"type": "0"
},
"children": [
{
"ngoamPathPtr": {
"attributes": {
"id": "1",
"rn": "pathptr-1"
}, "children": [
{
"ngoamNodePtr": {
"attributes": {
"addr": "55.55.55.2",
"egressIf": "Eth5/7/3",
"egressIfState": "UP",
"elapsedTime": "00:00:00:00.013",
"ingressIf": "Eth5/7/1",
"ingressIfState": "UP",
"order": "1",
"rn": "nodeptr-1",
"rxBandwidth": "10000000",
"rxBcast": "11",
"rxByteRate": "0",
"rxBytes": "26696076",
"rxDiscards": "0",
"rxErrors": "1",
"rxLen": "84",
"rxLoad": "0",
"rxMcast": "24222",
"rxPktRate": "0",
"rxUcast": "384",
"rxUnknown": "0",
"txBandwidth": "10000000",
"txBcast": "9",
"txByteRate": "0",
"txBytes": "26731567",
"txDiscards": "0",
"txErrors": "18",
"txLen": "84",
"txLoad": "0",
"txMcast": "24179",
"txPktRate": "0",
"txUcast": "940",
"v6addr": "::”
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Clearing a Session
Clearing a Session
DELETE http://<mgmt0_IP>/api/node/mo/sys/action/lsubj-[].json
Issue a DELETE oDn request to clear sessions created using the REST API.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html