Cisco Nexus 3000 and 9000 Series NX-API REST SDK User Guide and API Reference
Introduction
NX-API REST brings Model Driven Programmability (MDP) to standalone (non-APIC-based fabric) Nexus family switches. In model-driven architectures, software maintains a complete, explicit representation of the administrative and operational state of the system (the model) and performs actions only as side-effects of mutations of model entities.
This model is a formal specification understood by network planners and developers that is rendered into a running system. Furthermore, this object model is made available through standard Representational State Transfer (REST) interfaces, making it easier to access and manipulate the object model, and hence, the configuration and runtime state of the system.
The operational aspects of the modeling include statistics, faults and events – i.e. each of these would also have a model representation that is accessible programmatically to query the health of the system. In addition, the northbound management clients get notified about faults and events in a proactive manner once they subscribe to interested events.
Supported Platforms
NX-API REST is available for use with the following platforms:
- Cisco Nexus 3132Q-XL, 3172PQ-XL, 3172TQ-XL switches, starting from Cisco NX-OS Release 7.0(3)I2(2)
- Cisco Nexus 3164Q and 31128PQ switches
- Cisco Nexus 3600 platform switches, starting from Cisco NX-OS Release 7.0(3)F3(1)
- Cisco Nexus 9000 Series switches
Note: NX-API REST is not supported for other Cisco Nexus 3000 and 3100 Series switches with less than 8GB memory.
Challenges with Current Approaches to Network Programmability
Most networks in use today were built on hardware with tightly coupled software intended to be managed and administered through the command-line interface (CLI).
These systems worked well in a world of static network configurations, static workloads, and predictable slower change rates for application scaling. As data center networks have been virtualized and begun moving to cloud and agile IT models, this model is no longer the optimal method.
Therefore, vendors are working to layer programmability onto existing offerings and device operating systems - for example, improving the accessibility of the CLIs by making them available outside of the switch by using HTTP/HTTPS and using JSON/XML payloads.
Although this approach increases capabilities, it is not an ideal method for incorporating programmability. The CLI based programming, whether locally on switch or remotely using HTTP/HTTPS, is still synchronous, proprietary, order dependent and sequential. Hence automating using CLI makes the task harder.
Cisco NX-API-REST Programmability with Object-Oriented Data Model and REST APIs
Cisco has taken a foundational approach to building a programmable network infrastructure with the Cisco ACI (Application Centric Infrastructure) solution. This infrastructure operates as a single system at the fabric level, controlled by the centralized Cisco Application Policy Infrastructure Controller (APIC).
The NX-API-REST model borrows several concepts from Cisco ACI and makes them available for non-ACI based standalone Nexus fabric environment. Like ACI, it uses an object-oriented eventual consistency model based on promise theory. Promise theory is based on scalable control of intelligent objects rather than more traditional imperative models, which can be thought of as a top-down management system. In this system, the central manager must be aware of both the configuration commands of underlying objects and the current state of those objects.
Promise theory, in contrast, relies on the underlying objects to handle configuration state changes initiated by the management agent itself as "desired state changes." The syntactically and semantically valid configuration objects are accepted into the system and their actual deployment is done in an asynchronous manner. The objects are then responsible for passing exceptions or faults back to the management system. This approach reduces the burden and complexity of the management system and allows greater scale.
Models present an opportunity to standardize the same, which in turn, makes them portable across platforms belonging to a given vendor or different vendors. Models allow access of the same consistent configuration and management data via different protocols like CLI, NETCONF, RESTCONF, standard RESTful access, etc., using different encoding mechanisms (JSON, XML etc.). They also allow faster introduction of these protocols/encodings in the northbound direction as underlying the model and all the software behind it is agnostic to these upper layers.
YANG Data Modeling
YANG is a data modeling language that supports data models for the NETCONF protocol. (The NETCONF protocol supports network configuration management.)
YANG provides a way to define the objects and data in NETCONF requests and replies. YANG models the network configuration, operational, and RPC data; and it provides semantics to better define NETCONF data in terms of constraints, reusable structures, and built-in/derived types.
For more details about YANG data modeling, visit YANG Central http://www.yang-central.org.
NX-API-REST Modeled Objects
In the Cisco NX-API-REST framework, configuration and state information of the switch is stored in a hierarchical tree structure known as the management information tree (MIT), which is accessible through the API. One can make changes on a single object or an object subtree. Each node in the MIT represents a managed object or group of objects. These objects are organized in a hierarchical way, creating logical object containers. Figure 1 depicts the logical hierarchy of the MIT object model.
The NX-API-REST uses an information-model-based architecture in which the model describes all the information that can be controlled by a management process. Object instances are referred to as managed objects (MOs). Every managed object in the system can be identified by a unique distinguished name (DN). This approach allows the object to be referred to globally.
The NX-API-REST API operates in forgiving mode, which means that missing attributes are substituted with default values (if applicable) that are maintained in the internal data management engine (DME). The DME validates and rejects incorrect attributes. The API is also atomic. If multiple MOs are being configured, and any of the MOs cannot be configured, the API stops its operation. It returns the configuration to its prior state, stops the API operation that listens for API requests, and returns an error code.
Full event subscription is enabled. When any MO is created, changed, or deleted because of a user- or system-initiated action, an event is generated. With an API query, you can create a subscription to any future changes in the results of that query.
In addition to its distinguished name, each object can be referred to by its relative name (RN). The relative name identifies an object relative to its parent object. Any given object's distinguished name is derived from its own relative name appended to its parent object's distinguished name. Distinguished names are directly mapped to URLs. Either the relative name or the distinguished name can be used to access an object, dependent on the current location in the MIT. The relationship among managed objects, relative names, and distinguished names is shown in figure 2.
The above figure depicts the distinguished name, which uniquely represents any given managed object instance, and the relative name, which represents it locally underneath its parent managed object. All objects in the tree exist under the root object.
Because of the hierarchical nature of the tree and the attribute system used to identify object classes, the tree can be queried in several ways for managed object information. Queries can be performed on an object itself through its distinguished name, on a class of objects, or on a tree-level, discovering all members of an object.
For all MIT queries, one can optionally return the entire subtree or a partial subtree. Additionally, the role-based access control (RBAC) mechanism in the system dictates which objects are returned; only the objects that the user has rights to view will ever be returned.
Managed-Object Properties
Managed objects in Cisco NX-API-REST contain properties that define the managed object. Properties in a managed object are divided into chunks managed by given processes within the operating system. Any given object may have several processes that access it. All these properties together are compiled at runtime and presented to the user as a single object. Figure 2 below shows an example of this relationship.
In Figure 3, the example object has three processes that write to property chunks in the object. The Data Management Engine (DME), which is the interface between the manageability agent (thus the user) and the object, the Port Manager, which handles port configuration, and the Spanning Tree Protocol (STP) all interact with chunks of this object. The object itself is presented to the user through the API as a single entity compiled at runtime.
Starting with Cisco NX-OS 7.0(3)I5(2), the managed objects in Cisco NX-API-REST are documented in the Cisco NX-API Model Reference document https://developer.cisco.com/media/dme/index.html.
Accessing the Object Data through REST Interfaces
REST is a software architecture style for distributed systems such as the World Wide Web. REST has emerged over the past few years as a predominant web service design model. REST has increasingly displaced other design models such as Simple Object Access Protocol (SOAP) and Web Services Description Language (WSDL) due to its simpler style. The Cisco NX-API-REST supports REST interfaces for programmatic access to Nexus switches.
REST is a collection of resources:
- The base universal resource identifier (URI) for the web service, such as http://example.com/resources/
- The Internet media type of the data supported by the web service; often JSON, XML, or YAML, but it can be any other valid Internet media type.
- The set of operations supported by the web service using HTTP methods (for example, GET, PUT, POST, or DELETE )
Standard HTTP requests have the following semantics:
- POST: Target domain name, class, and options specify roots of subtrees at which modifications are applied. Data carried in the request is in the form of structured text (XML or JSON) subtrees. You can, therefore, specify a parent tree node target and affect N subtrees under that node. POST also can run methods on objects in scope.
- GET: Specify retrieval of objects in the scope of the URL and the options provided. Configuration of the network using REST calls doesn’t require a deep understanding of the object tree; one can easily change sample configurations and reapply them.
REST calls can be sent in a variety of ways. The most common use:
- POSTMAN with a Chrome browser: This popular tool http://www.getpostman.com/ makes sending REST calls very easy.
- Python scripts: You will most commonly use Python scripts for very large configurations that you want to create rapidly, and that you may have already tested individually using POSTMAN or cURL.
- Scripts in general
- Automation tools: For instance, one can use Cisco UCS Director or Cisco Intelligent Automation for Cloud (IAC).
The object-based information model of Cisco NXAPI-REST makes it a very good fit for REST interfaces: URLs and URIs map directly to distinguished names identifying objects on the tree, and any data on the MIT can be described as a self-contained structured text tree document encoded in XML or JavaScript Object Notation (JSON).
The objects have parent-child relationships that are identified using distinguished names and properties, which are read and modified by a set of create, read, update, and delete (CRUD) operations.
Objects can be accessed at their well-defined address, their REST URLs, using standard HTTP commands for retrieval and manipulation of Cisco NX-API-REST object data.
The URL format used can be represented as follows:
<system>/api/[mo|class]/[dn|class][:method].[xml|json]?{options}
The various building blocks of the preceding URL are as follows:
- System: System identifier; an IP address or DNS-resolvable host name
- mo | class: Indication of whether this is a managed object or tree (MIT) or class-level query
- class: Managed-object class (as specified in the information model) of the objects queried; the class name is represented as
- dn: Distinguished name (unique hierarchical name of the object in the MIT tree) of the object queried
- method: Optional indication of the method being invoked on the object; applies only to HTTP POST requests
- xml | json: Encoding format
- options: Query options, filters, and arguments
The typical sequence of configuration is:
Authenticate: Call
https://<IP of Nexus switch>/api/mo/aaaLogin.xml
with a payload that in XML is. This call returns a cookie value that the browser uses for the next calls. Send HTTP POST to apply the configuration: The URL of the POST message varies depending on the object, the following is an example:
https://<IP of Nexus switch>//api/mo/sys/bgp/inst.json
, where api indicates that this call is to the API, mo indicates that this call is to modify a managed object, bgp/inst refers to the BGP instance, and .json indicates that the payload is in JSON format. If the end of URL were .xml, that would mean that the payload is in XML format.Verify the HTTP status code: one should want a response of 200 OK. With the capability to address and access an individual object or a class of objects with the REST URL, one can achieve complete programmatic access to the entire object tree and, thereby, to the entire system.
With the capability to address and access an individual object or a class of objects with the REST URL, one can achieve complete programmatic access to the entire object tree and, thereby, to the entire system.
Subscribing to Query Results
When an API query is performed, there is an option to create a subscription to any future changes in the results of that query that occur during your active API session. When any MO is created, changed, or deleted because of a user- or system-initiated action, an event is generated. If that event changes the results of an active subscribed query, the APIC generates a push notification to the API client that created the subscription.
Opening a WebSocket
The API subscription feature uses the WebSocket protocol (RFC 6455) to implement a two-way connection with the API client through which the API can send unsolicited notification messages to the client. To establish this notification channel, you must first open a WebSocket connection with the API. Only a single WebSocket connection is needed to support multiple query subscriptions with multiple NX-API-REST instances. The WebSocket connection is dependent on API session connection, and closes when the API session ends.
The WebSocket connection is typically opened by a JavaScript method in an HTML5-compliant browser, as in the following example:
var Socket = new WebSocket(https://<IP_Address>/socket%TOKEN%);
In the URI, the %TOKEN% is the current API session token (cookie).
After the WebSocket connection is established, it is not necessary to resend the API session token when the API session is refreshed.
Creating a Subscription
Creating a Subscription
{
"subscriptionId" : "72057611234574337",
"foo" : [{
"bar" : {
"bar2" : {
"attr1" : "0:0",
}
}
}
]
}
To create a subscription to a query, perform the query with the option ?subscription=yes. This example creates a subscription to a query of the aaaUser class in the JSON format:
GET https://192.0.20.123/api/class/aaaUser.json?subscription=yes
The query response contains a subscription identifier, subscriptionId, that one can use to refresh the subscription and to identify future notifications from this subscription.
Receiving Notifications
Receiving Notifications
{
"subscriptionId" : ["72057598349672454", "72057598349672456"],
...
...
}
An event notification from the subscription delivers a data structure that contains the subscription ID and the MO description.
Because multiple active subscriptions can exist for a query, a notification can contain multiple subscription IDs as in the example shown.
Refreshing the Subscription
To continue to receive event notifications, you must periodically refresh each subscription during your API session. To refresh a subscription, send an HTTP GET message to the API method subscriptionRefresh with the parameter id equal to the subscriptionId as in this example:
GET https://<IP_Address>/api/subscriptionRefresh.json?id=72057611234574337
The API returns an empty response to the refresh message unless the subscription has expired.
Faults
In NX-API-REST, a fault is represented as a mutable, stateful, and persistent MO. When a specific condition occurs, such as a component failure, configuration deployment failure or an alarm, the system creates a fault MO as a child object to the MO that is primarily associated with the fault. For a fault object class, the fault conditions are defined by the fault rules of the parent object class. In most cases, a fault MO is automatically created, escalated, DE-escalated, and deleted by the system as specific conditions are detected.
If the same condition is detected multiple times while the corresponding fault MO is active, no additional instances of the fault MO are created. A fault MO remains in the system until the fault condition is cleared. The fault MO is deleted according to the settings in the fault collection and fault retention policies. A fault MO is read-only unless it is in the cleared and retained state, when it can be deleted by the user by acknowledging it.
The creation of a fault MO can be triggered by internal processes such as finite state machine (FSM) transitions or detected component failures, or by conditions specified by various fault policies, some of which are user configurable. For example, user can set fault thresholds on statistical measurements such as data traffic, temperatures etc.
Fault Objects, Records, and Log
Fault Objects
A fault object is represented by the following:
- fault:Inst — When a fault occurs in an MO, a fault instance MO is created under the MO that experienced the fault condition.
Fault Records
For every fault, a fault record object (fault:Record) is created in the fault log. A fault record is an immutable object that records a state transition for a fault instance object. Record creation is triggered by fault instance MO creation or deletion or by modification of key properties (for example, severity, life cycle, or acknowledgment) of the fault instance object.
Although a fault instance object is mutable, the fault record object is not. All properties of the record are set at the time the record object is created. A record object contains a complete snapshot of the fault instance object and is logically organized as a flat list under a single container. The record object contains properties from the corresponding instance object (fault:Inst) such as severity (original, highest, and previous), acknowledgment, occurrence, and life cycle as well as inherited properties that provide a snapshot of the fault instance and the nature and time of its change. The record is meant to be queried using time-based filters or property filters for severity, affected DN, or other criteria.
When a fault record object is created, it is added to the fault log. The object creation can also trigger the export of record details to an external destination by syslog, SNMP trap, or other methods.
Fault Log
The fault log collects and retains fault records. Records are purged only when the maximum capacity of the log is reached and space is needed for new fault records. Depending on the log space availability, a fault record can be retained in the fault log long after the fault object itself has been deleted.
Fault Severity
A fault raised by the system can transition through more than one severity during its life cycle. This table describes the possible fault severities in decreasing order of severity:
Severity | Description |
---|---|
critical | A service-affecting condition that requires immediate corrective action. For example, this severity could indicate that the managed object is out of service and its capability must be restored. |
major | A service-affecting condition that requires urgent corrective action. For example, this severity could indicate a severe degradation in the capability of the managed object and that its full capability must be restored. |
minor | A nonservice-affecting fault condition that requires corrective action to prevent a more serious fault from occurring. For example, this severity could indicate that the detected alarm condition is not currently degrading the capacity of the managed object. |
warning | A potential or impending service-affecting fault that currently has no significant effects in the system. An action should be taken to further diagnose, if necessary, and correct the problem to prevent it from becoming a more serious service-affecting fault. |
info | A basic notification or informational message that is possibly independently insignificant. (Used only for events) |
cleared | A notification that the condition that caused the fault has been resolved, and the fault has been cleared. |
Fault Types
A fault raised by the system can be one of the types described in this table:
Type | Description |
---|---|
Generic | The system has detected a generic issue. |
equipment | The system has detected that a physical component is inoperable or has another functional issue. |
configuration | The system is unable to successfully configure a component. |
connectivity | The system has detected a connectivity issue, such as an unreachable adapter. |
environmental | The system has detected a power issue, thermal issue, voltage issue, or a loss of CMOS settings. |
management | The system has detected a serious management issue, such as one of the following: Critical services could not be started. Components in the instance include incompatible firmware versions. |
Network | The system has detected a network issue, such as a link down. |
operational | The system has detected an operational issue, such as a log capacity limit or a failed component discovery. |
Fault Properties
The system provides detailed information about each fault raised. This table describes the fault properties:
Property | Description |
---|---|
code | The fault code (for example, F1017). |
rule id | The identifier of the rule that generated the fault instance. |
Id | The unique identifier assigned to the fault. |
Cause | The probable cause category (for example, equipment-inoperable). |
Type | The type of fault (for example: connectivity or environmental). |
Severity | The current severity level of the fault. |
Created | The day and time when the fault occurred. |
lastTransition | The day and time on which the severity or life cycle state for the fault last changed. |
Descry | The description of the fault. |
Lc | The life cycle state of the fault (for example, soaking). |
Occur | The number of times the event that raised the fault occurred. |
origSeverity | The severity assigned to the fault on the first time that it occurred. |
prevSeverity | If the severity has changed, this is the previous severity. |
highestSeverity | The highest severity encountered for this issue. |
Viewing Faults Using the API
One can view faults using the API query methods to search for fault MOs, which can be of class fault:Inst . One can search for all instances or one can refine one’s search using query filters.
Events
Any configuration or state change in any MO is considered an event. Most events are part of the normal workflow and there is no need to record their occurrence or to bring them to the attention of the user unless they meet one of the following criteria:
- The event is defined in the model as requiring notification.
- The event follows a user action that is required to be auditable.
A loggable event is represented by an event record object, which is an immutable, stateless, and persistent MO created by the system to record the occurrence of a specific set of conditions at a given point in time.
Although an event record MO is usually triggered by conditions in another MO, it is not contained by that MO but is contained in an event log.
NX-API-REST event MOs are stateless. An event MO created by the NX-API-REST is never modified or cleared. An event MO is deleted by the rotation of the event log as newer events are added and log space is needed.
Getting Started with the Cisco Nexus 3000 and 9000 Series NX-API REST SDK
Using NX-API REST with the Cisco Nexus 3000 and 9000 Series switches requires the following main steps:
1. Enabling NX-API REST on the switch.
Enabling NX-API REST on the switch allows communication with the switch using HTTP calls.
2. Installing and Using a REST Client
You can use a variety of REST clients to run NX-API REST. For example, Postman is provided as a free download for Google Chrome, and allows you to build and issue HTTP requests that execute the NX-API REST APIs to configure the switch. For details on using REST clients, see the "Running the APIs" section below.
3. Verifying the Configuration
After you execute one or more HTTP requests to execute NX-API REST calls, you should verify that the configuration is active by issuing GET commands from your REST client or appropriate CLI commands at the switch console.
4. Optionally, you can use the NX-API REST API from the Guest Shell.
NX-API REST is available for use with the Cisco Nexus 3132Q-XL, 3172PQ-XL, and 3172TQ-XL switches [starting with Cisco NX-OS Release 7.0(3)I2(2)], the Cisco Nexus 3164Q and 31128PQ switches, and the Cisco Nexus 9000 Series switches. NX-API REST is not supported for other Cisco Nexus 3000 and 3100 Series switches.
NX-API REST Management Commands
This section lists CLI commands that enable and configure NX-API REST on the switch.
Enabling NX-API REST on the Switch
To enable NX-API, enter the following CLI command on the switch:
feature nxapi
NX-API REST and the DME database are now enabled.
By default, the NX-API REST feature is enabled for HTTP listen on port 80 and HTTPS listen on port 443. If you need to change the HTTP or HTTPS port, you can use the nxapi port command.
Enabling and Disabling HTTP Ports for NX-API REST
By default, when you enable the NX-API REST feature, NX-API REST is configured for HTTP listen on port 80 and HTTPS listen on port 443.
To change the listen ports, use the following command:
nxapi {http | https} port port_number
where port_number specifies the port number to use for HTTP listen or HTTPS listen.
To disable a specified port enter the following command:
no nxapi {http | https}
Specifying http disables the active HTTP port and specifying https disables the active HTTPS port.
Uploading and Enabling Certificates
If you want to use a security certificate to authenticate users of NX-API REST, you must upload a certificate and then enable it.
To upload a certificate, enter the following command:
nxapi certificate {httpscrt | httpskey}
where:
- httpscrt specifies uploading an HTTPS certificate.
- httpskey specifies uploading an HTTPS key.
To enable the certificate or key, enter the following command;
nxapi certificate enable
Querying the NX-API REST Configuration
To display the current NX-API REST configuration, enter the following command:
show nxapi
The console indicates whether NX-API REST is enabled and indicates the listen ports:
nxapi enabled HTTP Listen on port 80 HTTPS Listen on port 443
VRF Commands
nxapi use-vrf
Specifies the default VRF, management VRF, or named VRF.
Iptables is a command-line firewall utility that uses policy chains to allow or block traffic and almost always comes pre-installed on any Linux distribution.
ip netns exec management iptables
Implements any access restrictions and can be run in management VRF.
Running the APIs
You can use a number of commercially available and freeware REST clients to issue HTTP requests using NX-API REST. Some commonly used REST clients are:
Postman: Postman is a developer utility that allows you to construct and issue HTTP requests. There are many versions; for example, Google provides Google Postman Extension for Chrome, which is downloadable from the Google Chrome Store. You can download the Google Postman Extension for Chrome from the Chrome Store at the following URL:
https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en]
Cocoa REST Client: A freeware REST client that runs on the MAC OS. You can download the Cocoa REST Client from the following URL:
RESTtest: A MAC-OS app that lets you test REST clients. This app is available on the Apple Mac App Store. You can download RESTtest from the following URL:
There are many other Postman products or REST clients that you can use to issue NX-API REST HTTP requests.
Entering URLs
URLs represent endpoints for the HTTP communication that transfers the HTTP request. The target endpoint for an NX-API REST call is the IP address or hostname of a Nexus 3000 or 9000 switch.
Header
You can use the sample URLs provided in this document by pasting the URL into the Postman URL input field or clicking a saved URL in the list of saved requests or collections at the left of the Postman display. Or if you know the object IDs stored in the DME database, you can use the Postman key-value editor to construct the URL.
HTTP Methods
With Postman, you can select the HTTP method from the Postman method pull-down. With other REST clients, you use the client user interface to specify the method type.
With NX-API REST, you will send a GET, a POST, or a DELETE.
HTTP GET
The GET method retrieves data from a specified MO on the switch.
HTTP POST
The POST method writes data to the MO database on the switch.
HTTP DELETE
The DELETE method deletes a specified configuration. For example, you can delete a switch user.
Message Body
The Message body (payload) contains JSON code that specifies the data for the HTTP method.
Message Response
The message response is an HTTP return code and an HTTP Response Body that contains JSON code showing the data returned by the method.
Filtering API Query Results
You can filter the results of an API query by appending one or more condition statements to the query URL as a parameter in this format:
https://URI?condition[&condition[&...]]
Multiple condition statements are joined by an ampersand (&).
Options are available to filter by object attributes and object subtrees.
Applying Query Scoping Filters
You can limit the scope of the response to an API query by applying scoping filters. You can limit the scope to the first level of an object or to one or more of its subtrees or children based on the class, properties, categories, or qualification by a logical filter expression.
query-target={self | children | subtree}
This statement restricts the scope of the query. This list describes the available scopes:
self—(Default) Considers only the MO itself, not the children or subtrees.
children—Considers only the children of the MO, not the MO itself.
subtree—Considers the MO itself and its subtrees.
target-subtree-class=mo-class1[,mo-class2]...
This statement specifies which object classes are to be considered when the query-target option is used with a scope other than self. You can specify multiple desired object types as a comma-separated list with no spaces.
To request subtree information, combine query-target=subtree with the target-subtree-class statement to indicate the specific subtree as follows:
query-target=subtree&target-subtree-class=className
query-target-filter=filter-expression
This statement specifies a logical filter to be applied to the response. This statement can be used by itself or applied after the query-target statement.
rsp-subtree={no | children | full}
For objects returned, this option specifies whether child objects are included in the response. This list describes the available choices:
- no—(Default) Response includes no children.
- children—Response includes only the children.
- full—Response includes the entire structure including the children.
rsp-subtree-class=mo-class
When child objects are to be returned, this statement specifies that only child objects of the specified object class are included in the response.
rsp-subtree-filter=filter-expression
When child objects are to be returned, this statement specifies a logical filter to be applied to the child objects.
rsp-subtree-include=category1[,category2...][option]
When child objects are to be returned, this statement specifies additional contained objects or options to be included in the response. You can specify one or more of the following categories in a comma-separated list with no spaces:
- audit-logs—Response includes subtrees with the history of user modifications to managed objects.
- event-logs—Response includes subtrees with event history information.
- faults—Response includes subtrees with currently active faults.
- fault-records—Response includes subtrees with fault history information.
- health—Response includes subtrees with current health information.
- health-records—Response includes subtrees with health history information.
- relations—Response includes relations-related subtree information.
- stats—Response includes statistics-related subtree information.
- tasks—Response includes task-related subtree information.
With any of the preceding categories, you can also specify one of the following options to further refine the query results:
- count—Response includes a count of matching subtrees but not the subtrees themselves.
- no-scoped—Response includes only the requested subtree information. Other top-level information of the target MO is not included in the response.
- required—Response includes only the managed objects that have subtrees matching the specified category.
For example, to include fault-related subtrees, specify faults in the list. To return only fault-related subtrees and no other top-level MO information, specify faults,no-scoped in the list as shown in this example:
query-target=subtree&rsp-subtree-include=faults,no-scoped
rsp-prop-include={all | naming-only | config-only}
This statement specifies what type of properties should be included in the response when the rsp-subtree option is used with an argument other than no.
- all—Response includes all properties of the returned managed objects.
- naming-only—Response includes only the naming properties of the returned managed objects.
- config-only—Response includes only the configurable properties of the returned managed objects.
Composing Query Filter Expressions
You can filter the response to an API query by applying an expression of logical operators and values. A basic equality or inequality test is expressed as follows:
query-target-filter=[eq|ne](attribute,value)
You can create a more complex test by combining operators and conditions using parentheses and commas:
query-target-filter=[and|or]([eq|ne](attribute,value),[eq|ne](attribute,value),...)
Available Logical Operators
The following table lists the available logical operators for query filter expressions.
Operator | Description |
---|---|
eq | Equal to |
ne | Not equal to |
lt | Less than |
gt | Greater than |
le | Less than or equal to |
ge | Greater than or equal to |
bw | Between |
not | Logical inverse |
and | Logical AND |
or | Logical OR |
xor | Logical exclusive OR |
true | Boolean TRUE |
false | Boolean FALSE |
anybit | TRUE if at least one bit is set |
allbits | Wildcard |
pholder | Property holder |
passive | Passive holder |
Examples
This example returns all managed objects of class aaaUser whose last name is equal to "Washington":
GET https://<IP_Address>/api/class/aaaUser.json?
query-target-filter=eq(aaaUser.lastName,"Washington")
This example returns aaa:Domain objects whose names are not "infra" or "common":
GET https://<IP_Address>/api/class/aaaDomain.json? query-target-filter=
and(ne(aaaDomain.name,"infra"), ne(aaaDomain.name,"common"))
Verifying the Configuration
To verify the configuration, do one of the following:
If you issued an HTTP POST call, issue an HTTP GET querying the managed object addressed in the POST operation.
Issue an NX-OS show command that shows the result of the command or commands that you used to enable configuration settings.
For example, if you issued a
http://<IP address>/api/mo/sys/bgp/inst.json
command to set BGP configuration values, you could issue the show running-config bgp command to display the BGP configuration and verify it.Use the Visore browser to navigate to the MO that holds the configuration that you specified using an HTTP POST method and verify that the attributes of the object are correct.
For more information, see the "Using the Managed Object Browser" section.
Using the Developer Sandbox
The NX-API Developer Sandbox is a web form, hosted on the switch, that can translate NX-OS CLI commands into equivalent JSON or XML payloads that can be pushed to the NX-API REST API. The web form is a single screen with three panes — Command (top pane), Request, and Response — as shown in the figure.
When you type or paste one or more CLI commands into the Command pane, the web form converts the commands into an API payload, checking for configuration errors, and displays the resulting payload in the Request pane. If you then choose to post the payload directly from the Sandbox to the switch, using the POST button in the Command pane, the Response pane displays the API response.
For detailed instructions on using the NX-API Developer Sandbox, see the Cisco Nexus 9000 Series NX-OS Programmability Guide, Release 7.x.
NX-API Feature Model
Hierarchy
- fm:Entity (sys/fm)
- fm:Nxapi (sys/fm/nxapi)
Supported Configuration
- Configuring feature nxapi in config mode
- Managed Object: fm:Nxapi
Attribute | Description | Naming property (y/n) | Type | Acceptable values (numeric values) | Default Values |
---|---|---|---|---|---|
adminSt | The administrative state of the object or policy | N | Enum | enabled (1) disabled (2) | disabled(2) |
Corresponding CLI
switch(config)# feature nxapi
Operational properties
Oper data
Attribute | Description | Type | Acceptable values (numeric values) | Default Values |
---|---|---|---|---|
operSt | The runtime state of the object | Enum | enabled disabled | disabled |
maxInstance | Number of instances configured | Uint32 | 1 | 1 |
Retries
None
Faults
None
Show CLI
show feature
Configuring Cisco Discovery Protocol
CDP is a proprietary protocol designed by Cisco System for Cisco devices. CDP helps administrators in collecting information about cisco devices.
Displaying all CDP-Enabled Interfaces
Displays all interfaces that have CDP enabled
switch# show cdp all
mgmt0 is up
CDP enabled on interface
Refresh time is 60 seconds
Hold time is 180 seconds
Ethernet1/1 is up
CDP enabled on interface
Refresh time is 60 seconds
Hold time is 180 seconds
Ethernet1/2 is up
CDP enabled on interface
Refresh time is 60 seconds
Hold time is 180 seconds
//...
Ethernet1/47 is down
CDP enabled on interface
Refresh time is 60 seconds
Hold time is 180 seconds
Ethernet1/48 is up
CDP enabled on interface
Refresh time is 60 seconds
Hold time is 180 seconds
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
Displaying CDP Database Entries
Displays the CDP database entries
switch# show cdp entry all
Device ID:166-bv-12
System Name:
Interface address(es):
IPv4 Address: 0.0.0.0
Platform: cisco WS-C2950-24, Capabilities: Switch IGMP Filtering
Interface: mgmt0, Port ID (outgoing port): FastEthernet0/7
Holdtime: 148 sec
Version:
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA8a, RELEASE SOFTWARE
(fc1)
Copyright (c) 1986-2006 by cisco Systems, Inc.
Compiled Fri 28-Jul-06 15:16 by weiliu
Advertisement Version: 2
Native VLAN: 1
VTP Management Domain:
Duplex: full
Mgmt address(es):
IPv4 Address: 0.0.0.0
Device ID:NO-ACCESS2(FOX1844GGTZ)
System Name:NO-ACCESS2
Interface address(es):
IPv4 Address: 31.31.31.2
IPv6 Address: 3131:31::2
Platform: N9K-C9504, Capabilities: Router Switch Supports-STP-Dispute
Interface: Ethernet1/1, Port ID (outgoing port): Ethernet1/1
Holdtime: 154 sec
Version:
Cisco Nexus Operating System (NX-OS) Software, Version 7.0(3)I1(1)
Advertisement Version: 2
Duplex: full
Mgmt address(es):
IPv4 Address: 172.23.167.133
Device ID:NO-ACCESS2(FOX1844GGTZ)
System Name:NO-ACCESS2
Interface address(es):
IPv4 Address: 41.41.41.2
IPv6 Address: 4141:41::2
Platform: N9K-C9504, Capabilities: Router Switch Supports-STP-Dispute
Interface: Ethernet1/2, Port ID (outgoing port): Ethernet1/2
Holdtime: 132 sec
Version:
Cisco Nexus Operating System (NX-OS) Software, Version 7.0(3)I1(1)
Advertisement Version: 2
Duplex: full
Mgmt address(es):
IPv4 Address: 172.23.167.133
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
Displaying the CDP Global Prameters
Displays the CDP global parameters
switch# show cdp global
Global CDP information:
CDP enabled globally
Refresh time is 60 seconds
Hold time is 180 seconds
CDPv2 advertisements is enabled
DeviceID TLV in System-Name(Default) Format
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
Displaying the CDP Interface Status
Displays the CDP interface status
switch# show cdp interface ethernet 1/1
Ethernet1/1 is up
CDP enabled on interface
Refresh time is 60 seconds
Hold time is 180 seconds
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
Displaying the CDP Neighbor Status
Displays the CDP neighbor status
switch# show cdp neighbors
Capability Codes:
R - Router, T - Trans-Bridge, B - Source-Route-Bridge
S - Switch, H - Host, I - IGMP, r - Repeater,
V - VoIP-Phone, D - Remotely-Managed-Device,
s - Supports-STP-Dispute
Device-ID
Local Intrfce
Hldtme Capabilit
y Platform
Port ID
netboot
mgmt0
122
S I
WS-C2950-24
Fas0/10
n7009-3(JAF1747AARQ)
Eth2/1
173
R S s
N7K-C7009
Eth3/8
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
Viewing VTP Information
CDP sends the VLAN Trunking Protocol (VTP) type-length-value field (TLV) if the following conditions are met:
- CDP Version 2 is enabled
- The VTP feature is enabled
- A VTP domain name is configured
You can view the VTP information with the show cdp neighbors detail command.
switch# show cdp neighbors detail
Device ID:netboot
VTP Management Domain Name: null
Interface address(es):
Platform: cisco WS-C2950-24, Capabilities: Switch IGMP Filtering
Interface: mgmt0, Port ID (outgoing port): FastEthernet0/10
Holdtime: 168 sec
Version:
Cisco Internetwork Operating System Software
IOS (tm) C2950 Software (C2950-I6Q4L2-M), Version 12.1(22)EA1, RELEASE SOFTWARE
(fc1)
Copyright (c) 1986-2004 by cisco Systems, Inc.
Compiled Mon 12-Jul-04 08:18 by madison
Advertisement Version: 2
Native VLAN: 1
Duplex: full
Device ID:n7009-3(JAF1747AARQ)
System Name: n7009-3
Interface address(es):
IPv4 Address: 3.8.10.7
Platform: N7K-C7009, Capabilities: Router Switch Supports-STP-Dispute
Interface: Ethernet2/1, Port ID (outgoing port): Ethernet3/8
Holdtime: 159 sec
Version:
Cisco Nexus Operating System (NX-OS) Software, Version 6.2(10)
Advertisement Version: 2
Duplex: full
MTU: 1500
Physical Location: snmplocation
Mgmt address(es):
IPv4 Address: 10.6.151.129
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
Displaying the CDP Traffic Statistics on an Interface
Displays the CDP traffic statistics on an interface
switch# show cdp traffic interface ethernet 1/1
Traffic statistics for Ethernet1/1
Input Statistics:
Total Packets: 345
Valid CDP Packets: 345
CDP v1 Packets: 0
CDP v2 Packets: 345
Invalid CDP Packets: 0
Unsupported Version: 0
Checksum Errors: 0
Malformed Packets: 0
Output Statistics:
Total Packets: 349
CDP v1 Packets: 0
CDP v2 Packets: 349
Send Errors: 0
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
Configuring RBAC Settings
Using NX-API REST, you can configure the most important RBAC settings on the switch, including usernames and passwords, RADIUS settings, TACACS+ settings, and AAA settings. This section contains payload examples to demonstrate how to use the NX-API REST API to configure RBAC settings on the Cisco Nexus 3000 and 9000 Series switches.
Logging in
Logging in
POST Request
http://<IP_Address>/api/mo/sys/userext/user-testname.json
{
"aaaUser": {
"attributes": {
"name": "testname",
"pwd": "<password>"
}}}
Response
{
"aaaLogin": {
"attributes": {
"token": "LIOcWMWyt5MnetsbiVwnE1kfcxD+HrJZ4d8Nvgi5mW44ZyCDut2JDN+NHA27Uxlo04ZACO8hyaKV08DuYBL7f93EOSz9LuniPs9/8MQeHrwESUeEhw0M4Kp2LJMlxAjeuV7m0/gww0Fi4p8K9gsyKSFxi74od6ztLhKiDFjtxm0=",
"siteFingerprint": "",
"refreshTimeoutSeconds": "600",
"guiIdleTimeoutSeconds": "1200",
"restTimeoutSeconds": "0",
"creationTime": "1435631774",
"firstLoginTime": "1435631774",
"userName": "admin",
"remoteUser": "false",
"unixUserId": "0",
"sessionId": "90wv8IkXTMiiGhrztPUdyg==",
"lastName": "",
"firstName": "",
"version": "0.9(14HEAD${version.patch})",
"buildTime": "Tue Jun 23 04:05:41 PDT 2015"
},
"children": [
{
"aaaUserDomain": {
"attributes": {
"name": "all",
"rolesR": "admin",
"rolesW": "admin"
},
"children": [
{
"aaaReadRoles": {
"attributes": {}
}
},
{
"aaaWriteRoles": {
"attributes": {},
"children": [
{
"role": {
"attributes": {
"name": "network-admin"
}}}}]}}]}}]}}]
This example demonstrates a user logging in.
Before you can issue any HTTP requests to configure the switch, you must issue an HTTP POST request to log into the switch. The aaaUser object is used to log into the switch.
CLI Command
username testname password
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/media/dme/index.html
Getting Password Configuration Information
Getting Password Configuration Information
HTTP GET
http://<IP_Address>/api/node/mo/sys/userext.json
Response
{
"totalCount": "1",
"imdata": [
{
"aaaUserEp": {
"attributes": {
"childAction": "",
"descr": "",
"dn": "sys/userext",
"lcOwn": "local",
"modTs": "2015-06-29T17:20:01.622+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "rootep",
"ownerKey": "",
"ownerTag": "",
"pwdMaxLength": "127",
"pwdMinLength": "4",
"pwdSecureMode": "yes",
"pwdStrengthCheck": "no",
"status": "",
"uid": "0"
}}}]}
You use an HTTP GET request to retrieve aaaUserEp information. An aaaUserEp object is a user endpoint, which is a local user. A user is assigned a role, which determines the user's privileges, and belongs to a security domain, which determines the user's scope of control
In the switch MO database, the RN for the aaaUserExp object is /sys/userext.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting Password Configuration Information
Setting Password Configuration Information
HTTP POST
http://<IP_Address>/api/node/mo/sys/userext.json
{
"aaaUserEp": {
"attributes": {
"childAction": "",
"descr": "",
"dn": "sys/userext",
"lcOwn": "local",
"modTs": "2015-04-16T02:56:49.967+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "rootep",
"ownerKey": "",
"ownerTag": "",
"pwdMaxLength": "127",
"pwdMinLength": "4",
"pwdSecureMode": "yes",
"pwdStrengthCheck": "no",
"status": "",
"uid": "0"
}
}
}
Response
{
"imdata": []
}
You can use an HTTP POST request to set user password configuration information.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring a User
This section contains payload examples that demonstrate how to configure a user.
Querying User Information
Querying User Information
HTTP GET
`http://<IP_Address>/api/node/mo/sys/userext/user-test.json`
Response
{
"totalCount": "0",
"imdata": []
}
The example in this section queries the MO database for configuration information for a specified user. In the MO database, the object for a particular user is an MO name with the format user-<username>, where username is the username whose data is queried. The example in this section queries user information for a user named "test."
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting User Information
Setting User Information
HTTP POST
http://<IP_Address>/api/node/mo/sys/userext/user-test.json
{
"aaaUser": {
"attributes": {
"accountStatus": "active",
"allowExpired": "no",
"childAction": "",
"clearPwdHistory": "no",
"descr": "",
"dn": "sys/userext/user-test",
"email": "",
"expiration": "2020-09-30",
"expires": "no",
"firstName": "",
"lastName": "",
"lcOwn": "local",
"modTs": "2015-04-16T03:08:10.193+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "test",
"ownerKey": "",
"ownerTag": "",
"phone": "",
"pwdEncryptType": "unspecified",
"pwdLifeTime": "no-password-expire",
"pwdSet": "yes",
"pwd": "Test123",
"status": "",
"uid": "0"
}}}
Response
{
"imdata": []
}
The aaaUser object sets the user information for a specified, user. The MO for the user is an MO with a name that has the format user-<username>, where username is the name of the user.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Deleting a User
Deleting a User
HTTP DELETE
http://<IP_Address>/api/node/mo/sys/userext/user-test.json
Response
{
"imdata": []
}
Deletes a specified user.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring TACACS
Getting TACACS+ Configuration Data
Getting TACACS+ Configuration Data
HTTP GET
http://<IP_Address>/api/node/mo/sys/userext/tacacsext.json
Response
{
"totalCount": "1",
"imdata": [
{
"aaaTacacsPlusEp": {
"attributes": {
"childAction": "",
"deadtime": "10",
"descr": "",
"directedReq": "no",
"dn": "sys/userext/tacacsext",
"lcOwn": "local",
"modTs": "2015-02-02T12:56:13.788+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "",
"ownerKey": "",
"ownerTag": "",
"retries": "1",
"srcIf": "unspecified",
"status": "",
"timeout": "20",
"uid": "0"
}}}]}
The aaaUser object contains an aaaTacacsPlusEp object that contains general TACACS+ information. By querying the tacacsext.json object, you can obtain this information.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting TACACS+ Configuration Data
Setting TACACS+ Configuration Data
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/tacacsext.json`
{
"aaaTacacsPlusEp": {
"attributes": {
"childAction": "",
"deadtime": "10",
"descr": "",
"directedReq": "no",
"dn": "sys/userext/tacacsext",
"key": "",
"keyEnc": "0",
"lcOwn": "local",
"modTs": "2015-02-02T12:56:13.788+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "",
"ownerKey": "",
"ownerTag": "",
"retries": "1",
"status": "",
"timeout": "20",
"uid": "0"
}}}
Response
{
"imdata": []
}
The aaaUser object contains an aaaTacacsPlusEp object that contains general TACACS+ information. By posting data to the tacacsext.json object, you can set this information.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
Posting this data is equivalent to issuing several tacacs-server commands, for example
tacacs-server key 7 fewhg
tacacs-server deadtime 10
tacacs-server timeout 20
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/media/dme/index.html
Configuring the TACACS+ Global Dead-Time Interval
Configuring the TACACS+ Global Dead-Time Interval
HTTP POST
http://<IP_Address>/api/node/mo/sys/userext/tacacsext.json
{
"aaaTacacsPlusEp": {
"attributes": {
"deadtime": "15"
}}}
Response
{
"imdata": []
}
Specifies the number of minutes before the Cisco NX-OS device checks a TACACS+ server that was previously unresponsive. The default value is 0 minutes, and the valid range is from 0 to 1440 minutes.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
tacacs-server deadtime 15
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/media/dme/index.html
Setting TACACS+ Provider Information
Setting TACACS+ Provider Information
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/tacacsext.json`
{
"aaaTacacsPlusProvider": {
"attributes": {
"name": "tns",
"port": "50",
"key": "test",
"timeout": "0"
}}}
Response
{
"imdata": []
}
Specifies a secret key for a specific TACACS+ server. You can specify that the key-value is in clear text format (0), is type-6 encrypted (6), or is type-7 encrypted (7). The Cisco NX-OS software encrypts a clear text key before saving it to the running configuration. The default format is clear text. The maximum length is 63 characters.
This secret key is used instead of the global secret key.
This example also specifies the TCP port to use for TACACS+ messages to the server. The default TCP port is 49. The range is from 1 to 65535.
The aaaUser object contains a tacacsplusprovider-tns object that contains TACACS+ provider configuration data. Using an HTTP POST method, you can set the TACACS+ provider settings for a switch.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
tacacs-server host tns key 7 test port 50
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/media/dme/index.html
Getting TACACS+ Provider Information
Getting TACACS+ Provider Information
HTTP GET
`http://<IP_Address>/api/node/mo/sys/userext/tacacsext/tacacsplusprovider-tns.json`
Response
{
"totalCount": "1",
"imdata": [
{
"aaaTacacsPlusProvider": {
"attributes": {
"authProtocol": "pap",
"childAction": "",
"descr": "",
"dn": "sys/userext/tacacsext/tacacsplusprovider-tns",
"epgDn": "",
"keySet": "no",
"lcOwn": "local",
"modTs": "2015-07-01T21:13:04.711+00:00",
"monPolDn": "uni/fabric/monfab-default",
"monitorServer": "disabled",
"monitoringUser": "test",
"name": "tns",
"operState": "inoperable",
"ownerKey": "",
"ownerTag": "",
"port": "49",
"retries": "inherit-from-global",
"snmpIndex": "0",
"status": "",
"timeout": "0",
"uid": "0",
"vrfName": ""
}}}]}
The aaaUser object contains a tacacsplusprovider-tns object that contains TACACS+ provider configuration data. Using an HTTP GET method, you can return the TACACS+ provider settings for a switch.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Deleting TACACS+ Provider Information
Deleting TACACS+ Provider Information
HTTP DELETE
`http://IP_Address/api/node/mo/sys/userext/tacacsext/tacacsplusprovider-tns.json`
Response
{
"imdata": []
}
Deletes TACACS+ provider information.
The aaaUser object contains a tacacsplusprovider-tns object that contains TACACS+ provider configuration data. Using an HTTP DELETE call, you can delete the TACACS+ provider settings for a switch.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
no tacacs-server host tns
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/media/dme/index.html
Getting TACACS+ Provider Group Information
Getting TACACS+ Provider Group Information
HTTP GET
`http://IP_Address/api/node/mo/sys/userext/tacacsext/tacacsplusprovider-tns.json`
Response
{
"totalCount": "0",
"imdata": []
}
The /sys/userext object contains a tacacsplusprovidergroup-tac1 object that contains TACACS+ Provider group configuration. Using an HTTP GET request, you can retrieve the configuration information for this object.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting TACACS+ Provider Group Information
Setting TACACS+ Provider Group Information
HTTP POST
`http://<IP_address>/api/node/mo/sys/userext/tacacsext/tacacsplusprovidergroup-tac1/providerref-tns.json`
{
"aaaTacacsPlusProviderGroup": {
"attributes": {
"childAction": "",
"deadtime": "0",
"descr": "",
"dn": "sys/userext/tacacsext/tacacsplusprovidergroup-tac1",
"lcOwn": "local",
"modTs": "2015-04-02T08:50:08.843+00:00",
"name": "tac1",
"ownerKey": "",
"ownerTag": "",
"snmpIndex": "0",
"srcIf": "unspecified",
"status": "",
"uid": "0",
"vrf": ""
}}}
Response
{
"imdata": []
}
Creates a TACACS+ server group and enters the TACACS+ server group configuration mode for that group.
The /sys/userext object contains a tacacsplusprovidergroup-tac1 object that contains TACACS+ Provider group configuration. Using an HTTP POST request, you can retrieve the configuration information for this object.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
aaa group server tacacs+ tac1
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/media/dme/index.html
Deleting TACACS+ Provider Group Information
Deleting TACACS+ Provider Group Information
HTTP DELETE
`http://<IP_Address>/api/node/mo/sys/userext/tacacsext/tacacsplusprovidergroup-tac1.json`
{
"aaaTacacsPlusProviderGroup": {
"attributes": {
"childAction": "",
"deadtime": "0",
"descr": "",
"dn": "sys/userext/tacacsext/tacacsplusprovidergroup-tac1",
"lcOwn": "local",
"modTs": "2015-04-02T08:50:08.843+00:00",
"name": "tac1",
"ownerKey": "",
"ownerTag": "",
"snmpIndex": "0",
"srcIf": "unspecified",
"status": "",
"uid": "0",
"vrf": ""
}}}
Response
{
"imdata": []
}
Deletes TACACS+ provider group information.
The /sys/userext object contains a tacacsplusprovidergroup-tac1 object that contains TACACS+ Provider group configuration. Using an HTTP DELETE request, you can delete the configuration information for this object.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
no aaa group server tacacs+ tac1
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/media/dme/index.html
Getting TACACS+ Provider Group Reference Information
Getting TACACS+ Provider Group Reference Information
HTTP GET
`http://<IP_Address>/api/node/mo/sys/userext/tacacsext/tacacsplusprovidergroup-tac1/providerref-tns.json`
Response
{
"totalCount": "0",
"imdata": []
}
The /sys/userext object contains a tacacsplusprovidergroup-tac1 reference object that contains TACACS+ Provider group reference configuration. Using an HTTP GET request, you can retrieve the configuration information for this object.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting TACACS+ Provider Group Reference Information
Setting TACACS+ Provider Group Reference Information
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/tacacsext/tacacsplusprovidergroup-tac1/providerref-tns.json`
{
"aaaProviderRef": {
"attributes": {
"childAction": "",
"descr": "",
"dn": "sys/userext/tacacsext/tacacsplusprovidergroup-tac1/providerref-tns",
"lcOwn": "local",
"modTs": "2015-04-02T08:26:39.417+00:00",
"name": "tns",
"order": "lowest-available",
"ownerKey": "",
"ownerTag": "",
"snmpIndex": "0",
"status": "",
"uid": "0"
}}}
Response
{
"imdata": []
}
This API configures TACACS+ Provider Group reference information.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
server tns
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/media/dme/index.html
Deleting TACACS+ Provider Group Reference Information
Deleting TACACS+ Provider Group Reference Information
HTTP DELETE
`http://<IP_Address>/api/node/mo/sys/userext/tacacsext/tacacsplusprovidergroup-tac1/providerref-tns.json`
Response
{
"imdata": []
}
This API deletes TACACS+ Provider Group reference information.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
no server tns
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/media/dme/index.html
Setting a TACACS+ Key for All TACACS+ Servers
Setting a TACACS+ Key for All TACACS+ Servers
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/tacacsext.json`
{
"aaaTacacsPlusEp": {
"attributes": {
"key": "QsEfThUkO",
"keyEnc": "0"
}}}
Response
{
"imdata": []
}
Specifies a TACACS+ key for all TACACS+ servers.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
tacacs-server key 0 QsEfThUkO
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/media/dme/index.html
Setting the Timeout Interval for TACACS+ Servers
Setting the Timeout Interval for TACACS+ Servers
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/tacacsext.json`
{
"aaaTacacsPlusEp": {
"attributes": {
"timeout": "10"
}}}
Response
{
"imdata": []
}
Specifies the global TACACS+ server timeout period in seconds.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
tacacs-server timeout 10
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/media/dme/index.html
Configuring the Global Source Interface for All TACACS+ Server Groups Configured on a Device
Configuring the Global Source Interface for All TACACS+ Server Groups Configured on a Device
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/tacacsext.json`
{
"aaaTacacsPlusEp": {
"attributes": {
"srcIf": "mgmt0"
}}}
Response
{
"imdata": []
}
Specifies the source interface to be used to reach the TACACS+ server.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
ip tacacs source-interface mgmt 0
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/media/dme/index.html
Configuring AAA
This section uses payloads and CLIs to demonstrate how to configure AAA.
Querying AAA Authentication Configuration
Querying AAA Authentication Configuration
HTTP GET
`http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultauth.json`
Response
{
"totalCount": "1",
"imdata": [
{
"aaaDefaultAuth": {
"attributes": {
"authProtocol": "pap",
"childAction": "",
"descr": "",
"dn": "sys/userext/authrealm/defaultauth",
"errEn": "no",
"fallback": "yes",
"lcOwn": "local",
"local": "yes",
"modTs": "2015-07-06T22:15:33.689+00:00",
"name": "",
"none": "no",
"ownerKey": "",
"ownerTag": "",
"providerGroup": "",
"providerGroup2": "",
"providerGroup3": "",
"providerGroup4": "",
"providerGroup5": "",
"providerGroup6": "",
"providerGroup7": "",
"providerGroup8": "",
"realm": "local",
"status": "",
"uid": "0"
}}}]}
The /sys/userext/authrealm.defaultauth object contains AAA configuration for the switch. Using this API, you can query AAA authentication configuration on the switch.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting AAA Authentication Configuration
Setting AAA Authentication Configuration
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultauth.json`
{
"aaaDefaultAuth": {
"attributes": {
"authProtocol": "pap",
"childAction": "",
"descr": "",
"dn": "sys/userext/authrealm/defaultauth",
"errEn": "no",
"fallback": "yes",
"lcOwn": "local",
"local": "no",
"modTs": "2015-04-11T11:20:05.347+00:00",
"name": "",
"none": "no",
"ownerKey": "",
"ownerTag": "",
"providerGroup": "tac1",
"providerGroup2": "",
"providerGroup3": "",
"providerGroup4": "",
"providerGroup5": "",
"providerGroup6": "",
"providerGroup7": "",
"providerGroup8": "",
"realm": "local",
"status": "",
"uid": "0"
}}}
{
"imdata": []
}
Enables ASCII authentication. The default is disabled.
The /sys/userext/authrealm.defaultauth object contains AAA configuration for the switch. Using this API you can set AAA authentication configuration on the switch.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
aaa authentication login default group tac1
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/media/dme/index.html
Querying AAA Authorization Configuration
Querying AAA Authorization Configuration
HTTP GET
`http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultauthor-1.json`
Response
{
"totalCount": "1",
"imdata": [
{
"aaaDefaultAuthor": {
"attributes": {
"authorMethodNone": "no",
"childAction": "",
"cmdType": "exec",
"descr": "",
"dn": "sys/userext/authrealm/defaultauthor-exec",
"lcOwn": "local",
"localRbac": "no",
"modTs": "2015-06-25T01:50:06.232+00:00",
"name": "Author",
"ownerKey": "",
"ownerTag": "",
"providerGroup": "",
"providerGroup2": "",
"providerGroup3": "",
"providerGroup4": "",
"providerGroup5": "",
"providerGroup6": "",
"providerGroup7": "",
"providerGroup8": "",
"realm": "tacacs",
"status": "",
"uid": "0"
}}}]}
The /sys/userext/authrealm/defaultrealm object contains one or more authorization objects that enable AAA authorization for the switch.
Using this API you can query AAA authorization configuration on the switch.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting AAA Authorization Configuration (config-commands)
Setting AAA Authorization Configuration (config-commands)
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultauthor-0.json`
{
"aaaDefaultAuthor": {
"attributes": {
"authorMethodNone": "no",
"childAction": "",
"cmdType": "config",
"descr": "",
"dn": "sys/userext/authrealm/defaultauthor-config",
"lcOwn": "local",
"localRbac": "no",
"modTs": "2015-04-13T13:45:58.822+00:00",
"name": "Author",
"ownerKey": "",
"ownerTag": "",
"providerGroup": "tac1",
"providerGroup2": "",
"providerGroup3": "",
"providerGroup4": "",
"providerGroup5": "",
"providerGroup6": "",
"providerGroup7": "",
"providerGroup8": "",
"realm": "tacacs",
"status": "",
"uid": "0"
}}}
Sets the AAA authorization configuration.
If AAA authorization is configured on the switch, the /sys/userext/authrealm/ object contains one or more authorization objects that enable AAA authorization for the switch. Using this API you can set AAA authorization configuration on the switch.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
aaa authorization config-commands default group tac1
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/media/dme/index.html
Setting AAA Authorization Configuration (commands)
Setting AAA Authorization Configuration (commands)
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultauthor-1.json`
{
"aaaDefaultAuthor": {
"attributes": {
"authorMethodNone": "no",
"childAction": "",
"cmdType": "exec",
"descr": "",
"dn": "sys/userext/authrealm/defaultauthor-exec",
"lcOwn": "local",
"localRbac": "no",
"modTs": "2015-04-13T13:45:06.041+00:00",
"name": "Author",
"ownerKey": "",
"ownerTag": "",
"providerGroup": "tac1",
"providerGroup2": "",
"providerGroup3": "",
"providerGroup4": "",
"providerGroup5": "",
"providerGroup6": "",
"providerGroup7": "",
"providerGroup8": "",
"realm": "tacacs",
"status": "",
"uid": "0"
}}}
Response
{
"imdata": []
}
Configures the command authorization method for specific roles on a TACACS+ server. The commands keyword configures authorization sources for all EXEC commands. The default keyword configures command authorization for a non-console session.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
aaa authorization commands default group tac1
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/media/dme/index.html
Querying AAA Accounting Configuration
Querying AAA Accounting Configuration
HTTP GET
`http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultacc.json`
Response
{
"totalCount": "1",
"imdata": [
{
"aaaDefaultAcc": {
"attributes": {
"accMethodNone": "no",
"childAction": "",
"descr": "",
"dn": "sys/userext/authrealm/defaultacc",
"lcOwn": "local",
"localRbac": "yes",
"modTs": "2015-07-02T20:45:51.932+00:00",
"name": "Accounting",
"ownerKey": "",
"ownerTag": "",
"providerGroup": "",
"providerGroup2": "",
"providerGroup3": "",
"providerGroup4": "",
"providerGroup5": "",
"providerGroup6": "",
"providerGroup7": "",
"providerGroup8": "",
"realm": "local",
"status": "",
"uid": "0"
}}}]}
The /sys/userext/authrealm.defaultacc object contains AAA accounting configuration for the switch. Using this API you can query the AAA accounting configuration.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting AAA Accounting Configuration
Configuring ACL TCAM Region with e-racl TCAM Carving
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultacc.json`
{
"aaaDefaultAcc": {
"attributes": {
"accMethodNone": "no",
"childAction": "",
"descr": "",
"dn": "sys/userext/authrealm/defaultacc",
"lcOwn": "local",
"localRbac": "no",
"modTs": "2015-04-10T14:27:46.178+00:00",
"name": "Accounting",
"ownerKey": "",
"ownerTag": "",
"providerGroup": "tac1",
"providerGroup2": "",
"providerGroup3": "",
"providerGroup4": "",
"providerGroup5": "",
"providerGroup6": "",
"providerGroup7": "",
"providerGroup8": "",
"realm": "local",
"status": "",
"uid": "0"
}}}
Response
{
"imdata": []
}
Configures the default accounting method.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
aaa accounting default group tac1
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/media/dme/index.html
Enabling AAA Accounting
Enabling AAA Accounting
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultacc.json`
{
"aaaDefaultAcc": {
"attributes": {
"accMethodNone": "no",
"localRbac": "yes",
"providerGroup": "",
"providerGroup2": "",
"providerGroup3": "",
"providerGroup4": "",
"providerGroup5": "",
"providerGroup6": "",
"providerGroup7": "",
"providerGroup8": ""
}}}
Response
{
"imdata": []
}
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
aaa accounting default local
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/media/dme/index.html
Authorize EXEC Mode Commands
Authorize EXEC Mode Commands
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultauthor-exec.json`
{
"aaaDefaultAuthor": {
"attributes": {
"authorMethodNone": "no",
"cmdType": "exec",
"localRbac": "yes",
"providerGroup": "",
"providerGroup2": "",
"providerGroup3": "",
"providerGroup4": "",
"providerGroup5": "",
"providerGroup6": "",
"providerGroup7": "",
"providerGroup8": ""
}}}
Response
{
"imdata": []
}
Configures the command authorization method for specific roles on a TACACS+ server. The commands keyword configures authorization sources for all EXEC commands. The default keyword configures command authorization for a non-console session.
The local method uses the local database for accounting.
The default method is local, which is used when no server groups are configured or when all the configured server groups fail to respond.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
aaa authorization commands default local
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/media/dme/index.html
Authorize Configuration Mode Commands
Authorize Configuration Mode Commands
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultauthor-config.json`
{
"aaaDefaultAuthor": {
"attributes": {
"authorMethodNone": "no",
"cmdType": "config",
"localRbac": "yes",
"providerGroup": "",
"providerGroup2": "",
"providerGroup3": "",
"providerGroup4": "",
"providerGroup5": "",
"providerGroup6": "",
"providerGroup7": "",
"providerGroup8": ""
}}}
Response
{
"imdata": []
}
Configures the command authorization method for specific roles on a TACACS+ server.
The commands keyword configures authorization sources for all EXEC commands, and the config-commands keyword configures authorization sources for all configuration commands.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
aaa authorization config-commands default local
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/media/dme/index.html
Configuring the Default Authentication Method
Configuring the Default Authentication Method
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultauth.json`
{
"aaaDefaultAuth": {
"attributes": {
"local": "yes",
"none": "no",
"providerGroup": "",
"providerGroup2": "",
"providerGroup3": "",
"providerGroup4": "",
"providerGroup5": "",
"providerGroup6": "",
"providerGroup7": "",
"providerGroup8": ""
}}}
Response
{
"imdata": []
}
Enables the default authentication.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
aaa authentication login default local
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/media/dme/index.html
Enabling Login Authentication Failure Messages
Enabling Login Authentication Failure Messages
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultauth.json`
{
"aaaDefaultAuth": {
"attributes": {
"errEn": "yes"
}}}
Response
{
"imdata": []
}
Enables failure messages for login authentication.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
aaa authentication login error-enable
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/media/dme/index.html
Enabling MS-CHAP Authentication
Enabling MS-CHAP Authentication
HTTP POST
http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultauth.json
{
"aaaDefaultAuth": {
"attributes": {
"authProtocol": "mschap"
}}}
Response
{
"imdata": []
}
Enables MSCHAP or MSCHAP V2 authentication. The default is disabled.
Note: You cannot enable both MSCHAP and MSCHAP V2 on your Cisco NX-OS device.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
aaa authentication login mschap enable
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/media/dme/index.html
Enabling ASCII Authentication
Enabling ASCII Authentication
HTTP POST
http://<IP_Address>/api/node/mo/sys/userext/authrealm/defaultauth.json
{
"aaaDefaultAuth": {
"attributes": {
"authProtocol": "ascii"
}}}
Response
{
"imdata": []
}
Enables ASCII authentication. The default is disabled.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
aaa authentication login ascii-authentication
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/media/dme/index.html
Configuring Radius
Querying Global RADIUS Configuration
Querying Global RADIUS Configuration
HTTP GET
`http://<IP_Address>/api/node/mo/sys/userext/radiusext.json`
Response
{
"totalCount": "1",
"imdata": [
{
"aaaRadiusEp": {
"attributes": {
"childAction": "",
"descr": "",
"dn": "sys/userext/radiusext",
"lcOwn": "local",
"modTs": "2015-07-07T00:28:07.039+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "",
"ownerKey": "",
"ownerTag": "",
"retries": "1",
"srcIf": "unspecified",
"status": "",
"timeout": "5",
"uid": "0"
}}}]}
The /sys/userext/ object contains a radiusext object that contains the global RADIUS configuration for the switch. Using this object, you can query the global RADIUS configuration.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting the Global RADIUS Configuration
Setting the Global RADIUS Configuration
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/radiusext.json`
{
"aaaRadiusEp": {
"attributes": {
"key": "aabbccd",
"keyEnc": "7",
"timeout": "60",
"retries": "5",
"srcIf": "eth1/2"
}}}
Response
{
"imdata": []
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Querying RADIUS Server Configuration
Querying RADIUS Server Configuration
HTTP GET
`http://<IP_Address>/api/node/mo/sys/radiusext/radiusprovider-5.6.7.8.json
Response
{
"aaaRadiusEp": {
"attributes": {
"key": "aabbccd",
"keyEnc": "7",
"timeout": "60",
"retries": "5",
"srcIf": "eth1/2"
}}}
If RADIUS is configured on the switch, the /sys/userext/radiusext/object contains one or more radiusprovider objects that contain RADIUS server configuration information. You can query these objects to retrieve RADIUS server configurations.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting RADIUS Server Configuration
Setting RADIUS Server Configuration
HTTP POST
`http://<IP_Address>/api/node/mo/sys/radiusext/radiusprovider-5.6.7.8.json`
{
"aaaRadiusEp": {
"attributes": {
"key": "aabbccd",
"keyEnc": "7",
"timeout": "60",
"retries": "5",
"srcIf": "eth1/2"
}}}
Response
{
"imdata": []
}
If RADIUS is configured on the switch, the /sys/userext/radiusext/object contains one or more radiusprovider objects that contain RADIUS server configuration information. You can specify a server object and set the configuration for it.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Specifying a Password Secure Mode and Userpassphrase Length
Specifying a Password Secure Mode and Userpassphrase Length
HTTP POST
`http://<IP_Address>/api/node/mo/sys/radiusext/radiusprovider-5.6.7.8.json`
{
"aaaUserEp": {
"attributes": {
"pwdMaxLength": "127",
"pwdMinLength": "4",
"pwdSecureMode": "yes"
}}}
Response
{
"imdata": []
}
By posting a request to a RADIUS provider object, you can configure RADIUS password attributes, such as password secure mode and the length of the userpassphrase.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Deleting a RADIUS Provider
Deleting a RADIUS Provider
HTTP DELETE
`http://<IP_Address>/api/node/mo/sys/userext/radiusext/radiusprovider-5.6.7.8.json`
Response
{
"imdata": []
}
If RADIUS is configured on the switch, the /sys/userext/radiusext/object contains one or more radiusprovider objects that contain RADIUS server configuration information. You can delete a provider object, which deletes its configuration.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting the IPv4 or IPv6 Address or Hostname for a RADIUS Server
etting the IPv4 or IPv6 Address or Hostname for a RADIUS Server
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/radiusext/radiusprovider.json`
{
"aaaRadiusProvider": {
"attributes": {
"name": "192.168.10.1"
}}}
Response
{
"imdata": []
}
Specifies the IPv4 address (can also be an IPv6 address or hostname) for a RADIUS server to use for authentication.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
radius-server host 192.168.10.1
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/media/dme/index.html
Setting a Pre-Shared Key for All RADIUS Servers
Setting a Preshared Key for All RADIUS Servers
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/radiusext.json`
{
"aaaRadiusEp": {
"attributes": {
"key": "QsEfThUkO",
"keyEnc": "0"
}}}
Response
{
"imdata": []
}
Specifies a RADIUS key for all RADIUS servers. You can specify that the key-value is in clear text format (0), is type-6 encrypted (6), or is type-7 encrypted (7). The Cisco NX-OS software encrypts a clear text key before saving it to the running configuration. The default format is clear text. The maximum length is 63 characters.
By default, no RADIUS key is configured.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
radius-server key 0 QsEfThUkO
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/media/dme/index.html
Setting the Retransmission Count for All RADIUS Servers
Setting the Retransmission Count for All RADIUS Servers
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/radiusext.json`
{
"aaaRadiusEp": {
"attributes": {
"retries": "3"
}}}
Response
{
"imdata": []
}
Specifies the retransmission count for all RADIUS servers. The default retransmission count is 1 and the range is from 0 to 5.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
radius-server retransmit 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/media/dme/index.html
Setting the Interval for Which a Router Waits for a Server Host to Reply
Setting the Interval for Which a Router Waits for a Server Host to Reply
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/radiusext.json`
{
"aaaRadiusEp": {
"attributes": {
"timeout": "60"
}}}
Response
{
"imdata": []
}
Specifies the transmission timeout interval for RADIUS servers. The default timeout interval is 5 seconds and the range is from 1 to 60 seconds.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
radius-server timeout 60
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/media/dme/index.html
Configuring the Global Source Interface for All RADIUS Server Groups Configured on the Device
Configuring the Global Source Interface for All RADIUS Server Groups Configured on the Device
HTTP POST
`http://<IP_Address>/api/node/mo/sys/userext/radiusext.json`
{
"aaaRadiusEp": {
"attributes": {
"srcIf": "lo0"
}}}
Response
{
"imdata": []
}
Configures the global source interface for all RADIUS server groups configured on the device.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right.
ip radius source-interface loopback0
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/media/dme/index.html
Configuring the VSH Roles and Rules
This section contains payload examples to demonstrate how to use the NX-API REST API to configure VSH roles and rules on the Cisco Nexus 3000 and 9000 Series switches.
Configuring Role
This section contains payload examples and CLIs to demonstrate how the NX-API REST APIs correspond to the CLI commands and to demonstrate how to configure roles.
Creating and Configuring a Role
Creating and Configuring a Role
HTTP POST
http://<IP_Address>/api/node/mo/sys/userext/role-test.json
{
"aaaRole": {
"attributes": {
"descr": "test description",
"denyVRF": "yes",
"denyVLAN": "yes",
"denyIntf": "yes"
}
}
}
Response
{
"imdata": []
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Creating and configuring a Rule in a Role
Creating and configuring a Rule in a Role
HTTP POST
http://<IP_Address>/api/node/mo/sys/userext/role-test/rule-1.json
{
"aaaRoleRule": {
"attributes": {
"ruleNumber": "1",
"permission": "permit",
"ruleAccess": "command",
"cmdStr": "show version"
}
}
}
Creating and configuring a Rule in a Role
HTTP POST
http://<IP_Address>/api/mo/sys/userext/role-test/rule-<number>.json
{
"aaaRoleRule": {
"attributes": {
"ruleNumber": "2",
"permission": "permit",
"ruleAccess": "read",
"ruleScope": "feature",
"scopeEntity": "config"
}
}
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring Terminal Log-All
Terminal Log-All enables the logging of all commands, including the show commands, to the accounting log.
Enabling Terminal Log-All
Enabling Terminal Log-All
HTTP POST
http://<IP_Address>/api/api/mo/sys/termlog.json
{
"terminalTerminalLog": {
"attributes": {
"logShowCommand": "1"
}
}
}
CLI Command
The CLI command below is the equivalent of the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
terminal log-all
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/media/dme/index.html
Disabling Terminal Log-All
Disabling Terminal Log-All
HTTP POST
http://<IP_Address>/api/api/mo/sys/termlog.json
{
"terminalTerminalLog": {
"attributes": {
"logShowCommand": "0"
}
}
}
Response
{
"imdata": []
}
CLI Command
The CLI command below is the equivalent of the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload..
no terminal log-all
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/media/dme/index.html
Configuring BGP
This section contains payload examples to demonstrate how to use the NX-API REST API to configure BGP on the Cisco Nexus 3000 and 9000 Series switches.
Enabling BGP
Before you can use the NX-API REST BGP configuration APIs, you must enable BGP on the switch.
Follow these steps to enable BGP.
Enter global configuration mode:
switch# config t
Enable the BGP feature:
switch(config)# feature bgp
BGP router configuration mode is now active. You can now issue NX-API REST BGP configuration calls.
BGP Router Configuration Examples
This section contains payload and CLI examples to demonstrate many of the BGP configuration options and to show how the REST APIs correspond to the CLI commands.
Creating a BGP Instance
Creating a BGP Instance
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"asn": "235"
}}}]}}
Response
{
imdata:[]
}
Creating a BGP Instance
<System>
<bgp-items>
<inst-items>
<asn>235</asn>
</inst-items>
</bgp-items>
</System>
Issue an HTTP GET request to verify that the configuration was successful:
GET http://<IP_address>/api/mo/sys/bgp/inst.json
This example enables BGP and assigns the AS number to the local BGP speaker. The AS number can be a 16-bit integer or a 32-bit integer in the form of a higher 16-bit decimal number and a lower 16-bit decimal number in xx.xx format.
CLI Command
The CLI command below is the equivalent of the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 235
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/media/dme/index.html
Configuring the Router Id
Configuring the Router Id
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default",
"rtrId": "1.1.1.1"
}}}]}}
Response
{
imdata:[]
}
Configuring the Router Id
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<rtrId>1.1.1.1</rtrId>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
This example configures the BGP router ID. This IP address identifies this BGP speaker.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
router-id 1.1.1.1
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/media/dme/index.html
Configuring the Cluster Id
Configuring the Cluster Id
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"clusterId": "110",
"name": "default"
}}}]}}
Response
{
imdata:[]
}
Configuring the Cluster Id
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<clusterId>110</clusterId>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
This example configures the local router as one of the route reflectors that serve the cluster. You specify a cluster ID to identify the cluster. This command triggers an automatic soft clear or refresh of BGP neighbor sessions.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
cluster-id 110
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/media/dme/index.html
Configuring the Graceful Restart Helper
Configuring the Graceful Restart Helper
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpGr": {
"attributes": {
"ctrl": "complete,helper"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the Graceful Restart Helper
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<gr-items>
<ctrl>complete,helper</ctrl>
</gr-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
This example enables the graceful restart helper functionality. Use this command if you have disabled graceful restart but you still want to enable graceful restart helper functionality. This command triggers an automatic notification and session reset for the BGP neighbor sessions.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
graceful-restart-helper
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/media/dme/index.html
Configuring the Graceful Restart Time
Configuring the Graceful Restart Time
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpGr": {
"attributes": {
"restartIntvl": "200"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the Graceful Restart Time
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<gr-items>
<restartIntvl>200</restartIntvl>
</gr-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
This example configures the maximum time for a restart sent to the BGP peer.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
graceful-restart restart-time 200
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/media/dme/index.html
Configuring the Graceful Restart Stale-Path Time
Configuring the Graceful Restart Stale-path Time
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpGr": {
"attributes": {
"staleIntvl": "400"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the Graceful Restart Stale-path Time
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<gr-items>
<staleIntvl>400</staleIntvl>
</gr-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
This example configures the maximum time that BGP keeps the stale routes from the restarting BGP peer.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
graceful-restart stalepath-time 400
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/media/dme/index.html
Configuring the Confederation Identifier
Configuring the Confederation Identifier
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpConfederation": {
"attributes": {
"asn": "102"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the Confederation Identifier
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<confed-items>
<asn>102</asn>
</confed-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
This example configures a confederation identifier for an AS confederation. This command triggers an automatic notification and session reset for the BGP neighbor sessions.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
confederation identifier 102
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/media/dme/index.html
Relaxing AS-Path Restrictions when Choosing Multipath
Relaxing AS-Path Restrictions when Choosing Multipath
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPathCtrl": {
"attributes": {
"asPathMultipathRelax": "enabled"
}}}]}}]}}
Response
{
imdata:[]
}
Relaxing AS-Path Restrictions when Choosing Multipath
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<pathctrl-items>
<asPathMultipathRelax>enabled</asPathMultipathRelax>
</pathctrl-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Allows load sharing across the providers with different (but equal-length) AS paths. Without the as-path multipath-relax option, the AS paths must be identical for load sharing.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
bestpath as-path multipath-relax
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/media/dme/index.html
Comparing the Router Id for Identical EBGP Paths
Comparing the Router Id for Identical EBGP Paths
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPathCtrl": {
"attributes": {
"compRtrId": "enabled"
}}}]}}]}}
Response
{
imdata:[]
}
Comparing the Router Id for Identical EBGP Paths
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<pathctrl-items>
<compRtrId>enabled</compRtrId>
</pathctrl-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Compares the router IDs for identical eBGP paths.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
bestpath compare-routerid
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/media/dme/index.html
Compare MED on Paths from a Different AS
Compare MED on Paths from a Different AS
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPathCtrl": {
"attributes": {
"alwaysCompMed": "enabled"
}}}]}}]}}
Response
{
imdata:[]
}
Compare MED on Paths from a Different AS
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<pathctrl-items>
<alwaysCompMed>enabled</alwaysCompMed>
</pathctrl-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Compares MED on paths from different autonomous systems.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
bestpath always-compare-med
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/media/dme/index.html
Deleting a BGP
Deleting a BGP
POST http://<mgmt0_IP>/api/mo/sys/bgp.json
{
"bgpEntity": {
"children": [
{
"bgpInst": {
"attributes": {
"status": "deleted"
}}}]}}
Response
{
imdata:[]
}
Deleting a BGP
<System>
<bgp-items>
<inst-items xc:operation="delete">
</inst-items>
</bgp-items>
</System>
This Example demonstrates how to delete a BGP instance.
CLI Commands
The CLI command below is the equivalent of the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
no router bgp 100
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/media/dme/index.html
IPv4 Address Family Configuration Examples
This section uses examples to demonstrate many of the BGP configuration options and to show how the REST APIs correspond to the CLI commands.
Enabling IPv4 Unicast Address Family
Configuring an IPv4 Unicast Address Family
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring an IPv4 Unicast Address Family
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Places the router in address family configuration mode and specifies unicast address prefixes for the IPv4 address family.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
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/media/dme/index.html
Enabling an IPv4 Unicast and Multicast Address Families under the Default VRF
Enabling an IPv4 Address Family under the Default VRF
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-mcast"
}
}
},
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
}}}]}}]}}
Response
{
imdata:[]
}
Enabling an IPv4 Address Family under the Default VRF
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-mcast</type>
</DomAf-list>
<DomAf-list>
<type>ipv4-ucast</type>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
This section demonstrates how to enable an IPv4 address family unicast and multicast together.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
address-family ipv4 multicast
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
Issue an HTTP GET request to verify that the configuration was successful:
GET http://<IP_address>/api/mo/sys/bgp/inst/dom-default/af-ipv4-ucast.json
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring Forward Packets over Multipath Paths
Configuring Forward Packets over Multipath Paths
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"maxExtEcmp": "9",
"type": "ipv4-ucast"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring Forward Packets over Multipath Paths
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<maxExtEcmp>9</maxExtEcmp>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Forwards packets over multipath paths.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
maximum-paths 9
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/media/dme/index.html
Configuring Multipath for IBGP Paths
Configuring Multipath for IBGP Paths
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"maxEcmp": "10",
"type": "ipv4-ucast"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring Multipath for IBGP Paths
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<maxEcmp>10</maxEcmp>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Controls the maximum number of parallel iBGP routes that can be installed in a routing table.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
maximum-paths ibgp 10
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/media/dme/index.html
Configuring the Administrative Distance
Configuring the Administrative Distance
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpAdminDist": {
"attributes": {
"eDist": "5",
"iDist": "8",
"localDist": "220"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Administrative Distance
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<adminDist-items>
<eDist>5</eDist>
<iDist>8</iDist>
<localDist>220</localDist>
</adminDist-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures administrative distance.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
distance 5 8 220
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/media/dme/index.html
Configuring Advertisement to only Active Routes to Peers
Configuring Advertisement to only Active Routes to Peers
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"supprInactive": "enabled",
"type": "ipv4-ucast"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring Advertisement to only Active Routes to Peers
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<supprInactive>enabled</supprInactive>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Suppresses the advertisement of routes that are not installed in the routing information base (RIB).
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
suppress-inactive
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/media/dme/index.html
Enabling MPLS Encapsulation
Enabling MPLS Encapsulation
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
nx rest
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"encapMpls": "enabled",
"inheritContPeerPolicyCtrl": "",
"type": "l2vpn-evpn"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Enabling MPLS Encapsulation
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>l2vpn-evpn</type>
<encapMpls>enabled</encapMpls>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Sets the label allocation mode to per-VRF.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
label-allocation-mode per-vrf
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
Disabling Label-Allocation Mode
Disabling Label-Allocation Mode
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
nx rest
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"lblAllocMod": "disabled",
"type": "ipv4-ucast"
}}}]}}]}}
Response
{
imdata:[]
}
Disabling Label-Allocation Mode
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<lblAllocMod>disabled</lblAllocMod>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the per-prefix label mode.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
no label-allocation-mode per-vrf
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/media/dme/index.html
Configuring IPv4 Aggregate Addresses
Configuring IPv4 Aggregate Addresses
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpAggAddr": {
"attributes": {
"addr": "192.0.0.0/8",
"adverMap": "sample2",
"asSet": "enabled",
"attrMap": "sample1",
"summaryOnly": "disabled",
"supprMap": "sample3"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring IPv4 Aggregate Addresses
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<aggaddr-items>
<AggAddr-list>
<addr>192.0.0.0/8</addr>
<adverMap></adverMap>
<asSet>enabled</asSet>
<attrMap></attrMap>
<summaryOnly>disabled</summaryOnly>
<supprMap></supprMap>
</AggAddr-list>
</aggaddr-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Creates an aggregate address. The path advertised for this route is an autonomous system set that consists of all elements contained in all paths that are being summarized:
- The as-set keyword generates autonomous system set path information and community information from contributing paths.
- The advertise-map keyword and argument specify the route map used to select attribute information from selected routes.
- The attribute-map keyword and argument specify the route map used to select attribute information from the aggregate.
- The suppress-map keyword and argument conditionally filter more specific routes.
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
aggregate-address 192.0.0.0/8 as-set advertise-map sample2 suppress-map sample3 attribute-map sample1
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/media/dme/index.html
Configuring the Redistribution of AM Routes
Configuring the Redistribution of AM Routes
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpInterLeakP": {
"attributes": {
"inst": "none",
"proto": "am",
"rtMap": "rtmap1"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Redistribution of AM Routes
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<interleak-items>
<InterLeakP-list>
<proto>am</proto>
<inst>none</inst>
<rtMap>rtmap1</rtMap>
</InterLeakP-list>
</interleak-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the redistribution of AM routes.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
redistribute am route-map rtmap1
Configuring a Route Map to Redistributed Routes
Configuring a Route Map to Redistributed Routes
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpInterLeakP": {
"attributes": {
"inst": "none",
"proto": "direct",
"rtMap": "map1"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring a Route Map to Redistributed Routes
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<interleak-items>
<InterLeakP-list>
<proto>direct</proto>
<inst>none</inst>
<rtMap>map1</rtMap>
</InterLeakP-list>
</interleak-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configuring a route map to redistributed routes.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
redistribute direct route-map map1
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/media/dme/index.html
Configuring the Redistribution of EIGRP Routes with Attributes Applied from a Route Map
Configuring the Redistribution of EIGRP Routes with Attributes Applied from a Route Map
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpInterLeakP": {
"attributes": {
"inst": "ProtTag1",
"proto": "eigrp",
"rtMap": "map1"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Redistribution of EIGRP Routes with Attributes Applied from a Route Map
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<interleak-items>
<InterLeakP-list>
<proto>eigrp</proto>
<inst>ProtTag1</inst>
<rtMap>map1</rtMap>
</InterLeakP-list>
</interleak-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configuring the redistribution of EIGRP routes with attributes applied from a route map.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
redistribute eigrp ProtTag1 route-map map1
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/media/dme/index.html
Configuring the Redistribution of HMM Routes with Attributes Applied from a Route Map
Configuring the Redistribution of HMM Routes with Attributes Applied from a Route Map
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpInterLeakP": {
"attributes": {
"inst": "none",
"proto": "hmm",
"rtMap": "map1"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Redistribution of HMM Routes with Attributes Applied from a Route Map
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<interleak-items>
<InterLeakP-list>
<proto>hmm</proto>
<inst>none</inst>
<rtMap>map1</rtMap>
</InterLeakP-list>
</interleak-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the redistribution of HMM routes with attributes applied from a route map.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
redistribute hmm route-map map1
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/media/dme/index.html
Configuring the Redistribution of ISIS Routes with Attributes Applied from a Route Map
Configuring the Redistribution of ISIS Routes with Attributes Applied from a Route Map
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpInterLeakP": {
"attributes": {
"inst": "ProtTag1",
"proto": "isis",
"rtMap": "map1"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Redistribution of ISIS Routes with Attributes Applied from a Route Map
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<interleak-items>
<InterLeakP-list>
<proto>isis</proto>
<inst>ProtTag1</inst>
<rtMap>map1</rtMap>
</InterLeakP-list>
</interleak-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the redistribution of ISIS routes with attributes applied from a route map.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
redistribute isis ProtTag1 route-map map1
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/media/dme/index.html
Configuring the Redistribution of LISP Routes with Attributes Applied from a Route Map
Configuring the Redistribution of LISP Routes with Attributes Applied from a Route Map
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpInterLeakP": {
"attributes": {
"inst": "none",
"proto": "lisp",
"rtMap": "map1"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Redistribution of LISP Routes with Attributes Applied from a Route Map
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<interleak-items>
<InterLeakP-list>
<proto>lisp</proto>
<inst>none</inst>
<rtMap>map1</rtMap>
</InterLeakP-list>
</interleak-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the redistribution of LISP routes with attributes applied from a route map.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
redistribute lisp route-map map1
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/media/dme/index.html
Configuring the Redistribution of OSPF Routes with Attributes Applied from a Route Map
Configuring the Redistribution of OSPF Routes with Attributes Applied from a Route Map
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpInterLeakP": {
"attributes": {
"inst": "ProtTag1",
"proto": "ospf",
"rtMap": "map1"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Redistribution of OSPF Routes with Attributes Applied from a Route Map
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<interleak-items>
<InterLeakP-list>
<proto>ospf</proto>
<inst>ProtTag1</inst>
<rtMap>map1</rtMap>
</InterLeakP-list>
</interleak-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the redistribution of OSPF routes with attributes applied from a route map.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
redistribute ospf ProtTag1 route-map map1
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/media/dme/index.html
Configuring the Redistribution of RIP Routes with Attributes Applied from a Route Map
Configuring the Redistribution of RIP Routes with Attributes Applied from a Route Map
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpInterLeakP": {
"attributes": {
"inst": "ProtTag1",
"proto": "rip",
"rtMap": "map1"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Redistribution of RIP Routes with Attributes Applied from a Route Map
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<interleak-items>
<InterLeakP-list>
<proto>rip</proto>
<inst>ProtTag1</inst>
<rtMap>map1</rtMap>
</InterLeakP-list>
</interleak-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the redistribution of RIP routes with attributes applied from a route map.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
redistribute rip ProtTag1 route-map map1
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/media/dme/index.html
Configuring the Redistribution of Static Routes with Attributes Applied from a Route Map
Configuring the Redistribution of Static Routes with Attributes Applied from a Route Map
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpInterLeakP": {
"attributes": {
"inst": "none",
"proto": "static",
"rtMap": "map1"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Redistribution of Static Routes with Attributes Applied from a Route Map
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<interleak-items>
<InterLeakP-list>
<proto>static</proto>
<inst>none</inst>
<rtMap>map1</rtMap>
</InterLeakP-list>
</interleak-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the redistribution of Static routes with attributes applied from a route map.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
address-family ipv4 unicast
redistribute static route-map map1
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/media/dme/index.html
Querying an IPv4 Aggregate Address Family
Querying an IPv4 Aggregate Address Family
GET http://<IP_address>/api/mo/sys/bgp/inst/dom-default/af-ipv4-ucast/aggaddr-[10.0.0.0/28].json
Response
{
"totalCount": "1",
"imdata": [
{
"bgpAggAddr": {
"attributes": {
"addr": "192.0.0.0/8",
"adverMap": "sample2",
"asSet": "enabled",
"attrMap": "sample1",
"childAction": "",
"dn": "sys/bgp/inst/dom-default/af-ipv4-ucast/aggaddr-[10.0.0.0/28]",
"lcOwn": "local",
"modTs": "2015-07-14T01:42:16.238+00:00",
"status": "",
"summaryOnly": "disabled",
"supprMap": "sample3"
}
}
}
]
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
IPv6 Address Family Configuration Examples
This section uses examples to demonstrate many of the BGP configuration options and to show how the REST APIs correspond to the CLI commands.
Adding an IPv6 Unicast Address Family
Adding an IPv6 Unicast Address Family
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "10"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv6-ucast"
}}}]}}]}}
Response
{
imdata:[]
}
Adding an IPv6 Unicast Address Family
<System>
<bgp-items>
<inst-items>
<asn>10</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv6-ucast</type>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Issue an HTTP GET request to verify that the configuration was successful:
GET http://<IP_address>/api/mo/sys/bgp/inst/dom-default/af-ipv6-ucast.json
Places the router in address family configuration mode and specifies unicast address prefixes for the IPv6 address family.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 10
address-family ipv6 unicast
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/media/dme/index.html
Enabling IPv6 Address Families under the Default VRF
Enabling IPv6 Address Families under the Default VRF
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv6-mcast"
}
}
},
{
"bgpDomAf": {
"attributes": {
"type": "ipv6-ucast"
}}}]}}]}}
Response
{
imdata:[]
}
Enabling IPv6 Address Families under the Default VRF
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv6-mcast</type>
</DomAf-list>
<DomAf-list>
<type>ipv6-ucast</type>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Issue an HTTP GET request to verify that the configuration was successful:
GET http://<IP_address>/api/mo/sys/bgp/inst/dom-<name>/af-ipv6-ucast.json
This section demonstrates how to enable an IPv6 address family unicast and multicast together.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
address-family ipv6 unicast
address-family ipv6 multicast
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/media/dme/index.html
Configuring IPv6 Aggregate Addresses
Configuring IPv6 Aggregate Addresses
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"type": "ipv6-ucast"
},
"children": [
{
"bgpAggAddr": {
"attributes": {
"addr": "192.0.0.0/8",
"adverMap": "",
"asSet": "enabled",
"attrMap": "",
"summaryOnly": "disabled",
"supprMap": ""
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring IPv6 Aggregate Addresses
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv6-ucast</type>
<aggaddr-items>
<AggAddr-list>
<addr>192.0.0.0/8</addr>
<adverMap></adverMap>
<asSet>enabled</asSet>
<attrMap></attrMap>
<summaryOnly>disabled</summaryOnly>
<supprMap></supprMap>
</AggAddr-list>
</aggaddr-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Issue an HTTP GET request to verify that the configuration was successful:
GET http://<IP_address>/api/mo/sys/bgp/inst/dom-foo/af-ipv6-ucast/aggaddr-[10.0.0.0/28].json
Creates an aggregate address. The as-set keyword generates autonomous system set path information and community information from contributing paths.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
address-family ipv6 unicast
aggregate-address 192.0.2.0/8 as-set
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/media/dme/index.html
Enabling the Maximum Path for iBGP Peers
Enabling the Maximum Path for iBGP Peers
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"maxEcmp": "34",
"type": "ipv6-mcast"
}}}]}}]}}
Response
{
imdata:[]
}
Enabling the Maximum Path for iBGP Peers
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>ipv6-mcast</type>
<maxEcmp>34</maxEcmp>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Controls the maximum number of parallel iBGP routes that can be installed in a routing table.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
address-family ipv6 multicast
maximum-paths ibgp 34
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
Issue an HTTP GET request to verify that the configuration was successful:
GET http://<IP_address>/api/mo/sys/bgp/inst/dom-default/af-ipv4-ucast.json
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Deleting an IPv6 Unicast Address Family
Deleting an IPv6 Unicast Address Family
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst/dom-default.json
{
"bgpDomAf": {
"attributes": {
"status": "deleted",
"type": "ipv6-ucast"
}}}
Response
{
imdata:[]
}
Deleting an IPv6 Unicast Address Family
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list xc:operation="delete">
<type>ipv6-mcast</type>
</DomAf-list>
<DomAf-list xc:operation="delete">
<type>ipv6-ucast</type>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Disables support for an IPv6 unicast address family.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
no address-family ipv6 unicast
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/media/dme/index.html
L2 EVPN Address Family Configuration Examples
This section uses examples to demonstrate BGP configuration options and to show how the REST APIs correspond to the CLI commands.
Advertising a Physical IP for a Type-5 Route
Advertising a Physical IP for a Type-5 Route
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpDomAf": {
"attributes": {
"advPip": "enabled",
"type": "l2vpn-evpn"
}}}]}}]}}
Response
{
imdata:[]
}
Advertising a Physical IP for a Type-5 Route
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<af-items>
<DomAf-list>
<type>l2vpn-evpn</type>
<advPip>enabled</advPip>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Advertises route type 5 routes using the primary IP address of the VTEP interface as the next hop address in the VXLAN EVPN fabric.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
address-family l2vpn evpn
advertise-pip
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/media/dme/index.html
Auto-Generating Routes for an EBGP Neighbor in an EVPN Address Family
Auto-Generating Routes for an EBGP Neighbor in an EVPN Address Family
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"rewriteEvpnRtAsn": "enabled",
"type": "l2vpn-evpn"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Auto-Generating Routes for an EBGP Neighbor in an EVPN Address Family
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>l2vpn-evpn</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<rewriteEvpnRtAsn>enabled</rewriteEvpnRtAsn>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Auto-generates routes for an eBGP neighbor in an EVPN address family.
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
neighbor 1.2.3.4
address-family l2vpn evpn
rewrite-evpn-rt-asn
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/media/dme/index.html
Peer Template Configuration Examples
This section uses examples to demonstrate many of the BGP configuration options and to show how the REST APIs correspond to the CLI commands.
Configuring a Template Configuration for Peer Parameters
Template Configuration for Peer Parameters
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "33.1.1.1"
}}}]}}]}}
Response
{
imdata:[]
}
Template Configuration for Peer Parameters
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Enters peer template configuration mode.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
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/media/dme/index.html
Configuring the Autonomous System Number of the Neighbor (Template Peer)
Configuring the Autonomous System Number of the Neighbor (Template Peer)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"asn": "330",
"inheritContPeerCtrl": "",
"name": "33.1.1.1"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the Autonomous System Number of the Neighbor (Template Peer)
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<asn>330</asn>
<inheritContPeerCtrl></inheritContPeerCtrl>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures an AS number for a template peer.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
remote-as 330
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/media/dme/index.html
Configuring a Log Message for Neighbor Up/Down Events (Under a Template Configuration for Peer Parameters)
Configuring a Log Message for Neighbor Up/Down Events (Under a Template Configuration for Peer Parameters)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"logNbrChgs": "enable",
"name": "33.1.1.1"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring a Log Message for Neighbor Up/Down Events (Under a Template Configuration for Peer Parameters)
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
<logNbrChgs>enable</logNbrChgs>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Logs a message for a neighbor up/down events.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
log-neighbor-changes
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/media/dme/index.html
Configuring the Local-as Number for the eBGP Neighbor (Template Peer)
Configuring the Local-as Number for the eBGP Neighbors (Template Peer)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "33.1.1.1"
},
"children": [
{
"bgpLocalAsn": {
"attributes": {
"asnPropagate": "none",
"localAsn": "100"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Local-as Number for the eBGP Neighbor (Template Peer)
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
<localasn-items>
<asnPropagate>none</asnPropagate>
<localAsn>100</localAsn>
</localasn-items>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the local-as.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
local-as 100
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/media/dme/index.html
Creating a Neighbor-Specific Description (Template Peer)
Creating a Neighbor-Specific Description (Template Peer)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"desc": "oc-bgp-peer",
"inheritContPeerCtrl": "",
"name": "33.1.1.1"
}}}]}}]}}
Response
{
imdata:[]
}
Creating a Neighbor-Specific Description (Template Peer)
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<desc>oc-bgp-peer</desc>
<inheritContPeerCtrl></inheritContPeerCtrl>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Creates a neighbor-specific description.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
description oc-bgp-peer
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/media/dme/index.html
Removing a Private AS Number from Outbound Updates
Removing a Private AS Number from Outbound Updates
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "33.1.1.1",
"privateASctrl": "replace-as"
}}}]}}]}}
Response
{
imdata:[]
}
Removing a Private AS Number from Outbound Updates
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
<privateASctrl>replace-as</privateASctrl>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Replaces all private AS numbers with the replace-as AS-path value.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
remove-private-as replace-as
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/media/dme/index.html
Configuring Multihop TTL for a Remote Peer
Configuring Multihop TTL for a Remote Peer
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "33.1.1.1",
"ttl": "2"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring Multihop TTL for a Remote Peer
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
<ttl>2</ttl>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the eBGP TTL value for eBGP multihop.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
ebgp-multihop 2
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/media/dme/index.html
Configuring the BGP Transport Connection as Passive Only
Configuring the BGP Transport Connection as Passive Only
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"connMode": "passive",
"inheritContPeerCtrl": "",
"name": "33.1.1.1"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the BGP Transport Connection as Passive Only
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<connMode>passive</connMode>
<inheritContPeerCtrl></inheritContPeerCtrl>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Allows a passive connection setup only.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
transport connection-mode passive
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/media/dme/index.html
Configuring the Keepalive and Hold Timers
Configuring the Keepalive and Hold Timers
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"holdIntvl": "181",
"inheritContPeerCtrl": "",
"kaIntvl": "61",
"name": "33.1.1.1"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the Keepalive and Hold Timers
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<holdIntvl>181</holdIntvl>
<inheritContPeerCtrl></inheritContPeerCtrl>
<kaIntvl>61</kaIntvl>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
timers 61 181
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/media/dme/index.html
Configuring an IPv4 Unicast Sub-Address Family
Configuring an IPv4 Unicast Sub-Address Family
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "33.1.1.1"
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"type": "ipv4-ucast"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring an IPv4 Unicast Sub-Address Family
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
</PeerAf-list>
</af-items>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
address-family ipv4 unicast
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/media/dme/index.html
Send Community Attribute to this Neighbor (Template Peer)
Send Community Attribute to this Neighbor (Template Peer)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "33.1.1.1"
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"sendComStd": "enabled",
"type": "ipv4-ucast"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Send Community Attribute to this Neighbor (Template Peer)
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<sendComStd>enabled</sendComStd>
</PeerAf-list>
</af-items>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Sends the community attribute to this BGP peer. This command triggers an automatic soft clear or refresh of BGP neighbor sessions.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
address-family ipv4 unicast
send-community
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/media/dme/index.html
Configuring the Maximum Number of Prefixes from this Neighbor (Template Peer)
Configuring the Maximum Number of Prefixes from this Neighbor (Template Peer)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "33.1.1.1"
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"type": "ipv4-ucast"
},
"children": [
{
"bgpMaxPfxP": {
"attributes": {
"action": "restart",
"maxPfx": "21",
"restartTime": "90",
"thresh": "20"
}}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Maximum Number of Prefixes from this Neighbor (Template Peer)
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<maxpfxp-items>
<action>restart</action>
<maxPfx>21</maxPfx>
<restartTime>90</restartTime>
<thresh>20</thresh>
</maxpfxp-items>
</PeerAf-list>
</af-items>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
address-family ipv4 unicast
maximum-prefix 21 20 restart 90
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/media/dme/index.html
Configuring the Advertisement Interval on a Template Peer
Configuring the advertisement-interval
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "33.1.1.1"
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"advIntvl": "80",
"inheritContPeerPolicyCtrl": "",
"type": "ipv4-ucast"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the advertisement-interval
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<advIntvl>80</advIntvl>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PeerAf-list>
</af-items>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Sets the interval time in seconds between sending advertisement frames. The range is from 1 to 255. The default is 1 second.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
address-family ipv4 unicast
advertisement-interval 80
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/media/dme/index.html
Configuring Advertisement to only Active Routes to Peers
Configuring Advertisement to only Active Routes to Peers
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "33.1.1.1"
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"ctrl": "suppress-inactive",
"inheritContPeerPolicyCtrl": "",
"type": "ipv4-ucast"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring Advertisement to only Active Routes to Peers
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<ctrl>suppress-inactive</ctrl>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PeerAf-list>
</af-items>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Suppresses the advertisement of routes that are not installed in the routing information base (RIB).
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
address-family ipv4 unicast
suppress-inactive
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/media/dme/index.html
Configuring Default Originate Toward a Peer
Configuring Default Originate Toward a Peer
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "33.1.1.1"
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"defOrg": "enabled",
"defOrgRtMap": "",
"inheritContPeerPolicyCtrl": "",
"type": "ipv4-ucast"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring Default Originate Toward a Peer
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>33.1.1.1</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<defOrg>enabled</defOrg>
<defOrgRtMap></defOrgRtMap>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PeerAf-list>
</af-items>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Generates a default route to the BGP peer.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer 33.1.1.1
address-family ipv4 unicast
default-originate
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/media/dme/index.html
Configuring a BGP Peer Template
Configuring a BGP Peer Template
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "192.168.1.2",
"asn": "65536",
"inheritContPeerCtrl": "",
"peerImp": "BasePeer"
}
}
},
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "BasePeer",
"sessionContImp": "BaseSession"
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"bgpPolicyInheritRule": {
"attributes": {
"name": "BasePolicy",
"seq": "1"
}}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring a BGP Peer Template
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>192.168.1.2</addr>
<asn>65536</asn>
<inheritContPeerCtrl></inheritContPeerCtrl>
<peerImp>BasePeer</peerImp>
</Peer-list>
</peer-items>
<peercont-items>
<PeerCont-list>
<name>BasePeer</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
<sessionContImp>BaseSession</sessionContImp>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<pol-items>
<PolicyInheritRule-list>
<name>BasePolicy</name>
<seq>1</seq>
</PolicyInheritRule-list>
</pol-items>
</PeerAf-list>
</af-items>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
template peer BasePeer
inherit peer-session BaseSession
address-family ipv4 unicast
inherit peer-policy BasePolicy 1
neighbor 192.168.1.2 remote-as 65536
inherit peer BasePeer
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/media/dme/index.html
Configuring a Fabric Border Leaf for a Neighbor Template
Configuring a Fabric Border Leaf for a Neighbor Template
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeerCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "p1",
"peerType": "fabric-border-leaf"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring a Fabric Border Leaf for a Neighbor Template
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peercont-items>
<PeerCont-list>
<name>p1</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
<peerType>fabric-border-leaf</peerType>
</PeerCont-list>
</peercont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures a fabric border leaf for a neighbor template.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
template peer p1
peer-type fabric-border-leaf
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/media/dme/index.html
Configuring a Fabric Border Leaf in a Peer-Session Template
Configuring a Fabric Border Leaf in a Peer-Session Template
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpSessionCont": {
"attributes": {
"inheritContPeerCtrl": "",
"name": "ps2",
"peerType": "fabric-external"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring a Fabric Border Leaf in a Peer-Session Template
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<sessioncont-items>
<SessionCont-list>
<name>ps2</name>
<inheritContPeerCtrl></inheritContPeerCtrl>
<peerType>fabric-external</peerType>
</SessionCont-list>
</sessioncont-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures a fabric border leaf in a peer-session template.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
template peer-session ps2
peer-type fabric-external
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/media/dme/index.html
Querying a Peer Template
Querying a Peer Template
GET http://<IP_address>/api/mo/sys/bgp/inst/dom-default/peercont-BasePeer.json
Response
{
"totalCount": "1",
"imdata": [
{
"bgpPeerCont": {
"attributes": {
"adminSt": "disabled",
"asn": "200",
"childAction": "",
"connMode": "passive",
"ctrl": "bfd,cap-neg-off,dis-conn-check",
"desc": "desc2",
"dn": "sys/bgp/inst/dom-default/peercont-sample1",
"holdIntvl": "300",
"inheritContPeerCtrl": "",
"kaIntvl": "200",
"lcOwn": "local",
"modTs": "2015-07-09T01:39:13.589+00:00",
"name": "BasePeer",
"sessionContImp": "BaseSession",
"srcIf": "eth1/1",
"status": "",
"ttl": "100"
}
}
}
]
}
This API call queries the settings of the peer template that were set in the previous example Configuring a BGP Peer Template.
Issue an HTTP GET request to verify that the BGP peer template configuration was successful.
BGP Neighbor Configuration Examples
This section uses examples to demonstrate many of the BGP configuration options and to show how the REST APIs correspond to the CLI commands.
Configuring a BGP Neighbor
Configuring a BGP Neighbor
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
}}}]}}]}}
Response
{
imdata:[]
}
Configuring a BGP Neighbor
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
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/media/dme/index.html
Inheriting a Peer Policy Template
Inheriting a Peer Policy Template
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": "",
"peerImp": "20.1.1.2"
}}}]}}]}}
Response
{
imdata:[]
}
Inheriting a Peer Policy Template
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<peerImp>20.1.1.2</peerImp>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
inherit peer 20.1.1.2
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/media/dme/index.html
Configuring the Autonomous System Number of the Neighbor
Configuring the Autonomous System Number of the Neighbor
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"asn": "200",
"inheritContPeerCtrl": ""
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the Autonomous System Number of the Neighbor
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<asn>200</asn>
<inheritContPeerCtrl></inheritContPeerCtrl>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
remote-as 200
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/media/dme/index.html
Configuring a Log Message for Neighbor Up/Down Events
Configuring a Log Message for Neighbor Up/Down Events
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": "",
"logNbrChgs": "enable"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring a Log Message for Neighbor Up/Down Events
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<logNbrChgs>enable</logNbrChgs>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Logs a message for a neighbor up/down events.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
log-neighbor-changes
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/media/dme/index.html
Configuring the Local-as Number for the eBGP Neighbor
Configuring the Local-as Number for the eBGP Neighbor
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpLocalAsn": {
"attributes": {
"asnPropagate": "none",
"localAsn": "100"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Local-as Number for the eBGP Neighbor
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<localasn-items>
<asnPropagate>none</asnPropagate>
<localAsn>100</localAsn>
</localasn-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the local-as.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
local-as 100
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/media/dme/index.html
Creating a Neighbor-Specific Description
Creating a Neighbor-Specific Description
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpLocalAsn": {
"attributes": {
"asnPropagate": "none",
"localAsn": "100"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Creating a Neighbor-Specific Description
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<name>nx-oc-bgp</name>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Adds a description to a specified neighbor.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
description nx-oc-bgp
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/media/dme/index.html
Removing a Private AS Number from Outbound Updates
Removing a Private AS Number from Outbound Updates
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": "",
"privateASctrl": "replace-as"
}}}]}}]}}
Response
{
imdata:[]
}
Removing a Private AS Number from Outbound Updates
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<privateASctrl>replace-as</privateASctrl>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Replaces all private AS numbers with the replace-as AS-path value.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
remove-private-as replace-as
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/media/dme/index.html
Configuring Multihop TTL for a Remote Peer (Neighbor)
Configuring Multihop TTL for a Remote Peer (Neighbor)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": "",
"ttl": "2"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring Multihop TTL for a Remote Peer (Neighbor)
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<ttl>2</ttl>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures a multihop TTL for a remote peer.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
ebgp-multihop 2
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/media/dme/index.html
Configuring the BGP Transport Connection as Passive Only (Neighbor)
Configuring the BGP Transport Connection as Passive Only (Neighbor)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"connMode": "passive",
"inheritContPeerCtrl": ""
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the BGP Transport Connection as Passive Only (Neighbor)
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<connMode>passive</connMode>
<inheritContPeerCtrl></inheritContPeerCtrl>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Allows a passive connection setup only.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
transport connection-mode passive
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/media/dme/index.html
Configuring the Keepalive and Hold Timers (Neighbor)
Configuring the Keepalive and Hold Timers (Neighbor)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"holdIntvl": "90",
"inheritContPeerCtrl": "",
"kaIntvl": "70"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the Keepalive and Hold Timers (Neighbor)
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<holdIntvl>90</holdIntvl>
<inheritContPeerCtrl></inheritContPeerCtrl>
<kaIntvl>70</kaIntvl>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Adds the keepalive and hold time BGP timer values for the neighbor. The range is from 0 to 3600 seconds. The default is 60 seconds for the keepalive time and 180 seconds for the hold time.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
timers 70 90
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/media/dme/index.html
Configuring an IPv4 Unicast Sub-Address Family (Neighbor)
Configuring an IPv4 Unicast Sub-Address Family (Neighbor)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"type": "ipv4-ucast"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring an IPv4 Unicast Sub-Address Family (Neighbor)
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Enters neighbor address family configuration mode.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
address-family ipv4 unicast
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/media/dme/index.html
Send Community Attribute to this Neighbor
Send Community Attribute to this Neighbor
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"sendComStd": "enabled",
"type": "ipv4-ucast"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Send Community Attribute to this Neighbor
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<sendComStd>enabled</sendComStd>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Sends the community attribute to this BGP peer. This command triggers an automatic soft clear or refresh of BGP neighbor sessions.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
address-family ipv4 unicast
send-community
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/media/dme/index.html
Configuring the Maximum Number of Prefixes from this Neighbor
Configuring the Maximum Number of Prefixes from this Neighbor
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"inheritContPeerPolicyCtrl": "",
"type": "ipv4-ucast"
},
"children": [
{
"bgpMaxPfxP": {
"attributes": {
"action": "restart",
"maxPfx": "10",
"restartTime": "12",
"thresh": "11"
}}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Maximum Number of Prefixes from this Neighbor
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
<maxpfxp-items>
<action>restart</action>
<maxPfx>10</maxPfx>
<restartTime>12</restartTime>
<thresh>11</thresh>
</maxpfxp-items>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the maximum number of prefixes from a peer.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
address-family ipv4 unicast
maximum-prefix 10 11 restart 12
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/media/dme/index.html
Configuring the Advertisement Interval on a Neighbor
Configuring the Advertisement Interval on a Neighbor
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"advIntvl": "80",
"inheritContPeerPolicyCtrl": "",
"type": "ipv4-ucast"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Advertisement Interval on a Neighbor
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<advIntvl>80</advIntvl>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Sets the interval time in seconds between sending advertisement frames. The range is from 1 to 255. The default is 1 second.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
address-family ipv4 unicast
advertisement-interval 80
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/media/dme/index.html
Originating a Default Toward this Peer (Neighbor)
Originating a Default toward this Peer (Neighbor)
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "20.1.1.1",
"inheritContPeerCtrl": ""
},
"children": [
{
"bgpPeerAf": {
"attributes": {
"defOrg": "enabled",
"defOrgRtMap": "",
"inheritContPeerPolicyCtrl": "",
"type": "ipv4-ucast"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Originating a Default toward this Peer (Neighbor)
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>20.1.1.1</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<af-items>
<PeerAf-list>
<type>ipv4-ucast</type>
<defOrg>enabled</defOrg>
<defOrgRtMap></defOrgRtMap>
<inheritContPeerPolicyCtrl></inheritContPeerPolicyCtrl>
</PeerAf-list>
</af-items>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Generates a default route to the BGP peer.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 20.1.1.1
address-family ipv4 unicast
default-originate
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/media/dme/index.html
Configuring BGP Session Templates
Configuring BGP Session Templates
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "192.168.1.2",
"asn": "65536",
"inheritContPeerCtrl": "",
"name": "Peer Router A",
"sessionContImp": "BaseSession"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring BGP Session Templates
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>192.168.1.2</addr>
<asn>65536</asn>
<inheritContPeerCtrl></inheritContPeerCtrl>
<name>Peer Router A</name>
<sessionContImp>BaseSession</sessionContImp>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Issue an HTTP GET request to verify that the configuration was successful:
GET http://<IP_address>/api/mo/sys/bgp/inst/dom-foo/af-ipv4-ucast/aggaddr-[10.0.0.0/28].json
Adds a description for the neighbor.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 192.168.1.2 remote-as 65536
inherit peer-session BaseSession
description Peer Router A
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
Updating a BGP Peer
This example issues a POST request to update an existing BGP peer.
Updating a BGP Peer
POST http://<IP_address>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "192.168.1.2",
"ttl": "10",
"asn": "65536",
"inheritContPeerCtrl": "",
"name": "Peer Router A",
"sessionContImp": "BaseSession"
}}}]}}]}}
After updating the peer, issue an HTTP GET request to verify that the configuration was successful, as in this example:
GET http://<IP_address>/api/mo/sys/bgp/inst/dom-default/peer-[10.10.10.10].json
Configures the eBGP TTL value for eBGP multihop. The range is from 2 to 255. You must manually reset the BGP sessions after using this command.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
neighbor 192.168.1.2
inherit peer-session BaseSession
remote-as 65536
description Peer Router A
ebgp-multihop 10
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring a Fabric Border Leaf for a Neighbor
Configuring a Fabric Border Leaf for a Neighbor
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"inheritContPeerCtrl": "",
"peerType": "fabric-border-leaf"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring a Fabric Border Leaf for a Neighbor
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<inheritContPeerCtrl></inheritContPeerCtrl>
<peerType>fabric-border-leaf</peerType>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures a fabric border leaf for a neighbor
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
neighbor 1.2.3.4
peer-type fabric-border-leaf
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/media/dme/index.html
Deleting a BGP Peer
Deleting a BGP Peer
DELETE http://<mgmt0_IP>/api/mo/sys/bgp/inst/dom-default.json
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.1.1.1",
"status": "deleted"
}}}]}}
Response
{
imdata:[]
}
Deleting a BGP Peer
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list xc:operation="delete">
<addr>1.1.1.1</addr>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Deletes a BGP peer.
Issue an HTTP GET request to verify that the configuration was successful:
GET http://<IP_address>/api/mo/sys/bgp/inst.json
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
router bgp 100
no neighbor 1.1.1.1
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/media/dme/index.html
Configuring a BMP Server
This section uses examples to demonstrate BMP server configuration options and to show how the REST APIs correspond to the CLI commands.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
Configuring an IPv4 or IPv6 Address Port for the BMP Server
Configuring an IPv4 or IPv6 Address Port for the BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"addr": "1.2.3.4",
"id": "1",
"port": "1"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring an IPv4 or IPv6 Address Port for the BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<addr>1.2.3.4</addr>
<port>1</port>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures an IPv4 or IPv6 address port for the BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
address 1.2.3.4 port-number 1
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/media/dme/index.html
Entering a Description for the BMP Server
Entering a Description for the BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"descr": "This is an example of a description",
"id": "1"
}}}]}}]}}
Response
{
imdata:[]
}
Entering a Description for the BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<descr>This is an example of a description</descr>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Enters a description for the BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
description This is an example of a description
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/media/dme/index.html
Configuring a Delay Interval to Connect to the BMP Server
Configuring a Delay Interval to Connect to the BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"delayIntvl": "30",
"id": "1"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring a Delay Interval to Connect to the BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<delayIntvl>30</delayIntvl>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures a delay interval to connect to the BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
initial-delay 30
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/media/dme/index.html
Configuring an Initial-Refresh Delay for the BMP Server
Configuring an Initial-Refresh Delay for the BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"id": "1",
"refreshIntvlDelay": "30"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring an Initial-Refresh Delay for the BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<refreshIntvlDelay>30</refreshIntvlDelay>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures an initial refresh delay for the BMP server; after which, the initial route update is sent to the BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
initial-refresh delay 30
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/media/dme/index.html
Configuring the BMP Server to Skip the Sending of Initial Route Updates
Configuring the BMP Server to Skip the Sending of Initial Route Updates
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"id": "1",
"refreshIntvlSkip": "yes"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the BMP Server to Skip the Sending of Initial Route Updates
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<refreshIntvlSkip>true</refreshIntvlSkip>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures an initial-refresh for the BMP server to skip the sending of initial route updates to the BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
initial-refresh skip
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/media/dme/index.html
Disabling an IPv4 or IPv6 Address Port Configuration for the BMP Server
Disabling an IPv4 or IPv6 Address Port Configuration for the BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"addr": "0.0.0.0",
"id": "1",
"port": "0"
}}}]}}]}}
Response
{
imdata:[]
}
Disabling an IPv4 or IPv6 Address Port Configuration for the BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<addr>0.0.0.0</addr>
<port>0</port>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Disables the configuration of an IPv4 or IPv6 address port for the BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
no address
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/media/dme/index.html
Disabling the Description of the BMP Server
Disabling the Description of the BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"descr": "",
"id": "1"
}}}]}}]}}
Response
{
imdata:[]
}
Disabling the Description of the BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<descr></descr>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Disables the description of the BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
no description
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/media/dme/index.html
Disabling a Delay Interval to Connect to the BMP Server
Disabling a Delay Interval to Connect to the BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"delayIntvl": "45",
"id": "1"
}}}]}}]}}
Response
{
imdata:[]
}
Disabling a Delay Interval to Connect to the BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<delayIntvl>45</delayIntvl>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Disables a delay interval to connect to the BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
no initial-delay 30
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/media/dme/index.html
Disables an Initial-Refresh Delay for the BMP Server
Disables an Initial-Refresh Delay for the BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"id": "1",
"refreshIntvlDelay": "30"
}}}]}}]}}
Response
{
imdata:[]
}
Disables an Initial-Refresh Delay for the BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<refreshIntvlDelay>30</refreshIntvlDelay>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Disables an initial refresh delay for the BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
no initial-refresh delay 30
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/media/dme/index.html
Disables the Skipping of an Initial-Refresh Delay
Disables the Skipping of an Initial-Refresh Delay
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"id": "1",
"refreshIntvlSkip": "no"
}}}]}}]}}
Response
{
imdata:[]
}
Disables the Skipping of an Initial-Refresh Delay
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<refreshIntvlSkip>false</refreshIntvlSkip>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Disables the skipping of an initial refresh delay.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
no initial-refresh skip
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/media/dme/index.html
Disables the Administrative Shutdown of the BMP Server
Disables the Administrative Shutdown of the BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"adminSt": "enabled",
"id": "1"
}}}]}}]}}
Response
{
imdata:[]
}
Disables the Administrative Shutdown of the BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<adminSt>enabled</adminSt>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Disables the administrative shutdown of the BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
no shutdown
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/media/dme/index.html
Disabling the Specified Interval That Statistics are Sent to the BMP Server
Disabling the Specified Interval That Statistics are Sent to the BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"id": "1",
"statIntvl": "0"
}}}]}}]}}
Response
{
imdata:[]
}
Disabling the Specified Interval That Statistics are Sent to the BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<statIntvl>0</statIntvl>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Disables the specified interval that statistics are sent to the BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
no stats-reporting-period
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/media/dme/index.html
Disabling the Source Interface for the BMP Server
Disabling the Source Interface for the BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"id": "1",
"srcIf": "unspecified"
}}}]}}]}}
Response
{
imdata:[]
}
Disabling the Source Interface for the BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<srcIf>unspecified</srcIf>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Disables the source interface of a BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
no update-source
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/media/dme/index.html
Administratively Shutting Down the BMP Server
Administratively Shutting Down the BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"adminSt": "disabled",
"id": "1"
}}}]}}]}}
Response
{
imdata:[]
}
Administratively Shutting Down the BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<adminSt>disabled</adminSt>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Administratively shuts down the BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
shutdown
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/media/dme/index.html
Configuring the Interval after which Statistics are Sent to the BMP Server
Configuring the Interval after which Statistics are Sent to the BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"id": "1",
"statIntvl": "30"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the Interval after which Statistics are Sent to the BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<statIntvl>30</statIntvl>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the interval after which statistics are sent to the BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
stats-reporting-period 30
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/media/dme/index.html
Configuring the Source Ethernet Interface for a BMP Session
Configuring the Source Ethernet Interface for a BMP Session
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"id": "1",
"srcIf": "eth2/1"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the Source Ethernet Interface for a BMP Session
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<srcIf>eth2/1</srcIf>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures the source Ethernet interface for a BMP session.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
update-source ethernet 2/1
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/media/dme/index.html
Configuring a Virtual Router Context for a BMP Server
Configuring a Virtual Router Context for a BMP Server
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"id": "1",
"vrfName": "v1"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring a Virtual Router Context for a BMP Server
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<vrfName>v1</vrfName>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Configures a virtual router context for a BMP server.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
vrf v1
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/media/dme/index.html
Activating BMP Monitoring for a Peer
Activating BMP Monitoring for a Peer
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpPeer": {
"attributes": {
"addr": "1.2.3.4",
"bmpSrvId1St": "enabled",
"inheritContPeerCtrl": ""
}}}]}}]}}
Response
{
imdata:[]
}
Activating BMP Monitoring for a Peer
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<peer-items>
<Peer-list>
<addr>1.2.3.4</addr>
<bmpSrvId1St>enabled</bmpSrvId1St>
<inheritContPeerCtrl></inheritContPeerCtrl>
</Peer-list>
</peer-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Activates BMP monitoring for a peer.
Note: The bmp-activate-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
neighbor 1.2.3.4
bmp-activate-server 1
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/media/dme/index.html
Disabling a VRF Context
Disabling a VRF Context
POST http://<mgmt0_IP>/api/mo/sys/bgp/inst.json
{
"bgpInst": {
"attributes": {
"asn": "100"
},
"children": [
{
"bgpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"bgpBmpSvr": {
"attributes": {
"id": "1"
"vrfName": "default"
}}}]}}]}}
Response
{
imdata:[]
}
Disabling a VRF Context
<System>
<bgp-items>
<inst-items>
<asn>100</asn>
<dom-items>
<Dom-list>
<name>default</name>
<bmp-items>
<BmpSvr-list>
<id>1</id>
<vrfName>default</vrfName>
</BmpSvr-list>
</bmp-items>
</Dom-list>
</dom-items>
</inst-items>
</bgp-items>
</System>
Disables a VRF context.
Note: The bmp-server CLI was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
router bgp 100
bmp-server 1
no vrf VRF_1
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/media/dme/index.html
Configuring EVPN
This section contains examples that demonstrate how to configure EVPN.
Exporting and Importing Target VPN Extended Communities in a Specified Format
Exporting and Importing Target VPN Extended Communities in a Specified Format
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}},{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Exporting and Importing Target VPN Extended Communities in a Specified Format
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Exporting and importing target VPN extended communities in a specified format.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
evpn
vni 123 l2
route-target both 1:2
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/media/dme/index.html
Exporting and Importing Target VPN Extended Communities in Auto-Generated Targets
Exporting and Importing Target VPN Extended Communities in Auto-Generated Targets
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:unknown:0:0"
}}}]}},{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:unknown:0:0"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Exporting and Importing Target VPN Extended Communities in Auto-Generated Targets
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Exporting and importing target VPN extended communities in auto-generated targets.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
evpn
vni 123 l2
route-target both auto
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/media/dme/index.html
Importing Target VPN Extended Communities in Auto-Generated Targets
Importing Target VPN Extended Communities in Auto-Generated Targets
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:unknown:0:0"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Importing Target VPN Extended Communities in Auto-Generated Targets
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rttp-items>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Importing target VPN extended communities in auto-generated targets.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
evpn
vni 123 l2
route-target import auto
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/media/dme/index.html
Importing Target VPN Extended Communities in a Specified Format
Importing Target VPN Extended Communities in a Specified Format
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Importing Target VPN Extended Communities in a Specified Format
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rttp-items>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Importing target VPN extended communities in a specified format.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
evpn
vni 123 l2
route-target import 1:2
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/media/dme/index.html
Exporting Target VPN Extended Communities in Auto-Generated Targets
Exporting Target VPN Extended Communities in Auto-Generated Targets
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:unknown:0:0"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Exporting Target VPN Extended Communities in Auto-Generated Targets
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Exporting target VPN extended communities in auto-generated targets.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
evpn
vni 123 l2
route-target export auto
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/media/dme/index.html
Exporting Target VPN Extended Communities in a Specified Format
Exporting Target VPN Extended Communities in a Specified Format
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Exporting Target VPN Extended Communities in a Specified Format
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Exporting target VPN extended communities in a specified format.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
evpn
vni 123 l2
route-target export 1:2
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/media/dme/index.html
Auto-Generating VPN Route Distinguishers
Auto-Generating VPN Route Distinguishers
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123",
"rd": "rd:unknown:0:0"
}}}]}}
Response
{
imdata:[]
}
Auto-Generating VPN Route Distinguishers
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rd>rd:unknown:0:0</rd>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Auto-generating VPN route distinguishers.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
evpn
vni 123 l2
rd auto
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/media/dme/index.html
Generating VPN Route Distinguishers in a Specified Format
Generating VPN Route Distinguishers in a Specified Format
POST http://<mgmt0_IP>/api/mo/sys/evpn.json
{
"rtctrlL2Evpn": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"rtctrlBDEvi": {
"attributes": {
"encap": "vxlan-123",
"rd": "rd:as2-nn2:1:2"
}}}]}}
Response
{
imdata:[]
}
Generating VPN Route Distinguishers in a Specified Format
<System>
<evpn-items>
<adminSt>enabled</adminSt>
<bdevi-items>
<BDEvi-list>
<encap>vxlan-123</encap>
<rd>rd:as2-nn2:1:2</rd>
</BDEvi-list>
</bdevi-items>
</evpn-items>
</System>
Generating VPN route distinguishers in a specified format.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
evpn
vni 123 l2
rd 1:2
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/media/dme/index.html
Configuring a VRF Context
This section contains examples that demonstrate how to configure a VRF context.
Performing a Route-Map-Based VRF Export
Performing a Route-Map-Based VRF Export
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlMapP": {
"attributes": {
"rtMap": "map1"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Performing a Route-Map-Based VRF Export
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>ipv4-ucast</type>
<rttp-items>
<RttP-list>
<type>export</type>
<rtctrlmap-items>
<rtMap>map1</rtMap>
</rtctrlmap-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Performs a route-map-based VRF export.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
export map map1
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/media/dme/index.html
Copying Route Prefixes into the Default VRF
Copying Route Prefixes into the Default VRF
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlDomDefMapP": {
"attributes": {
"allowVpn": "no",
"pfxLimit": "123",
"rtMap": "map1"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Copying Route Prefixes into the Default VRF
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>ipv4-ucast</type>
<rttp-items>
<RttP-list>
<type>export</type>
<rtctrldefmap-items>
<allowVpn>false</allowVpn>
<pfxLimit>123</pfxLimit>
<rtMap>map1</rtMap>
</rtctrldefmap-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Copies route prefixes from a non-default VRF into the global routing table (the default VRF).
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
export vrf default 123 map map1
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/media/dme/index.html
Importing IPv4 Unicast Prefixes into the Default VRF
Importing IPv4 Unicast Prefixes into the Default VRF
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlDomDefMapP": {
"attributes": {
"allowVpn": "no",
"pfxLimit": "0",
"rtMap": "map1"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Importing IPv4 Unicast Prefixes into the Default VRF
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>ipv4-ucast</type>
<rttp-items>
<RttP-list>
<type>export</type>
<rtctrldefmap-items>
<allowVpn>false</allowVpn>
<pfxLimit>0</pfxLimit>
<rtMap>map1</rtMap>
</rtctrldefmap-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Copies a route containing IPv4 or IPv6 unicast prefixes from a non-default VRF into the global routing table (the default VRF).
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
export vrf default map map1
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/media/dme/index.html
Performing a Route-Map-Based VRF Import
Performing a Route-Map-Based VRF Import
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlMapP": {
"attributes": {
"rtMap": "map1"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Performing a Route-Map-Based VRF Import
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>ipv4-ucast</type>
<rttp-items>
<RttP-list>
<type>import</type>
<rtctrlmap-items>
<rtMap>map1</rtMap>
</rtctrlmap-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Performs a route-map-based VRF import.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
import map map1
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/media/dme/index.html
Exporting and Importing Target VPN Extended Communities in Auto-Generated Targets
Exporting and Importing Target VPN Extended Communities in Auto-Generated Targets
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:unknown:0:0"
}}}]}},{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:unknown:0:0"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Exporting and Importing Target VPN Extended Communities in Auto-Generated Targets
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>ipv4-ucast</type>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Exporting and importing target VPN extended communities in auto-generated targets.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
route-target both auto
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/media/dme/index.html
Exporting and Importing Target VPN Extended Communities in Auto-Generated Targets for EVPN
Exporting and Importing Target VPN Extended Communities in Auto-Generated Targets for EVPN
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "l2vpn-evpn"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:unknown:0:0"
}}}]}},{
"rtctrlRttP": {
"attributes": {
"type": "import"
}}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Exporting and Importing Target VPN Extended Communities in Auto-Generated Targets for EVPN
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>l2vpn-evpn</type>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Exporting and importing target VPN extended communities in auto-generated targets for EVPN.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
route-target both auto evpn
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/media/dme/index.html
Exporting and Importing Target VPN Extended Communities in Auto-Generated Targets for MVPN
Exporting and Importing Target VPN Extended Communities for MVPN
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "ipv4-mvpn"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:unknown:0:0"
}}}]}},{
"rtctrlRttP": {
"attributes": {
"type": "import"
}}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Exporting and Importing Target VPN Extended Communities in Auto-Generated Targets for MVPN
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>ipv4-mvpn</type>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:unknown:0:0</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Exporting and importing target VPN extended communities in auto-generated targets for MVPN.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
route-target both auto mvpn
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/media/dme/index.html
Exporting and Importing Target VPN Extended Communities in a Specified Format
Exporting and Importing Target VPN Extended Communities in a Specified Format
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}},{
"rtctrlRttP": {
"attributes": {
"type": "import"
}}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Exporting and Importing Target VPN Extended Communities in a Specified Format
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>ipv4-ucast</type>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Exporting and importing target VPN extended communities in a specified format.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
route-target both 1:2
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/media/dme/index.html
Exporting and Importing Target VPN Extended Communities in a Specified Format for EVPN
Exporting and Importing Target VPN Extended Communities in a Specified Format for EVPN
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "l2vpn-evpn"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}},{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Exporting and Importing Target VPN Extended Communities in a Specified Format for EVPN
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>l2vpn-evpn</type>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Exports and imports target VPN extended communities in a specified format for EVPN.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
route-target both 1:2 evpn
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/media/dme/index.html
Exporting and Importing Target VPN Extended Communities in a Specified Format for MVPN
Exporting and Importing Target VPN Extended Communities in a Specified Format for MVPN
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "ipv4-mvpn"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}},{
"rtctrlRttP": {
"attributes": {
"type": "import"
}}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Exporting and Importing Target VPN Extended Communities in a Specified Format for MVPN
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>ipv4-mvpn</type>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Exporting and importing target VPN extended communities in a specified format for MVPN.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
route-target both 1:2 mvpn
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/media/dme/index.html
Exporting Target VPN Extended Communities in a Specified Format
Exporting Target VPN Extended Communities in a Specified Format
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Exporting Target VPN Extended Communities in a Specified Format
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>ipv4-ucast</type>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Exporting target VPN extended communities in a specified format.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
route-target export 1:2
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/media/dme/index.html
Exporting Target VPN Extended Communities in a Specified Format for EVPN
Exporting Target VPN Extended Communities in a Specified Format for EVPN
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "l2vpn-evpn"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Exporting Target VPN Extended Communities in a Specified Format for EVPN
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>l2vpn-evpn</type>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Exporting target VPN extended communities in a specified format for EVPN.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
route-target export 1:2 evpn
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/media/dme/index.html
Exporting Target VPN Extended Communities in a Specified Format for MVPN
Exporting Target VPN Extended Communities in a Specified Format for MVPN
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "ipv4-mvpn"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Exporting Target VPN Extended Communities in a Specified Format for MVPN
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>ipv4-mvpn</type>
<rttp-items>
<RttP-list>
<type>export</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Exporting target VPN extended communities in a specified format for MVPN.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
route-target export 1:2 mvpn
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/media/dme/index.html
Importing Target VPN Extended Communities in a Specified Format
Importing Target VPN Extended Communities in a Specified Format
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Importing Target VPN Extended Communities in a Specified Format
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>ipv4-ucast</type>
<rttp-items>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Importing target VPN extended communities in a specified format.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
route-target import 1:2
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/media/dme/index.html
Importing Target VPN Extended Communities in a Specified Format for EVPN
Importing Target VPN Extended Communities in a Specified Format for EVPN
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "l2vpn-evpn"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Importing Target VPN Extended Communities in a Specified Format for EVPN
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>l2vpn-evpn</type>
<rttp-items>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Importing target VPN extended communities in a specified format for EVPN.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
route-target import 1:2 evpn
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/media/dme/index.html
Auto-Generating VPN Route Distinguishers
Auto-Generating VPN Route Distinguishers
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1",
"rd": "rd:unknown:0:0"
}}}]}}
Response
{
imdata:[]
}
Auto-Generating VPN Route Distinguishers
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<rd>rd:unknown:0:0</rd>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Auto-generating VPN route distinguishers.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
rd auto
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/media/dme/index.html
Generating VPN Route Distinguishers in a Specified Format
Generating VPN Route Distinguishers in a Specified Format
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1",
"rd": "rd:as2-nn2:1:2"
}}}]}}
Response
{
imdata:[]
}
Generating VPN Route Distinguishers in a Specified Format
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<rd>rd:as2-nn2:1:2</rd>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Generating VPN route distinguishers in a specified format.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
rd 1:2
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/media/dme/index.html
Allowing Re-Importation of VPN Imported Routes
Allowing Re-Importation of VPN Imported Routes
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"l3Inst": {
"attributes": {
"name": "foo"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "foo"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "export"
},
"children": [
{
"rtctrlDomDefMapP": {
"attributes": {
"allowVpn": "yes",
"pfxLimit": "0",
"rtMap": "map1"
}}}]}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Allowing Re-Importation of VPN Imported Routes
<System>
<inst-items>
<Inst-list>
<name>foo</name>
<dom-items>
<Dom-list>
<name>foo</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>ipv4-ucast</type>
<rttp-items>
<RttP-list>
<type>export</type>
<rtctrldefmap-items>
<allowVpn>true</allowVpn>
<pfxLimit>0</pfxLimit>
<rtMap>map1</rtMap>
</rtctrldefmap-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Allows reimporting VPN-imported routes.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context foo
address-family ipv4 unicast
export vrf default map map1 allow-vpn
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/media/dme/index.html
Configuring the Target for MVPN Routes
Configuring the Target for MVPN Routes
POST http://<mgmt0_IP>/api/mo/sys/inst-VRF_1.json
{
"l3Inst": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDom": {
"attributes": {
"name": "VRF_1"
},
"children": [
{
"rtctrlDomAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"rtctrlAfCtrl": {
"attributes": {
"type": "ipv4-mvpn"
},
"children": [
{
"rtctrlRttP": {
"attributes": {
"type": "import"
},
"children": [
{
"rtctrlRttEntry": {
"attributes": {
"rtt": "route-target:as2-nn2:1:2"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the Target for MVPN Routes
<System>
<inst-items>
<Inst-list>
<name>VRF_1</name>
<dom-items>
<Dom-list>
<name>VRF_1</name>
<af-items>
<DomAf-list>
<type>ipv4-ucast</type>
<ctrl-items>
<AfCtrl-list>
<type>ipv4-mvpn</type>
<rttp-items>
<RttP-list>
<type>import</type>
<ent-items>
<RttEntry-list>
<rtt>route-target:as2-nn2:1:2</rtt>
</RttEntry-list>
</ent-items>
</RttP-list>
</rttp-items>
</AfCtrl-list>
</ctrl-items>
</DomAf-list>
</af-items>
</Dom-list>
</dom-items>
</Inst-list>
</inst-items>
</System>
Configures the target for MVPN routes.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
vrf context VRF_1
address-family ipv4 unicast
route-target import 1:2 mvpn
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/media/dme/index.html
Querying Ephemeral Operational Data
- rsp-foreign-subtree=ephemeral—Specifies that this is an ephemeral request, retrieving high-volume data.
- rsp-subtree=full—Should be specified to retrieve all children under the dn query.
- batch-id—An integer with a range of 1 to N. You can specify in increments (1, 2, 3, …) to retrieve data in iteration.
- batch-size—An integer with a range of 1 to 100,000. You can specify the maximum number of managed objects to be retrieved in each batch iteration.
Querying Ephemeral Operational Data for IPv4 and IPv6 Unicast/Multicast Address Families
Command | Ephemeral DN Query | Description |
---|---|---|
show bgp ip unicast |
All Routeshttp://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-ipv4-ucast.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 One Route http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-ipv4-ucast/rt-[[pfx]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Displays BGP information for the IPv4 unicast address family |
show bgp ip multicast |
All Routeshttp://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-ipv4-mcast.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 One Route http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-ipv4-mcast/rt-[[pfx]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Displays BGP information for the IPv4 multicast address family |
show bgp ipv6 unicast |
All Routeshttp://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-ipv6-ucast.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 One Route http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-ipv6-ucast/rt-[[pfx]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Displays BGP information for IPv6 unicast address family |
show bgp ipv6 multicast |
All Routeshttp://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-ipv6-mcast.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 One Route http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-ipv6-mcast/rt-[[pfx]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display BGP information for IPv6 multicast address family |
show bgp vrf default [ipv 4| ipv6] [unicast | multicast] [A.B.C.D | A.B.C.D/LEN] |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/rt-[[pfx]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display 1 Route |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/exportedrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display exported routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/importedrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display imported routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/injectedrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display injected routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/fltrlist-[name].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display filter-list routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/pfxlist-[name].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display prefix-list routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/rtmap-[name].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display route-map routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/recvdpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display received-paths routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/nh-[[addr]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display nexthop |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/damppathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening paths |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/damphstpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening history paths |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/selforigrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display self originated paths |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ipv4-ucast|ipv6-ucast]/dampening.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening parameters |
show bgp ip unicast neighbors 2.2.2.2 routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[[addr]]/af-[type].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors routes |
show bgp ip unicast neighbors 2.2.2.2 received-routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[[addr]]/af-[type]/rcvdrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors received-routes |
show bgp ip unicast neighbors 2.2.2.2 advertised-routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[[addr]]/af-[type]/advtdrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors advertised-routes |
show bgp ip unicast neighbors 2.2.2.2 routes dampened vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[[addr]]/af-[type]/dampenpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors dampening routes |
Querying Ephemeral Operational Data for VPNv4 and VPNv6 Unicast Address Families
Command | Ephemeral DN Query | Description |
---|---|---|
show bgp vpnv4 unicast |
All Routeshttp://{{ip}}/mo/,sys/bgp/inst/dom-[name]/af-vpnv4-ucast.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 One Route http://{{ip}}/mo/,sys/bgp/inst/dom-[name]/af-vpnv4-ucast/vpnrt-[[pfx]]-rd-[rd]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Displays BGP information for the VPNv4 address family |
show bgp vpnv6 unicast |
All Routeshttp://{{ip}}/mo/,sys/bgp/inst/dom-[name]/af-vpnv6-ucast.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 One Route http://{{ip}}/mo/,sys/bgp/inst/dom-[name]/af-vpnv6-ucast/vpnrt-[[pfx]]-rd-[rd]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Displays BGP information for the VPNv6 address family |
show bgp vrf default [vpnv4 | vpnv6] [unicast] [A.B.C.D | A.B.C.D/LEN] |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[vpnv4-ucast | vpnv6-ucast]/vpnrt-[[pfx]]-rd-[rd]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display 1 Route |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[vpnv4-ucast | vpnv6-ucast]/exportedrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display exported routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[vpnv4-ucast | vpnv6-ucast]/importedrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display imported routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[vpnv4-ucast | vpnv6-ucast]/fltrlist-[name].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display filter-list routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[vpnv4-ucast | vpnv6-ucast]/rtmap-[name].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display route-map routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[vpnv4-ucast | vpnv6-ucast]/recvdpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display received-paths routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[vpnv4-ucast | vpnv6-ucast]/nh-[[addr]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display nexthop |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[vpnv4-ucast | vpnv6-ucast]/damppathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening paths |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[vpnv4-ucast | vpnv6-ucast]/damphstpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening history paths |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[vpnv4-ucast | vpnv6-ucast]/dampening.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening parameters |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[vpnv4-ucast | vpnv6-ucast]/rd-[rd].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display routes by rd |
show bgp [vpnv4 | vpnv6] unicast neighbors 2.2.2.2 routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[addr]]/af-[vpnv4-ucast | vpnv6-ucast].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors routes |
show bgp [vpnv4 | vpnv6] unicast neighbors 2.2.2.2 received-routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[addr]]/af-[vpnv4-ucast | vpnv6-ucast]/rcvdrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors received-routes |
show bgp [vpnv4 | vpnv6] unicast neighbors 2.2.2.2 advertised-routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[addr]]/af-[vpnv4-ucast | vpnv6-ucast]/advtdrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors advertised-routes |
show bgp [vpnv4 | vpnv6] unicast neighbors 2.2.2.2 routes dampened vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[[addr]]/af-[vpnv4-ucast | vpnv6-ucast]/dampenpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors dampening routes |
Querying Ephemeral Operational Data L2VPN EVPN Address Families
Command | Ephemeral DN Query | Description |
---|---|---|
show bgp l2vpn evpn |
All Routeshttp://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-l2vpn-evpn.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 One Route http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-l2vpn-evpn/evpnrt-[[pfx]]-rd-[rd]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Displays BGP information for the L2VPN EVPN address family |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[l2vpn-evpn]/evpnrt-[[pfx]]-rd-[rd].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display 1 Route |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[l2vpn-evpn]/mac-[macaddr].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display routes by macaddr |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[l2vpn-evpn]/fltrlist-[name].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display filter-list routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[l2vpn-evpn]/rtmap-[name].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display route-map routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[l2vpn-evpn]/recvdpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display received-paths routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ l2vpn-evpn]/nh-[[addr]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display nexthop |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ l2vpn-evpn]/damppathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening paths |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ l2vpn-evpn]/damphstpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening history paths |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ l2vpn-evpn]/dampening.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening parameters |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[l2vpn-evpn]/rd-[rd].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display routes by rd |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[l2vpn-evpn]/rttype-[rtType].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display routes by route-type |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[l2vpn-evpn]/vnid-[vnid].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display routes by vnid |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[l2vpn-evpn]/esid-[esid].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display routes by esid |
show bgp l2vpn evpn neighbors 2.2.2.2 routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[addr]]/af-[l2vpn-evpn].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors routes |
show bgp l2vpn evpn neighbors 2.2.2.2 received-routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[addr]]/af-[l2vpn-evpn]/rcvdrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors received-routes |
show bgp l2vpn evpn neighbors 2.2.2.2 advertised-routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[addr]]/af-[l2vpn-evpn]/advtdrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors advertised-routes |
show bgp l2vpn evpn neighbors 2.2.2.2 routes dampened vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[[addr]]/af-[l2vpn-evpn]/dampenpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors dampening routes |
Querying Ephemeral Operational Data for IPv4 and IPv6 Labeled Unicast Address Families
Command | Ephemeral DN Query | Description |
---|---|---|
show bgp ip labeled-unicast |
All Routeshttp://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ipv4-lucast].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 One Route http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ipv4-lucast]/lblrt-[[pfx].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Displays BGP information for the IPv4 labeled unicast address family |
show bgp vrf default [ipv4 | ipv6] [labeled-unicast] [A.B.C.D | A.B.C.D/LEN] |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ipv4-lucast | ipv6-lucast]/lblrt-[[pfx]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display 1 Route |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ipv4-lucast | ipv6-lucast]/exportedrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display exported routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ipv4-lucast | ipv6-lucast]/importedrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display imported routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ipv4-lucast | ipv6-lucast]/fltrlist-[name].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display filter-list routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ipv4-lucast | ipv6-lucast]/rtmap-[name].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display route-map routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ipv4-lucast | ipv6-lucast]/recvdpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display received-paths routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ipv4-lucast | ipv6-lucast]/nh-[[addr]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display nexthop |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ipv4-lucast | ipv6-lucast]/damppathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening paths |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ipv4-lucast | ipv6-lucast]/damphstpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening history paths |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ipv4-lucast | ipv6-lucast]/dampening.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening parameters |
show bgp [ipv4 | ipv6] labeled-unicast neighbors 2.2.2.2 routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[addr]]/af-[ipv4-lucast | ipv6-lucast].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors routes |
show bgp [ipv4 | ipv6] labeled-unicast neighbors 2.2.2.2 received-routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[addr]]/af-[ipv4-lucast | ipv6-lucast]/rcvdrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors received-routes |
show bgp [ipv4 | ipv6] labeled-unicast neighbors 2.2.2.2 advertised-routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[addr]]/af-[ipv4-lucast | ipv6-lucast]/advtdrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors advertised-routes |
show bgp [ipv4 | ipv6] labeled-unicast neighbors 2.2.2.2 routes dampened vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[[addr]]/af-[ipv4-lucast | ipv6-lucast]/dampenpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors dampening routes |
Querying Ephemeral Operational Data for the Link State Address Family
Command | Ephemeral DN Query | Description |
---|---|---|
show bgp link-state |
All Routeshttp://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-lnkstate.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 One Route http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-lnkstate/lsrt-[pfx].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Displays BGP information for the link-state address family |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[lnkstate]/lsrt-[pfx].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display 1 Route |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ lnkstate]/fltrlist-[name].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display filter-list routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[lnkstate]/rtmap-[name].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display route-map routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ lnkstate]/recvdpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display received-paths routes |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ lnkstate]/nh-[[addr]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display nexthop |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ lnkstate]/damppathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening paths |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ lnkstate]/damphstpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening history paths |
show bgp vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[ lnkstate]/dampening.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening parameters |
show bgp link-state neighbors 2.2.2.2 routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[addr]]/af-[lnkstate].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors routes |
show bgp link-state neighbors 2.2.2.2 received-routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[addr]]/af-[lnkstate]/rcvdrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors received-routes |
show bgp link-state neighbors 2.2.2.2 advertised-routes vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[addr]]/af-[lnkstate]/advtdrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors advertised-routes |
show bgp link-state neighbors 2.2.2.2 routes dampened vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[[addr]]/af-[lnkstate]/dampenpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display neighbors dampening routes |
Querying Ephemeral Operational Data for the IPv4 MVPN Address Family
Command | Ephemeral DN Query | Description |
---|---|---|
show bgp ipv4 mvpn vrf <name> |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
All routes |
There is no corresponding show command for this query |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/mvpnrt-[pfx]-rd-[rd].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
1 route display by NLRI RD (Network Layer Reachability Information Route Distinguisher) |
show bgp ipv4 mvpn dampening history-paths vrf <name> |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/damphstpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening history paths |
show bgp ipv4 mvpn dampening dampened-paths vrf <name> |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/damppathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display dampening paths |
show bgp ipv4 mvpn rd <ASN2:NN | ASN4:NN | IPV4:NN> |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/rd-[rd].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display by RD |
show bgp ipv4 mvpn route-type |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/mrttype-[rtType].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display by route type |
show bgp ipv4 mvpn filter-list <word> vrf <name> |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/fltrlist-[name].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display filter routes |
show bgp ipv4 mvpn nexthop |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/nh-[[pfx]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display nexthop |
show bgp ipv4 mvpn received-paths vrf |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/rcvdpathsrt.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display received paths |
show bgp ipv4 mvpn route-map |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/af-[type]/rtmap-[name].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1/code> |
Display by route map |
show bgp ipv4 mvpn neighbors <A.B.C.D | A.B.C.D/LEN | A:B::C:D | A:B::C:D/LEN> vrf foo |
http://{{ip}}/mo/sys/bgp/inst/dom-[name]/peer-[[addr]]/af-[type].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=20000&batch-id=1 |
Display routes by BGP peer address family |
Ephemeral REST Output
GET http://{{ip}}/api/mo/sys/bgp/inst/dom-default/af-[ipv4-ucast].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-size=50&batch-id=1
Response
{
"totalCount": "1",
"imdata": [
{
"bgpDomAf": {
"attributes": {
"advSysMac": "disabled",
"advertL2vpnEvpn": "disabled",
"allocLblAll": "disabled",
"allocLblRtMap": "",
"bestPathCmpltTs": "2017-02-16T10:50:01.126+00:00",
"bestPathSigTs": "2017-02-16T10:50:01.119+00:00",
"childAction": "",
"clReflection": "enabled",
"critNhTimeout": "crit",
"defInfOrigRd": "unknown:unknown:0:0",
"defInfOrigRtt": "unknown:unknown:0:0",
"defInfOriginate": "disabled",
"defMetric": "",
"dn": "sys/bgp/inst/dom-default/af-ipv4-ucast",
"igpMetric": "600",
"lblAllocMod": "disabled",
"maxEcmp": "1",
"maxExtEcmp": "1",
"modTs": "2017-02-16T10:50:01.231+00:00",
"name": "bgp-DomAf",
"nhRtMap": "",
"nonCritNhTimeout": "noncrit",
"numAggregates": "0",
"numNetworks": "0",
"numPaths": "15",
"numPeers": "3",
"numPeersActive": "3",
"numRoutes": "11",
"persistentOnReload": "true",
"retainRttAll": "disabled",
"retainRttRtMap": "",
"status": "",
"supprInactive": "disabled",
"tblId": "0x1",
"tblMap": "",
"tblMapFltr": "disabled",
"tblSt": "up",
"tblVer": "98",
"tmrBstpthDfr": "0",
"tmrMax": "0",
"type": "ipv4-ucast",
"uid": "0",
"vniEthTag": "disabled"
},
"children": [
{
"bgpRoute": {
"attributes": {
"bestPathId": "3",
"numPaths": "3",
"pfx": "1.1.1.1/32",
"rd": "unknown:unknown:0:0",
"rn": "rt-[1.1.1.1/32]",
"rtFlags": "best,rib,xmit",
"ver": "93"
},
"children": [
{
"bgpPath": {
"attributes": {
"aggr": "8.8.8.8",
"aggrAs": "100",
"asPath": "20640 57555 28934 314",
"clusterLst": "",
"extComm": "RT:100:1 RT:1.1.1.1:1",
"flags": "atomic-aggr,metric",
"id": "0",
"importedRd": "unknown:unknown:0:0",
"localPref": "100",
"metric": "2326136519",
"nh": "21.0.101.99",
"nhMetric": "4294967295",
"operSt": "invalid",
"origin": "igp",
"originatorId": "0.0.0.0",
"peer": "19.0.101.1",
"peerRtrId": "12.12.12.12",
"rcvdLbl": "",
"regComm": "1:8609 2:45523 3:16903 4:53818",
"rn": "path-[19.0.101.1]-id-0-nh-[21.0.101.99]",
"type": "internal",
"unknownAttrData": "",
"unknownAttrLen": "0",
"weight": "0"
},
"children": [
{
"bgpAsSeg": {
"attributes": {
"order": "1",
"rn": "seg-1"
},
"children": [
{
"bgpAsItem": {
"attributes": {
"asn": "20640",
"order": "1",
"rn": "asn-1"
}
}
},
{
"bgpAsItem": {
"attributes": {
"asn": "314",
"order": "4",
"rn": "asn-4"
}
}
},
{
"bgpAsItem": {
"attributes": {
"asn": "28934",
"order": "3",
"rn": "asn-3"
}
}
},
{
"bgpAsItem": {
"attributes": {
"asn": "57555",
"order": "2",
"rn": "asn-2"
}
}
}
]
}
},
{
"bgpRegComm": {
"attributes": {
"community": "regular:as2-nn2:2:45523",
"rn": "rcomm-regular:as2-nn2:2:45523"
}
}
},
{
"bgpRegComm": {
"attributes": {
"community": "regular:as2-nn2:1:8609",
"rn": "rcomm-regular:as2-nn2:1:8609"
}
}
},
{
"bgpRegComm": {
"attributes": {
"community": "regular:as2-nn2:3:16903",
"rn": "rcomm-regular:as2-nn2:3:16903"
}
}
},
{
"bgpRegComm": {
"attributes": {
"community": "regular:as2-nn2:4:53818",
"rn": "rcomm-regular:as2-nn2:4:53818"
}
}
},
{
"bgpExtComm": {
"attributes": {
"encap": "unknown",
"rn": "ecomm",
"rtrMac": "00:00:00:00:00:00"
},
"children": [
{
"bgpExtCommRt": {
"attributes": {
"community": "extended:ipv4-nn2:1.1.1.1:1",
"rn": "rt-extended:ipv4-nn2:1.1.1.1:1"
}
}
},
{
"bgpExtCommRt": {
"attributes": {
"community": "extended:as2-nn2:100:1",
"rn": "rt-extended:as2-nn2:100:1"
}
}
}
]
}
}
]
}
},
{
"bgpPath": {
"attributes": {
"aggr": "8.8.8.8",
"aggrAs": "100",
"asPath": "62112 33492 4872 41787",
"clusterLst": "",
"extComm": "RT:100:1 RT:1.1.1.1:1",
"flags": "advertise,atomic-aggr,best-path,metric",
"id": "0",
"importedRd": "unknown:unknown:0:0",
"localPref": "100",
"metric": "476387081",
"nh": "19.0.101.2",
"nhMetric": "0",
"operSt": "valid",
"origin": "igp",
"originatorId": "0.0.0.0",
"peer": "19.0.101.2",
"peerRtrId": "19.0.101.2",
"rcvdLbl": "",
"regComm": "1:50081 2:21461 3:58376 4:29755",
"rn": "path-[19.0.101.2]-id-0-nh-[19.0.101.2]",
"type": "internal",
"unknownAttrData": "",
"unknownAttrLen": "0",
"weight": "0"
},
"children": [
{
"bgpAsSeg": {
"attributes": {
"order": "1",
"rn": "seg-1"
},
"children": [
{
"bgpAsItem": {
"attributes": {
"asn": "62112",
"order": "1",
"rn": "asn-1"
}
}
},
{
"bgpAsItem": {
"attributes": {
"asn": "41787",
"order": "4",
"rn": "asn-4"
}
}
},
{
"bgpAsItem": {
"attributes": {
"asn": "4872",
"order": "3",
"rn": "asn-3"
}
}
},
{
"bgpAsItem": {
"attributes": {
"asn": "33492",
"order": "2",
"rn": "asn-2"
}
}
}
]
}
},
{
"bgpRegComm": {
"attributes": {
"community": "regular:as2-nn2:3:58376",
"rn": "rcomm-regular:as2-nn2:3:58376"
}
}
},
{
"bgpRegComm": {
"attributes": {
"community": "regular:as2-nn2:2:21461",
"rn": "rcomm-regular:as2-nn2:2:21461"
}
}
},
{
"bgpRegComm": {
"attributes": {
"community": "regular:as2-nn2:1:50081",
"rn": "rcomm-regular:as2-nn2:1:50081"
}
}
},
{
"bgpRegComm": {
"attributes": {
"community": "regular:as2-nn2:4:29755",
"rn": "rcomm-regular:as2-nn2:4:29755"
}
}
},
{
"bgpExtComm": {
"attributes": {
"encap": "unknown",
"rn": "ecomm",
"rtrMac": "00:00:00:00:00:00"
},
"children": [
{
"bgpExtCommRt": {
"attributes": {
"community": "extended:ipv4-nn2:1.1.1.1:1",
"rn": "rt-extended:ipv4-nn2:1.1.1.1:1"
}
}
},
{
"bgpExtCommRt": {
"attributes": {
"community": "extended:as2-nn2:100:1",
"rn": "rt-extended:as2-nn2:100:1"
}
}
}
]
}
}
]
}
},
{
"bgpPath": {
"attributes": {
"aggr": "8.8.8.8",
"aggrAs": "100",
"asPath": "38050 9430 46344 17724",
"clusterLst": "",
"extComm": "RT:100:1 RT:1.1.1.1:1",
"flags": "atomic-aggr,metric",
"id": "0",
"importedRd": "unknown:unknown:0:0",
"localPref": "100",
"metric": "2921604939",
"nh": "19.0.101.3",
"nhMetric": "0",
"operSt": "valid",
"origin": "igp",
"originatorId": "0.0.0.0",
"peer": "19.0.101.3",
"peerRtrId": "19.0.101.3",
"rcvdLbl": "",
"regComm": "1:26019 2:62933 3:34313 4:5693",
"rn": "path-[19.0.101.3]-id-0-nh-[19.0.101.3]",
"type": "internal",
"unknownAttrData": "",
"unknownAttrLen": "0",
"weight": "0"
},
"children": [
{
"bgpAsSeg": {
"attributes": {
"order": "1",
"rn": "seg-1"
},
"children": [
{
"bgpAsItem": {
"attributes": {
"asn": "38050",
"order": "1",
"rn": "asn-1"
}
}
},
{
"bgpAsItem": {
"attributes": {
"asn": "17724",
"order": "4",
"rn": "asn-4"
}
}
},
{
"bgpAsItem": {
"attributes": {
"asn": "46344",
"order": "3",
"rn": "asn-3"
}
}
},
{
"bgpAsItem": {
"attributes": {
"asn": "9430",
"order": "2",
"rn": "asn-2"
}
}
}
]
}
},
{
"bgpRegComm": {
"attributes": {
"community": "regular:as2-nn2:4:5693",
"rn": "rcomm-regular:as2-nn2:4:5693"
}
}
},
{
"bgpRegComm": {
"attributes": {
"community": "regular:as2-nn2:1:26019",
"rn": "rcomm-regular:as2-nn2:1:26019"
}
}
},
{
"bgpRegComm": {
"attributes": {
"community": "regular:as2-nn2:3:34313",
"rn": "rcomm-regular:as2-nn2:3:34313"
}
}
},
{
"bgpRegComm": {
"attributes": {
"community": "regular:as2-nn2:2:62933",
"rn": "rcomm-regular:as2-nn2:2:62933"
}
}
},
{
"bgpExtComm": {
"attributes": {
"encap": "unknown",
"rn": "ecomm",
"rtrMac": "00:00:00:00:00:00"
},
"children": [
{
"bgpExtCommRt": {
"attributes": {
"community": "extended:ipv4-nn2:1.1.1.1:1",
"rn": "rt-extended:ipv4-nn2:1.1.1.1:1"
}
}
},
{
"bgpExtCommRt": {
"attributes": {
"community": "extended:as2-nn2:100:1",
"rn": "rt-extended:as2-nn2:100:1"
}}}]}}]}}]}}]}}]}
Configuring HSRP
Hot Standby Router Protocol (HSRP) is a first-hop redundancy protocol (FHRP) that allows a transparent failover of the first-hop IP router.
Configuring an IPv4 HSRP Group
Configuring an IPv4 HSRP Group
HTTP POST
http://<IP_Address>/api/node/mo/sys/hsrp/inst/if-[eth1/7].json
{
"hsrpIf": {
"attributes": {
"id": "eth1/7",
"version": "v2"
},
"children": [
{
"hsrpGroup": {
"attributes": {
"af": "ipv4",
"ctrl": "preempt",
"fwdLwrThrld": "11",
"fwdUprThrld": "88",
"helloIntvl": "15000",
"holdIntvl": "45000",
"id": "123",
"ip": "192.0.20.11",
"ipObtainMode": "admin",
"preemptDelayMin": "22",
"preemptDelayReload": "33",
"preemptDelaySync": "444",
"prio": "33"
}}}]}}
This example configures an IPv4 group with a secondary IP address on an interface.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring an IPv6 HSRP Group
Configuring an IPv6 HSRP Group
HTTP POST
http://<IP_Address>/api/node/mo/sys/hsrp/inst/if-[eth1/7].json
{
"hsrpIf": {
"attributes": {
"id": "eth1/7",
"version": "v2"
},
"children": [
{
"hsrpGroup": {
"attributes": {
"af": "ipv6",
"ctrl": "preempt",
"fwdLwrThrld": "11",
"fwdUprThrld": "22",
"helloIntvl": "15000",
"holdIntvl": "45000",
"id": "125",
"preemptDelayMin": "22",
"preemptDelayReload": "33",
"preemptDelaySync": "444",
"prio": "33"
},
"children": [
{
"hsrpAddr": {
"attributes": {
"ip": "1:2::3:4"
}}}]}}]}}
This example configures an IPv6 group on an interface.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring IPv6 Neighbor Discovery and ICMPv6
Use the IPv6 Neighbor Discovery Protocol (NDP) to determine whether a neighboring router is reachable. IPv6 nodes use neighbor discovery to determine the addresses of nodes on the same network (local link), to find neighboring routers that can forward their packets, to verify whether neighboring routers are reachable or not, and to detect changes to link-layer addresses. NDP uses ICMP messages to detect whether packets are sent to neighboring routers that are unreachable.
This section uses payload examples to demonstrate how to use NX-API REST API to configure IPv6 neighbor discovery on the Cisco Nexus 3000 and 9000 Series switches.
Neighbor Discovery Configuration Command Examples
This section contains payload examples and CLIs to demonstrate many of the neighbor discovery configuration options and to show how the REST APIs correspond to the CLI commands.
Configuring the ND Settings of an IPv6 Interface
Configuring the ND Settings of an IPv6 Interface
POST http://<IP_Address>/api/node/mo/sys/nd/inst/dom-default/if-[eth1/9].json
{
"ndIf": {
"attributes": {
"ctrl": "managed-cfg,redirects,suppress-ra-mtu",
"dadAttempts": "1",
"dadnsInterval": "5000",
"dnsSearchListSuppress": "disabled",
"dnsSuppress": "disabled",
"hopLimit": "64",
"id": "eth1/9",
"macExtract": "exclude-nud-phase",
"mtu": "1500",
"nsIntvl": "1000",
"raIntvl": "600",
"raIntvlMin": "200",
"raLifetime": "60",
"retransTimer": "0"
}
}
}
This example configures the ND-related fields of an interface.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring ICMPv6 on an IPv6 Interface
Configuring ICMPv6 on an IPv6 Interface
POST http://<IP_Address>/api/node/mo/sys/nd/inst/dom-default/if-[eth1/9].json
{
"ndIf": {
"attributes": {
"ctrl": "managed-cfg,redirects,suppress-ra-mtu",
"dadAttempts": "1",
"dadnsInterval": "5000",
"dnsSearchListSuppress": "disabled",
"dnsSuppress": "disabled",
"hopLimit": "64",
"id": "eth1/9",
"macExtract": "exclude-nud-phase",
"mtu": "1500",
"nsIntvl": "1000",
"raIntvl": "600",
"raIntvlMin": "200",
"raLifetime": "60",
"retransTimer": "0"
}
}
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring ICMPv6 Logging on an IPv6 Interface
Configuring ICMPv6 Logging on an IPv6 Interface
POST http://<IP_Address>/api/node/mo/sys/icmpv6/inst.json
{
"icmpv6Inst": {
"attributes": {
"loggingIpv6Icmp6": "icmpv6",
"loggingLevel": "Notice"
},
"children": [
{
"icmpv6If": {
"attributes": {
"ctrl": "redirect,unreachables-icmp",
"id": "eth1/9"
}}}]}}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring the DNS Server Sequence Number
Configuring the DNS Server Sequence Number
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"interfaceEntity": {
"children": [
{
"l3LbRtdIf": {
"attributes": {
"id": "lo222"
}}}]}},{
"ndEntity": {
"children": [
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "lo222"
},
"children": [
{
"ndRouteAdvDNSServer": {
"attributes": {
"dnsSequenceNum": "0",
"dnsServer": "enabled",
"dnsServerAddr": "a::b",
"dnsServerLifeTime": "4",
"dnsServerLifeTimeInfinite": "disabled"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Example:Configuring the DNS Server Sequence Number
<System>
<intf-items>
<lb-items>
<LbRtdIf-list>
<id>lo222</id>
</LbRtdIf-list>
</lb-items>
</intf-items>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>lo222</id>
<dns-items>
<RouteAdvDNSServer-list>
<dnsServerAddr>a::b</dnsServerAddr>
<dnsSequenceNum>0</dnsSequenceNum>
<dnsServer>enabled</dnsServer>
<dnsServerLifeTime>4</dnsServerLifeTime>
<dnsServerLifeTimeInfinite>disabled</dnsServerLifeTimeInfinite>
</RouteAdvDNSServer-list>
</dns-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface loopback 222
ipv6 nd ra dns server a::b 4 sequence 0
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/media/dme/index.html
Configuring an IPv6 DNS Search-List Sequence Number
Configuring an IPv6 DNS Search-List Sequence Number
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"interfaceEntity": {
"children": [
{
"l3LbRtdIf": {
"attributes": {
"id": "lo222"
}}}]}},{
"ndEntity": {
"children": [
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "lo222"
},
"children": [
{
"ndRouteAdvDNSSearchList": {
"attributes": {
"dnsSearchListLifeTime": "4",
"dnsSearchListLifeTimeInfinite": "disabled",
"dnsSearchListName": "ab",
"dnsSequenceNum": "0",
"dnssl": "enabled"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring an IPv6 DNS Search-List Sequence Number
<System>
<intf-items>
<lb-items>
<LbRtdIf-list>
<id>lo222</id>
</LbRtdIf-list>
</lb-items>
</intf-items>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>lo222</id>
<dnssl-items>
<RouteAdvDNSSearchList-list>
<dnsSearchListName>ab</dnsSearchListName>
<dnsSequenceNum>0</dnsSequenceNum>
<dnsSearchListLifeTime>4</dnsSearchListLifeTime>
<dnsSearchListLifeTimeInfinite>disabled</dnsSearchListLifeTimeInfinite>
<dnssl>enabled</dnssl>
</RouteAdvDNSSearchList-list>
</dnssl-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface loopback 222
ipv6 nd ra dns search-list ab 4 sequence 0
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/media/dme/index.html
Configuring a High Default Route Preference
Configuring a High Default Route Preference
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"interfaceEntity": {
"children": [
{
"l3LbRtdIf": {
"attributes": {
"id": "lo222"
}}}]}},{
"ndEntity": {
"children": [
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "lo222",
"routerPreference": "high"
}}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Example:Configuring a High Default Route Preference
<System>
<intf-items>
<lb-items>
<LbRtdIf-list>
<id>lo222</id>
</LbRtdIf-list>
</lb-items>
</intf-items>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>lo222</id>
<routerPreference>high</routerPreference>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface loopback 222
ipv6 nd router-preference high
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/media/dme/index.html
Configuring the High Fault Router Preference Lifetime
Configuring the High Fault Router Preference Lifetime
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"interfaceEntity": {
"children": [
{
"l3LbRtdIf": {
"attributes": {
"id": "lo222"
}}}]}},{
"ndEntity": {
"children": [
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "lo222"
},
"children": [
{
"ndIfRoutes": {
"children": [
{
"ndRoute": {
"attributes": {
"ndRouteAddr": "1::/24",
"ndRouteLifeTime": "0",
"ndRouteLifeTimeInfinite": "disabled",
"routePreference": "high",
"verifyReachability": "disabled"
}}}]}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Example:Configuring the High Fault Router Preference Lifetime
<System>
<intf-items>
<lb-items>
<LbRtdIf-list>
<id>lo222</id>
</LbRtdIf-list>
</lb-items>
</intf-items>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>lo222</id>
<routes-items>
<rt-items>
<Route-list>
<ndRouteAddr>1::/24</ndRouteAddr>
<ndRouteLifeTime>0</ndRouteLifeTime>
<ndRouteLifeTimeInfinite>disabled</ndRouteLifeTimeInfinite>
<routePreference>high</routePreference>
<verifyReachability>disabled</verifyReachability>
</Route-list>
</rt-items>
</routes-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface loopback 222
ipv6 nd route 1::/24 route-preference High 0
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/media/dme/index.html
Disable Sending Route Information Options in RA Messages
Disable Sending Route Information Options in RA Messages
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"interfaceEntity": {
"children": [
{
"l3LbRtdIf": {
"attributes": {
"id": "lo222"
}}}]}},{
"ndEntity": {
"children": [
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "lo222",
"routeSuppress": "enabled"
}}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Disable Sending Route Information Options in RA Messages
<System>
<intf-items>
<lb-items>
<LbRtdIf-list>
<id>lo222</id>
</LbRtdIf-list>
</lb-items>
</intf-items>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>lo222</id>
<routeSuppress>enabled</routeSuppress>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface loopback 222
ipv6 nd ra route suppress
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/media/dme/index.html
Synchronizing Cisco Fabric Services
Synchronizing Cisco Fabric Services
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"fmEntity": {
"children": [
{
"fmVpc": {
"attributes": {
"adminSt": "enabled"
}}}]}},{
"ndEntity": {
"children": [
{
"ndInst": {
"children": [
{
"ndVpc": {
"children": [
{
"ndVpcDom": {
"attributes": {
"ndSync": "enabled"
}}}]}}]}}]}},{
"vpcEntity": {
"children": [
{
"vpcInst": {
"children": [
{
"vpcDom": {
"attributes": {
"id": "100"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Example:Synchronizing Cisco Fabric Services
<System>
<fm-items>
<vpc-items>
<adminSt>enabled</adminSt>
</vpc-items>
</fm-items>
<nd-items>
<inst-items>
<vpc-items>
<dom-items>
<ndSync>enabled</ndSync>
</dom-items>
</vpc-items>
</inst-items>
</nd-items>
<vpc-items>
<inst-items>
<dom-items>
<id>100</id>
</dom-items>
</inst-items>
</vpc-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
feature vpc
vpc domain 100
ipv6 nd synchronize
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/media/dme/index.html
Setting the Off-List Timeout for Neighbor Discovery
Setting the Off-List Timeout for Neighbor Discovery
POST http://<mgmt0_IP>/api/mo/sys/nd.json
{
"ndEntity": {
"children": [
{
"ndInst": {
"attributes": {
"offListTimeout": "200"
}}}]}}
Response
{
imdata:[]
}
Setting the Off-List Timeout for Neighbor Discovery
<System>
<nd-items>
<inst-items>
<offListTimeout>200</offListTimeout>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ipv6 nd off-list timeout 200
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/media/dme/index.html
Configuring the IPv6 Internal Event History Buffer for ICMP
Configuring the IPv6 Internal Event History Buffer for ICMP
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
"icmpv6Inst": {
"children": [
{
"icmpv6ICMPv6EventLogs": {
"attributes": {
"eventType": "nd",
"logSize": "small"
}}}]}}
Response
{
imdata:[]
}
Configuring the IPv6 Internal Event History Buffer for ICMP
<System>
<icmpv6-items>
<inst-items>
<logs-items>
<ICMPv6EventLogs-list>
<eventType>nd</eventType>
<logSize>small</logSize>
</ICMPv6EventLogs-list>
</logs-items>
</inst-items>
</icmpv6-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ipv6 icmp internal event-history nd size small
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/media/dme/index.html
Configuring an IPv6 Neighbor Address or MAC Address
Configuring an IPv6 Neighbor Address or MAC Address
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst":{
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"hopLimit": "4",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring an IPv6 Neighbor Address or MAC Address
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<hopLimit>4</hopLimit>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd hop-limit 4
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/media/dme/index.html
Setting the IPv6 Hop Limit
Setting the IPv6 Hop Limit
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst":{
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1",
"mtu": "2200"
}}}]}}]}}
Response
{
imdata:[]
}
Setting the IPv6 Hop Limit
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<mtu>2200</mtu>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd mtu 2200
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/media/dme/index.html
Setting the MTU in Bytes
Setting the MTU in Bytes
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"ctrl": "managed-cfg,redirects",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Setting the MTU in Bytes
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<ctrl>managed-cfg,redirects</ctrl>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd managed-config-flag
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/media/dme/index.html
Obtaining Address Information
Obtaining Address Information
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"ctrl": "other-cfg,redirects",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Obtaining Address Information
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<ctrl>other-cfg,redirects</ctrl>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd other-config-flag
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/media/dme/index.html
Obtaining Non-Address Related Information
Obtaining Non-Address Related Information
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1",
"nsIntvl": "2222"
}}}]}}]}}
Response
{
imdata:[]
}
Obtaining Non-Address Related Information
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<nsIntvl>2222</nsIntvl>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd ns-interval 2222
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/media/dme/index.html
Setting the Retransmission Interval Between Sending Neighbor-Solicitation Messages
Setting the Retransmission Interval Between Sending Neighbor-Solicitation Messages
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"dadAttempts": "3",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Setting the Retransmission Interval Between Sending Neighbor-Solicitation Messages
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<dadAttempts>3</dadAttempts>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd dad attempts 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/media/dme/index.html
Setting the IPv6 Duplicate Address Detection Transmits
Setting the IPv6 Duplicate Address Detection Transmits
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1",
"raIntvl": "44",
"raIntvlMin": "3"
}}}]}}]}}
Response
{
imdata:[]
}
Setting the IPv6 Duplicate Address Detection Transmits
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<raIntvl>44</raIntvl>
<raIntvlMin>3</raIntvlMin>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd ra-interval 44 min 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/media/dme/index.html
Setting the Interval between Sending Router-Advertisement Messages
Setting the Interval between Sending Router-Advertisement Messages
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1",
"raLifetime": "800"
}}}]}}]}}
Response
{
imdata:[]
}
Setting the Interval between Sending Router-Advertisement Messages
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<raLifetime>800</raLifetime>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd ra-lifetime 800
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/media/dme/index.html
Setting the Router Lifetime of a Default Router
Setting the Router Lifetime of a Default Router
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"ndPfx": {
"attributes": {
"addr": "1:2::3:4/3",
"ctrl": "advertise,router-address",
"lifetime": "4294967295",
"prefLifetime": "4294967295"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Setting the Router Lifetime of a Default Router
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<pfx-items>
<Pfx-list>
<addr>1:2::3:4/3</addr>
<ctrl>advertise,router-address</ctrl>
<lifetime>4294967295</lifetime>
<prefLifetime>4294967295</prefLifetime>
</Pfx-list>
</pfx-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd prefix 1:2::3:4/3 infinite infinite no-autoconfig no-onlink
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/media/dme/index.html
Specifying the time a Node Considers a Neighbor Up After Reachability Confirmation
Specifying the time a Node Considers a Neighbor Up After Reachability Confirmation
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1",
"reachableTime": "3"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying the time a Node Considers a Neighbor Up After Reachability Confirmation
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<reachableTime>3</reachableTime>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd reachable-time 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/media/dme/index.html
Specifying the Advertisement Lifetime for the IPv6 Prefix
Specifying the Advertisement Lifetime for the IPv6 Prefix
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"ndPfx": {
"attributes": {
"addr": "1:2::3:4/3",
"ctrl": "advertise,router-address",
"lifetime": "4294967295",
"prefLifetime": "4294967295"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Specifying the Advertisement Lifetime for the IPv6 Prefix
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<pfx-items>
<Pfx-list>
<addr>1:2::3:4/3</addr>
<ctrl>advertise,router-address</ctrl>
<lifetime>4294967295</lifetime>
<prefLifetime>4294967295</prefLifetime>
</Pfx-list>
</pfx-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd prefix 1:2::3:4/3 infinite infinite no-autoconfig no-onlink
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/media/dme/index.html
Specifying the Advertisement Lifetime for the IPv6 Default Prefix
Specifying the Advertisement Lifetime for the IPv6 Default Prefix
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"ndDefaultPrefix": {
"attributes": {
"ctrl": "advertise,router-address",
"defLifetime": "4294967295",
"defPrefLifetime": "4294967295",
"defPrefix": "enabled"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Specifying the Advertisement Lifetime for the IPv6 Default Prefix
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<defpfx-items>
<ctrl>advertise,router-address</ctrl>
<defLifetime>4294967295</defLifetime>
<defPrefLifetime>4294967295</defPrefLifetime>
<defPrefix>enabled</defPrefix>
</defpfx-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd prefix default infinite infinite no-autoconfig no-onlink
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/media/dme/index.html
Disable Sending RDNSS in Router-Advertisement Messages
Disable Sending RDNSS in Router-Advertisement Messages
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"dnsSuppress": "enabled",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Disable Sending RDNSS in Router-Advertisement Messages
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<dnsSuppress>enabled</dnsSuppress>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd ra dns server suppress
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/media/dme/index.html
Disable Sending DNSSL in Router-Advertisement Messages
Disable Sending DNSSL in Router-Advertisement Messages
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"dnsSearchListSuppress": "enabled",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Disable Sending DNSSL in Router-Advertisement Messages
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<dnsSearchListSuppress>enabled</dnsSearchListSuppress>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd ra dns search-list suppress
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/media/dme/index.html
Disable Sending MTU in Router-Advertisement Messages
Disable Sending MTU in Router-Advertisement Messages
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"ctrl": "redirects,suppress-ra-mtu",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Disable Sending MTU in Router-Advertisement Messages
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<ctrl>redirects,suppress-ra-mtu</ctrl>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd suppress-ra mtu
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/media/dme/index.html
Enable Sending ICMPv6 Redirect Messages
Enable Sending ICMPv6 Redirect Messages
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"ctrl": "redirects",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Enable Sending ICMPv6 Redirect Messages
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<ctrl>redirects</ctrl>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd redirects
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/media/dme/index.html
Setting the Interval between Sending Router-Advertisement Messages
Setting the Interval between Sending Router-Advertisement Messages
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1",
"raLifetime": "800"
}}}]}}]}}
Response
{
imdata:[]
}
Setting the Interval between Sending Router-Advertisement Messages
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<raLifetime>800</raLifetime>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd ra-lifetime 800
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/media/dme/index.html
Setting the Router Lifetime of a Default Router
Setting the Router Lifetime of a Default Router
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"ndPfx": {
"attributes": {
"addr": "1:2::3:4/3",
"ctrl": "advertise,router-address",
"lifetime": "4294967295",
"prefLifetime": "4294967295"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Setting the Router Lifetime of a Default Router
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<pfx-items>
<Pfx-list>
<addr>1:2::3:4/3</addr>
<ctrl>advertise,router-address</ctrl>
<lifetime>4294967295</lifetime>
<prefLifetime>4294967295</prefLifetime>
</Pfx-list>
</pfx-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd prefix 1:2::3:4/3 infinite infinite no-autoconfig no-onlink
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/media/dme/index.html
Specifying the Time a Node Considers a Neighbor Up After Reachability Confirmation
Specifying the time a Node Considers a Neighbor Up After Reachability Confirmation
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1",
"reachableTime": "3"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying the time a Node Considers a Neighbor Up After Reachability Confirmation
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<reachableTime>3</reachableTime>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd reachable-time 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/media/dme/index.html
Specifying the Advertisement Lifetime for the IPv6 Prefix
Specifying the Advertisement Lifetime for the IPv6 Prefix
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"ndPfx": {
"attributes": {
"addr": "1:2::3:4/3",
"ctrl": "advertise,router-address",
"lifetime": "4294967295",
"prefLifetime": "4294967295"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Specifying the Advertisement Lifetime for the IPv6 Prefix
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<pfx-items>
<Pfx-list>
<addr>1:2::3:4/3</addr>
<ctrl>advertise,router-address</ctrl>
<lifetime>4294967295</lifetime>
<prefLifetime>4294967295</prefLifetime>
</Pfx-list>
</pfx-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd prefix 1:2::3:4/3 infinite infinite no-autoconfig no-onlink
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/media/dme/index.html
Specifying the Advertisement Lifetime for the IPv6 Default Prefix
Specifying the Advertisement Lifetime for the IPv6 Default Prefix
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"ndDefaultPrefix": {
"attributes": {
"ctrl": "advertise,router-address",
"defLifetime": "4294967295",
"defPrefLifetime": "4294967295",
"defPrefix": "enabled"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Specifying the Advertisement Lifetime for the IPv6 Default Prefix
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<defpfx-items>
<ctrl>advertise,router-address</ctrl>
<defLifetime>4294967295</defLifetime>
<defPrefLifetime>4294967295</defPrefLifetime>
<defPrefix>enabled</defPrefix>
</defpfx-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd prefix default infinite infinite no-autoconfig no-onlink
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/media/dme/index.html
Disable Sending RDNSS in Router-Advertisement Messages
Disable Sending RDNSS in Router-Advertisement messages
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"dnsSuppress": "enabled",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Disable Sending RDNSS in Router-Advertisement messages
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<dnsSuppress>enabled</dnsSuppress>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd ra dns server suppress
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/media/dme/index.html
Disable Sending DNSSL in Router-Advertisement Messages
Disable Sending DNSSL in Router-Advertisement Messages
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"dnsSearchListSuppress": "enabled",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Disable Sending DNSSL in Router-Advertisement Messages
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<dnsSearchListSuppress>enabled</dnsSearchListSuppress>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd ra dns search-list suppress
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/media/dme/index.html
Disable Sending MTU in Router-Advertisement Messages
Disable Sending MTU in Router-Advertisement Messages
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"ctrl": "redirects,suppress-ra-mtu",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Disable Sending MTU in Router-Advertisement Messages
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<ctrl>redirects,suppress-ra-mtu</ctrl>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd suppress-ra mtu
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/media/dme/index.html
Enable Sending ICMPv6 Redirect Messages
Enable Sending ICMPv6 Redirect Messages
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"ctrl": "redirects",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Enable Sending ICMPv6 Redirect Messages
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<ctrl>redirects</ctrl>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd redirects
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/media/dme/index.html
Configuring Solicited Neighbor Advertisement
Configuring Solicited Neighbor Advertisement
POST http://<mgmt0_IP>/api/mo/sys/nd.json
{
"ndEntity": {
"children": [
{
"ndInst": {
"attributes": {
"acceptSolicitNghbrEntry": "accept",
"probeIntervalForSolicitNghbr": "0",
"solicitNghbrAdvertisement": "enabled"
}}}]}}
Response
{
imdata:[]
}
Configuring Solicited Neighbor Advertisement
<System>
<nd-items>
<inst-items>
<acceptSolicitNghbrEntry>accept</acceptSolicitNghbrEntry>
<probeIntervalForSolicitNghbr>0</probeIntervalForSolicitNghbr>
<solicitNghbrAdvertisement>enabled</solicitNghbrAdvertisement>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd solicit-na accept no-probe
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/media/dme/index.html
Enabling Solicited Neighbor Advertisement
Enabling Solicited Neighbor Advertisement
POST http://<mgmt0_IP>/api/mo/sys/nd.json
{
"ndEntity": {
"children": [
{
"ndInst": {
"attributes": {
"acceptSolicitNghbrEntry": "none",
"solicitNghbrAdvertisement": "enabled"
}}}]}}
Response
{
imdata:[]
}
Enabling Solicited Neighbor Advertisement
<System>
<nd-items>
<inst-items>
<acceptSolicitNghbrEntry>none</acceptSolicitNghbrEntry>
<solicitNghbrAdvertisement>enabled</solicitNghbrAdvertisement>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd solicit
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/media/dme/index.html
Extracting Next Hop MAC Addresses Embedded in IPv6
Extracting Next Hop MAC Addresses Embedded in IPv6
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"id": "eth1/1",
"macExtract": "nud-phase"
}}}]}}]}}
Response
{
imdata:[]
}
Extracting Next Hop MAC Addresses Embedded in IPv6
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<macExtract>nud-phase</macExtract>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 nd mac-extract
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/media/dme/index.html
Discovering Hosts from DADNS
Discovering Hosts from DADNS
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"ndEntity": {
"children": [
{
"ndInst": {
"children": [
{
"ndDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ndIf": {
"attributes": {
"dadnsInterval": "2999",
"id": "lo3"
}}}]}}]}}]}},{
"interfaceEntity": {
"children": [
{
"l3LbRtdIf": {
"attributes": {
"id": "lo3"
}}}]}}]}}
Response
{
imdata:[]
}
Discovering Hosts from DADNS
<System>
<System>
<nd-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>lo3</id>
<dadnsInterval>2999</dadnsInterval>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</nd-items>
<intf-items>
<lb-items>
<LbRtdIf-list>
<id>lo3</id>
</LbRtdIf-list>
</lb-items>
</intf-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface loopack 3
ipv6 nd dadns-discover 2999
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/media/dme/index.html
Neighbor Discovery Action Command Examples
This section contains payload examples and CLIs to show how the REST APIs correspond to the CLI commands and to demonstrate the neighbor discovery action commands.
Clearing IPv6 ICMP VPC-Statistics
Clearing IPv6 icmp vpc-statistics
POST http://10.77.143.51/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ndInstClearVpcStatLTask": {
"attributes": {
"adminSt": "start",
"dn":
"sys/action/lsubj-[sys]/ndInstClearVpcStatLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ipv6 icmp vpc-statistics
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/media/dme/index.html
Clearing IPv6 Interface Statistics
Clearing IPv6 interface statistics
POST http://10.77.143.51/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ndInstClearIntfStatLTask": {
"attributes": {
"adminSt": "start",
"interface": "<type-with-port>"
"dn":
"sys/action/lsubj-[sys]/ndInstClearIntfStatLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ipv6 icmp interface statistics
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/media/dme/index.html
Clearing IPv6 ICMP Global Statistics
Clearing IPv6 ICMP Global Statistics
POST http://10.77.143.51/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ndInstClearGlobalStatLTask": {
"attributes": {
"adminSt": "start",
"dn":
"sys/action/lsubj-[sys]/ndInstClearGlobalStatLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ipv6 icmp global statistics
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/media/dme/index.html
Clearing a Neighbor VRF
Clearing a VRF
POST http://10.77.143.51/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ndInstClearIpv6NeighborLTask": {
"attributes": {
"adminSt": "start",
"nbrAddr": "2::1",
"interface": "eth1/1",
"vrf": "abc",
"forceDelete": "disabled",
"dn":
"sys/action/lsubj-[sys]/ndInstClearIpv6NeighborLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ipv6 neighbor 2::1 Ethernet1/1 vrf abc
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/media/dme/index.html
Clearing IPv6 Neighbor Ethernet
Clearing IPv6 Neighbor Ethernet
POST http://10.77.143.51/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ndInstClearIpv6NeighborLTask": {
"attributes": {
"adminSt": "start",
"nbrAddr": "2::1",
"interface": "eth1/1",
"vrf": "",
"forceDelete": "disabled",
"dn":
"sys/action/lsubj-[sys]/ndInstClearIpv6NeighborLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ipv6 neighbor 2::1 Ethernet1/1
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/media/dme/index.html
Clearing an Ipv6 Neighbor VRF
Clearing an Ipv6 neighbor VRF
POST http://10.77.143.51/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ndInstClearIpv6NeighborLTask": {
"attributes": {
"adminSt": "start",
"nbrAddr": "2::1",
"interface": "unspecified",
"vrf": "abc",
"forceDelete": "disabled",
"dn":
"sys/action/lsubj-[sys]/ndInstClearIpv6NeighborLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ipv6 neighbor 2::1 vrf abc
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/media/dme/index.html
Clearing an IPv6 Neighbor Address
Clearing an IPv6 Neighbor Address
POST http://10.77.143.51/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ndInstClearIpv6NeighborLTask": {
"attributes": {
"adminSt": "start",
"nbrAddr": "2::1",
"interface": "unspecified",
"vrf": "",
"forceDelete": "disabled",
"dn":
"sys/action/lsubj-[sys]/ndInstClearIpv6NeighborLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ipv6 neighbor 2::1
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/media/dme/index.html
Clearing IPv6 Neighbor Ethernet1/1
Clearing IPv6 neighbor Ethernet1/1
POST http://10.77.143.51/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ndInstClearIpv6NeighborLTask": {
"attributes": {
"adminSt": "start",
"nbrAddr": "0.0.0.0",
"interface": "eth1/1",
"vrf": "",
"forceDelete": "disabled",
"dn":
"sys/action/lsubj-[sys]/ndInstClearIpv6NeighborLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ipv6 neighbor Ethernet1/1
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/media/dme/index.html
Clearing All IPv6 Neighbor VRFs
Clearing all IPv6 Neighbor VRFs
POST http://10.77.143.51/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ndInstClearIpv6NeighborLTask": {
"attributes": {
"adminSt": "start",
"nbrAddr": "0.0.0.0",
"interface": "unspecified",
"vrf": "all",
"forceDelete": "disabled",
"dn":
"sys/action/lsubj-[sys]/ndInstClearIpv6NeighborLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ipv6 neighbor vrf all
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/media/dme/index.html
Clearing IPv6 Neighbors through Force-Delete
Clearing IPv6 neighbors through force-delete
POST http://10.77.143.51/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ndInstClearIpv6NeighborLTask": {
"attributes": {
"adminSt": "start",
"nbrAddr": "0.0.0.0",
"interface": "unspecified",
"vrf": "",
"forceDelete": "enabled",
"dn":
"sys/action/lsubj-[sys]/ndInstClearIpv6NeighborLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ipv6 neighbor force-delete
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/media/dme/index.html
Neighbor Discovery Operational Command Examples
This section contains payload examples and CLIs to demonstrate the neighbor discovery operational commands and to show how the REST APIs correspond to the CLI commands.
Getting all ND Settings
Getting all ND Settings
GET http://<IP_Address>/api/node/mo/sys/nd.json
Response
{
"ndEntity": {
"attributes": {
"adminSt": "enabled",
"childAction": "",
"modTs": "2016-11-21T17:45:33.053+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "",
"operErr": "",
"operSt": "enabled",
"persistentOnReload": "true",
"rn": "nd",
"status": "",
"uid": "0"
},
"children": [
{
"ndInst": {
"attributes": {
"acceptSolicitNghbrEntry": "none",
"adjacencyCfgFailedBmp": "",
"adjacencyCfgFailedTs": "00:00:00:00.000",
"adjacencyCfgState": "0",
"adminSt": "enabled",
"agingInterval": "1380",
"cacheLimit": "174080",
"cacheSyslogRate": "1",
"childAction": "",
"configErr": "",
"ctrl": "",
"ipv6AdjRouteDistance": "250",
"modTs": "2016-11-21T17:45:33.053+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "",
"offListTimeout": "180",
"operErr": "",
"persistentOnReload": "true",
"probeIntervalForSolicitNghbr": "5",
"rn": "inst",
"solicitNghbrAdvertisement": "disabled",
"status": "",
"uid": "0"
},
"children": [
{
"ndDom": {
"attributes": {
"childAction": "",
"modTs": "2016-11-29T06:17:45.680+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "default",
"persistentOnReload": "true",
"rn": "dom-default",
"status": "",
"uid": "0"
},
"children": [
{
"ndIf": {
"attributes": {
"adminSt": "enabled",
"childAction": "",
"configError": "noerror",
"ctrl": "redirects",
"dadAttempts": "1",
"dadnsInterval": "5000",
"descr": "",
"dnsSearchListSuppress": "disabled",
"dnsSuppress": "disabled",
"hopLimit": "64",
"id": "eth1/9",
"macExtract": "none",
"modTs": "2016-11-29T06:17:45.680+00:00",
"monPolDn": "uni/fabric/monfab-default",
"mtu": "1500",
"name": "",
"ndCfgFailedBmp": "",
"ndCfgFailedTs": "00:00:00:00.000",
"ndCfgState": "0",
"nsIntvl": "1000",
"persistentOnReload": "true",
"raIntvl": "600",
"raIntvlMin": "200",
"raLifetime": "60",
"reachableTime": "0",
"retransTimer": "0",
"rn": "if-[eth1/9]",
"status": "",
"uid": "0"
}}}]}}]}}]}}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Getting VRF Information
Getting VRF Information
GET http://<mgmt0_IP>/api/mo/sys/nd/inst/dom-<vrf>/if-[<intf>]/ifstats/rt-[<route>].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ipv6 nd interface route vrf abce
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/media/dme/index.html
Querying the ND Configuration
Querying the ND Configuration
GET http://<IP_Address>/api/node/mo/sys/nd.json
Response
{
"ndEntity": {
"attributes": {
"adminSt": "enabled",
"childAction": "",
"modTs": "2016-11-21T17:45:33.053+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "",
"operErr": "",
"operSt": "enabled",
"persistentOnReload": "true",
"rn": "nd",
"status": "",
"uid": "0"
},
"children": [
{
"ndInst": {
"attributes": {
"acceptSolicitNghbrEntry": "none",
"adjacencyCfgFailedBmp": "",
"adjacencyCfgFailedTs": "00:00:00:00.000",
"adjacencyCfgState": "0",
"adminSt": "enabled",
"agingInterval": "1380",
"cacheLimit": "174080",
"cacheSyslogRate": "1",
"childAction": "",
"configErr": "",
"ctrl": "",
"ipv6AdjRouteDistance": "250",
"modTs": "2016-11-21T17:45:33.053+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "",
"offListTimeout": "180",
"operErr": "",
"persistentOnReload": "true",
"probeIntervalForSolicitNghbr": "5",
"rn": "inst",
"solicitNghbrAdvertisement": "disabled",
"status": "",
"uid": "0"
},
"children": [
{
"ndDom": {
"attributes": {
"childAction": "",
"modTs": "2016-11-29T06:17:45.680+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "default",
"persistentOnReload": "true",
"rn": "dom-default",
"status": "",
"uid": "0"
},
"children": [
{
"ndIf": {
"attributes": {
"adminSt": "enabled",
"childAction": "",
"configError": "noerror",
"ctrl": "redirects",
"dadAttempts": "1",
"dadnsInterval": "5000",
"descr": "",
"dnsSearchListSuppress": "disabled",
"dnsSuppress": "disabled",
"hopLimit": "64",
"id": "eth1/9",
"macExtract": "none",
"modTs": "2016-11-29T06:17:45.680+00:00",
"monPolDn": "uni/fabric/monfab-default",
"mtu": "1500",
"name": "",
"ndCfgFailedBmp": "",
"ndCfgFailedTs": "00:00:00:00.000",
"ndCfgState": "0",
"nsIntvl": "1000",
"persistentOnReload": "true",
"raIntvl": "600",
"raIntvlMin": "200",
"raLifetime": "60",
"reachableTime": "0",
"retransTimer": "0",
"rn": "if-[eth1/9]",
"status": "",
"uid": "0"
}}}]}}]}}]}}
This example returns all ND settings
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring BFD
Bidirectional Forwarding Detection (BFD) is a detection protocol designed to provide fast forwarding path failure detection times for all media types, encapsulations, topologies, and routing protocols. In addition to fast forwarding path failure detection, BFD provides a consistent failure detection method for network administrators. Because the network administrator can use BFD to detect forwarding path failures at a uniform rate, rather than the variable rates for different routing protocol hello mechanisms, network profiling and planning will be easier, and reconvergence time will be consistent and predictable.
Configuring OSPFv2
This section contains payload examples to demonstrate how to use the NX-API REST API to configure OSPFv2 on the Cisco Nexus 3000 and 9000 Series switches.
Guidelines and Restrictions
- OSPFv2 operational support is not available through NX-API in releases earlier than Cisco NX-OS 7.0(3)I5(1).
- When configuring interface settings in a POST operation, you must always specify the desired area. If no area attribute is specified, the operation is applied to area 1.
- If an interface is configured with area="0.0.0.0", the REST GET for the interface MO shows area="backbone".
- Operational information objects (status and statistics) are maintained only for a single OSPF instance. When multiple OSPF instances exist, operational information is not supported.
- When configuring or querying an OSPFv2 interface, do not use the
ospfInternalIf
managed object. UseospfIf
instead.
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
Enabling OSPFv2
Before you can use the NX-API REST OSPFv2 configuration APIs, you must enable OSPFv2 on the switch.
Follow these steps to enable OSPFv2.
Enter global configuration mode:
switch# configure terminal
Enable the OSPFv2 feature:
switch(config)# feature ospf
Specify a BGP router and enter router configuration
switch(config)# router ospf name
These commands create a named OSPF instance and an OSPF domain named default. OSPFv2 router configuration mode is now active. You can now issue NX-API REST OSPFv2 configuration calls.
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
Configuring Optional Parameters on an OSPFv2 Instance
Configuring Optional Parameters on an OSPFv2 Instance
POST http://<IP_Address>/api/node/mo/sys/ospf/inst-my_ospf.json
{
"ospfDom": {
"attributes": {
"adjChangeLogLevel": "brief",
"ctrl": "default-passive,name-lookup",
"dist": "25",
"maxEcmp": "4",
"name": "default",
"rtrId": "192.0.20.1"
}
}
}
You can configure optional parameters for OSPF.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
router ospf my_ospf
router-id 192.0.20.1
distance 25
log-adjacency-changes
maximum-paths 4
passive-interface default
name-lookup
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/media/dme/index.html
Configuring Networks in OSPFv2
Configuring Networks in OSPFv2
POST http://<IP_Address>/api/node/mo/sys/ospf.json
{
"ospfIf": {
"attributes": {
"adminSt": "enabled",
"advertiseSecondaries": "no",
"area": "0.0.0.15",
"cost": "25",
"ctrl": "mtu-ignore",
"deadIntvl": "50",
"helloIntvl": "25",
"id": "eth1/9",
"instance": "201",
"instanceid": "0",
"passiveCtrl": "enabled",
"prio": "25"
}
}
}
You can configure a network to OSPFv2 by associating it through the interface that the router uses to connect to that network. You can add all networks to the default backbone area (Area 0), or you can create new areas using any decimal number or an IP address.
Prerequisite: The interface eth1/9 is already configured.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
interface eth1/9
ip address 192.0.20.1/16
ip router ospf 201 area 0.0.0.15 secondaries none
ip ospf cost 25
ip ospf dead-interval 50
ip ospf hello-interval 25
ip ospf mtu-ignore
ip ospf passive-interface
ip ospf priority 25
no ip ospf shutdown
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/media/dme/index.html
Configuring a Virtual Link
Configuring a Virtual Link
POST http://<IP_Address>/api/node/mo/sys/ospf/inst-my_ospf.json
{
"ospfInst": {
"attributes": {
"name": "my_ospf"
},
"children": [
{
"ospfDom": {
"attributes": {
"name": "default"
},
"children": [
{
"ospfArea": {
"attributes": {
"id": "0.0.0.10"
},
"children": [
{
"ospfVLink": {
"attributes": {
"deadIntvl": "50",
"helloIntvl": "25",
"nbrRtrId": "10.1.2.3",
"rexmitIntvl": "60",
"xmitDelay": "2"
},
"children": [
{
"ospfAuthNewP": {
"attributes": {
"keyId": "3",
"md5key": "3 6260a55332988492d5666ab77a685d71",
"md5keySecureMode": "yes",
"type": "md5"
}}}]}}]}}]}}]}}
A virtual link connects an isolated area to the backbone area through an intermediate area.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
router ospf my_ospf
area 0.0.0.10 virtual-link 10.1.2.3
dead-interval 50
hello-interval 25
retransmit-interval 60
transmit-delay 2
authentication message-digest
message-digest-key 3 md5 asdflkj1234
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/media/dme/index.html
Querying an OSPFv2 Instance
Querying an OSPFv2 Instance
GET http://<IP_Address>/api/node/mo/sys/ospf/inst-my_ospf.json?rsp-subtree=full
{
"totalCount": "1",
"imdata": [
{
"ospfInst": {
"attributes": {
"adminSt": "enabled",
"childAction": "",
"ctrl": "",
"dn": "sys/ospf/inst-my_ospf",
"memAlert": "normal",
"modTs": "2016-12-13T02:57:36.789+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "my_ospf",
"operErr": "",
"persistentOnReload": "true",
"status": "",
"uid": "0"
},
"children": [
{
"ospfDom": {
"attributes": {
"adjChangeLogLevel": "none",
"adminSt": "enabled",
"bwRef": "40000",
"bwRefUnit": "mbps",
"childAction": "",
"ctrl": "",
"defMetric": "unspecified",
"discardRoute": "ext,int",
"dist": "110",
"downbitIgnore": "no",
"maxEcmp": "8",
"modTs": "2016-12-13T02:57:36.789+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "default",
"operRtrId": "0.0.0.0",
"operSt": "down",
"persistentOnReload": "true",
"rfc1583Compat": "no",
"rn": "dom-default",
"rtrId": "0.0.0.0",
"status": "",
"uid": "0"
},
"children": [
{
"ospfGr": {
"attributes": {
"childAction": "",
"ctrl": "complete",
"gracePeriod": "60",
"helper": "yes",
"modTs": "2016-12-13T02:57:36.789+00:00",
"persistentOnReload": "true",
"restartAge": "0",
"restartExitReason": "none",
"restartStatus": "not-restarting",
"rn": "gr",
"status": "",
"uid": "0"
}
}
},
{
"ospfArea": {
"attributes": {
"asbrCnt": "0",
"authType": "unspecified",
"brCnt": "0",
"childAction": "",
"cost": "1",
"ctrl": "",
"id": "0.0.0.10",
"lsaCksumSum": "0",
"modTs": "2016-12-14T22:38:25.014+00:00",
"monPolDn": "uni/fabric/monfab-default",
"nssaTransRole": "candidate",
"nssaTransSt": "elected",
"nssaTransStabIntvl": "40",
"persistentOnReload": "true",
"rn": "area-0.0.0.10",
"status": "",
"type": "regular",
"uid": "0"
},
"children": [
{
"ospfVLink": {
"attributes": {
"childAction": "",
"deadIntvl": "unspecified",
"helloIntvl": "10",
"modTs": "2016-12-14T22:38:25.014+00:00",
"monPolDn": "uni/fabric/monfab-default",
"nbrRtrId": "10.1.2.3",
"persistentOnReload": "true",
"rexmitIntvl": "5",
"rn": "vlink-10.1.2.3",
"status": "",
"uid": "0",
"xmitDelay": "1"
}}}]}}]}}]}}]}
Displays OSPF information.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
show ip ospf my_ospf
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/media/dme/index.html
Configuring Multicast (PIM)
Protocol Independent Multicast (PIM), which is used between multicast-capable routers, advertises group membership across a routing domain by constructing multicast distribution trees. PIM builds shared distribution trees on which packets from multiple sources are forwarded, as well as source distribution trees on which packets from a single source are forwarded.
This section contains payload examples to demonstrate how to use the NX-API REST API to configure Multicast (PIM) on the Cisco Nexus 3000 and 9000 Series switches.
See also Configuring Multicast (MSDP).
Enabling PIM
Enabling PIM
HTTP POST
http://<IP_Address>/api/node/mo/sys/fm/pim.json
{
"fmPim": {
"attributes": {
"adminSt": "enabled"
}
}
}
This example enables PIM.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
feature pim
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/media/dme/index.html
Configuring PIM Sparse Mode Parameters
HTTP POST
http://<IP_Address>/api/node/mo/sys/pim.json
{
"pimInst": {
"children": [
{
"pimDom": {
"attributes": {
"name": "default"
},
"children": [
{
"pimASMPatP": {
"children": [
{
"pimSharedRangeP": {
"attributes": {
"pfxList": "",
"rtMap": "my_route_map3",
"useSPTCommand": "yes"
}
}
},
{
"pimRegTrP": {
"attributes": {
"maxRate": "1000"
}
}
}
]
}
},
{
"pimAutoRPP": {
"attributes": {
"ctrl": "forward,listen"
}
}
},
{
"pimIf": {
"attributes": {
"border": "yes",
"drDelay": "3",
"drPrio": "192",
"id": "eth1/9",
"neighRtMap": "my_neighbor_policy",
"neighpfxList": "",
"pimSparseMode": "yes"
},
"children": [
{
"pimHelloTrP": {
"attributes": {
"authKey": "3 a2710d3f3229ad9b",
"authT": "ah-md5",
"helloItvl": "25000"
}
}
}
]
}
},
{
"pimBSRP": {
"attributes": {
"ctrl": "forward"
}}}]}}]}}
This example configures the PIM sparse mode parameters.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
ip pim auto-rp forward listen
ip pim bsr forward
ip pim register-rate-limit 1000
ip pim spt-threshold infinity group-list my_route_map3
interface ethernet 1/9
ip pim sparse-mode
ip pim dr-priority 192
ip pim dr-delay 3
ip pim hello-authentication ah-md5 my_key
ip pim hello-interval 25000
ip pim border
ip pim neighbor-policy my_neighbor_policy
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/media/dme/index.html
Flushing All Routes
Flushing All Routes
HTTP POST
http://<IP_Address>/api/node/mo/sys/pim/inst/dom-default.json
{
"pimDom": {
"attributes": {
"flushRoutes": "yes",
"name": "default"
}
}
}
When routes are flushed, they are removed from the Multicast Routing Information Base (MRIB) and the Multicast Forwarding Information Base (MFIB).
This example flushes existing routes.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
ip pim flush-routes
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/media/dme/index.html
Configuring BFD for PIM in VRF Mode
Configuring BFD for PIM in VRF Mode
HTTP POST
http://<IP_Address>/api/node/mo/sys/pim/inst/dom-default.json
{
"pimDom": {
"attributes": {
"bfd": "yes",
"name": "default"
}
}
}
This example configures BFD for PIM on the default DOM.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
ip pim bfd
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/media/dme/index.html
Configuring BFD for PIM on an Interface
Configuring BFD for PIM on an Interface
HTTP POST
http://<IP_Address>/api/node/mo/sys/pim/inst/dom-default/if-[eth1/9].json
{
"pimIf": {
"attributes": {
"bfdInst": "enabled",
"id": "eth1/9"
}
}
}
This example configures BFD for PIM on Ethernet interface 1/9.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
interface eth1/9
ip pim bfd-instance
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/media/dme/index.html
Configuring Multicast (MSDP)
You can use the Multicast Source Discovery Protocol (MSDP) to exchange multicast source information between multiple Border Gateway Protocol (BGP) enabled Protocol Independent Multicast (PIM) sparse-mode domains.
This section contains payload examples to demonstrate how to use the NX-API REST API to configure MSDP on the Cisco Nexus 3000 and 9000 Series switches.
See also Configuring Multicast (PIM).
Enabling MSDP
Enabling MSDP
HTTP POST
http://<IP_Address>/api/node/mo/sys/fm/msdp.json
{
"fmMsdp": {
"attributes": {
"adminSt": "enabled"
}
}
}
This example enables MSDP.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
feature msdp
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/media/dme/index.html
Configuring an MSDP Peer
Configuring an MSDP Peer
HTTP POST
http://<IP_Address>/api/node/mo/sys/msdp/inst/dom-default.json
{
"msdpDom": {
"attributes": {
"name": "default"
},
"children": [
{
"msdpPeer": {
"attributes": {
"addr": "192.0.20.123",
"adminSt": "disabled",
"asn": "200",
"descr": "This is an example of a peer",
"kaIntvl": "50",
"kaTimeout": "70",
"srcActiveMsgLimit": "9999999",
"srcIf": "eth1/9"
},
"children": [
{
"msdpAuthP": {
"attributes": {
"key": "3 8578e14ab51234e3e185fabecbaf7c6d"
}}}]}}]}}
This example configures an MSDP peer.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
ip msdp peer 192.0.20.123 connect-source eth1/9 remote-as 200
ip msdp description 192.0.20.123 This is an example of a peer
ip msdp keepalive 192.0.20.123 50 70
ip msdp shutdown 192.0.20.123
ip msdp sa-limit 192.0.20.123 9999999
ip msdp password 192.0.20.123 0 asdfzxcv1234
Prerequisites:
- Ensure that you have enabled PIM and MSDP.
- Ensure that you configured PIM in the domains of the routers that you will configure as MSDP peers.
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/media/dme/index.html
Configuring MSDP Global Parameters
Configuring MSDP Global Parameters
HTTP POST
http://<IP_Address>/api/node/mo/sys/msdp/inst/dom-default.json
{
"msdpDom": {
"attributes": {
"name": "default",
"origIf": "eth1/9",
"srcActiveMsgIntvl": "120"
},
"children": [
{
"msdpMaxGrpP": {
"attributes": {
"maxGrp": "100000",
"srcPfx": "192.0.30.1/24"
}}}]}}
This example configures MSDP parameters for the default domain.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
ip msdp originator-id eth1/9
ip msdp group-limit 100000 source 192.0.30.1/24
ip msdp sa-interval 120
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/media/dme/index.html
Prerequisites:
- Ensure that you have enabled PIM and MSDP.
Configuring MSDP Mesh Groups
Configuring MSDP Mesh Groups
HTTP POST
http://<IP_Address>/api/node/mo/sys/msdp/inst/dom-default/peer-[192.0.20.123].json
{
"msdpMeshGrp": {
"attributes": {
"grpName": "my_mesh_grp1"
}
}
}
This example adds the peer to an MSDP mesh group.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
ip msdp mesh-group 192.0.20.123 my_mesh_grp1
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/media/dme/index.html
Querying the MSDP Domain
Querying the MSDP Domain
HTTP GET
http://<IP_Address>/api/node/mo/sys/msdp/inst/dom-default.json
{
"totalCount": "1",
"imdata": [
{
"msdpDom": {
"attributes": {
"childAction": "",
"ctrl": "",
"dn": "sys/msdp/inst/dom-default",
"modTs": "2016-12-07T03:47:02.900+00:00",
"name": "default",
"origIf": "eth1/10",
"persistentOnReload": "true",
"reConnIntvl": "10",
"srcActiveMsgIntvl": "120",
"status": "",
"uid": "0"
},
"children": [
{
"msdpPeer": {
"attributes": {
"addr": "192.0.20.123",
"adminSt": "disabled",
"asn": "200",
"childAction": "",
"connTmrTs": "1970-01-01T00:00:00.000+00:00",
"descr": "This is an example of a peer",
"discontinuityTs": "2016-12-07T03:47:02.947+00:00",
"establishTransitions": "0",
"kaIntvl": "50",
"kaTimeout": "70",
"lastResetOperQual": "Password change",
"localPort": "unspecified",
"modTs": "2016-12-07T17:03:55.036+00:00",
"name": "",
"operSt": "admin-down",
"persistentOnReload": "true",
"remPort": "unspecified",
"rn": "peer-[192.0.20.123]",
"srcActiveMsgLimit": "9999999",
"srcIf": "eth1/9",
"status": "",
"uid": "22322",
"upTs": "2016-12-07T03:47:02.961+00:00"
},
"children": [
{
"msdpMeshGrp": {
"attributes": {
"childAction": "",
"descr": "",
"grpName": "my_mesh_grp1",
"modTs": "2016-12-07T17:04:25.140+00:00",
"name": "",
"persistentOnReload": "true",
"rn": "meshgrp",
"status": "",
"uid": "22322"
}
}
},
{
"msdpAuthP": {
"attributes": {
"childAction": "",
"descr": "",
"key": "",
"modTs": "2016-12-07T03:47:02.900+00:00",
"name": "",
"persistentOnReload": "true",
"rn": "auth",
"status": "",
"type": "none",
"uid": "22322"
}}}]}}]}}]}
This example returns the MSDP configuration for the default MSDP domain.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring HMM
The Host Mobility Manager (HMM) tracks end-host movement by discovering the end host and propagating the end-host reachability information to the other switches (leaf switches) in the fabric.
This section contains payload examples to demonstrate how to use the NX-API REST API to configure HMM on the Cisco Nexus 3000 and 9000 Series switches.
Enabling BGP EVPN
Enabling BGP EVPN
http://<IP_Address>/api/node/mo/sys/fm/evpn.json
{
"fmEvpn": {
"attributes": {
"adminSt": "enabled"
}
}
}
This example enables BGP EVPN control plane on the switch.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
[no] nv overlay evpn
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/media/dme/index.html
Enabling Fabric Forwarding
Enabling Fabric Forwarding
http://<IP_Address>/api/node/mo/sys/fm/hmm.json
{
"fmHmm": {
"attributes": {
"adminSt": "enabled"
}
}
}
This example enables the fabric forwarding feature.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
[no] feature fabric forwarding
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/media/dme/index.html
Configuring an AnyCast Gateway
Configuring an AnyCast Gateway
http://<IP_Address>/api/node/mo/sys/hmm/fwdinst.json
{
"hmmFwdInst": {
"attributes": {
"amac": "11:22:33:44:55:66",
"limitVlanMac": "1024"
}
}
}
This example configures an Anycast Gateway.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
[no] fabric forwarding anycast-gateway-mac <mac>
[no] fabric forwarding limit-vlan-mac <max-limit>
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/media/dme/index.html
Enabling Duplicate Detection for IP and MAC Addresses
Enabling Duplicate Detection for IP and MAC Addresses
http://<IP_Address>/api/node/mo/sys/hmm/fwdinst/evpn.json
{
"hmmFwdEvpn": {
"attributes": {
"ddHmmoves": "25",
"ddHnsecs": "180"
}
}
}
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
[no] fabric forwarding dup-host-ip-addr-detection <mmoves> <nsecs>
[no] fabric forwarding dup-host-recovery-timer <timeout> recover-count <count>
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/media/dme/index.html
Creating an SVI as an Anycast Gateway
Creating an SVI as an Anycast Gateway
http://<IP_Address>/api/node/mo/sys.json
{
"topSystem": {
"children": [
{
"interfaceEntity": {
"children": [
{
"sviIf": {
"attributes": {
"id": "vlan10"
}}}]}},
{
"hmmEntity": {
"children": [
{
"hmmFwdInst": {
"children": [
{
"hmmFwdIf": {
"attributes": {
"id": "vlan10",
"mode": "anycastGW"
}}}]}}]}},
{
"fmEntity": {
"children": [
{
"fmInterfaceVlan": {
"attributes": {
"adminSt": "enabled"
}}}]}}]}}
This example enables the VLAN network interface feature, creates an SVI, and associates the SVI with the Anycast Gateway.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
[no] feature interface-vlan
[no] interface vlan 10
[no] fabric forwarding mode anycast-gateway
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/media/dme/index.html
Configuring VXLAN BGP EVPN
You can use Virtual Extensible Local Area Networks (VXLANs) to extend reachability of a VLAN within a data center over Layer 3. When you use VXLANs, you are no longer restricted to using only 4096 VLANs in a data center.
The switch can be configured to provide a BGP Ethernet VPN (EVPN) control plane using a distributed Anycast gateway, with Layer 2 and Layer 3 VXLAN overlay networks.
This section contains payload examples to demonstrate how to use the NX-API REST API to configure VXLAN on the Cisco Nexus 3000 and 9000 Series switches.
New and Changed VXLAN Model Information
The following table provides an overview of the significant changes for the VXLAN model in Cisco NX-OS Release 7.0(3)I7(1).
Description |
Config/Show command |
New MO Name |
New DN |
Old MO Name |
Old DN |
Comments |
NVO end-points container |
N/A |
nvoEps |
sys/eps |
N/A |
N/A |
New MO |
NVE interface (nve1) |
interface nve1 |
nvoEp (config/oper) |
sys/eps/epId-1 |
nvoEp (config/oper) |
sys/epId-1 |
DN changed. MO name unchanged |
VNI container |
|
nvoNws |
sys/eps/epId-1/nws |
nvoNws |
sys/epId-1/nws |
DN changed. MO name unchanged |
Single VNI |
member vni 5000 |
nvoNw (config) |
sys/eps/epId-1/nws/vni-5000 |
nvoNw (config/oper) |
sys/epId-1/nws/vni-5000 |
NvoNw - config properties for single vni.
|
Range of VNIs |
member vni 5000-5001 |
nvoNwRange (config) |
sys/eps/epId-1/nws/vnis-5000-5001 |
NvoNwRange - config properties for VNI range |
||
VNI oper data |
show nve vni 5000 detail show nve vni 5001 detail |
nvoOperNw (oper) |
sys/eps/epId-1/nws/opervni-5000 sys/eps/epId-1/nws/opervni-5001 |
OperNw – Operational properties for individual VNIs. |
||
Ingress-Replication |
member vni 5000 ingress-replication protocol bgp/static |
nvoIngRepl (config) |
sys/eps/epId-1/nws/vni-5000/IngRepl |
nvoIngRepl (config) |
sys/epId-1/nws/vni-5000/IngRepl |
DN changed. MO name unchanged |
member vni 5000-5001 ingress-replication protocol bgp/static |
sys/eps/epId-1/nws/vnis-5000-5001/IngRepl |
|||||
NVO peer container |
N/A |
nvoPeers |
sys/eps/epId-1/peers |
nvoPeers |
sys/epId-1/peers |
DN changed. MO name unchanged |
Dynamic Peer |
show nve peers peer-ip 1.1.1.1 detail |
nvoDyPeer (oper) |
sys/eps/epId-1/peers/dy_peer-1.1.1.1 |
nvoDyPeer (oper) |
sys/epId-1/peers/dy_peer-1.1.1.1 |
(BGP-RNH/UDP sources) DN changed. MO name unchanged |
Dynamic IR Peer |
show nve peers peer-ip 1.1.1.1 detail |
nvoDyIRPeer (oper) |
sys/eps/epId-1/peers/dyn_ir_peer-1.1.1.1 |
nvoDyIRPeer (oper) |
sys/epId-1/nws/vni-5000/IngRepl/dyn_ir_peer-1.1.1.1 |
(BGP IMET Peer) DN changed. MO name unchanged - single MO created for each peer. |
Static IR Peer |
member vni 5000 ingress-replication protocol static peer-ip 1.1.1.1 |
nvoConfigStIRPeer (config) |
sys/eps/epId-1/nws/vni-5000/IngRepl/config_st_ir_peer-1.1.1.1 |
nvoStIRPeer (config) |
sys/epId-1/nws/vni-5000/IngRepl/st_ir_peer-1.1.1.1 |
DN changed. Mo name changed. |
member vni 5000-5001 ingress-replication protocol static peer-ip 1.1.1.1 |
sys/eps/epId-1/nws/vnis-5000-5001/IngRepl/config_st_ir_peer-1.1.1.1 |
|||||
Static IR Peer oper container |
show nve peers peer-ip 1.1.1.1 detail |
nvoStIRPeer (oper) |
sys/eps/epId-1/peers/st_ir_peer-1.1.1.1 |
N/A |
N/A |
New MO for static IR peer operational properties. |
Static Peer (controller learnt) |
show nve peers peer-ip 1.1.1.1 detail |
nvoStPeer (config/oper) |
sys/eps/epId-1/peers/st_peer-1.1.1.1 |
nvoStPeer (config/oper) |
sys/epId-1/peers/st_peer-1.1.1.1 |
DN changed. MO name unchanged |
Enabling VXLAN BGP EVPN
Enabling VXLAN BGP EVPN
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"fmEntity": {
"children": [
{
"fmEvpn": {
"attributes": {
"adminSt": "enabled"
}}},{
"fmNvo": {
"attributes": {
"adminSt": "enabled"
}}},{
"fmVnSegment": {
"attributes": {
"adminSt": "enabled"
}}}]}}]}}
Response
{
imdata:[]
}
Enabling VXLAN BGP EVPN
<System>
<fm-items>
<evpn-items>
<adminSt>enabled</adminSt>
</evpn-items>
<nvo-items>
<adminSt>enabled</adminSt>
</nvo-items>
<vnsegment-items>
<adminSt>enabled</adminSt>
</vnsegment-items>
</fm-items>
</System>
This operation enables the Network Virtualization (NV) overlay and enables VLAN-based VXLAN and the EVPN control plane for VXLAN.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
feature vn-segment
feature nv overlay
nv overlay evpn
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/media/dme/index.html
VXLAN Configuration Command Examples
This section uses examples to demonstrate many of the VXLAN configuration options and to show how the REST APIs correspond to the CLI commands.
Configuring VLAN and VXLAN VNI
Configuring VLAN and VXLAN VNI
POST http://<mgmt0_IP>/api/mo/sys/bd.json
{
"bdEntity": {
"children": [
{
"l2BD": {
"attributes": {
"accEncap": "vxlan-90001",
"fabEncap": "vlan-123",
"pcTag": "1"
}}}]}}
Response
{
imdata:[]
}
Configuring VLAN and VXLAN VNI
<System>
<bd-items>
<bd-items>
<BD-list>
<fabEncap>vlan-123</fabEncap>
<accEncap>vxlan-90001</accEncap>
<pcTag>1</pcTag>
</BD-list>
</bd-items>
</bd-items>
</System>
This operation specifies a VLAN and maps the VLAN to a VXLAN VNI to configure Layer 2 VNI under VXLAN VLAN. This creates a VRF overlay VLAN for VXLAN routing.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
vlan 123
vn-segment 90001
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/media/dme/index.html
Configuring SVI for Hosts for VXLAN Routing
Configuring SVI for Hosts for VXLAN Routing
HTTP POST
http://<IP_Address>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"ipv4Entity": {
"children": [
{
"ipv4Inst": {
"children": [
{
"ipv4Dom": {
"attributes": {
"name": "vxlan-90001"
},
"children": [
{
"ipv4If": {
"attributes": {
"id": "vlan123"
},
"children": [
{
"ipv4Addr": {
"attributes": {
"addr": "192.0.20.16/24"
}}}]}}]}}]}}]}},
{
"interfaceEntity": {
"children": [
{
"sviIf": {
"attributes": {
"id": "vlan123"
},
"children": [
{
"nwRtVrfMbr": {
"attributes": {
"tDn": "sys/inst-vxlan-90001"
}}}]}}]}},
{
"bdEntity": {
"children": [
{
"l2BD": {
"attributes": {
"fabEncap": "vlan-123",
"pcTag": "1"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring SVI for Hosts for VXLAN Routing
<System>
<ipv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>vxlan-90001</name>
<if-items>
<If-list>
<id>vlan123</id>
<addr-items>
<Addr-list>
<addr>192.0.20.16/24</addr>
</Addr-list>
</addr-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv4-items>
<intf-items>
<svi-items>
<If-list>
<id>vlan123</id>
<rtvrfMbr-items>
<tDn>/System/inst-items/Inst-list[name='vxlan-90001']</tDn>
</rtvrfMbr-items>
</If-list>
</svi-items>
</intf-items>
</System>
This operation configures SVI and an IP address on a VLAN for a host.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface vlan123
vrf member vxlan-90001
ip address 192.0.20.16/24
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/media/dme/index.html
Configuring VNI Under VRF for VXLAN Routing
This operation configures a Layer 3 VNI under a VRF overlay VLAN. (A VRF overlay VLAN is a VLAN that is not associated with any server facing ports. All VXLAN VNIs that are mapped to a VRF, need to have their own internal VLANs allocated to it.)
Configuring VNI Under VRF for VXLAN Routing
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"l3Inst": {
"attributes": {
"encap": "vxlan-90005",
"name": "vxlan-90001"
}}}]}}
Response
{
imdata:[]
}
Configuring VNI Under VRF for VXLAN Routing
<System>
<inst-items>
<Inst-list>
<name>vxlan-90001</name>
<encap>vxlan-90005</encap>
</Inst-list>
</inst-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
vrf context vxlan-90001
vni 90005
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/media/dme/index.html
Configuring an Anycast Gateway for VXLAN Routing
This operation configures a distributed gateway virtual MAC address and associates the SVI with the anycast gateway.
Configuring an Anycast Gateway for VXLAN Routing
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"hmmEntity": {
"children": [
{
"hmmFwdInst": {
"attributes": {
"amac": "00:01:00:02:00:03"
},
"children": [
{
"hmmFwdIf": {
"attributes": {
"id": "vlan123",
"mode": "anycastGW"
}}}]}}]}},{
"interfaceEntity": {
"children": [
{
"sviIf": {
"attributes": {
"id": "vlan123"
}}}]}},{
"fmEntity": {
"children": [
{
"fmInterfaceVlan": {
"attributes": {
"adminSt": "enabled"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring an Anycast Gateway for VXLAN Routing
<System>
<hmm-items>
<fwdinst-items>
<amac>00:01:00:02:00:03</amac>
<if-items>
<FwdIf-list>
<id>vlan123</id>
<mode>anycastGW</mode>
</FwdIf-list>
</if-items>
</fwdinst-items>
</hmm-items>
<intf-items>
<svi-items>
<If-list>
<id>vlan123</id>
</If-list>
</svi-items>
</intf-items>
<fm-items>
<ifvlan-items>
<adminSt>enabled</adminSt>
</ifvlan-items>
</fm-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
feature interface-vlan
fabric forwarding anycast-gateway-mac 1.2.3
interface vlan123
fabric forwarding mode anycast-gateway
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/media/dme/index.html
Configuring the NVE Interface and VNIs
Configuring the NVE Interface and VNIs
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"nvoEps": {
"children": [
{
"nvoEp": {
"attributes": {
"epId": "1",
"hostReach": "bgp",
"sourceInterface": "lo2"
},
"children": [
{
"nvoNws": {
"children": [
{
"nvoNwRange": {
"attributes": {
"isLegacyMode": "no",
"isMcastRange": "no",
"mcastGroup": "225.4.0.1",
"suppressARP": "no",
"vniRangeMax": "5008",
"vniRangeMin": "5000"
}
}
},
{
"nvoNw": {
"attributes": {
"isLegacyMode": "no",
"vni": "4001"
},
"children": [
{
"nvoIngRepl": {
"attributes": {
"proto": "bgp"
}
}
}
]
}
},
{
"nvoNw": {
"attributes": {
"isLegacyMode": "no",
"vni": "5000"
},
"children": [
{
"nvoIngRepl": {
"attributes": {
"proto": "static"
},
"children": [
{
"nvoConfigStIRPeer": {
"attributes": {
"ip": "1.1.1.1"
}
}
}
]
}
}
]
}
},
{
"nvoNw": {
"attributes": {
"associateVrfFlag": "yes",
"isLegacyMode": "no",
"vni": "90003"
}}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring the NVE Interface and VNIs
<System>
<eps-items>
<epId-items>
<Ep-list>
<epId>1</epId>
<hostReach>bgp</hostReach>
<sourceInterface>lo2</sourceInterface>
<nws-items>
<vni-items>
<Nw-list>
<vni>4001</vni>
<isLegacyMode>false</isLegacyMode>
<IngRepl-items>
<proto>bgp</proto>
</IngRepl-items>
</Nw-list>
<Nw-list>
<vni>90003</vni>
<associateVrfFlag>true</associateVrfFlag>
<isLegacyMode>false</isLegacyMode>
</Nw-list>
</vni-items>
<vnis-items>
<NwRange-list>
<vniRangeMin>5000</vniRangeMin>
<vniRangeMax>5008</vniRangeMax>
<isLegacyMode>false</isLegacyMode>
<isMcastRange>false</isMcastRange>
<mcastGroup>225.4.0.1</mcastGroup>
<suppressARP>false</suppressARP>
</NwRange-list>
</vnis-items>
</nws-items>
</Ep-list>
</epId-items>
</eps-items>
</System>
This operation performs the following configuration:
- Configures a network virtualization edge (NVE) interface, which is the overlay interface that terminates VXLAN tunnels (only 1 NVE interface is allowed on the switch)
- Defines BGP as the mechanism for host reachability advertisement
- Adds an Layer 3 VNI to the overlay for a tenant VRF (required for VXLAN routing only)
- Adds a Layer 2 VNI to the tunnel interface
- Configures the multicast group on a per-VNI basis
CLI Commands
Static VNIs can only be configured without a host-reach BGP config.
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface nve 1
source-interface loopback 2
host-reachability protocol bgp
member vni 5000-5008
mcast-group 225.4.0.1
member vni 90003 associate-vrf
member vni 4001
ingress-replication protocol bgp
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
Note: Starting with Cisco NX-OS Release 7.0.3I7(1), the nvoEps MO was added. To view the updated MOs and DNs, and for detailed information about classes and attributes described in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html
Disabling VXLAN, BGP, and EVPN
Disabling VXLAN, BGP, and EVPN
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"fmEntity": {
"children": [
{
"fmEvpn": {
"attributes": {
"adminSt": "disabled"
}
}
},
{
"fmNvo": {
"attributes": {
"adminSt": "disabled"
}
}
},
{
"fmVnSegment": {
"attributes": {
"adminSt": "disabled"
}}}]}}]}}
Response
{
imdata:[]
}
Disabling VXLAN, BGP, and EVPN
<System>
<fm-items>
<evpn-items>
<adminSt>disabled</adminSt>
</evpn-items>
<nvo-items>
<adminSt>disabled</adminSt>
</nvo-items>
<vnsegment-items>
<adminSt>disabled</adminSt>
</vnsegment-items>
</fm-items>
</System>
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
no feature vn-segment
no feature nv overlay
no nv overlay evpn
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/media/dme/index.html
Querying Configuration and Operational Data
GET http://<IP_Address>/api/node/mo/sys/eps/epId-1.json?rsp-subtree=full
Querying the NVE Interface Configuration and Operational Data
{
"totalCount": "1",
"imdata": [
{
"nvoEp": {
"attributes": {
"adminSt": "enabled",
"advertiseVmac": "no",
"autoRemapReplicationServers": "no",
"cfgSrc": "0",
"childAction": "",
"controllerId": "0",
"descr": "",
"dn": "sys/eps/epId-1",
"encapType": "0",
"epId": "1",
"holdDownTime": "180",
"holdDownTimerExpiryTime": "NA",
"holdUpTime": "30",
"holdUpTimerExpiryTime": "NA",
"hostReach": "bgp",
"learningMode": "CP",
"mac": "F4:0F:1B:6F:F5:5B",
"modTs": "2017-08-15T21:12:59.668+00:00",
"monPolDn": "",
"multisiteBordergwInterface": "unspecified",
"operEncapType": "vxlan",
"operState": "up",
"persistentOnReload": "true",
"propFaultBitmap": "",
"sourceInterface": "lo2",
"status": "",
"uid": "0",
"vpcVIPNotified": "no"
},
"children": [
{
"nvoPeers": {
"attributes": {
"childAction": "",
"modTs": "2017-08-15T19:20:50.871+00:00",
"monPolDn": "",
"persistentOnReload": "true",
"rn": "peers",
"status": "",
"uid": "0"
},
"children": [
{
"nvoDyIRPeer": {
"attributes": {
"createTs": "2017-08-15T21:45:15.593+00:00",
"firstVNI": "0",
"ip": "1.1.1.1",
"mac": "00:00:00:00:00:00",
"rn": "dyn_ir_peer-1.1.1.1",
"state": "Up",
"upStateTransitionTs": "2017-08-15T21:45:15.604+00:00"
}
}
},
{
"nvoDyPeer": {
"attributes": {
"createTs": "2017-08-15T21:45:15.593+00:00",
"firstVNI": "4001",
"ip": "1.1.1.1",
"mac": "50:87:89:D4:6B:B7",
"rn": "dy_peer-1.1.1.1",
"state": "Up",
"upStateTransitionTs": "2017-08-15T21:45:15.604+00:00"
}
}
}
]
}
},
{
"nvoNws": {
"attributes": {
"childAction": "",
"modTs": "2017-08-15T19:20:50.871+00:00",
"monPolDn": "",
"persistentOnReload": "true",
"rn": "nws",
"status": "",
"uid": "0"
},
"children": [
{
"nvoOperNw": {
"attributes": {
"epId": "1",
"mode": "CP",
"operMcastGroup": "0.0.0.0",
"rn": "opervni-90003",
"state": "Up",
"type": "L3",
"vlanBD": "vlan-903",
"vni": "90003"
}
}
},
{
"nvoOperNw": {
"attributes": {
"epId": "1",
"mode": "CP",
"operMcastGroup": "225.4.0.1",
"rn": "opervni-5007",
"state": "Up",
"type": "L2",
"vlanBD": "vlan-507",
"vni": "5007"
}
}
},
{
"nvoOperNw": {
"attributes": {
"epId": "1",
"mode": "CP",
"operMcastGroup": "225.4.0.1",
"rn": "opervni-5001",
"state": "Up",
"type": "L2",
"vlanBD": "vlan-501",
"vni": "5001"
}
}
},
{
"nvoOperNw": {
"attributes": {
"epId": "1",
"mode": "CP",
"operMcastGroup": "225.4.0.1",
"rn": "opervni-5003",
"state": "Up",
"type": "L2",
"vlanBD": "vlan-503",
"vni": "5003"
}
}
},
{
"nvoOperNw": {
"attributes": {
"epId": "1",
"mode": "CP",
"operMcastGroup": "225.4.0.1",
"rn": "opervni-5008",
"state": "Up",
"type": "L2",
"vlanBD": "vlan-508",
"vni": "5008"
}
}
},
{
"nvoOperNw": {
"attributes": {
"epId": "1",
"mode": "CP",
"operMcastGroup": "225.4.0.1",
"rn": "opervni-5005",
"state": "Up",
"type": "L2",
"vlanBD": "vlan-505",
"vni": "5005"
}
}
},
{
"nvoOperNw": {
"attributes": {
"epId": "1",
"mode": "CP",
"operMcastGroup": "0.0.0.0",
"rn": "opervni-4001",
"state": "Up",
"type": "L2",
"vlanBD": "vlan-401",
"vni": "4001"
}
}
},
{
"nvoOperNw": {
"attributes": {
"epId": "1",
"mode": "CP",
"operMcastGroup": "225.4.0.1",
"rn": "opervni-5002",
"state": "Up",
"type": "L2",
"vlanBD": "vlan-502",
"vni": "5002"
}
}
},
{
"nvoOperNw": {
"attributes": {
"epId": "1",
"mode": "CP",
"operMcastGroup": "225.4.0.1",
"rn": "opervni-5006",
"state": "Up",
"type": "L2",
"vlanBD": "vlan-506",
"vni": "5006"
}
}
},
{
"nvoOperNw": {
"attributes": {
"epId": "1",
"mode": "CP",
"operMcastGroup": "225.4.0.1",
"rn": "opervni-5004",
"state": "Up",
"type": "L2",
"vlanBD": "vlan-504",
"vni": "5004"
}
}
},
{
"nvoOperNw": {
"attributes": {
"epId": "1",
"mode": "CP",
"operMcastGroup": "225.4.0.1",
"rn": "opervni-5000",
"state": "Up",
"type": "L2",
"vlanBD": "vlan-500",
"vni": "5000"
}
}
},
{
"nvoNwRange": {
"attributes": {
"associateVrfFlag": "no",
"childAction": "",
"isLegacyMode": "no",
"isMcastRange": "no",
"mcastGroup": "225.4.0.1",
"modTs": "2017-08-15T19:21:03.043+00:00",
"monPolDn": "",
"multisiteIngRepl": "disable",
"persistentOnReload": "true",
"propFaultBitmap": "",
"rn": "vnis-5000-5008",
"status": "",
"suppressARP": "no",
"uid": "0",
"vniRangeMax": "5008",
"vniRangeMin": "5000"
}
}
},
{
"nvoNw": {
"attributes": {
"associateVrfFlag": "no",
"childAction": "",
"isLegacyMode": "no",
"mcastGroup": "0.0.0.0",
"modTs": "2017-08-15T21:45:15.542+00:00",
"monPolDn": "",
"multisiteIngRepl": "disable",
"persistentOnReload": "true",
"propFaultBitmap": "",
"rn": "vni-4001",
"status": "",
"suppressARP": "no",
"uid": "0",
"vni": "4001"
},
"children": [
{
"nvoIngRepl": {
"attributes": {
"childAction": "",
"modTs": "2017-08-15T21:45:15.572+00:00",
"monPolDn": "",
"persistentOnReload": "true",
"propFaultBitmap": "",
"proto": "bgp",
"rn": "IngRepl",
"status": "",
"uid": "0"
}
}
}
]
}
},
{
"nvoNw": {
"attributes": {
"associateVrfFlag": "yes",
"childAction": "",
"isLegacyMode": "no",
"mcastGroup": "0.0.0.0",
"modTs": "2017-08-15T19:20:51.075+00:00",
"monPolDn": "",
"multisiteIngRepl": "disable",
"persistentOnReload": "true",
"propFaultBitmap": "",
"rn": "vni-90003",
"status": "",
"suppressARP": "no",
"uid": "0",
"vni": "90003"
}}}]}}]}}]}
Note: Starting with Cisco NX-OS Release 7.0.3I7(1), the nvoEps MO was added. To view the updated MOs and DNs, and for detailed information about classes and attributes described in the payload, see the NX-API DME Model Reference: https://developer.cisco.com/media/dme/index.html
Configuring VXLAN OAM (NGOAM)
VXLAN OAM, referred to as NGOAM throughout this document, authenticates path trace requests to provide statistics and uses HMAC MD5 as the authentication mechanism.
Enabling NGOAM
Enabling NGOAM
POST http://<mgmt0_IP>/api/mo/sys/fm.json
{
"fmEntity": {
"children": [
{
"fmNgoam": {
"attributes": {
"adminSt": "enabled"
}}}]}}
Response
{
imdata:[]
}
Enabling NGOAM
<System>
<fm-items>
<ngoam-items>
<adminSt>enabled</adminSt>
</ngoam-items>
</fm-items>
</System>
Before you can use the NX-API REST NGOAM configuration APIs, you must enable NGOAM on the switch.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
feature ngoam
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/media/dme/index.html
Configuring an NGOAM OAM Profile
Configuring an NGOAM OAM Profile
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
}}}]}}
Response
{
imdata:[]
}
Configuring an NGOAM OAM Profile
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
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/media/dme/index.html
A Description of the NGOAM Profile
A Description of the NGOPAM Profile
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"desc": "This is an NGOAM profile",
"profId": "2"
}}}]}}
Response
{
imdata:[]
}
A Description of the NGOAM Profile
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<desc>This is an NGOAM profile</desc>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
description This is an NGOAM profile
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/media/dme/index.html
Encapsulating dot1q
Encapsulating dot1q
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"dot1q": "123",
"dot1qIf": "eth1/1",
"profId": "2"
}}}]}}
Response
{
imdata:[]
}
Encapsulating dot1q
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<dot1q>123</dot1q>
<dot1qIf>eth1/1</dot1qIf>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
dot1q 123 ethernet1/1
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/media/dme/index.html
Configuring the NGOAM Hop Count
Configuring the NGOAM Hop Count
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"hop": "23",
"profId": "2"
}}}]}}
Response
{
imdata:[]
}
Configuring the NGOAM Hop Count
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<hop>23</hop>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
hop 23
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/media/dme/index.html
Configuring the NGOAM Egress Interface
Configuring the NGOAM Egress Interface
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"interface": "Ethernet1/1",
"profId": "2"
}}}]}}
Response
{
imdata:[]
}
Configuring the NGOAM Egress Interface
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<interface>Ethernet1/1</interface>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
interface ethernet1/1
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/media/dme/index.html
Specifying the OAM-Channel
Specifying the OAM-Channel
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"oamChannel": "tissa",
"profId": "2"
}}}]}}
Response
{
imdata:[]
}
Specifying the OAM-Channel
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<oamChannel>tissa</oamChannel>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
oam-channel 2
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/media/dme/index.html
Configuring the NGOAM Payload
Configuring the NGOAM Payload
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"payloadPad": "0x0",
"profId": "2"
}}}]}}
Response
{
imdata:[]
}
Configuring the NGOAM Payload
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<payloadPad>0x0</payloadPad>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
payload pad 0x0
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/media/dme/index.html
Configuring NGOAM UDP Source Port Range
Configuring NGOAM UDP Source Port Range
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2",
"srcPort": "1-4"
}}}]}}
Response
{
imdata:[]
}
Configuring NGOAM UDP Source Port Range
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<srcPort>1-4</srcPort>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
sport 1-4
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/media/dme/index.html
Configuring NGOAM Flow Forward
Configuring NGOAM Flow Forward
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
},
"children": [
{
"ngoamFlowFwd": {
"attributes": {
"forward": "yes"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring NGOAM Flow Forward
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<flowfwd-items>
<forward>true</forward>
</flowfwd-items>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
flow forward
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/media/dme/index.html
Specifying a Flow Profile to Include a dot1q Tag
Specifying a Flow Profile to Include a dot1q Tag
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
},
"children": [
{
"ngoamFlowFwd": {
"attributes": {
"dot1q": "123",
"forward": "yes"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying a Flow Profile to Include a dot1q Tag
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<flowfwd-items>
<dot1q>123</dot1q>
<forward>true</forward>
</flowfwd-items>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
flow forward
dot1q 123
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/media/dme/index.html
Specifying a Flow IPv4 Destination Address
Specifying a Flow IPv4 Destination Address
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
},
"children": [
{
"ngoamFlowFwd": {
"attributes": {
"forward": "yes",
"ipDest": "1.2.3.4"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying a Flow IPv4 Destination Address
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<flowfwd-items>
<forward>true</forward>
<ipDest>1.2.3.4</ipDest>
</flowfwd-items>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
flow forward
ip destination 1.2.3.4
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/media/dme/index.html
Specifying the Flow Source IPv4 Address
Specifying the Flow Source IPv4 Address
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
},
"children": [
{
"ngoamFlowFwd": {
"attributes": {
"forward": "yes",
"ipSrc": "1.2.3.4"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying the Flow Source IPv4 Address
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<flowfwd-items>
<forward>true</forward>
<ipSrc>1.2.3.4</ipSrc>
</flowfwd-items>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
flow forward
ip source 1.2.3.4
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/media/dme/index.html
Specifying a Flow IPv6 Destination Address
Specifying a Flow IPv6 Destination Address
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
},
"children": [
{
"ngoamFlowFwd": {
"attributes": {
"forward": "yes",
"ipv6Dest": "1:2::3:4"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying a Flow IPv6 Destination Address
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<flowfwd-items>
<forward>true</forward>
<ipv6Dest>1:2::3:4</ipv6Dest>
</flowfwd-items>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
flow forward
ipv6 destination 1:2::3:4
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/media/dme/index.html
Specifying the Flow Source IPv6 Address
Specifying the Flow Source IPv6 Address
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
},
"children": [
{
"ngoamFlowFwd": {
"attributes": {
"forward": "yes",
"ipv6Src": "1:2::3:4"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying the Flow Source IPv6 Address
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<flowfwd-items>
<forward>true</forward>
<ipv6Src>1:2::3:4</ipv6Src>
</flowfwd-items>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
flow forward
ipv6 source 1:2::3:4
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/media/dme/index.html
Specifying the Flow Destination MAC Address
Specifying the Flow Destination MAC Address
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
},
"children": [
{
"ngoamFlowFwd": {
"attributes": {
"forward": "yes",
"macDest": "00:01:00:02:00:03"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying the Flow Destination MAC Address
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<flowfwd-items>
<forward>true</forward>
<macDest>00:01:00:02:00:03</macDest>
</flowfwd-items>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
flow forward
mac-address destination 1.2.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/media/dme/index.html
Specifying the Flow Source MAC Address
Specifying the Flow Source MAC Address
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
},
"children": [
{
"ngoamFlowFwd": {
"attributes": {
"forward": "yes",
"macSrc": "00:01:00:02:00:03"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying the Flow Source MAC Address
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<flowfwd-items>
<forward>true</forward>
<macSrc>00:01:00:02:00:03</macSrc>
</flowfwd-items>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
flow forward
mac-address source 1.2.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/media/dme/index.html
Specifying the Flow Destination Port Address
Specifying the Flow Destination Port Address
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
},
"children": [
{
"ngoamFlowFwd": {
"attributes": {
"forward": "yes",
"portDest": "123"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying the Flow Destination Port Address
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<flowfwd-items>
<forward>true</forward>
<portDest>123</portDest>
</flowfwd-items>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
flow forward
port destination 123
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/media/dme/index.html
Specifying the Flow Source Port Address
Specifying the Flow Source Port Address
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
},
"children": [
{
"ngoamFlowFwd": {
"attributes": {
"forward": "yes",
"portSrc": "123"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying the Flow Source Port Address
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<flowfwd-items>
<forward>true</forward>
<portSrc>123</portSrc>
</flowfwd-items>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
flow forward
port source 123
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/media/dme/index.html
Specifying the Flow Protocol Number
Specifying the Flow Protocol Number
POST http://<mgmt0_IP>/api/mo/sys/ngoam.json
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
},
"children": [
{
"ngoamFlowFwd": {
"attributes": {
"forward": "yes",
"protocol": "123"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying the Flow Protocol Number
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<flowfwd-items>
<forward>true</forward>
<protocol>123</protocol>
</flowfwd-items>
</Profile-list>
</profile-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
flow forward
protocol 123
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/media/dme/index.html
NGOAM Install ACL
NGOAM Install ACL
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
},
"children": [
{
"ngoamFlowFwd": {
"attributes": {
"forward": "yes"
}}}]}},
{
"ngoamInstallAcl": {
"attributes": {
"enabled": "yes"
}}}]}}]}}
Response
{
imdata:[]
}
NGOAM Install ACL
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<flowfwd-items>
<forward>true</forward>
</flowfwd-items>
</Profile-list>
</profile-items>
<installacl-items>
<enabled>true</enabled>
</installacl-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
flow forward
ngoam install acl
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/media/dme/index.html
NGOAM Authentication Key
NGOAM Authentication Key
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"ngoamEntity": {
"children": [
{
"ngoamProfile": {
"attributes": {
"profId": "2"
},
"children": [
{
"ngoamFlowFwd": {
"attributes": {
"forward": "yes"
}}}]}},
{
"ngoamAuthentication": {
"attributes": {
"key": "key"
}}}]}}]}}
Response
{
imdata:[]
}
NGOAM Authentication Key
<System>
<ngoam-items>
<profile-items>
<Profile-list>
<profId>2</profId>
<flowfwd-items>
<forward>true</forward>
</flowfwd-items>
</Profile-list>
</profile-items>
<authentication-items>
<key>key</key>
</authentication-items>
</ngoam-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ngoam profile 2
flow forward
ngoam authentication key
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/media/dme/index.html
Disabling NGOAM
Disabling NGOAM
POST http://<mgmt0_IP>/api/mo/sys/fm.json
{
"fmEntity": {
"children": [
{
"fmNgoam": {
"attributes": {
"adminSt": "disabled"
}}}]}}
Response
{
imdata:[]
}
Disabling NGOAM
<System>
<fm-items>
<ngoam-items>
<adminSt>disabled</adminSt>
</ngoam-items>
</fm-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
no feature ngoam
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/media/dme/index.html
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.
Note: This example was added in Release 7.0(3)I6(1).
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.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.
Note: This example was added in Release 7.0(3)I6(1).
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/media/dme/index.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"
}
Note: This example was added in Release 7.0(3)I6(1).
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.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.
Note: This example was added in Release 7.0(3)I6(1).
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.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": "::"
}
}
}
]
Note: This example was added in Release 7.0(3)I6(1).
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.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"
"vrf" : "vni-31000"
"reqStats": "yes"
"adminSt" : "1"
"srcIp" : "12.0.2.2"
}
}
}
The POST fields are optional. See the GET request for all available fields.
Note: This example was added in Release 7.0(3)I6(1).
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.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": "::”
}
Note: This example was added in Release 7.0(3)I6(1).
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.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.
Note: This example was added in Release 7.0(3)I6(1).
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Ephemeral (MOTL) MOs for Release 7.0(3)I6(1)
The following table lists the queries for retrieving different NVE counters through ephemeral MOs.
Description | Show Command | Ephemeral DN Query |
---|---|---|
NVE interface counters | show int nve |
http://{{ip}}/mo/sys/eps/epId- |
Single VNI counters | show nve vni |
http://{{ip}}/mo/sys/eps/epId- |
All VNI counters | NA |
http://{{ip}}/mo/sys/eps/epId- |
Single peer counters | show nve peers |
http://{{ip}}/mo/sys/eps/epId-<nve-id>/peers/dy_peer-<ip>/cntrs.json?rsp-foreign-subtree=ephemeral http://{{ip}}/mo/sys/eps/epId-<nve-id>/peers/st_peer-<ip>/cntrs.json?rsp-foreign-subtree=ephemeral http://{{ip}}/mo/sys/eps/epId-<nve-id>/peers/st_ir_peer-<ip>/cntrs.json?rsp-foreign-subtree=ephemeral http://{{ip}}/mo/sys/eps/epId-<nve-id>/peers/dy_ir_peer-<ip>/cntrs.json?rsp-foreign-subtree=ephemeral |
All peers counters | NA |
http://{{ip}}/mo/sys/eps/epId- |
All counters: NVE counters, VNI counters and peer counters | NA |
http://{{ip}}/mo/sys/eps.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral |
Configuring Static MPLS and Segment Routing
Enabling Static MPLS
Enabling Static MPLS
HTTP POST
http://<IP_Address>/api/node/mo/sys/fm/mplsstatic.json
{
"topSystem": {
"children": [
{
"fmEntity": {
"children": [
{
"fmMplsStatic": {
"attributes": {
"adminSt": "enabled"
}}}]}}]}}
This example enables static MPLS.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
feature mpls static
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/media/dme/index.html
Enabling Segment Routing
Enabling Segment Routing
HTTP POST
http://<IP_Address>/api/node/mo/sys/fm/mplssgmtrtg.json
{
"topSystem": {
"children": [
{
"fmEntity": {
"children": [
{
"fmMplsSgmntRtg": {
"attributes": {
"adminSt": "enabled"
}}}]}}]}}
CLI Commands
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
feature mpls segment-routing
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/media/dme/index.html
Enabling MPLS on an Interface
Enabling MPLS on an Interface
HTTP POST
http://<IP_Address>/api/node/mo/sys/mpls/If-[eth1/5].json
{
"topSystem": {
"children": [
{
"interfaceEntity": {
"children": [
{
"l1PhysIf": {
"attributes": {
"id": "eth1/5",
"layer": "Layer3",
"userCfgdFlags": "admin_layer"
}}}]}},
{
"mplsEntity": {
"children": [
{
"mplsIf": {
"attributes": {
"id": "eth1/5"
}}}]}}]}}
Enables MPLS forwarding on Ethernet interface 1/5.
Creating an instance of this MO enables MPLS on the specified interface. Deleting an instance of this MO disables MPLS on the specified interface.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
int eth1/5
no switchport
mpls ip forwarding
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/media/dme/index.html
Reserving Labels for Static Assignment
Reserving Labels for Static Assignment
HTTP POST
http://<IP_Address>/api/node/mo/sys/labeltable/lblrange.json
{
"ulibLabelTable": {
"children": [
{
"ulibLblRange": {
"attributes": {
"dynLblMax": "17",
"dynLblMin": "99",
"staticLblMax": "100",
"staticLblMin": "10000"
}}}]}}
There are three partitions (ranges) in ULIB: the dynamic label range, the static label range, and the segment routing global block (SRGB) range. The dynamic and static label ranges must be non-overlapping, while the SRGB range must be a contiguous subset of the dynamic range.
This example configures labels for static assignment.
CLI Commands
The CLI commands and options listed below are used to create the payload example displayed in the pane on the right.
[no] mpls label range <min-label> <max-label> [static <min-static-label> <max-static-label>]
[no] global-block <beginning-label> <ending-label>
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/media/dme/index.html
Configuring Static Label and Prefix Binding
Configuring Static Label and Prefix Binding
HTTP POST
http://<IP_Address>/api/node/mo/sys/mpls_static/af--ipv4-ucast/pfx_label-2000.json
{
"topSystem": {
"children": [
{
"mplsstaticEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"mplsstaticAf": {
"attributes": {
"type": "ipv4-ucast"
},
"children": [
{
"mplsstaticPfxLclLbl": {
"attributes": {
"label": "2000",
"pfx": "1.255.200.0/32"
}}}]}}]}}]}}
This example specifies static binding of incoming labels to IPv4 prefixes.
CLI Commands
The CLI commands listed below are used to create the payload example displayed in the pane on the right.
[no] mpls static configuration
[no] address-family {ipv4 | ipv6} unicast
[no] local-label <static-inlabel> prefix {<prefix> <mask> | <prefix-mask>}}
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/media/dme/index.html
Configuring the Next Hop
Configuring the Next Hop
HTTP POST
http://<IP_Address>/api/node/mo/sys/mpls_static/af--ipv4-ucast/pfx_label-2000/nh.json
{
"mplsstaticNh": {
"attributes": {
"nhAddr": "1.31.1.1",
"outLbl": "2000"
}
}
}
This example specifies the next hop.
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
[no] next-hop <next-hop> out-label {<static-outlabel> | implicit-null }
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/media/dme/index.html
Next Hop Backup
Next Hop Backup
HTTP POST
http://<IP_Address>/api/node/mo/sys/mpls_static/af--ipv4-ucast/pfx_label-2000/backup_nh.json
{
"mplsstaticBackupNh": {
"attributes": {
"if": "eth1/7",
"nhAddr": "1.34.1.1",
"outLbl": "implicit-null"
}
}
}
This example specifies the next-hop backup path.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
[no] next-hop backup <interface> <next-hop> out-label {<static-outlabel> | implicit-null }
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/media/dme/index.html
Next Hop Auto-Resolve
Next Hop Auto-Resolve
HTTP POST
http://<IP_Address>/api/node/mo/sys/mpls_static/af--ipv4-ucast/pfx_label-2000/auto_resolve_nh.json
{
"mplsstaticAutoResolveNh": {
"attributes": {
"outLbl": "3001"
}
}
}
This example specifies next-hop auto-resolve.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
[no] next-hop auto-resolve out-label {<static-outlabel> | implicit-null }
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/media/dme/index.html
Configuring Static Routes
Static routes are route table entries that you manually configure. These static routes do not change unless you reconfigure them. Static routes are simple to design and work well in environments where network traffic is relatively predictable and where network design is relatively simple.
This section contains payload examples to demonstrate how to use the NX-API REST API to configure static routes on the Cisco Nexus 3000 and 9000 Series switches.
Configuring an IPv4 Static Route
Configuring an IPv4 Static Route
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst/dom-default.json
{
"ipv4Route": {
"attributes": {
"prefix": "192.0.0.0/8"
},
"children": [
{
"ipv4Nexthop": {
"attributes": {
"nhAddr": "192.0.2.4/32",
"nhIf": "eth1/8",
"nhVrf": "default",
"pref": "1",
"rtname": "StatRt5",
}}}]}}
Response
{
imdata:[]
}
Configuring an IPv4 Static Route
<System>
<ipv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<rt-items>
<Route-list>
<prefix>192.0.0.0/8</prefix>
<nh-items>
<Nexthop-list>
<nhIf>eth1/8</nhIf>
<nhAddr>192.0.2.4/32</nhAddr>
<nhVrf>default</nhVrf>
<pref>1</pref>
<rtname>StatRt5</rtname>
<tag>1234</tag>
</Nexthop-list>
</nh-items>
</Route-list>
</rt-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv4-items>
</System>
Configures an IPv4 unicast static route.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip route 192.0.2.0/8 ethernet 1/8 192.0.2.4 name StatRt5 tag 1234 1
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/media/dme/index.html
Configuring an IPv6 Static Route
Configuring an IPv6 Static Route
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst/dom-default.json
{
"ipv6Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv6Route": {
"attributes": {
"prefix": "2001:db8::/48"
},
"children": [
{
"ipv6Nexthop": {
"attributes": {
"nhAddr": "6::6/128",
"nhIf": "eth2/1",
"nhVrf": "default",
"pref": "1",
"rtname": "StatRtV6-5",
"tag": "1234"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring an IPv6 Static Route
<System>
<ipv6-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<rt-items>
<Route-list>
<prefix>2001:db8::/48</prefix>
<nh-items>
<Nexthop-list>
<nhIf>eth2/1</nhIf>
<nhAddr>6::6/128</nhAddr>
<nhVrf>default</nhVrf>
<pref>1</pref>
<rtname>StatRtV6-5</rtname>
<tag>1234</tag>
</Nexthop-list>
</nh-items>
</Route-list>
</rt-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv6-items>
</System>
Configures an IPv6 unicast static route.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ipv6 route 2001:db8::/48 6::6 eth2/1 name StatRtV6-5 tag 1234 1
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/media/dme/index.html
Configuring an IPv4 Static Route with BFD
Configuring an IPv4 Static Route with BFD
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst/dom-default.json
{
"ipv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv4RtStaticBfd": {
"attributes": {
"intf": "eth1/9",
"nexthop": "192.0.20.123"
}}}]}}
Response
{
imdata:[]
}
Configuring an IPv4 Static Route with BFD
<System>
<ipv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<rtstaticbfd-items>
<RtStaticBfd-list>
<intf>eth1/9</intf>
<nexthop>192.0.20.123</nexthop>
</RtStaticBfd-list>
</rtstaticbfd-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv4-items>
</System>
Enables BFD for all static routes on an interface. Use the? keyword to display the supported interfaces.
Prerequisite: BFD is enabled
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip route static bfd eth1/9 192.0.20.123
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/media/dme/index.html
Deleting an IPv4 Static Route
Deleting an IPv4 Static Route
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst/dom-default.json
{
"ipv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv4Route": {
"attributes": {
"prefix": "192.0.0.0/8"
},
"children": [
{
"ipv4Nexthop": {
"attributes": {
"nhAddr": "192.0.2.4",
"nhIf": "eth1/8",
"nhVrf": "default",
"status": "deleted"
}}}]}}]}}
Response
{
imdata:[]
}
Deleting an IPv4 Static Route
<System>
<ipv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<rt-items>
<Route-list>
<prefix>192.0.0.0/8</prefix>
<nh-items>
<Nexthop-list xc:operation="delete">
<nhIf>eth1/8</nhIf>
<nhAddr>192.0.2.4</nhAddr>
<nhVrf>default</nhVrf>
</Nexthop-list>
</nh-items>
</Route-list>
</rt-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv4-items>
</System>
Deletes an IPv4 static route.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
no ip route 192.0.2.0/8 ethernet 1/8 192.0.2.4
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
Specifying a Next-Hop Address
Specifying an IPv4 Next-Hop Address
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst/dom-default.json
{
"ipv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv4Route": {
"attributes": {
"prefix": "0.0.0.0/1"
},
"children": [
{
"ipv4Nexthop": {
"attributes": {
"nhAddr": "2.2.2.2/32",
"nhIf": "unspecified",
"nhVrf": "default"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying an IPv4 Next-Hop Address
<System>
<ipv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<rt-items>
<Route-list>
<prefix>0.0.0.0/1</prefix>
<nh-items>
<Nexthop-list>
<nhIf>unspecified</nhIf>
<nhAddr>2.2.2.2/32</nhAddr>
<nhVrf>default</nhVrf>
</Nexthop-list>
</nh-items>
</Route-list>
</rt-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv4-items>
</System>
Configures an IPv4 next hop.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip route 1.1.1.1/1 2.2.2.2
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/media/dme/index.html
Specifying an IPv6 Next-Hop Address
Specifying an IPv6 Next-Hop Address
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst/dom-default.json
{
"ipv6Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv6Route": {
"attributes": {
"prefix": "2:3::4:5/3"
},
"children": [
{
"ipv6Nexthop": {
"attributes": {
"nhAddr": "1:2::3:4/128",
"nhIf": "eth1/1",
"nhVrf": "default"
}}}]}}]}}
Response
{
imdata:[]
}
Specifying an IPv6 Next-Hop Address
<System>
<ipv6-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<rt-items>
<Route-list>
<prefix>2:3::4:5/3</prefix>
<nh-items>
<Nexthop-list>
<nhIf>eth1/1</nhIf>
<nhAddr>1:2::3:4/128</nhAddr>
<nhVrf>default</nhVrf>
</Nexthop-list>
</nh-items>
</Route-list>
</rt-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv6-items>
</System>
Configures an IPv6 unicast static route.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ipv6 route 2:3::4:5/3 ethernet 1/1 1:2::3:4
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/media/dme/index.html
Configuring IP Static Routes on an Interface
Configuring IP Static Routes on an Interface
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst/dom-default.json
{
"ipv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv4RtStaticBfd": {
"attributes": {
"intf": "eth1/1",
"nexthop": "2.2.2.2"
}}}]}}
Response
{
imdata:[]
}
Configuring IP Static Routes on an Interface
<System>
<ipv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<rtstaticbfd-items>
<RtStaticBfd-list>
<intf>eth1/1</intf>
<nexthop>2.2.2.2</nexthop>
</RtStaticBfd-list>
</rtstaticbfd-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv4-items>
</System>
Enables BFD detection on a static route.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ip route static bfd ethernet1/1 2.2.2.2
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/media/dme/index.html
Configuring IPv6 Static Routes on an Interface
Configuring IPv6 Static Routes
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst/dom-default.json
{
"ipv6Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv6RtStaticBfd": {
"attributes": {
"intf": "eth1/1",
"nexthop": "1:2::3:42/128"
}}}]}}
Response
{
imdata:[]
}
Configuring IPv6 Static Routes
<System>
<ipv6-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<rtstaticbfd-items>
<RtStaticBfd-list>
<intf>eth1/1</intf>
<nexthop>1:2::3:42/128</nexthop>
</RtStaticBfd-list>
</rtstaticbfd-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv6-items>
</System>
Enables BFD detection on a static route.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 route static bfd ethernet1/1 2.2.2.2
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/media/dme/index.html
Querying an IPv4 Static Route
Querying an IPv4 Static Route
GET http://<IP_Address>/api/node/mo/sys/ipv4/inst/dom-default/rt-[192.0.0.0/8].json
Response
{
"totalCount": "1",
"imdata": [
{
"ipv4Route": {
"attributes": {
"childAction": "",
"ctrl": "",
"descr": "",
"dn": "sys/ipv4/inst/dom-default/rt-[192.0.0.0/8]",
"modTs": "2016-12-16T00:41:12.115+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "",
"pcTag": "any",
"persistentOnReload": "true",
"pref": "1",
"prefix": "192.0.0.0/8",
"status": "",
"tag": "0"
},
"children": [
{
"ipv4Nexthop": {
"attributes": {
"childAction": "",
"descr": "",
"flags": "",
"ipv4CfgFailedBmp": "",
"ipv4CfgFailedTs": "00:00:00:00.000",
"ipv4CfgState": "0",
"modTs": "2016-12-16T00:41:12.115+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "",
"nhAddr": "192.0.2.4/32",
"nhIf": "eth1/9",
"nhVrf": "default",
"object": "0",
"operSt": "up",
"operStQual": "unspecified",
"persistentOnReload": "true",
"pref": "1",
"rn": "nh-[eth1/9]-addr-[192.0.2.4/32]-vrf-[default]",
"rtname": "StatRt5",
"rwEncap": "unknown",
"status": "",
"tag": "1234"
}}}]}}]}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Querying a Static Route
Querying a Static Route
GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-default/routestat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ip static-route [vrf {<vrf-name> | <vrf-known-name> | all}]
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
Querying IPv6 Static Routes
Querying IPv6 Static Routes
GET https://<IP_Address>/mo/sys/ipv6/inst/dom-default/routestats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
Querying IPv6 Static Routes
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/routestats/pfx-[102:102:102::102/128]-nh-[12:1:1::2/128].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 static-route [<prefix>] [multicast] [track-table]
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
Configuring Tunnel Interfaces
This section contains payload examples to demonstrate how to use the NX-API REST API to configure tunnel interfaces for the Cisco Nexus 3000 and 9000 Series switches.
Enabling Tunneling
Enabling Tunneling
POST http://<IP_Address>/api/node/mo/sys/fm.json
{
"fmEntity": {
"children": [
{
"fmTunnelif": {
"attributes": {
"adminSt": "enabled"
}}}]}}
Response
{
imdata:[]
}
Enabling Tunneling
<System>
<fm-items>
<tunnelif-items>
<adminSt>enabled</adminSt>
</tunnelif-items>
</fm-items>
</System>
Enabling feature tunnel.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
feature tunnel
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/media/dme/index.html
Configuring Tunnel Interface - decapsulate-any
Configuring Tunnel Interface - decapsulate-any
POST http://<mgmt0_IP>/api/mo/sys/intf.json
{
"interfaceEntity": {
"children": [
{
"tunnelifIf": {
"attributes": {
"id": "tunnel2",
"tunMode": "ipv6ipv6/dcapany"
}}}]}}
Response
{
imdata:[]
}
Configuring Tunnel Interface - decapsulate-any
<System>
<intf-items>
<tunnelif-items>
<If-list>
<id>tunnel2</id>
<tunMode>ipv6ipv6/dcapany</tunMode>
</If-list>
</tunnelif-items>
</intf-items>
</System>
Supports IPv6 payloads over IPv6 transport (IPv6inIPv6 packets) ( 7.0(3)I6(1) and later). This step is applicable for IPv6 networks only.
Note: This command is not supported on Cisco Nexus 9500 Series switches.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface tunnel2
tunnel mode ipv6ipv6 decapsulate-any
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/media/dme/index.html
Configuring Tunnel Interface - source direct
Configuring Tunnel Interface - source direct
POST http://<mgmt0_IP>/api/mo/sys/intf.json
{
"interfaceEntity": {
"children": [
{
"tunnelifIf": {
"attributes": {
"id": "tunnel2",
"tunSrcAddr": "0.0.0.0",
"tunSrcDirect": "enabled",
"tunSrcIntf": "unspecified"
}}}]}}
Response
{
imdata:[]
}
Configuring Tunnel Interface - source direct
<System>
<intf-items>
<tunnelif-items>
<If-list>
<id>tunnel2</id>
<tunSrcAddr>0.0.0.0</tunSrcAddr>
<tunSrcDirect>enabled</tunSrcDirect>
<tunSrcIntf>unspecified</tunSrcIntf>
</If-list>
</tunnelif-items>
</intf-items>
</System>
Configures IP-in-IP tunnel decapsulation on any directly connected IP addresses. Beginning with Cisco NX-OS Release 7.0(3)I6(1), this option is now supported only when the IP-in-IP decapsulation is used to source route the packets through the network.
Note: This command is not supported on Cisco Nexus 9500 Series switches.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface tunnel2
tunnel source direct
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/media/dme/index.html
Configuring Port Channels
This section contains payload examples to demonstrate how to use the NX-API REST API to configure port channels on the Cisco Nexus 3000 and 9000 Series switches.
See Configuring Virtual Port Channels for detailed information about configuring virtual port channels.
Creating Port Channels
- switch(config)# int port-channel 1
- switch(config-if)# shutdown
- switch(config-if)# description “test port-channel”
- switch(config-if)# mtu 1750
- switch(config-if)# duplex full
- switch(config-if)# no snmp trap link-status
- switch(config-if)# speed 40000
- switch(config-if)# switchport
- switch(config-if)# switchport mode trunk
- switch(config-if)# switchport access vlan 20
- switch(config-if)# switchport trunk allowed vlan 2-20
- switch(config-if)# bandwidth 20000
- switch(config-if)# delay 20
- switch(config-if)# logging event port link-status
- switch(config-if)# logging event port trunk-status
- switch(config-if)# lacp min-links 5
- switch(config)# int eth1/1
- switch(config-if)# channel-group 10 mode active
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
Creating port-channel members
- switch(config)# interface ethernet 1/1
- switch(config-if)# channel-group 10 force
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
Configuring Virtual Port Channels
This section contains payload examples to demonstrate how to use the NX-API REST API to configure virtual port channels on the Cisco Nexus 3000 and 9000 Series switches.
Configuring a vPC Domain
Configuring a vPC Domain
HTTP POST http://<IP_Address>/api/node/mo/sys/vpc/inst/dom.json
{
"vpcDom": {
"attributes": {
"autoRecovery": "enabled",
"delayRestoreSVI": "333",
"excludeSVI": "555",
"grcflCnstncyChck": "enabled",
"id": "1",
"peerGw": "enabled",
"peerSwitch": "enabled",
"rolePrio": "222",
"sysMac": "00:03:00:04:00:05",
"sysPrio": "111"
},
"children": [
{
"vpcKeepalive": {
"attributes": {
"destIp": "192.0.20.11"
}}}]}}
This example:
- Ensures that VLAN interface 555 does not go down on the vPC secondary device when the vPC peer link fails
- Enables graceful consistency checking
- Configures vPC peer devices to act as peer gateways
- Configures a pure vPC peer switch topology
- Manually configures the VPC peer device role
- Manually configures a VPC domain MAC address
- Manually configures the system priority
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
vpc domain 1
auto-recovery
delay restore interface-vlan 333
dual-active exclude interface-vlan 555
graceful consistency-check
peer-gateway
peer-switch
role priority 222
system-mac 3.4.5
system-priority 111
peer-keepalive destination 192.0.20.11
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/media/dme/index.html
Creating the vPC Peer Link
Creating the vPC Peer Link
HTTP POST http://<IP_Address>/api/node/mo/sys/vpc/inst/dom.json
{
"vpcKeepalive": {
"children": [
{
"vpcPeerLink": {
"attributes": {
"id": "po10"
}
}
}
]
}
}
Configures the selected port channel as the vPC peer link.
Prerequisites:
- The port-channel must already exist. See Configuring Port Channels for detailed information about port channels.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
interface port-channel 10
vpc peer-link
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/media/dme/index.html
Moving Other Port Channels into a VPC
Moving Other Port Channels into a vPC
HTTP POST http://<IP_Address>/api/node/mo/sys/vpc/inst/dom/if-20.json
{
"vpcIf": {
"attributes": {
"id": "20"
},
"children": [
{
"vpcRsVpcConf": {
"attributes": {
"tDn": "sys/intf/aggr-[po10]"
}
}
}
]
}
}
This example configures the selected port channel into the vPC to connect to the downstream device.
Prerequisites:
- The port-channel must already exist. See Configuring Port Channels for detailed information about port channels.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
interface port-channel 10
vpc 20
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/media/dme/index.html
Configuring Address Synchronization
HTTP POST http://<IP_Address>/api/node/mo/sys/intf/aggr-[po13].json
{
"pcAggrIf": {
"attributes": {
"id": "po13"
}
}
}
IPv4 and IPv6 ND address synchronization supports faster convergence of address tables between the vPC peers.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
ip arp synchronize
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/media/dme/index.html
Querying the vPC Domain
Querying the vPC Domain
HTTP GET http://<IP_Address>/api/node/mo/sys/vpc/inst/dom.json
Rsponse
{
"totalCount": "1",
"imdata": [
{
"vpcDom": {
"attributes": {
"adminSt": "enabled",
"autoRecovery": "disabled",
"autoRecoveryIntvl": "240",
"batchedVpcInv": "",
"childAction": "",
"compatQual": "1102512194",
"compatQualStr": "Consistency Check Not Performed",
"compatSt": "fail",
"deadIntvl": "200",
"delayPeerLinkBringup": "0",
"delayRestoreSVI": "10",
"delayRestoreVPC": "30",
"dn": "sys/vpc/inst/dom",
"dualActiveSt": "false",
"excludeSVI": "",
"grcflCnstncyChck": "disabled",
"id": "1",
"ipv4CfsSync": "disabled",
"ipv6CfsSync": "disabled",
"issuFromVer": "",
"issuToVer": "",
"lacpRole": "election-not-done",
"localMAC": "74:26:AC:EC:91:87",
"localPrio": "0",
"modTs": "2016-10-13T13:42:24.010+00:00",
"monPolDn": "",
"name": "",
"oldRole": "election-not-done",
"operRole": "election-not-done",
"operSt": "configured-master",
"orphanPortList": "0",
"peerGw": "enabled",
"peerIp": "0.0.0.0",
"peerMAC": "00:00:00:00:00:00",
"peerPrio": "0",
"peerSt": "down",
"peerStQual": "success",
"peerSwitch": "disabled",
"peerVersion": "23",
"persistentOnReload": "true",
"rolePrio": "3",
"status": "",
"summOperRole": "election-not-done",
"sysMac": "00:03:02:02:01:01",
"sysPrio": "11",
"track": "0",
"type2CompatQual": "1102512194",
"type2CompatQualStr": "Consistency Check Not Performed",
"type2CompatSt": "fail",
"vIpAnnounceDelay": "45",
"virtualIp": "0.0.0.0",
"vpcCfgFailedBmp": "",
"vpcCfgFailedTs": "00:00:00:00.000",
"vpcCfgState": "0",
"vpcMAC": "00:00:00:00:00:00",
"vpcPrio": "32667"
}}}]}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring LACP
This section contains payload examples to demonstrate how to use the NX-API REST API to configure LACP on the Cisco Nexus 3000 and 9000 Series switches.
Querying the LACP Configuration
Querying the LACP Configuration
GET
http://<IP_Address>/api/node/mo/sys/lacp/inst.json
Response
{
"totalCount": "1",
"imdata": [
{
"lacpInst": {
"attributes": {
"adminPrio": "32768",
"adminSt": "enabled",
"childAction": "",
"ctrl": "",
"dn": "sys/lacp/inst",
"lacpctrl": "",
"modTs": "2016-10-12T14:40:10.978+00:00",
"monPolDn": "uni/fabric/monfab-default",
"name": "",
"operErr": "",
"operPrio": "32768",
"persistentOnReload": "true",
"status": "",
"sysMac": "00:00:00:00:00:00",
"uid": "0"
}
}
}
]
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring IP Addresses
This section contains payload examples to demonstrate how to use the NX-API REST API to configure IP addresses on the Cisco Nexus 3000 and 9000 Series switches.
Configuring an IPv4 Address for a Subinterface
Configuring an IPv4 Address for a Subinterface
HTTP POST
http://<IP_address>/api/mo/sys/intf.json
{
"topSystem": {
"children": [
{
"ipv4Entity": {
"children": [
{
"ipv4Inst" : {
"children" : [
{
"ipv4Dom" : {
"attributes" : {
"name" : "default"
},
"children" : [
{
"ipv4If" : {
"attributes" : {
"id" : "eth3/35.101"
}
"children" : [
{
"ipv4Addr" : {
"attributes" : {
"addr" : "113.1.1.1/24"
}}}]}}]}}]}}]}}]}}
The example in this section configures an IPv4 Address for a Subinterface.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring a Secondary IPv4 Address for a Subinterface
Configuring a Secondary IPv4 Address for a Subinterface
HTTP POST
http://<IP_address>/api/mo/sys/intf.json
{
"topSystem": {
"children": [ {
"ipv4Entity": {
"children": [ {
"ipv4Inst" : {
"children" : [
{
"ipv4Dom" : {
"attributes" : {
"name" : "default"
},
"children" : [
{
"ipv4If" : {
"attributes" : {
"id" : "eth3/35.101"
}
"children" : [
{
"ipv4Addr" : {
"attributes" : {
"addr" : "101.101.101.1/24",
"type" : "secondary"
}}}]}}]}}]}}]}}]}}
The example in this section configures a secondary IPv4 address for a specified subinterface.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring an IPv4 and an IPv6 Address for a Subinterface
Configuring an IPv4 and an IPv6 Address for a Subinterface
HTTP POST
http://<IP_address>/api/mo/sys/intf.json
{
"topSystem": {
"children" : [ {
"l3Inst" : {
"attributes" : {
"name" : "default"
}
"children" : [{
"l3EncRtdIf" : {
"attributes" : {
"id" : "eth3/35.101",
"descr": "new interface 101",
"encap": "vlan-100",
"adminSt": "up",
"mediumType" : "p2p"
}
}
} ]
}
} ]
"children": [ {
"ipv4Entity": {
"children": [ {
"ipv4Inst" : {
"children" : [ {
"ipv4Dom" : {
"attributes" : {
"name" : "default"
},
"children" : [ {
"ipv4If" : {
"attributes" : {
"id" : "eth3/24.101"
}
"children" : [ {
"ipv4Addr" : {
"attributes" : {
"addr" : "101.1.1.1/24"
}}}]}}]}}]}}]}}]
"children": [ {
"ipv6Entity": {
"children": [ {
"ipv6Inst" : {
"children" : [{
"ipv6Dom" : {
"attributes" : {
"name" : "default"
}
"children" : [{
"ipv6If" : {
"attributes" : {
"id" : "eth3/24.101"
}
"children" : [{
"ipv6LLaddr": {
"attributes": {
"addr": "fe82::ab3"
}
}
},
{
"ipv6Addr" : {
"attributes" : {
"addr" : "100:100:10::10/96"
}
}
}
{
"ipv6Neighbor": {
"attributes": {
"addr": "9134::a3f2",
"neighborMac": "00:50:56:A6:50:D6"
}}}]}}]}}]}}]}}]}}
This example assigns an IPv4 and an IPv6 address to a subinterface.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring Breakout on High-Bandwidth Interfaces
Cisco NX-OS supports breakout interfaces. The breakout command works at the module level and splits the 40G interface of a module into four 10G interfaces. The module is reloaded and the configuration for the interface is removed when the command is executed. When doing a module/port-level breakout thru REST, upon the completion of the action by the switch, the user should see corresponding l1PhysIf MOs get created with the DN as "sys/intf/phys-[id]" as an example.
- interface breakout module
- interface breakout module
port map - show interface brief
- show system internal im info interface ethernet 1/1/1
- show system internal im info module 1
This section contains payload examples to demonstrate how to use the NX-API REST API to configure breakout on high-bandwidth interfaces.
Post Task
POST
http://IP-address/api/mo/sys/action.json
{
"actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"topSystemCopyRSLTask" : {
"attributes" : {
"adminSt": "start",
"dn": "sys/action/lsubj-[sys]/topSystemCopyRSLTask",
"freq": "one-shot"
}
}
}
]
}
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Delete Task
POST
http://IP-address/api/mo/sys/action/lsubj-[sys].json
{
"topSystemCopyRSLTask": {
"attributes": {
"dn": "sys/action/lsubj-[sys]/topSystemCopyRSLTask"
"status": "deleted"
}
}
}
This deletes the Result also.
To delete all tasks under /sys/action, you may use
POST
http://IP-address/api/mo/sys/action.json
{
"actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
"status": "deleted"
}
}
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring Interfaces
This section contains payload examples to demonstrate how to use the NX-API REST API to configure interfaces.
Configuring an Interface as a Trunk Port and Enabling a List of Allowed VLANs
Configuring an Interface as a Trunk Port and Enabling a List of Allowed VLANs
HTTP POST
`http://<IP_Address>/api/mo/sys.json`
{
"topSystem": {
"children": [
{
"l1PhysIf": {
"attributes": {
"rn": "phys-[eth3/21]",
"id": "eth3/21",
"descr": "MDT test: trunk port",
"layer": "Layer2",
"mode": "trunk",
"mtu": "9216",
"adminSt": "up",
"trunkLog": "enable",
"trunkVlans": "2-150",
"snmpTrapSt": "disable"
}
}
}
}
}
The example in this section configures an interface as a trunk port and enables a list of trunk VLANs. When this API call executes, an l1PhysIf object named "phys-[eth3/21]" (/sys/intf/phys-[eth3/21]/) is created in the MO database, as well as several other objects that are required for port channel functionality.
The phys-[eth3/21] object holds the configuration for the interface that is configured as a trunk port.
To verify that the interface configuration was created, issue an HTTP GET request to query the following URI.
http://<IP_Address>/api/mo/sys/intf/phys-[eth3/21].json
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
QUERY PARAMETERS
No query parameters
Querying a Trunk Port Configuration
Querying a Trunk Port Configuration
{
"totalCount": "1",
"imdata": [
{
"l1PhysIf": {
"attributes": {
"accessVlan": "unknown",
"adminSt": "down",
"autoNeg": "on",
"bw": "0",
"childAction": "",
"delay": "1",
"descr": "MDT test: trunk port",
"dn": "sys/intf/phys-[eth3/21]",
"dot1qEtherType": "0x8100",
"duplex": "auto",
"ethpmCfgFailedBmp": "",
"ethpmCfgFailedTs": "00:00:00:00.000",
"ethpmCfgState": "0",
"id": "eth3/21",
"inhBw": "unspecified",
"layer": "Layer3",
"lcOwn": "local",
"linkDebounce": "100",
"linkLog": "default",
"mdix": "auto",
"medium": "broadcast",
"modTs": "2015-07-22T02:12:44.341+00:00",
"mode": "trunk", ================> shows port configured as "trunk"
"monPolDn": "",
"mtu": "9216",
"name": "",
"portT": "unknown",
"routerMac": "not-applicable",
"snmpTrapSt": "disable",
"spanMode": "not-a-span-dest",
"speed": "auto",
"status": "",
"switchingSt": "disabled",
"trunkLog": "enable",
"trunkVlans": "2-150",
"uid": "28530",
"usage": "discovery",
"userCfgdFlags": "0",
"vlanmgrCfgFailedBmp": "",
"vlanmgrCfgFailedTs": "00:00:00:00.000",
"vlanmgrCfgState": "0"
}
}
}
]
}
The example in this section queries the trunk port interface configuration that was specified in the previous HTTP POST request.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
HTTP REQUEST
HTTP GET
http://IP_Address/api/mo/sys/intf/phys-[eth3/21].json
QUERY PARAMETERS
No query parameters
Configuring an Interface as a Layer 2 Access Port and Enabling an Access VLAN
Configuring an Interface as a Layer 2 Access Port and Enabling an Access VLAN
HTTP POST
`http://<IP_Address>/api/mo/sys.json`
{
"topSystem": {
"children": [
{
"l1PhysIf": {
"attributes": {
"rn": "phys-[eth3/21]",
"id": "eth3/21",
"descr": "MDT test: trunk port",
"layer": "Layer2",
"mode": "access",
"mtu": "9216",
"adminSt": "up",
"trunkLog": "enable",
"accessVlan": "vlan-150",
"snmpTrapSt": "disable"
}
}
}
}
}
This example configures an interface as a layer 2 access port and enables an access VLAN.
When the HTTP POST request executes, the l1PhysIf object that was created in the previous POST request "phys-[eth3/21]" (/sys/intf/phys-[eth3/21]/) is reconfigured to be a layer 2 access port.
To verify that the interface configuration was created, issue an HTTP GET request to query the following URI:
http://<IP_Address>/api/mo/sys/intf/phys-[eth3/21].json
HTTP GET
http://<IP_address>/api/mo/sys/intf/phys-[eth3/21].json
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
QUERY PARAMETERS
No query parameters
Issuing a Shut or No Shut of the Interface
Issuing a Shut or No Shut of the Interface
HTTP POST
`http://<IP_address>//api/mo/sys.json`
{
"l1PhysIf" : {
"attributes" : {
"id" : "eth3/21",
"mtu" : "default"
"speed" : "auto"
"adminSt": "up"
}
}
}
{
"imdata": []
}
The example in this section shows how to issue a shut or no shut for an interface. In this example, the interface that was first configured to be a trunk port and then reconfigured to be a layer 2 access port, as shown in previous sections, is brought up.
If the interface is up and you want to bring it down, change "adminSt": "up" to "adminSt": "down"
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
QUERY PARAMETERS
No query parameters
Verifying the Shut or No Shut of the Interface
To verify that the shut or no shut command was successful, perform an HTTP GET operation.
HTTP GET
`http://<IP_address>/api/mo/sys/intf/phys-[eth3/21].json`
{
"totalCount": "1",
"imdata": [
{
"l1PhysIf": {
"attributes": {
"accessVlan": "vlan-150",
"adminSt": "up", ---------> indicate that interface is "no shut"
"autoNeg": "on",
"bw": "0",
"childAction": "",
"delay": "1",
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring an IPv4 Address for an Interface
Configuring ACL TCAM Region with e-racl TCAM Carving
HTTP POST
`http://<IP_address>/api/mo/sys.json`
{
"topSystem": {
"children": [
{
"ipv4Entity": {
"children": [
{
"ipv4Inst": {
"children": [
{
"ipv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv4If": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"ipv4Addr": {
"attributes": {
"addr": "10.0.0.1/10"
}}}]}}]}}]}}]}}]}}
The HTTP request in this example assigns an IPv4 address to an interface.
Note: This example was added in Release 7.0(3)I6(1).
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
QUERY PARAMETERS
No query parameters
Configuring User Flags
Configuring User Flags
POST
http://<IP_Address>172.31.200.141/api/mo/sys/intf/phys-[eth1/2].json
{
"l1PhysIf" : {
"attributes" : {
"id" : "eth1/2",
“layer" : “Layer2”,
"userCfgdFlags" : "admin_layer"
}
}
}
Configuring User Flags
POST
http://<IP_Address>/api/mo/sys/intf/phys-[eth1/2].json
{
"l1PhysIf" : {
"attributes" : {
"id" : "eth1/2",
"layer" : “Layer3”,
"mtu" : "5000",
"adminSt" : "up",
"userCfgdFlags" : "admin_layer,admin_mtu,admin_state"
}
}
}
User configured flags (REST property userCfgdFlags in l1PhysIf and pcAggrIf MOs) are used to indicate that a property (layer, admin state, and/or mtu) has been configured by the user.
If these flags are not set, users may experience configuration loss (for layer, admin state, and MTU) on the reload of the system.
Interfaces with the “admin_layer” and/or “admin_state” value set for “userCfgdFlags” will be unaffected by the “system default switchport” and “system default switchport shutdown” commands (respectively). User configured flags are automatically set correctly when CLI is executed, and only must be manually set for REST.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Creating a Subinterface under a Main Interface
Creating a Subinterface under a Main Interface
HTTP POST
http://<IP_address>/api/mo/sys/intf.json
{
"l3EncRtdIf" : {
"attributes" : {
"id" : "eth3/27.100"
"descr": "new interface 100"
"encap": "vlan-100",
"adminSt": "up"
"mediumType" : "p2p"
}
}
}
{
"imdata": []
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
The example in this section creates a subinterface under a main interface.
QUERY PARAMETERS
No query parameters
Querying the State of a Subinterface
Querying the State of a Subinterface
HTTP POST
http://<IP_address>/api/mo/sys/intf/encrtd-[eth3/27.100].json
{
"totalCount": "1",
"imdata": [
{
"l3EncRtdIf": {
"attributes": {
"adminSt": "up",
"bw": "0",
"childAction": "",
"delay": "1",
"descr": "",
"dn": "sys/intf/encrtd-[eth3/27.100]",
"encap": "vlan-100",
"ethpmCfgFailedBmp": "",
"ethpmCfgFailedTs": "00:00:00:00.000",
"ethpmCfgState": "0",
"id": "eth3/27.100",
"ifConnDn": "",
"lcOwn": "local",
"linkLogEn": "default",
"mediumType": "broadcast",
"modTs": "2015-07-16T04:21:02.065+00:00",
"monPolDn": "",
"mtu": "1500",
"mtuInherit": "yes",
"name": "",
"routerMac": "00:00:00:00:00:00",
"status": ""
}
}
}
]
}
The example in this section queries the state of a specified subinterface.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
QUERY PARAMETERS
No query parameters
Configuring the DNS Source Interface
Configuring the DNS Source Interface
POST http://<mgmt0_IP>/api/mo/sys/ipSrcIf.json
{
"srcintfEntity": {
"children": [
{
"srcintfDnsSrcIf": {
"attributes": {
"srcIf": "lo111",
"vrf": "default"
}}}]}}
Response
{
imdata:[]
}
Configuring the DNS Source Interface
<System>
<ipSrcIf-items>
<dns-items>
<DnsSrcIf-list>
<vrf>default</vrf>
<srcIf>lo111</srcIf>
</DnsSrcIf-list>
</dns-items>
</ipSrcIf-items>
</System>
Configures the DNS Source Interface
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip dns source-interface loopback 111
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/media/dme/index.html
Configuring the Source Interface Feature for a TFTP Client
Configuring the Source Interface Feature for a TFTP Client
POST http://<mgmt0_IP>/api/mo/sys/ipSrcIf.json
{
"srcintfEntity": {
"children": [
{
"srcintfTftp": {
"attributes": {
"srcIf": "lo111",
"vrf": "default"
}}}]}}
Response
{
imdata:[]
}
Configuring the Source Interface Feature for a TFTP Client
<System>
<ipSrcIf-items>
<tftp-items>
<Tftp-list>
<vrf>default</vrf>
<srcIf>lo111</srcIf>
</Tftp-list>
</tftp-items>
</ipSrcIf-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip tftp source-interface loopback 111
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/media/dme/index.html
Enable Network Address Translation (NAT)
Network Address Translation (NAT) enables private IP internetworks that use nonregistered IP addresses to connect to the Internet. NAT operates on a device, usually connecting two networks, and translates private (not globally unique) IP addresses in the internal network into legal IP addresses before packets are forwarded to another network.
Before you can use the NX-API REST NAT configuration APIs, you must enable NAT on the switch.
Follow these steps to enable NAT.
Enter global configuration mode:
config t
Enable the NAT feature:
switch(config)# feature nat
NAT configuration mode is now active. You can now issue NX-API REST NAT configuration calls.
Note: This example was added in Release 7.0(3)I6(1).
Configuring tcp-timeout for NAT Translation Table
Configuring tcp-timeout for NAT Translation Table
POST http://<mgmt0_ip>/api/mo/sys/nat.json
{
"natEntity": {
"children": [
{
"natInst": {
"attributes": {
"tcpTimeout": "100"
}}}]}}
Response
{
imdata:[]
}
Configuring tcp-timeout for NAT Translation Table
<System>
<nat-items>
<inst-items>
<tcpTimeout>100</tcpTimeout>
</inst-items>
</nat-items>
</System>
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip nat translation tcp-timeout 100
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/media/dme/index.html
Configuring udp-timeout for NAT Translation Table
Configuring udp-timeout for NAT Translation Table
POST http://<mgmt0_IP>/api/mo/sys/nat.json
{
"natEntity": {
"children": [
{
"natInst": {
"attributes": {
"udpTimeout": "101"
}}}]}}
Response
{
imdata:[]
}
Configuring udp-timeout for NAT Translation Table
<System>
<nat-items>
<inst-items>
<udpTimeout>101</udpTimeout>
</inst-items>
</nat-items>
</System>
Configures udp-timeout for a NAT translation table.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip nat translation udp-timeout 101
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/media/dme/index.html
Configuring Timeout for NAT Translation Table
Configuring Timeout for NAT Translation Table
POST http://<mgmt0_IP>/api/mo/sys/nat.json
{
"natEntity": {
"children": [
{
"natInst": {
"attributes": {
"timeout": "102"
}}}]}}
Response
{
imdata:[]
}
Configuring Timeout for NAT Translation Table
<System>
<nat-items>
<inst-items>
<timeout>102</timeout>
</inst-items>
</nat-items>
</System>
Configures timeout for NAT translation table.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip nat translation timeout 102
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/media/dme/index.html
Configuring Maximum Size of NAT Table for All Hosts
Configuring Maximum Size of NAT Table for All Hosts
POST http://<mgmt0_IP>/api/mo/sys/nat.json
{
"natEntity": {
"children": [
{
"natInst": {
"attributes": {
"allhost": "103"
}}}]}}
Response
{
imdata:[]
}
Configuring Maximum Size of NAT Table for All Hosts
<System>
<nat-items>
<inst-items>
<allhost>103</allhost>
</inst-items>
</nat-items>
</System>
Configures the maximum size of NAT the table for all hosts.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip nat translation max-entries all-host 103
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/media/dme/index.html
Configuring Maximum Size of NAT Table
Configuring Maximum Size of NAT Table
POST http://<mgmt0_IP>/api/mo/sys/nat.json
{
"natEntity": {
"children": [
{
"natInst": {
"attributes": {
"maxtranslation": "104"
}}}]}}
Response
{
imdata:[]
}
Configuring Maximum Size of NAT Table
<System>
<nat-items>
<inst-items>
<maxtranslation>104</maxtranslation>
</inst-items>
</nat-items>
</System>
Configures the maximum size of the NAT table.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip nat translation max-entries 104
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/media/dme/index.html
Creating NAT Pool with Network Mask
Creating NAT Pool with Network Mask
POST http://<mgmt0_IP>/api/mo/sys/nat/inst.json
{
"natInst": {
"children": [
{
"natPool": {
"attributes": {
"mask": "255.0.255.0",
"poolname": "pool5"
}}}]}}
Response
{
imdata:[]
}
Creating NAT Pool with Network Mask
<System>
<nat-items>
<inst-items>
<pool-items>
<Pool-list>
<poolname>pool5</poolname>
<mask>255.0.255.0</mask>
</Pool-list>
</pool-items>
</inst-items>
</nat-items>
</System>
Creats a NAT pool with a network mask.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip nat pool pool5 netmask 255.0.255.0
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/media/dme/index.html
Creating NAT Pool with Prefix Length
Creating NAT Pool with Prefix Length
POST http://<mgmt0_IP>/api/mo/sys/nat/inst.json
{
"natInst": {
"children": [
{
"natPool": {
"attributes": {
"poolname": "pool5",
"prefixlen": "24"
}}}]}}
Response
{
imdata:[]
}
Creating NAT Pool with Prefix Length
<System>
<nat-items>
<inst-items>
<pool-items>
<Pool-list>
<poolname>pool5</poolname>
<prefixlen>24</prefixlen>
</Pool-list>
</pool-items>
</inst-items>
</nat-items>
</System>
Creates a NAT pool with a prefix length.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip nat pool pool5 prefix-length 24
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/media/dme/index.html
Creating NAT Pool with Network Mask
Creating NAT Pool with Network Mask
POST http://<mgmt0_IP>/api/mo/sys/nat/inst/pool-pool5.json
{
"natPool": {
"attributes": {
"mask": "255.0.255.0",
"poolname": "pool5"
},
"children": [
{
"natPoolAddress": {
"attributes": {
"endip": "20.1.1.5",
"startip": "20.1.1.1"
}}}]}}
Response
{
imdata:[]
}
Creating NAT Pool with Network Mask
<System>
<nat-items>
<inst-items>
<pool-items>
<Pool-list>
<poolname>pool5</poolname>
<mask>255.0.255.0</mask>
<startip-items>
<PoolAddress-list>
<startip>20.1.1.1</startip>
<endip>20.1.1.5</endip>
</PoolAddress-list>
</startip-items>
</Pool-list>
</pool-items>
</inst-items>
</nat-items>
</System>
Creates a NAT pool with a network mask.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip nat pool pool5 20.1.1.1 20.1.1.5 netmask 255.0.255.0
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/media/dme/index.html
Creating NAT Pool with Prefix Length
Creating NAT Pool with Prefix Length
POST http://<mgmt0_IP>/api/mo/sys/nat/inst/pool-pool5.json
{
"natPool": {
"attributes": {
"poolname": "pool5",
"prefixlen": "3"
},
"children": [
{
"natPoolAddress": {
"attributes": {
"endip": "20.1.1.5",
"startip": "20.1.1.1"
}}}]}}
Response
{
imdata:[]
}
Creating NAT Pool with Prefix Length
<System>
<nat-items>
<inst-items>
<pool-items>
<Pool-list>
<poolname>pool5</poolname>
<prefixlen>3</prefixlen>
<startip-items>
<PoolAddress-list>
<startip>20.1.1.1</startip>
<endip>20.1.1.5</endip>
</PoolAddress-list>
</startip-items>
</Pool-list>
</pool-items>
</inst-items>
</nat-items>
</System>
Creates a NAT pool with a prefix length.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip nat pool pool5 20.1.1.1 20.1.1.5 prefix-length 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/media/dme/index.html
Configuring Netstack
This section contains payload examples to demonstrate how to use the NX-API REST API to configure netstack on the Cisco Nexus 3000 and 9000 Series switches.
Netstack Configuration Command Examples
This section contains payload examples and CLIs to demonstrate many of the netstack configuration commands and to show how the REST APIs correspond to the CLI commands.
Configuring a Secondary IPv4 Address on an Interface
HTTP POST
http://<IP_Address>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv4If": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"ipv4Addr": {
"attributes": {
"addr": "128.0.0.1/10",
"type": "secondary",
"tag": "30"
}}}]}}]}}]}}
This example configures a tagged secondary IPv4 address on the Ethernet 1/1 interface. Change the attributes as necessary for your own uses.
Configuring IP Forwarding
HTTP POST
http://<IP_Address>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv4If": {
"attributes": {
"forward": "enabled",
"id": "eth1/1"
}}}]}}]}}
This example configures forwarding on interface Ethernet 1/1.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring Reachability
HTTP POST
http://<IP_Address>/api/mo/sys/icmpv4/inst.json
{
"icmpv4Inst": {
"children": [
{
"icmpv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"icmpv4If": {
"attributes": {
"ctrl": "port-unreachable,redirect,unreachable",
"id": "eth1/1"
}}}]}}]}}
The following example configures ICMPv4 on the interface Ethernet 1/1 such that the ICMPv4 interface is unreachable.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Queue 1 Packet when Triggered NS is Sent
Queue 1 Packet when Triggered NS is Sent
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"interfaceEntity": {
"children": [
{
"l3LbRtdIf": {
"attributes": {
"id": "lo222"
}}}]}},
{
"ipv6Entity": {
"children": [
{
"ipv6Inst": {
"attributes": {
"queuePackets": "enabled"
}}}]}}]}}
Response
{
imdata:[]
}
Queue 1 Packet when Triggered NS is Sent
<System>
<intf-items>
<lb-items>
<LbRtdIf-list>
<id>lo222</id>
</LbRtdIf-list>
</lb-items>
</intf-items>
<ipv6-items>
<inst-items>
<queuePackets>enabled</queuePackets>
</inst-items>
</ipv6-items>
</System>
Queue 1 packet when a triggered NS is sent.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface loopback 222
ipv6 queue-packets
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/media/dme/index.html
Switch ND Packets Received on Core Ports
Switch ND Packets Received on Core Ports
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"interfaceEntity": {
"children": [
{
"l3LbRtdIf": {
"attributes": {
"id": "lo222"
}}}]}},
{
"ipv6Entity": {
"children": [
{
"ipv6Inst": {
"attributes": {
"switchPackets": "all"
}}}]}}]}}
Response
{
imdata:[]
}
Switch ND Packets Received on Core Ports
<System>
<intf-items>
<lb-items>
<LbRtdIf-list>
<id>lo222</id>
</LbRtdIf-list>
</lb-items>
</intf-items>
<ipv6-items>
<inst-items>
<switchPackets>all</switchPackets>
</inst-items>
</ipv6-items>
</System>
Switch ND packets received on core ports.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface loopback 222
ipv6 switch-packets
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/media/dme/index.html
Enabling IP Source Routing
Enabling IP Source Routing
POST http://<mgmt0_IP>/api/mo/sys/ipv4.json
{
"ipv4Entity": {
"children": [
{
"ipv4Inst": {
"attributes": {
"sourceRoute": "enabled"
}}}]}}
Response
{
imdata:[]
}
Enabling IP Source Routing
<System>
<ipv4-items>
<inst-items>
<sourceRoute>enabled</sourceRoute>
</inst-items>
</ipv4-items>
</System>
Enables IP source routing.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip source-route
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/media/dme/index.html
Enabling IP Auto Discard
Enabling IP Auto Discard
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4Dom": {
"attributes": {
"autoDiscard": "enabled",
"name": "default"
}}}]}}
Response
{
imdata:[]
}
Enabling IP Auto Discard
<System>
<ipv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<autoDiscard>enabled</autoDiscard>
</Dom-list>
</dom-items>
</inst-items>
</ipv4-items>
</System>
Enables IP auto discard.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip auto-discard
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/media/dme/index.html
Specifying an IPv4 ICMP Error-Source Interface
Specifying an IPv4 ICMP Error-Source Interface
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4Dom": {
"attributes": {
"ipIcmpErrorsSrcIntf": "lo2",
"name": "default"
}}}]}}
Response
{
imdata:[]
}
Specifying an IPv4 ICMP Error-Source Interface
<System>
<ipv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<ipIcmpErrorsSrcIntf>lo2</ipIcmpErrorsSrcIntf>
</Dom-list>
</dom-items>
</inst-items>
</ipv4-items>
</System>
Generates ICMP error packets with the source IPv4 address from the configured interface.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip icmp-errors source-interface loopback 2
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/media/dme/index.html
Specifying Internal IPv6 Event Logs for High Availability
Specifying Internal IPv6 Event Logs for High Availability
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
"ipv6Inst": {
"children": [
{
"ipv6IPv6EventLogs": {
"attributes": {
"eventType": "highAvailability",
"logSize": "small"
}}}]}}
Response
{
imdata:[]
}
Specifying Internal IPv6 Event Logs for High Availability
<System>
<ipv6-items>
<inst-items>
<logs-items>
<IPv6EventLogs-list>
<eventType>highAvailability</eventType>
<logSize>small</logSize>
</IPv6EventLogs-list>
</logs-items>
</inst-items>
</ipv6-items>
</System>
Specifies the internal IPv6 event log for high availability buffer size.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ipv6 internal event-history ha size small
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/media/dme/index.html
Enabling Access-List Matching for Locally Generated Traffic
Enabling Access-List Matching for Locally Generated Traffic
POST http://<mgmt0_IP>/api/mo/sys/ipv4.json
{
"ipv4Entity": {
"children": [
{
"ipv4Inst": {
"attributes": {
"accessListMatchLocal": "enabled"
}}}]}}
Response
{
imdata:[]
}
Enabling Access-List Matching for Locally Generated Traffic
<System>
<ipv4-items>
<inst-items>
<accessListMatchLocal>enabled</accessListMatchLocal>
</inst-items>
</ipv4-items>
</System>
Enables access-list matching for locally generated traffic.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip access-list match-local-traffic
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/media/dme/index.html
Specifying IPv4 Load Sharing
Specifying IPv4 Load Sharing
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4IPLoadSharing": {
"attributes": {
"concatenation": "disabled",
"greOuterHash": "disabled",
"loadShareMode": "srcDestPort"
}}}]}}
Response
{
imdata:[]
}
Specifying IPv4 Load Sharing
<System>
<ipv4-items>
<inst-items>
<iploadsharing-items>
<concatenation>disabled</concatenation>
<greOuterHash>disabled</greOuterHash>
<loadShareMode>srcDestPort</loadShareMode>
</iploadsharing-items>
</inst-items>
</ipv4-items>
</System>
Configures IPv4 load sharing.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip load-sharing address source-destination port source-destination
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/media/dme/index.html
Setting the Syslog Filter Level for Netstack
Setting the Syslog Filter Level for Netstack
POST http://<mgmt0_IP>/api/mo/sys/ipv4.json
{
"ipv4Entity": {
"children": [
{
"ipv4Inst": {
"attributes": {
"loggingLevel": "critical"
}}}]}}
Response
{
imdata:[]
}
Setting the Syslog Filter Level for Netstack
<System>
<ipv4-items>
<inst-items>
<loggingLevel>critical</loggingLevel>
</inst-items>
</ipv4-items>
</System>
Sets the syslog filter level for netstack.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
logging level netstack 2
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/media/dme/index.html
Configuring the ICMPv6 Logging Level
Configuring the ICMPv6 Logging Level
POST http://<mgmt0_IP>/api/mo/sys/icmpv6.json
{
"icmpv6Entity": {
"children": [
{
"icmpv6Inst": {
"attributes": {
"loggingLevel": "Error"
}}}]}}
Response
{
imdata:[]
}
Configuring the ICMPv6 Logging Level
<System>
<icmpv6-items>
<inst-items>
<loggingLevel>Error</loggingLevel>
</inst-items>
</icmpv6-items>
</System>
Configures the ICMPv6 logging level.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
logging Level icmpv6 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/media/dme/index.html
Sending ICMP Redirect Messages
Sending ICMP Redirect Messages
POST http://<mgmt0_IP>/api/mo/sys/icmpv4/inst.json
{
"icmpv4Inst": {
"children": [
{
"icmpv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"icmpv4If": {
"attributes": {
"ctrl": "port-unreachable,redirect",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Sending ICMP Redirect Messages
<System>
<icmpv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<ctrl>port-unreachable,redirect</ctrl>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</icmpv4-items>
</System>
Enables sending redirects.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ip redirects
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/media/dme/index.html
Configuring an IP Address on an Interface
Configuring an IP Address on an Interface
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv4If": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"ipv4Addr": {
"attributes": {
"addr": "4.4.4.4/5",
"tag": "111"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring an IP Address on an Interface
<System>
<ipv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<addr-items>
<Addr-list>
<addr>4.4.4.4/5</addr>
<tag>111</tag>
</Addr-list>
</addr-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv4-items>
</System>
Configures an IP address on an interface.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ip address 4.4.4.4/5 tag 111
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/media/dme/index.html
Configuring Additional IP Addresses on an Interface
Configuring Additional IP Addresses on an Interface
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv4If": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"ipv4Addr": {
"attributes": {
"addr": "4.4.4.4/5",
"tag": "111",
"type": "secondary"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring Additional IP Addresses on an Interface
<System>
<ipv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<addr-items>
<Addr-list>
<addr>4.4.4.4/5</addr>
<tag>111</tag>
<type>secondary</type>
</Addr-list>
</addr-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv4-items>
</System>
Configures additional IP addresses on an interface.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ip address 4.4.4.4/5 secondary tag 323
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/media/dme/index.html
Enabling IP Forwarding on an Interface
Enabling IP Forwarding on an Interface
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv4If": {
"attributes": {
"forward": "enabled",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Enabling IP Forwarding on an Interface
<System>
<ipv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<forward>enabled</forward>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv4-items>
</System>
Enables IP forwarding on an interface.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ip forward
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/media/dme/index.html
Enabling an IP-Directed Broadcast ACL Policy
Enabling an IP-Directed Broadcast ACL Policy
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv4If": {
"attributes": {
"acl": "ACL_Policy_Name",
"directedBroadcast": "enabled",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Enabling an IP-Directed Broadcast ACL Policy
<System>
<ipv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<acl>ACL_Policy_Name</acl>
<directedBroadcast>enabled</directedBroadcast>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv4-items>
</System>
Enables an IP-directed broadcast ACL policy.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ip directed-broadcast ACL_Policy_Name
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/media/dme/index.html
Enabling the Sending of ICMP Unreachables (other than port-unreachable)
Enabling the Sending of ICMP Unreachables (other than port-unreachable)
POST http://<mgmt0_IP>/api/mo/sys/icmpv4/inst.json
{
"icmpv4Inst": {
"children": [
{
"icmpv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"icmpv4If": {
"attributes": {
"ctrl": "port-unreachable,redirect,unreachable",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Enabling the Sending of ICMP Unreachables (other than port-unreachable)
<System>
<icmpv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<ctrl>port-unreachable,redirect,unreachable</ctrl>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</icmpv4-items>
</System>
Enables the sending of ICMP unreachables (other than port-unreachable).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ip unreachables
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/media/dme/index.html
Enable Sending an ICMP Port Unreachable
Enable Sending an ICMP Port Unreachable
POST http://<mgmt0_IP>/api/mo/sys/icmpv4/inst.json
{
"icmpv4Inst": {
"children": [
{
"icmpv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"icmpv4If": {
"attributes": {
"ctrl": "port-unreachable,redirect",
"id": "eth1/1"
}}}]}}]}}
Response
{
imdata:[]
}
Enable Sending an ICMP Port Unreachable
<System>
<icmpv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<ctrl>port-unreachable,redirect</ctrl>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</icmpv4-items>
</System>
Enables sending an ICMP port unreachable.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ip port-unreachable
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/media/dme/index.html
Enabling IPv6 on an Interface Using only a Single Link-Local Address
Enabling IPv6 on an Interface Using only a Single Link-Local Address
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
"ipv6Inst": {
"children": [
{
"ipv6Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv6If": {
"attributes": {
"autoconfig": "disabled",
"id": "eth1/1",
"useLinkLocalAddr": "enabled"
}}}]}}]}}
Response
{
imdata:[]
}
Enabling IPv6 on an Interface Using only a Single Link-Local Address
<System>
<ipv6-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<autoconfig>disabled</autoconfig>
<useLinkLocalAddr>enabled</useLinkLocalAddr>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv6-items>
</System>
Enables IPv6 on an interface using only a single link-local address.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 address use-link-local-only
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/media/dme/index.html
Changing the Format of a Link-Local Address
Changing the Format of a Link-Local Address
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
"ipv6Inst": {
"children": [
{
"ipv6Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv6If": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"ipv6LLaddr": {
"attributes": {
"addr": "feb1:2::3:4"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Changing the Format of a Link-Local Address
<System>
<ipv6-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<lladdr-items>
<LLaddr-list>
<addr>feb1:2::3:4</addr>
</LLaddr-list>
</lladdr-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv6-items>
</System>
Changes the format of a link-local address.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 link-local FEB1:2::3:4
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/media/dme/index.html
Configuring IPv6 Addresses on an Interface
Configuring IPv6 Addresses on an Interface
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
"ipv6Inst": {
"children": [
{
"ipv6Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv6If": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"ipv6Addr": {
"attributes": {
"addr": "1:2::3:4/3",
"ctrl": "eui64",
"pref": "44"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring IPv6 Addresses on an Interface
<System>
<ipv6-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<addr-items>
<Addr-list>
<addr>1:2::3:4/3</addr>
<ctrl>eui64</ctrl>
<pref>44</pref>
</Addr-list>
</addr-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv6-items>
</System>
Configures IPv6 addresses on an interface.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 address 1:2::3:4/3 eui64 route-preference 44
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/media/dme/index.html
Configuring a U6RIB Route Preference for Local or Direct Routes
Configuring a U6RIB Route Preference for Local or Direct Routes
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
"ipv6Inst": {
"children": [
{
"ipv6Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv6If": {
"attributes": {
"autoconfig": "enabled",
"defaultRoute": "enabled",
"id": "eth1/1",
"useLinkLocalAddr": "disabled"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring a U6RIB Route Preference for Local or Direct Routes
<System>
<ipv6-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<autoconfig>enabled</autoconfig>
<defaultRoute>enabled</defaultRoute>
<useLinkLocalAddr>disabled</useLinkLocalAddr>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv6-items>
</System>
Configuring a U6RIB route preference for local or direct routes.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 address autoconfig default
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/media/dme/index.html
Configuring IPv6 Stateless Address Autoconfig
Configuring IPv6 Stateless Address Autoconfig
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
"ipv6Inst": {
"children": [
{
"ipv6Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv6If": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"ipv6Neighbor": {
"attributes": {
"addr": "1:2::3:4",
"neighborMac": "00:05:00:05:00:05"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring IPv6 Stateless Address Autoconfig
<System>
<ipv6-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<nghbr-items>
<Neighbor-list>
<addr>1:2::3:4</addr>
<neighborMac>00:05:00:05:00:05</neighborMac>
</Neighbor-list>
</nghbr-items>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv6-items>
</System>
Configures IPv6 stateless address autoconfig.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 neighbor 1:2::3:4 5.5.5
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/media/dme/index.html
Enable Sending ICMPv6 Unreachable Messages
Enable Sending ICMPv6 Unreachable Messages
POST http://<mgmt0_IP>/api/mo/sys/icmpv6/inst.json
{
"icmpv6Inst": {
"children": [
{
"icmpv6If": {
"attributes": {
"ctrl": "unreachables-icmp",
"id": "eth1/1"
}}}]}}
Response
{
imdata:[]
}
Enable Sending ICMPv6 Unreachable Messages
<System>
<icmpv6-items>
<inst-items>
<if-items>
<If-list>
<id>eth1/1</id>
<ctrl>unreachables-icmp</ctrl>
</If-list>
</if-items>
</inst-items>
</icmpv6-items>
</System>
Enables sending ICMPv6 unreachable messages.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 icmp unreachables
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/media/dme/index.html
Specifying when Probing for an Adjacency Begins
Specifying when Probing for an Adjacency Begins
POST http://<mgmt0_IP>/api/mo/sys/icmpv6.json
{
"icmpv6Entity": {
"children": [
{
"icmpv6Inst": {
"attributes": {
"adjStaleTimer": "300",
"adjStaleTimerIcmp": "disabled"
}}}]}}
Response
{
imdata:[]
}
Specifying when Probing for an Adjacency Begins
<System>
<icmpv6-items>
<inst-items>
<adjStaleTimer>300</adjStaleTimer>
<adjStaleTimerIcmp>disabled</adjStaleTimerIcmp>
</inst-items>
</icmpv6-items>
</System>
Specifies when probing for an adjacency begins.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 adjacency-stale-timer 300
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/media/dme/index.html
Configuring an IP Interface as Unnumbered
Configuring an IP Interface as Unnumbered
POST http://<mgmt0_IP>/api/mo/sys/nd/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv4If": {
"attributes": {
"id": "eth1/1",
"unnumbered": "lo1"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring an IP Interface as Unnumbered
<System>
<ipv4-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>eth1/1</id>
<unnumbered>lo1</unnumbered>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv4-items>
</System>
Configures an IP interface as unnumbered.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet 1/1
ip unnumbered lo1
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/media/dme/index.html
Configuring a VLAN Interface as IPv6 Forward
Configuring a VLAN Interface as IPv6 Forward
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"interfaceEntity": {
"children": [
{
"sviIf": {
"attributes": {
"id": "vlan1"
}
}
}
]
}
},
{
"ipv6Entity": {
"children": [
{
"ipv6Inst": {
"children": [
{
"ipv6Dom": {
"attributes": {
"name": "default"
},
"children": [
{
"ipv6If": {
"attributes": {
"forward": "enabled",
"id": "vlan1"
}}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring a VLAN Interface as IPv6 Forward
<System>
<intf-items>
<svi-items>
<If-list>
<id>vlan2</id>
</If-list>
</svi-items>
</intf-items>
<ipv6-items>
<inst-items>
<dom-items>
<Dom-list>
<name>default</name>
<if-items>
<If-list>
<id>vlan2</id>
<forward>enabled</forward>
</If-list>
</if-items>
</Dom-list>
</dom-items>
</inst-items>
</ipv6-items>
</System>
Configures a VLAN interface as IPv6 forward.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
ipv6 forward
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/media/dme/index.html
Netstack Operational Command Examples
This section demonstrates many of the netstack operational command options shows how the NX-API REST API corresponds to the CLI commands.
Querying an IP Interface
Default VRF
GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-default/if-[vlan2].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
Non-Default VRF
GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-3/if-[vlan3].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ip interface { {{brief [include-secondary]} | [<interface>] | [<ip-addr>]}
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
Querying IP Traffic
GET https://<IP_Address>/api/mo/sys/ipv4/inst/iptrafficstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ip traffic
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
Querying IP Clients
All Clients
GET https://<IP_Address>/api/mo/sys/ipv4/inst.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
A Specific Client
GET https://<IP_Address>/api/mo/sys/ipv4/inst/client-pktmgr-proto-47.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ip client [<client-name>]
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
Querying a IP Processes
Default VRF
GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-default/pstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
Non-Default VRF
GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-3/pstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ip process [api] [vrf {<vrf-name> | <vrf-known-name> | all}]
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
Querying Netstack Log Levels
GET https://<IP_Address>/api/mo/sys/ipv4/inst.json
CLI Command
show logging level netstack
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
Querying Load Sharing
GET https://<IP_Address>/api/mo/sys/ipv4/inst/loadstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ip load-sharing
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
Querying IPv6 Interfaces
Default VRF
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/if-[vlan2].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
Non-Default VRF
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-3/if-[vlan3].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ipv6 interface
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
Querying IPv6 Traffic
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/trafficstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ipv6 traffic [detail] [vrf {<vrf-name> | <vrf-known-name>}]
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
Querying IPv6 Clients
All Clients
GET https://<IP_Address>/api/mo/sys/ipv6/inst.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
A Specific Client
GET https://<IP_Address>/api/mo/sys/ipv6/inst/clientstats-tm-proto-0.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ipv6 client [<client-name>]
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
Querying IPv6 Fragments
GET https://<IP_Address>/api/mo/sys/ipv6/inst/fragstats-[<srcAddr>]‘.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 fragments [<source-addr>]
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
Querying IPv6 Processes
Default VRF
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/procstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
Non-Default VRF
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-3/procstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
CLI Command
show ipv6 process [vrf {<vrf-name> | <vrf-known-name> | all}]
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
Querying IPv6 MTU Statistics
GET https://<IP_Address>/api/mo/sys/ipv6/inst/mtustats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 mtu [statistics | vrf {<vrf-name> | <vrf-known-name> | all [detail]}]
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
Querying IPv6 Neighbor Static Interfaces
GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/if-[vlan2].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 neighbor static [interface <interface>]
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
Querying Logging Levels for ICMPv6
GET https://<IP_Address>/api/mo/sys/icmpv6/inst.json
CLI Command
show logging level ipv6 icmp
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
Querying IPv6 Global Traffic
GET https://<IP_Address>/api/mo/sys/nd/inst/glblpktstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 {icmp | nd} global traffic
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
Querying IPv6 Interface Statistics for Prefixes and Routes
Default VRF (Prefix)
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-default/if-[vlan2]/ifstats/pfx-[12:2:1::/96].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
Default VRF (Route)
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-default/if-[vlan2]/ifstats/rt-[102:102:102::102/128].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
Non-Default VRF (Prefix)
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-3/if-[vlan3]/ifstats/pfx-[12:2:1::/96].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
Non-Default VRF (Route)
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-3/if-[vlan3]/ifstats/rt-[102:102:102::102/128].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 {icmp | nd} interface [<interface>] {[prefix [full]] | [route] | [detail]} [vrf {<vrf-name> | <vrf-known-name> | all}]} | default-vrf
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
Querying IPv6 ICMP Off-List Statistics
GET https://<IP_Address>/api/mo/sys/nd/inst/offliststat-<vlanID>-ip-[<addr>]‘.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 icmp off-list [vlan <vlan-id>]
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
Querying IPv6 ICMP vPC Statistics
GET https://<IP_Address>/api/mo/sys/nd/inst/vpcstat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 icmp vpc-statistics
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
Querying IPv6 Router Statistics
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-<intf-vrf>/if-[<interface>]/rtrstat-[<routerAddr>]‘.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 routers [all-routers] [[interface <interface>] | [vrf {<vrf-name> | <vrf-known-name> | all}]]
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
Querying IPv6 ICMP vAddr Link-Local Addresses
vAddr Link-Local Address
GET https://<IP_Address>/api/mo/sys/nd/inst/vaddrllstat-[fe80::5:73ff:fea0:2].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
vAddr Globals
GET https://<IP_Address>/api/mo/sys/nd/inst/dom-default/vaddrstatglobal-[12:6:1::101].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
CLI Command
show ipv6 icmp vaddr { link-local [detail] | global | pt-tree}
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
Netstack Action Command Examples
This section contains payload examples and CLIs to demonstrate many of the netstack action command options and to show how the REST APIs correspond to the CLI commands
Clearing IP traffic
Clearing IP traffic
POST http://<mgmt0_IP>/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ipv4InstClearTrafficStatLTask": {
"attributes": {
"adminSt": "start",
"dn":
"sys/action/lsubj-[sys]/ipv4InstClearTrafficStatLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Clears IP global statistics.
Note: This example was added in Release 7.0(3)I6(1).
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ip traffic
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/media/dme/index.html
Clearing interface statistics
Clearing interface statistics
POST http://<mgmt0_IP>/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ipv4InstClearIntfStatLTask": {
"attributes": {
"adminSt": "start",
"interface": "<type-with-port>"
"dn":
"sys/action/lsubj-[sys]/ipv4InstClearIntfStatLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Clears IP interface statistics.
Note: This example was added in Release 7.0(3)I6(1).
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ip interface statistics
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/media/dme/index.html
Clearing IPv6 Traffic
Clearing IPv6 Traffic
POST http://<mgmt0_IP>/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ipv6InstClearTrafficStatLTask": {
"attributes": {
"adminSt": "start",
"dn":
"sys/action/lsubj-[sys]/ipv6InstClearTrafficStatLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Clears IPv6 traffic.
Note: This example was added in Release 7.0(3)I6(1).
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. .
clear ipv6 traffic
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/media/dme/index.html
Clearing IPv6 Statistics
Clearing IPv6 Statistics
POST http://10.77.143.51/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ipv6InstClearGlobalStatLTask": {
"attributes": {
"adminSt": "start",
"dn":
"sys/action/lsubj-[sys]/ipv6InstClearGlobalStatLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Clears IPv6 statistics.
Note: This example was added in Release 7.0(3)I6(1).
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ipv6 statistics
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/media/dme/index.html
Clearing IPv6 Interface Statistics
Clearing IPv6 Interface Statistics
POST http://10.77.143.51/api/mo/sys/action.json
{ "actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
}
"children" : [{
"ipv6InstClearIntfStatLTask": {
"attributes": {
"adminSt": "start",
"interface": "<type-with-port>"
"dn":
"sys/action/lsubj-[sys]/ipv6InstClearIntfStatLTask",
"freq": "one-shot"
}
}
}]
}
}
Response
{
imdata:[]
}
Clears IPv6 interface statistics.
Note: This example was added in Release 7.0(3)I6(1).
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear ipv6 interface statistics
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/media/dme/index.html
Configuring SVIs
After you have configured VLANs, you can configure switched virtual interfaces (SVIs). An SVI is a virtual routed interface that connects a VLAN on the device to the Layer 3 router engine on the same device.
This section contains payload examples to demonstrate how to use the NX-API REST API to configure SVIs on the Cisco Nexus 3000 and 9000 Series switches.
Creating and Configuring an SVI Interface
Creating and Configuring an SVI Interface
HTTP POST
http://<IP_Address>/api/node/mo/sys/intf/svi-[vlan1000].json
{
"sviIf": {
"attributes": {
"id": "vlan1000",
"adminSt": "up",
"autostate": "no",
"bw": "100000",
"carDel": "50",
"delay": "10",
"descr": "MDP SVI vlan 1000",
"inbMgmt": "no",
"loadIntvl1": "70",
"mac": "2.3.4",
"medium": "p2p",
"mtu": "9216",
"snmpTrap": "yes"
}
}
}
Response
{
"imdata": []
}
This example creates an SVI named vlan1000.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
[no] interface vlan <vlan_id>
[no] shutdown
[no] autostate
bandwidth <bw>
carrier-delay <msec>
delay <msec>
description <string>
load-interval {interval seconds {1 | 2 | 3}}
mac-address <mac>
[no] management
medium { broadcast | p2p }
mtu <mtu>
[no] snmp trap link-status
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/media/dme/index.html
Querying an SVI Configuration
Querying an SVI Configuration
HTTP GET
http://<IP_Address>/api/node/mo/sys/intf/svi-[vlan1000].json
Response
{
"totalCount": "1",
"imdata": [
{
"sviIf": {
"attributes": {
"adminSt": "up",
"autostate": "no",
"bw": "100000",
"carDel": "50",
"childAction": "",
"delay": "10",
"descr": "MDP SVI vlan 1000",
"dn": "sys/intf/svi-[vlan1000]",
"id": "vlan1000",
"inbMgmt": "no",
"iod": "19",
"loadIntvl1": "70",
"loadIntvl2": "300",
"loadIntvl3": "60",
"mac": "00:02:00:03:00:04",
"medium": "p2p",
"modTs": "2016-12-01T23:50:37.569+00:00",
"monPolDn": "uni/fabric/monfab-default",
"mtu": "9216",
"mtuInherit": "yes",
"name": "",
"operSt": "down",
"operStQual": "no-vlan",
"osSum": "failed",
"persistentOnReload": "true",
"snmpTrap": "yes",
"status": "",
"uid": "15214",
"vlanId": "1000",
"vlanT": "0"
}
}
}
]
}
This example reads the configuration of the SVI named vlan1000
The HTTP request in this example queries the SVI configuration that was set in the previous example.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring VRRP
The NX-API REST API supports the REST-based configuration of the Virtual Router Redundancy Protocol (VRRP), versions 2 (VRRPv2) and 3 (VRRPv3), on the Cisco Nexus 3000 and 9000 Series devices. VRRPv2 only supports IPv4 addresses, whereas VRRPv3 supports both IPv4 and IPv6 addresses.
This section contains payload examples to demonstrate how to use the NX-API REST API to configure VRRP on the Cisco Nexus 3000 and 9000 Series switches.
VRRPv2
The VRRPv2 implementation in the the NX-API REST supports the configuration that is set by the following VRRP-related CLI commands in interface mode:
[no] vrrp vr_id
address ip_address [secondary] | no address [ip_address [secondary]]
advertisement-interval interval_time | no advertisement-interval [ interval_time ]
priority priority_value [forwarding-threshold lower lower-value upper upper-value | no priority [forwarding-threshold]
[no] shutdown
authentication text authentication_password | no authentication text authentication_passord
vrrp bfd peer_interface_ip
By default, when VRRPv2 is enabled on the device, a MO calls /sys/vrrp/inst/ is created. This is a VRRPv2 configuration instance. As you create VRRP IDs, additional objects are created under the /sys/vrrp/inst/ object.
VRRPv3
The VRRPv3 implementation in the the NX-API REST supports the configuration that is set by the following VRRP-related CLI commands:
[no] vrrpv3 vr_id address-family {ipv4|ipv6}
address ipv4_address [primary] | no address [ipv4_address [primary]]
[no] description description
[no] preempt
[no] preempt delay minimum seconds
timers advertise interval_time | no timers advertise [ interval_time ]
priority priority_value [forwarding-threshold lower lower-value upper upper-value | no priority [forwarding-threshold]
[no] shutdown
By default, when VRRPv3 is enabled on the device, a MO calls /sys/vrrpv3/inst/ is created. This is a VRRPv3 configuration instance. As you create VRRPv3 IDs, additional objects are created under the /sys/vrrpv3/inst/ object.
Enabling VRRP
Enabling VRRP
HTTP POST
http://<IP_Address>/api/mo/sys/fm/vrrp.json
{
"fmEntity": {
"children": [
{
"fmVrrp": {
"attributes": {
"adminSt": "enabled"
}}}]}}
Response
{
imdata:[]
}
Enabling VRRP
<System>
<fm-items>
<vrrp-items>
<adminSt>enabled</adminSt>
</vrrp-items>
</fm-items>
</System>
This example enables VRRP.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
feature vrrp
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/media/dme/index.html
Creating a VRRPv2 Interface (vrrpv2)
Creating a VRRPv2 Interface (vrrpv2)
HTTP POST
http://<ip_address>/api/mo/sys/vrrp/inst/if-[eth1/7].json
{
"vrrpInterface": {
"attributes" : {
"id" : "eth1/7"
}
}
}
The HTTP request shown in this example creates a VRRPv2 ID on an Ethernet interface called "eth1/7". Replace the parameters with the appropriate values:
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Creating a Primary VRRPv2 ID (vrrpv2)
Creating a Primary VRRPv2 ID (vrrpv2)
HTTP POST
http://<IP_address>/api/mo/sys/vrrp/inst/if-[eth1/7]/id-[2].json
{
"vrrpId": {
"attributes": {
"adminSt" : "enabled",
"id": "2",
"primary": "10.10.10.102"
}}}
The HTTP request shown in this example creates a Managed Object called with an ID of 1 a primary IP address of 10.10.10.102.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Creating a Secondary VRRP ID (vrrpv2)
Creating a Secondary VRRP ID (vrrpv2)
POST http://<IP_address>/api/mo/sys/vrrp/inst/if-[eth1/7]/id-[2]/secondary-[10.10.10.101].json
{
"vrrpSecondary" : {
"attributes" : {
"secondary" : "10.10.10.101"
}
}
}
The HTTP request in this example creates a secondary VRRPv2 ID named "secondary-[10.10.10.101]" under the primary VRRP ID id-[2].
Creating a VRRPv3 Interface (vrrpv3)
Creating a VRRPv3 Interface (vrrpv3)
HTTP POST
http://<ip_address>/api/mo/sys/vrrpv3/inst/if-[eth1/7].json
{
"vrrpv3Interface": {
"attributes": {
"id": "eth1/7"
},
"children": [
{
"vrrpv3Vr": {
"attributes": {
"af": "ipv4",
"id": "10"
}}}]}}
Response
{
imdata:[]
}
Creating a VRRPv3 Interface (vrrpv3)
<System>
<vrrpv3-items>
<inst-items>
<if-items>
<Interface-list>
<id>eth1/7</id>
<id-items>
<Vr-list>
<id>10</id>
<af>ipv4</af>
</Vr-list>
</id-items>
</Interface-list>
</if-items>
</inst-items>
</vrrpv3-items>
</System>
The HTTP request shown in this example creates a VRRPv3 instance with a group ID of 10 and an IPv4 address family.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/7
vrrpv3 10 address-family ipv4
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/media/dme/index.html
Generating a VRRPv3 interface (vrrpv3)
Generating a VRRPv3 interface (vrrpv3)
HTTP POST
http://<ip_address>/api/mo/sys/if-[eth1/7].json
{
"l1PhysIf": {
"attributes": {
"id": "eth1/7",
"layer": "Layer3",
"userCfgdFlags": "admin_layer"
}
}
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Creating a Primary VRRP ID and Address Family (vrrpv3)
Creating a Primary VRRP ID and Address Family (vrrpv3)
HTTP POST
http://<IP_address>/api/mo/sys/vrrpv3/inst/if-[eth1/7].json
{
"vrrpv3Interface": {
"attributes": {
"id": "eth1/7"
},
"children": [
{
"vrrpv3Vr": {
"attributes": {
"af": "ipv4",
"id": "10",
"ip": "100.0.1.10"
}}}]}}
Response
{
imdata:[]
}
Creating a Primary VRRP ID and Address Family (vrrpv3)
<System>
<vrrpv3-items>
<inst-items>
<if-items>
<Interface-list>
<id>eth1/7</id>
<id-items>
<Vr-list>
<id>10</id>
<af>ipv4</af>
<ip>100.0.1.10</ip>
</Vr-list>
</id-items>
</Interface-list>
</if-items>
</inst-items>
</vrrpv3-items>
</System>
The HTTP request shown in this example creates a Managed Object called "vrrpv3Vr" with an address family attribute (af) of ipv4, an address family ID of "10", and an IP address of 10.10.10.102.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/7
vrrpv3 10 address-family ipv4
address 100.0.1.10 primary
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/media/dme/index.html
Configuring VRRPv3 Control Group for IPv6 (vrrpv3)
Configuring VRRPv3 for IPv6 (vrrpv3)
POST http://<mgmt0_IP>/api/mo/sys/vrrpv3/inst/if-{[id]}/id-{id}-{af}.json
{
"topSystem": {
"children": [
{
"vrrpv3Entity": {
"children": [
{
"vrrpv3Inst": {
"children": [
{
"vrrpv3Interface": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"vrrpv3Vr": {
"attributes": {
"af": "ipv6",
"id": "1",
"ip": "fe80::1",
"preempt": "disabled",
"priCfg": "120"
},
"children": [
{
"vrrpv3Addr": {
"attributes": {
"addr": "1::5"
}
}
},
{
"vrrpv3Addr": {
"attributes": {
"addr": "1::2"
}
}
},
{
"vrrpv3Addr": {
"attributes": {
"addr": "1::8"
}
}
},
{
"vrrpv3Addr": {
"attributes": {
"addr": "1::3"
}
}
},
{
"vrrpv3Addr": {
"attributes": {
"addr": "1::7"
}
}
},
{
"vrrpv3Addr": {
"attributes": {
"addr": "1::6"
}
}
},
{
"vrrpv3Addr": {
"attributes": {
"addr": "1::4"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring VRRPv3 for IPv6 (vrrpv3)
<System>
<vrrpv3-items>
<inst-items>
<if-items>
<Interface-list>
<id>eth1/1</id>
<id-items>
<Vr-list>
<id>1</id>
<af>ipv6</af>
<ip>fe80::1</ip>
<preempt>disabled</preempt>
<priCfg>120</priCfg>
<addr-items>
<Addr-list>
<addr>1::5</addr>
</Addr-list>
<Addr-list>
<addr>1::2</addr>
</Addr-list>
<Addr-list>
<addr>1::8</addr>
</Addr-list>
<Addr-list>
<addr>1::3</addr>
</Addr-list>
<Addr-list>
<addr>1::7</addr>
</Addr-list>
<Addr-list>
<addr>1::6</addr>
</Addr-list>
<Addr-list>
<addr>1::4</addr>
</Addr-list>
</addr-items>
</Vr-list>
</id-items>
</Interface-list>
</if-items>
</inst-items>
</vrrpv3-items>
</System>
Configures a VRRPv3 control group for IPv6.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
vrrpv3 1 address-family ipv6
priority 120
no preempt
address fe80::1 primary
address 1::2
address 1::3
address 1::4
address 1::5
address 1::6
address 1::7
address 1::8
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/media/dme/index.html
Configuring VRRPv3 Control Group for IPv4 (vrrpv3)
Configuring VRRPv3 for IPv4 (vrrpv3)
POST http://<mgmt0_IP>/api/mo/sys/vrrpv3/inst/if-{[id]}/id-{id}-{af}.json
{
"topSystem": {
"children": [
{
"vrrpv3Entity": {
"children": [
{
"vrrpv3Inst": {
"children": [
{
"vrrpv3Interface": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"vrrpv3Vr": {
"attributes": {
"advIntvl": "1100",
"af": "ipv4",
"id": "1",
"ip": "1.1.1.2",
"preempt": "enabled",
"preemptDelayMin": "10",
"priCfg": "150"
},
"children": [
{
"vrrpv3Addr": {
"attributes": {
"addr": "1.1.1.8"
}
}
},
{
"vrrpv3Addr": {
"attributes": {
"addr": "1.1.1.3"
}
}
},
{
"vrrpv3Addr": {
"attributes": {
"addr": "1.1.1.7"
}
}
},
{
"vrrpv3Addr": {
"attributes": {
"addr": "1.1.1.9"
}
}
},
{
"vrrpv3Addr": {
"attributes": {
"addr": "1.1.1.4"
}
}
},
{
"vrrpv3Addr": {
"attributes": {
"addr": "1.1.1.5"
}
}
},
{
"vrrpv3Addr": {
"attributes": {
"addr": "1.1.1.6"
}}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring VRRPv3 for IPv4 (vrrpv3)
<System>
<vrrpv3-items>
<inst-items>
<if-items>
<Interface-list>
<id>eth1/1</id>
<id-items>
<Vr-list>
<id>1</id>
<af>ipv4</af>
<advIntvl>1100</advIntvl>
<ip>1.1.1.2</ip>
<preempt>enabled</preempt>
<preemptDelayMin>10</preemptDelayMin>
<priCfg>150</priCfg>
<addr-items>
<Addr-list>
<addr>1.1.1.8</addr>
</Addr-list>
<Addr-list>
<addr>1.1.1.3</addr>
</Addr-list>
<Addr-list>
<addr>1.1.1.7</addr>
</Addr-list>
<Addr-list>
<addr>1.1.1.9</addr>
</Addr-list>
<Addr-list>
<addr>1.1.1.4</addr>
</Addr-list>
<Addr-list>
<addr>1.1.1.5</addr>
</Addr-list>
<Addr-list>
<addr>1.1.1.6</addr>
</Addr-list>
</addr-items>
</Vr-list>
</id-items>
</Interface-list>
</if-items>
</inst-items>
</vrrpv3-items>
</System>
Configures a VRRPv3 control group for IPv4.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
vrrpv3 1 address-family ipv4
timers advertise 1100
priority 150
preempt delay minimum 10
address 1.1.1.2 primary
address 1.1.1.3 secondary
address 1.1.1.4 secondary
address 1.1.1.5 secondary
address 1.1.1.6 secondary
address 1.1.1.7 secondary
address 1.1.1.8 secondary
address 1.1.1.9 secondary
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/media/dme/index.html](https://developer.cisco.com/media/dme/index.html
Configuring Route Policy Manager
Route Policy Manager supports route maps and IP prefix lists.
These features are used for route redistribution and policy-based routing. A "prefix list" contains one or more IPv4 or IPv6 network prefixes and the associated prefix length values. You can use a prefix list by itself in features such as Border Gateway Protocol (BGP) templates, route filtering, or redistribution of routes that are exchanged between routing domains. Route maps can apply to both routes and IP packets.
Route filtering and redistribution pass a route through a route map while policy based routing passes IP packets through a route map.
This section contains payload examples to demonstrate how to use the NX-API REST API to configure RPM on the Cisco Nexus 3000 and 9000 Series switches.
New and Changed RPM Model Information
The following table provides an overview of the significant changes for the RPM model in Cisco NX-OS Release 7.0(3)I7(1).
Description | Example Command for MO Creation | New DN | Old DN |
---|---|---|---|
The commvValue property was removed from the DN of the rtmap:SetExtCommCost MO. | set extcommunity cost {[igp | pre-bestpath] comm-id cost-value}+ |
sys/rpm/rtmap-[name]/ent-[order]/sextcommcost-[[commCrit]]-[commId] |
sys/rpm/rtmap-[name]/ent-[order]/sextcommcost-[[commCrit]]-[commId]-[commValue] |
Configuring a Route Map
HTTP POST
`http://<IP_Address>/api/node/mo/sys/rpm.json`
Configuring a Route Map
{
"rtmapRule": {
"attributes": {
"name": "testRtMap",
"status": "created"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap.json'
PAYLOAD: >
{
"rtmapEntry" : {
"attributes" : {
"order": "10",
"action":"1",
"descr":"world"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapMatchRegComm" : {
"attributes" : {
"criteria": "exact"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/mregcomm.json'
PAYLOAD: >
{
"rtmapRsRegCommAtt" : {
"attributes" : {
"tDn": "sys/rpm/rtregcom-[testRegComm1]"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/mregcomm.json'
PAYLOAD: >
{
"rtmapRsRegCommAtt" : {
"attributes" : {
"tDn": "sys/rpm/rtregcom-[testRegComm2]"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapMatchRtType" : {
"attributes" : {
"routeT": "external"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapMatchRtType" : {
"attributes" : {
"routeT": "local"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapMatchRtType" : {
"attributes" : {
"routeT": "isis-l2"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapMatchAsPathAccessList" : {
"attributes" : {
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/mrtacclist.json'
PAYLOAD: >
{
"rtmapRsRtAsPathAccAtt" : {
"attributes" : {
"tDn": "sys/rpm/accesslist-testAccList1"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/mrtacclist.json'
PAYLOAD: >
{
"rtmapRsRtAsPathAccAtt" : {
"attributes" : {
"tDn": "sys/rpm/accesslist-testAccList2"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapMatchRtDst" : {
"attributes" : {
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/mrtdst.json'
PAYLOAD: >
{
"rtmapRsRtDstAtt" : {
"attributes" : {
"tDn": "sys/rpm/pfxlistv4-testV4PfxList1"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/mrtdst.json'
PAYLOAD: >
{
"rtmapRsRtDstAtt" : {
"attributes" : {
"tDn": "sys/rpm/pfxlistv4-testV4PfxList2"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapMatchRtDstV6" : {
"attributes" : {
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/mrtdstv6.json'
DESCRIPTION: 'Route-Map Match IPv6 PfxList Entry 1'
PAYLOAD: >
{
"rtmapRsRtDstV6Att" : {
"attributes" : {
"tDn": "sys/rpm/pfxlistv6-testV6PfxList1"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/mrtdstv6.json'
PAYLOAD: >
{
"rtmapRsRtDstV6Att" : {
"attributes" : {
"tDn": "sys/rpm/pfxlistv6-testV6PfxList2"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapMatchRtTag" : {
"attributes" : {
"tag": "231"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapMatchRtTag" : {
"attributes" : {
"tag": "232"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapEntry" : {
"attributes" : {
"loadShareV4": "enabled"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapEntry" : {
"attributes" : {
"loadShareV6": "enabled"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/nhpa.json'
PAYLOAD: >
{
"rtmapSetNhPeerAddr" : {
"attributes" : {
"v4PeerAddr": "enabled"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/nhpa.json'
PAYLOAD: >
{
"rtmapSetNhPeerAddr" : {
"attributes" : {
"v4PeerAddr": "disabled"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapSetNh" : {
"attributes" : {
"addr": "10.10.10.10"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapSetNh" : {
"attributes" : {
"addr": "2000::4"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapSetPref" : {
"attributes" : {
"localPref": "200"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapSetOrigin" : {
"attributes" : {
"originT": "egp"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapSetRegComm" : {
"attributes" : {
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/sregcomm.json'
PAYLOAD: >
{
"rtregcomItem" : {
"attributes" : {
"community": "regular:as2-nn2:65530:50300"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/sregcomm.json'
PAYLOAD: >
{
"rtregcomItem" : {
"attributes" : {
"community": "regular:as2-nn2:65530:50800"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/sregcomm.json'
PAYLOAD: >
{
"rtregcomItem" : {
"attributes" : {
"community": "regular:as2-nn2:0:0"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/sregcomm.json'
PAYLOAD: >
{
"rtregcomItem" : {
"attributes" : {
"community": "regular:as2-nn2:65535:65283"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/sregcomm.json'
PAYLOAD: >
{
"rtregcomItem" : {
"attributes" : {
"community": "regular:as2-nn2:65535:65282"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10/sregcomm.json'
PAYLOAD: >
{
"rtregcomItem" : {
"attributes" : {
"community": "regular:as2-nn2:65535:65281"
}
}
}
HTTP_POST 'http://<ip>/api/node/mo/sys/rpm/rtmap-testRtMap/ent-10.json'
PAYLOAD: >
{
"rtmapSetCommList" : {
"attributes" : {
"delete": "enabled",
"name": "das"
}
}
}
{
"imdata": []
}
The example in this section uses an HTTP POST operation that executes a series of POSTs to enable a configuration that is equivalent to the CLIs listed below.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
route-map testRtMap permit 10
description world
match as-path testAccList1 testAccList2
match ip address prefix-list testV4PfxList1 testV4PfxList2
match ipv6 address prefix-list testV6PfxList1 testV6PfxList2
match tag 231 232
match community testRegComm1 testRegComm2 exact-match
match route-type external local level-2
set ip next-hop 10.10.10.10 load-share
set ipv6 next-hop 2000::4 load-share
set local-preference 200
set origin egp
set community internet 65530:50300 65530:50800 no-export no-advertise local-AS
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring STP
Cisco NX-OS supports spanning tree protocol. Users can configure the switch to run STP in either rapid-pvst mode or mst mode. In addition, users can config a port for the spanning tree.
This section contains payload examples to demonstrate how to use the NX-API REST API to configure STP on the Cisco Nexus 3000 and 9000 Series switches.
Configuring STP Settings
NX-API REST supports the following spanning-tree protocol (STP) settings:
spanning-tree mode <stp-mode> | no spanning-tree mode [<stp-mode>]
[no] spanning-tree mst simulate pvst global
[no] spanning-tree port type edge bpduguard default
[no] spanning-tree port type edge bpdufilter default
[no] spanning-tree port type edge edge default
[no] spanning-tree port type edge network default
[no] spanning-tree vlan <vlan-id>
[no] spanning-tree vlan <vlan-id> forward-time <seconds>
[no] spanning-tree vlan <vlan-id> hello-time <seconds>
[no] spanning-tree vlan <vlan-id> max-age <seconds>
[no] spanning-tree vlan <vlan-id> priority <prio>
spanning-tree port type <port-type> | no spanning-tree port [<port-type>]
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting STP Mode to MST
Setting STP Mode to MST
HTTP POST
http://<IP_Address>/api/mo/sys/stp/inst.json
{
"stpInst": {
"attributes": {
"mode": "mst"
}
}
}
Response
{
"imdata": []
}
This example sets STP mode to support Multiple Spanning Trees (MST):
When you issue an HTTP POST to configure STP, an stpInst object (/sys/stp/inst) is created in the MIT. Under this object, objects are created for each interface included in the spanning tree, and an stpMstEntity object (syst/stp/inst/mstent) is created, which holds the MST configuration.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting STP Mode to Rapid PVST
Setting STP Mode to Rapid PVST
HTTP POST
http://<IP_Address>/api/mo/sys/stp/inst.json
{
"stpInst": {
"attributes": {
"mode": "pvrst"
}
}
}
Response
{
"imdata": []
}
This example sets STP mode to support Rapid PVST.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Enabling or Disabling MST Spanning Tree Simulation
Enabling or Disabling MST Spanning Tree Simulation
HTTP POST
http://<IP_Address>/api/mo/sys/stp/inst/mstent.json
{
"stpMstEntity": {
"attributes": {
"simulate": "enabled"
}
}
}
Response
{
"imdata": []
}
This example enables MST spanning tree simulation. To disable MST Spanning Tree simulation, set the "simulate" value to "disabled."
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting the Spanning Tree Port Type to extchp-edge
Setting the Spanning Tree Port Type to extchp-edge
HTTP POST
http://<IP_Address>/api/mo/sys/stp/inst.json
{
"stpInst": {
"attributes": {
"ctrl": "extchp-edge"
}
}
}
{
"imdata": []
}
This example changes the spanning tree port type to 'extchp-edge'.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting the Spanning Tree Port Type to network
Setting the Spanning Tree Port Type to network
HTTP POST
http://<IP_Address>/api/mo/sys/stp/inst.json
{
"stpInst": {
"attributes": {
"ctrl": "network"
}
}
}
Response
{
"imdata": []
}
This example changes the spanning tree port type to 'network'.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Enabling Additional Settings for the Spanning Tree Port Type
HTTP POST
`http://<IP_Address>/api/mo/sys/stp/inst.json
This example sets the spanning tree port type to "extchp-bpdu-filter":
{
"stpInst": {
"attributes": {
"ctrl": "extchp-bpdu-filter"
}
}
}
This example sets the spanning tree port type to none (""):
{
"stpInst": {
"attributes": {
"ctrl": ""
}
}
}
Response
{
"imdata": []
}
You can provide additional settings for the "ctrl" object to enable additional settings for the spanning tree port type. For example, you can set the value to:
- "extchp-bpdu-guard"
- "extchp-bpdu-filter"
- "" - This specifies a port type of "none"
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Enabling or Disabling Spanning Tree Protocol on a VLAN
Enabling or Disabling Spanning Tree Protocol on a VLAN
HTTP POST
http://<IP_Address>/api/mo/sys/stp/inst/vlan-33.json
{
"stpVlan": {
"attributes": {
"adminSt": "enabled"
}
}
}
Response
{
"imdata": []
}
To enable STP, set the "adminSt" value to "enabled." To disable STP, set the "adminSt" value to "disabled".
This example enables STP on VLAN 33.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Setting an Interface Port Type
Setting an Interface Port Type
HTTP POST
http://<IP_Address>/api/mo/sys/stp/inst/if-[eth5/1].json
{
"stpIf": {
"attributes": {
"mode": "network"
}
}
}
Response
{
"imdata": []
}
This example sets the interface port type on the eth5/1 interface to 'network'.
By changing the value of the "mode" parameter, you can specify other interface port type values; for example:
- "edge"
- "normal"
- "default"
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring ACLs
This section contains payload examples to demonstrate how to use the NX-API REST API to configure ACL on the Cisco Nexus 3000 and 9000 Series switches.
ACL Configuration Examples
This section uses examples to demonstrate many of the ACL configuration options and to show how the REST APIs correspond to the CLI commands.
Configuring IPv4 and IPv6 Access Lists
Configuring IPv4 and IPv6 Access Lists
POST http://<mgmt0_IP>/api/node/mo/sys/acl.json
{
"aclEntity": {
"children": [
{
"ipv6aclAF": {
"children": [
{
"ipv6aclACL": {
"attributes": {
"name": "acl_ipv6"
}}}]}},{
"ipv4aclAF": {
"children": [
{
"ipv4aclACL": {
"attributes": {
"name": "acl_tcp"
}}}]}}]}}
Response
{
"imdata": []
}
Configuring IPv4 and IPv6 Access Lists
<System>
<acl-items>
<ipv6-items>
<name-items>
<ACL-list>
<name>acl_ipv6</name>
</ACL-list>
</name-items>
</ipv6-items>
<ipv4-items>
<name-items>
<ACL-list>
<name>acl_tcp</name>
</ACL-list>
</name-items>
</ipv4-items>
</acl-items>
</System>
Configures IPv4 and IPv6 access lists.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip access-list acl_tcp
ipv6 access-list acl_ipv6
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/media/dme/index.html
Configuring a MAC Access List
Configuring a MAC Access List
POST http://<mgmt0_IP>/api/mo/sys/acl/mac.json
{
"macaclAF": {
"children": [
{
"macaclACL": {
"attributes": {
"name": "ListName"
}}}]}}
Response
{
"imdata": []
}
Configuring a MAC Access List
<System>
<acl-items>
<mac-items>
<name-items>
<ACL-list>
<name>ListName</name>
</ACL-list>
</name-items>
</mac-items>
</acl-items>
</System>
Configurs a MAC access list.
Note: This example was added in Release 7.0(3)I6(1).
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
mac access-list ListName
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/media/dme/index.html
Applying Access Control to a List of VLANs
Applying Access Control to a List of VLANs
POST http://<mgmt0_IP>/api/mo/sys/acl/vlan-vacl1.json
{
"aclVLANACL": {
"attributes": {
"name": "vacl1"
},
"children": [
{
"aclVLANList": {
"attributes": {
"list": "1-10",
"operation": "apply"
}}}]}}
Response
{
"imdata": []
}
Applying Access Control to a List of VLANs
<System>
<acl-items>
<vlan-items>
<VLANACL-list>
<name>vacl1</name>
<vlanlist-items>
<list>1-10</list>
<operation>apply</operation>
</vlanlist-items>
</VLANACL-list>
</vlan-items>
</acl-items>
</System>
Applies access control to a list of VLANs.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
vlan filter vacl1 vlan-list 1-10
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/media/dme/index.html
Egress ACL Configuration Examples
This section uses examples to demonstrate many of the ACL configuration options and to show how the REST APIs correspond to the CLI commands.
Attaching an IPv4 ACL to an Interface in the Egress Direction
Attaching an IPv4 ACL to an Interface in the Egress Direction
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv6/policy/egress.json
{
"aclEgress": {
"children": [
{
"aclIf": {
"attributes": {
"name": "eth1/2"
},
"children": [
{
"aclInst": {
"attributes": {
"name": "bar"
}}}]}}]}}
Response
{
"imdata": []
}
Attaching an IPv4 ACL to an Interface in the Egress Direction
<System>
<acl-items>
<ipv4-items>
<policy-items>
<egress-items>
<intf-items>
<If-list>
<name>eth1/2</name>
<acl-items>
<name>bar</name>
</acl-items>
</If-list>
</intf-items>
</egress-items>
</policy-items>
</ipv4-items>
</acl-items>
</System>
Attaches an IPv4 ACL to an interface in the egress direction.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface eth1/2
ip access-group bar out
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/media/dme/index.html
Attaching an IPv6 ACL to an Interface in the Egress Direction
Attaching an IPv6 ACL to an Interface in the Egress Direction
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv6/policy/egress.json
{
"aclEgress": {
"children": [
{
"aclIf": {
"attributes": {
"name": "eth1/3"
},
"children": [
{
"aclInst": {
"attributes": {
"name": "bar6"
}}}]}}]}}
Response
{
"imdata": []
}
Attaching an IPv6 ACL to an Interface in the Egress Direction
<System>
<acl-items>
<ipv6-items>
<policy-items>
<egress-items>
<intf-items>
<If-list>
<name>eth1/3</name>
<acl-items>
<name>bar6</name>
</acl-items>
</If-list>
</intf-items>
</egress-items>
</policy-items>
</ipv6-items>
</acl-items>
</System>
Attaches and an IPv6 ACL to an interface in the egress direction.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface eth1/3
ipv6 traffic-filter bar6 out
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/media/dme/index.html
Ingress ACL Configuration Examples
This section uses examples to demonstrate many of the ACL configuration options and to show how the REST APIs correspond to the CLI commands.
Specifying IPv4 Access Control to an Interface in the Ingress Direction
Attaching an IPv4 Access List to an Interface in the Ingress Direction
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv4/policy/ingress.json
{
"aclIngress": {
"children": [
{
"aclIf": {
"attributes": {
"name": "eth1/1"
},
"children": [
{
"aclInst": {
"attributes": {
"name": "foo"
}}}]}}]}}
Response
{
"imdata": []
}
Attaching an IPv4 Access List to an Interface in the Ingress Direction
<System>
<acl-items>
<ipv4-items>
<policy-items>
<ingress-items>
<intf-items>
<If-list>
<name>eth1/1</name>
<acl-items>
<name>foo</name>
</acl-items>
</If-list>
</intf-items>
</ingress-items>
</policy-items>
</ipv4-items>
</acl-items>
</System>
Attaches an IPv6 ACL to an interface in the egress direction.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface eth1/1
ip access-group foo in
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/media/dme/index.html
Specifying IPv6 Access Control for Inbound Packets
Specifying IPv6 Access Control for Inbound Packets
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv4/policy/ingress.json
{
"aclIngress": {
"children": [
{
"aclVty": {
"children": [
{
"aclInst": {
"attributes": {
"name": "bar_vty"
}}}]}}]}}
Response
{
"imdata": []
}
Specifying IPv6 Access Control for Inbound Packets
<System>
<acl-items>
<ipv4-items>
<policy-items>
<ingress-items>
<vty-items>
<acl-items>
<name>bar_vty</name>
</acl-items>
</vty-items>
</ingress-items>
</policy-items>
</ipv4-items>
</acl-items>
</System>
Specifying IPv6 access control for inbound packets.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
line vty
ipv6 access-class bar_vty in
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/media/dme/index.html
ACE Configuration Examples
This section uses examples to demonstrate many of the ACL configuration options and to show how the REST APIs correspond to the CLI commands.
Adding ACE to an Existing IPv4 ACL (deny)
Adding ACE to an Existing IPv4 ACL (deny)
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv4.json
{
"ipv4aclAF": {
"children": [
{
"ipv4aclACL": {
"attributes": {
"name": "acl_tcp"
},
"children": [
{
"ipv4aclACE": {
"attributes": {
"action": "deny",
"dstPrefix": "13.235.46.97",
"dstPrefixLength": "9",
"protocol": "udp",
"seqNum": "2",
"srcPrefix": "12.234.56.97",
"srcPrefixLength": "13",
"userSetBit": "1"
}}}]}}]}}
Response
{
"imdata": []
}
Adding ACE to an Existing IPv4 ACL (deny)
<System>
<acl-items>
<ipv4-items>
<name-items>
<ACL-list>
<name>acl_tcp</name>
<seq-items>
<ACE-list>
<seqNum>2</seqNum>
<action>deny</action>
<dstPrefix>13.235.46.97</dstPrefix>
<dstPrefixLength>9</dstPrefixLength>
<protocol>udp</protocol>
<srcPrefix>12.234.56.97</srcPrefix>
<srcPrefixLength>13</srcPrefixLength>
<userSetBit>1</userSetBit>
</ACE-list>
</seq-items>
</ACL-list>
</name-items>
</ipv4-items>
</acl-items>
</System>
Adds ACE to an existing IPV4 ACL (configured to reject packets).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip access-list acl_tcp
2 deny udp 12.234.56.97/13 13.235.46.97/9
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/media/dme/index.html
Adding ACE to an Existing IPv6 ACL
Adding ACE to an Existing IPv6 ACL
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv6/name-L1.json
{
"ipv6aclACL": {
"attributes": {
"name": "L1"
},
"children": [
{
"ipv6aclACE": {
"attributes": {
"action": "deny",
"dstPrefix": "3::4",
"dstPrefixLength": "96",
"protocol": "tcp",
"seqNum": "32",
"srcPrefix": "1::2",
"srcPrefixLength": "127",
"userSetBit": "1"
}}}]}}
Response
{
"imdata": []
}
Adding ACE to an Existing IPv6 ACL
<System>
<acl-items>
<ipv6-items>
<name-items>
<ACL-list>
<name>foo</name>
<seq-items>
<ACE-list>
<seqNum>32</seqNum>
<action>deny</action>
<dstPrefix>3::4</dstPrefix>
<dstPrefixLength>96</dstPrefixLength>
<protocol>tcp</protocol>
<srcPrefix>1::2</srcPrefix>
<srcPrefixLength>127</srcPrefixLength>
<userSetBit>1</userSetBit>
</ACE-list>
</seq-items>
</ACL-list>
</name-items>
</ipv6-items>
</acl-items>
</System>
Adds ACE to an existing IPv6 ACL (configured to reject packets).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ipv6 access-list L1
32 deny tcp 1::2/127 3::4/96
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/media/dme/index.html
Adding ACE to an Existing IPv4 ACL (permit)
Adding ACE to an Existing IPv4 ACL (permit)
POST http://<mgmt0_IP>/api/sys/acl.json
{
"aclEntity": {
"children": [
{
"ipv4aclAF": {
"children": [
{
"ipv4aclACL": {
"attributes": {
"name": "ipv4_test_ace"
},
"children": [
{
"ipv4aclACE": {
"attributes": {
"action": "permit",
"dstPrefix": "6.6.6.6",
"dstPrefixLength": "4",
"protocol": "udp",
"seqNum": "2",
"srcPrefix": "5.5.5.5",
"srcPrefixLength": "4",
"vni": "15"
}}}]}}]}}]}}
Response
{
"imdata": []
}
Adding ACE to an Existing IPv4 ACL (permit)
<System>
<acl-items>
<ipv4-items>
<name-items>
<ACL-list>
<name>ipv4_test_ace</name>
<seq-items>
<ACE-list>
<seqNum>30</seqNum>
<action>permit</action>
<dstPrefix>0.0.0.0</dstPrefix>
<protocol>udp</protocol>
<srcPrefix>0.0.0.0</srcPrefix>
<userSetBit>1572865</userSetBit>
<vni>10</vni>
</ACE-list>
</seq-items>
</ACL-list>
</name-items>
</ipv4-items>
</acl-items>
</System>
Adds ACE to an existing IPv4 ACL (configured to forward packets).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip access-list ipv4_test_ace
2 permit udp 5.5.5.5/4 6.6.6.6/4
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/media/dme/index.html
Configuring ACE with a Log that Matches Against an Entry
Configuring ACE with a Log that Matches Against an Entry
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv4/name-L1.json
{
"ipv4aclACL": {
"attributes": {
"name": "L1"
},
"children": [
{
"ipv4aclACE": {
"attributes": {
"action": "permit",
"dstPrefix": "2.2.2.2",
"dstPrefixLength": "3",
"logging": "yes",
"protocol": "tcp",
"seqNum": "20",
"srcPrefix": "1.1.1.1",
"srcPrefixLength": "2",
}}}]}}
Response
{
"imdata": []
}
Configuring ACE with a Log that Matches Against an Entry
<System>
<acl-items>
<ipv4-items>
<name-items>
<ACL-list>
<name>ipv4_test_ace</name>
<seq-items>
<ACE-list>
<seqNum>20</seqNum>
<action>permit</action>
<dstPrefix>0.0.0.0</dstPrefix>
<logging>true</logging>
<protocol>tcp</protocol>
<srcPrefix>0.0.0.0</srcPrefix>
<userSetBit>1572865</userSetBit>
</ACE-list>
</seq-items>
</ACL-list>
</name-items>
</ipv4-items>
</acl-items>
</System>
Configures ACE with a log that matches against an entry.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip access-list L1
20 permit tcp 1.1.1.1/2 2.2.2.2/3 log
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/media/dme/index.html
Configuring ACE to Check Non-Initial Fragments
Configuring ACE to Check Non-Initial Fragments
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv4/name-L1.json
{
"ipv4aclACL": {
"attributes": {
"name": "L1"
},
"children": [
{
"ipv4aclACE": {
"attributes": {
"action": "permit",
"dstPrefix": "2.2.2.2",
"dstPrefixLength": "3",
"fragment": "yes",
"protocol": "tcp",
"seqNum": "20",
"srcPrefix": "1.1.1.1",
"srcPrefixLength": "2",
}}}]}}
Response
{
"imdata": []
}
Configuring ACE to Check Non-Initial Fragments
<System>
<acl-items>
<ipv6-items>
<name-items>
<ACL-list>
<name>ipv6_test_ace</name>
<seq-items>
<ACE-list>
<seqNum>20</seqNum>
<action>permit</action>
<dstPrefix>0::0</dstPrefix>
<fragment>true</fragment>
<protocol>ipv6</protocol>
<srcPrefix>0::0</srcPrefix>
<userSetBit>1572865</userSetBit>
</ACE-list>
</seq-items>
</ACL-list>
</name-items>
</ipv6-items>
</acl-items>
</System>
Configures ACE to check non-initial fragments
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ipv6 access-list L1
20 permit tcp 1.1.1.1/2 2.2.2.2/3 fragments
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/media/dme/index.html
Configuring ACE to Match Packets Based on the HTTP Method
Configuring ACE to Match Packets Based on the HTTP Method
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv4/name-L1.json
{
"ipv4aclACL": {
"attributes": {
"name": "L1"
},
"children": [
{
"ipv4aclACE": {
"attributes": {
"action": "permit",
"dstPrefix": "2.2.2.2",
"dstPrefixLength": "3",
"httpOption": "head",
"protocol": "tcp",
"seqNum": "20",
"srcPrefix": "1.1.1.1",
"srcPrefixLength": "2",
}}}]}}
Response
{
"imdata": []
}
Configuring ACE to Match Packets Based on the HTTP Method
<System>
<acl-items>
<ipv4-items>
<name-items>
<ACL-list>
<name>ipv4_test_ace</name>
<seq-items>
<ACE-list>
<seqNum>20</seqNum>
<action>permit</action>
<dstPrefix>0.0.0.0</dstPrefix>
<httpOption>head</httpOption>
<protocol>tcp</protocol>
<srcPrefix>0.0.0.0</srcPrefix>
<userSetBit>1572865</userSetBit>
</ACE-list>
</seq-items>
</ACL-list>
</name-items>
</ipv4-items>
</acl-items>
</System>
Configures ACE to match packets based on the HTTP method.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip access-list L1
20 permit tcp any any http-method head
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/media/dme/index.html
Configuring ACE to Make VLAN-Based Matches
Configuring ACE to Make VLAN-Based Matches
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv4/name-L1.json
{
"ipv4aclACL": {
"attributes": {
"name": "L1"
},
"children": [
{
"ipv4aclACE": {
"attributes": {
"action": "permit",
"dstPrefix": "2.2.2.2",
"dstPrefixLength": "3",
"protocol": "tcp",
"seqNum": "40",
"srcPrefix": "1.1.1.1",
"srcPrefixLength": "2",
"vlan": "5"
}}}]}}
Response
{
"imdata": []
}
Configuring ACE to Make VLAN-Based Matches
<System>
<acl-items>
<ipv4-items>
<name-items>
<ACL-list>
<name>ipv4_test_ace</name>
<seq-items>
<ACE-list>
<seqNum>40</seqNum>
<action>permit</action>
<dstPrefix>0.0.0.0</dstPrefix>
<protocol>ip</protocol>
<srcPrefix>0.0.0.0</srcPrefix>
<userSetBit>1572865</userSetBit>
<vlan>5</vlan>
</ACE-list>
</seq-items>
</ACL-list>
</name-items>
</ipv4-items>
</acl-items>
</System>
Configures ACE to make VLAN-based matches.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip access-list L1
40 permit ip any any vlan 5
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/media/dme/index.html
Configuring ACE to Specify the TCP Options Size
Configuring ACE to Specify the TCP Options Size
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv4/name-L1.json
{
"ipv4aclACL": {
"attributes": {
"name": "L1"
},
"children": [
{
"ipv4aclACE": {
"attributes": {
"action": "permit",
"dstPrefix": "2.2.2.2",
"dstPrefixLength": "3",
"protocol": "tcp",
"seqNum": "20",
"srcPrefix": "1.1.1.1",
"srcPrefixLength": "2",
"tcpOptionLength": "36",
}}}]}}
Response
{
"imdata": []
}
Configuring ACE to Specify the TCP Options Size
<System>
<acl-items>
<ipv4-items>
<name-items>
<ACL-list>
<name>ipv4_test_ace</name>
<seq-items>
<ACE-list>
<seqNum>20</seqNum>
<action>permit</action>
<dstPrefix>0.0.0.0</dstPrefix>
<protocol>tcp</protocol>
<srcPrefix>0.0.0.0</srcPrefix>
<tcpOptionLength>36</tcpOptionLength>
<userSetBit>1572865</userSetBit>
</ACE-list>
</seq-items>
</ACL-list>
</name-items>
</ipv4-items>
</acl-items>
</System>
Configures ACE to specify the TCP options size.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip access-list ipv4_test_ace
20 permit tcp any any tcp-option-length 36
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/media/dme/index.html
Configuring ACE with a User-Defined Field Match
Configuring ACE with a User-Defined Field Match
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv4.json
{
"ipv4aclAF": {
"children": [
{
"ipv4aclACL" : {
"attributes" : {
"name" : "ipv4_test_ace"
}
"children" : [{
"ipv4aclACE" : {
"attributes" : {
"seqNum": "10",
"action": "permit",
"protocol" : "ip",
"srcPrefix" : "1.1.1.1",
"srcPrefixLength" : "2",
"dstPrefix" : "2.2.2.2"
"dstPrefixLength" : "2"
}
"children" : [{
"ipv4aclUDF" : {
"attributes" : {
"udf1Name" : "name1",
"udf1Val" : "0x1",
"udf1Mask" : "0x2",
"udf2Name" : "name2",
"udf2Val" : "0xff",
"udf2Mask" : "0xee"
}}}]}}]}}]}}
Response
{
"imdata": []
}
Configuring ACE with a User-Defined Field Match
<System>
<acl-items>
<ipv4-items>
<name-items>
<ACL-list>
<name>test2</name>
<seq-items>
<ACE-list>
<seqNum>10</seqNum>
<action>permit</action>
<dstPrefix>2.2.2.2</dstPrefix>
<dstPrefixLength>2</dstPrefixLength>
<protocol>ip</protocol>
<srcPrefix>1.1.1.1</srcPrefix>
<srcPrefixLength>2</srcPrefixLength>
<userSetBit>1</userSetBit>
<udf-items>
<udf1Mask>2</udf1Mask>
<udf1Name>name1</udf1Name>
<udf1Val>1</udf1Val>
<udf2Mask>238</udf2Mask>
<udf2Name>name2</udf2Name>
<udf2Val>255</udf2Val>
</udf-items>
</ACE-list>
</seq-items>
</ACL-list>
</name-items>
</ipv4-items>
</acl-items>
</System>
Configurs ACE with a user-defined field match.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip access-list ipv4_test_ace
10 permit ip 1.1.1.1/2 2.2.2.2/2 udf name1 0x1 0x2 udf name2 0xff 0xee
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/media/dme/index.html
Configuring a Time Range
Applying a Time Range
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv4/name-L1.json
{
"ipv4aclACL": {
"attributes": {
"name": "L1"
},
"children": [
{
"ipv4aclACE": {
"attributes": {
"action": "permit",
"dstPrefix": "2.2.2.2",
"dstPrefixLength": "3",
"protocol": "ip",
"seqNum": "10",
"srcPrefix": "1.1.1.1",
"srcPrefixLength": "2",
"timeRange": "t1",
"userSetBit": "1"
}}}]}}
Response
{
"imdata": []
}
Configuring a Time Range
<System>
<acl-items>
<ipv4-items>
<name-items>
<ACL-list>
<name>foo</name>
<seq-items>
<ACE-list>
<seqNum>10</seqNum>
<action>permit</action>
<dstPrefix>0.0.0.0</dstPrefix>
<protocol>ip</protocol>
<srcPrefix>0.0.0.0</srcPrefix>
<timeRange>t1</timeRange>
<userSetBit>1572865</userSetBit>
</ACE-list>
</seq-items>
</ACL-list>
</name-items>
</ipv4-items>
</acl-items>
</System>
Configures a time range.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
ip access-list L1
10 permit ip 1.1.1.1/2 2.2.2.2/3 time-range t1
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/media/dme/index.html
ACL Action Command Examples
Clearing an IPv4 Access List
Clearing an IPv4 Access List
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv4.json
{
"ipv4aclAF": {
"children": [
{
"aclStatClear": {
"attributes": {
"name": "Count1"
}}}]}}
Response
{
"imdata": []
}
Clearing an IPv4 Access List
<System>
<acl-items>
<ipv4-items>
<statClear-items>
<name>Count1</name>
</statClear-items>
</ipv4-items>
</acl-items>
</System>
Clears an IPv4 access list.
Note: This example was added in Release 7.0(3)I6(1).
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
clear ip access-list counters Count1
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/media/dme/index.html
Clearing an IPv6 Access List
Clearing an IPv6 Access List
POST http://<mgmt0_IP>/api/mo/sys/acl/ipv6.json
{
"ipv6aclAF": {
"children": [
{
"aclStatClear": {
"attributes": {
"name": "Count2"
}}}]}}
Response
{
"imdata": []
}
Clearing an IPv6 Access List
<System>
<acl-items>
<ipv6-items>
<statClear-items>
<name>Count2</name>
</statClear-items>
</ipv6-items>
</acl-items>
</System>
Clears an IPv6 access list.
Note: This example was added in Release 7.0(3)I6(1).
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
clear ipv6 access-list counters Count2
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/media/dme/index.html
Configuring QoS
This section contains payload examples to demonstrate how to use the NX-API REST API to configure QoS on the Cisco Nexus 3000 and 9000 Series switches.
Setting up a QoS Instance
QoS is instantiated when a QoS class-map or policy is created.
QoS Class Maps
The following examples pertain specifically to QoS class maps.
Configuring or Modifying a Class Map
Configuring or Modifying a Class Map
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c.json
{
"ipqosCMapEntity": {
"children": [
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class1"
}}}]}}
Response
{
imdata:[]
}
Configuring or Modifying a Class Map
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class1</name>
<matchType>match-all</matchType>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
You can create or modify a class map then reference class maps in policy maps.
Note: You cannot create a queuing class map; you must use one of the system-defined queuing class maps.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map type qos class1
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/media/dme/index.html
Applying Descriptions to MQC Objects
Applying Descriptions to MQC Objects
POST http://<IP_Address>/api/mo/sys/ipqos/dflt.json
{
"ipqosEntity": {
"children": [
{
"ipqosDefaultQoS": {
"children": [
{
"ipqosCMapEntity": {
"children": [
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class1"
},
"children": [
{
"ipqosDescription": {
"attributes": {
"val": "This is a description of the class-map"
}}}]}}]}},
{
"ipqosPMapEntity": {
"children": [
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "pol1"
},
"children": [
{
"ipqosDescription": {
"attributes": {
"val": "This is a description of the policy-map"
}}}]}}]}}]}}]}}
Response
{
imdata:[]
}
Applying Descriptions to MQC Objects
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class1</name>
<matchType>match-all</matchType>
<Description-items>
<val>This is a description of the class-map</val>
</Description-items>
</CMapInst-list>
</name-items>
</c-items>
<p-items>
<name-items>
<PMapInst-list>
<name>pol1</name>
<matchType>match-all</matchType>
<Description-items>
<val>This is a description of the policy-map</val>
</Description-items>
</PMapInst-list>
</name-items>
</p-items>
</dflt-items>
</ipqos-items>
</System>
You can use the description command to add a description to a MQC object. The description can be up to 200 alphanumeric characters.
Note: You cannot modify the description of system-defined queuing class maps.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map type qos class1
description This is a description of the class-map
policy-map pol1
description This is a description of the policy-map
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/media/dme/index.html
Configuring a Policy Class
Configuring a Policy Class
POST http://<IP_Address>/api/mo/sys/ipqos/dflt.json
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "p1"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "class2",
"userSetBit": "1"
}}}]}}
Response
{
imdata:[]
}
Configuring a Policy Class
<System>
<ipqos-items>
<dflt-items>
<p-items>
<name-items>
<PMapInst-list>
<name>p1</name>
<matchType>match-all</matchType>
<cmap-items>
<MatchCMap-list>
<name>class2</name>
<userSetBit>1</userSetBit>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</dflt-items>
</ipqos-items>
</System>
This example creates a named object that represents a set of policies that are to be applied to a set of traffic classes and associates a class map with the policy map and enters the configuration mode for the specified system class.
Note: The associated class map must be the same type as the policy map type.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map type qos p1
class type qos class2
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/media/dme/index.html
Configuring ACL Classification
Configuring ACL Classification
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class1"
},
"children": [
{
"ipqosAcl": {
"attributes": {
"name": "foo"
}}}]}}
Response
{
imdata:[]
}
Configuring ACL Classification
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class1</name>
<matchType>match-all</matchType>
<acl-items>
<Acl-list>
<name>Access_Name</name>
</Acl-list>
</acl-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
You can classify traffic by matching packets based on existing ACLs. The permit and deny ACL keywords are ignored in the matching. QoS does not use the permit-deny functions of ACLs. You can classify by either IPv4, IPv6, or MAC address.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map type qos class1
match access-group foo
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/media/dme/index.html
Configuring CoS Classification
Configuring CoS Classification
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_cos.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_cos"
},
"children": [
{
"ipqosCos": {
"attributes": {
"val": "4"
}}}]}}
Response
{
imdata:[]
}
Configuring CoS Classification
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_cos</name>
<matchType>match-all</matchType>
<cos-items>
<Cos-list>
<val>4</val>
</Cos-list>
</cos-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
You can classify traffic based on the class of service (CoS) in the IEEE 802.1Q header. This 3-bit field is defined in IEEE 802.1p to support QoS traffic classes. CoS is encoded in the high order 3 bits of the VLAN ID Tag field and is referred to as user_priority.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_cos
match cos 4
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/media/dme/index.html
Configuring DSCP Classification
Configuring DSCP Classification
POST http://<IP_Address>/api/mo/sys/ipqos/dflt.json
{
"ipqosDefaultQoS": {
"children": [
{
"ipqosCMapEntity": {
"children": [
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_cos"
},
"children": [
{
"ipqosDscp": {
"attributes": {
"val": "af21"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Configuring DSCP Classification
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_cos</name>
<matchType>match-all</matchType>
<dscp-items>
<Dscp-list>
<val>af21</val>
</Dscp-list>
</dscp-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example configures the traffic class by matching packets based on dscp-values.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_cos
match dscp af21
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/media/dme/index.html
Configuring IP RTP Classification
Configuring IP RTP Classification
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_cos.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_cos"
},
"children": [
{
"ipqosIpRtp": {
"attributes": {
"range": "3000"
}}}]}}
Response
{
imdata:[]
}
Configuring IP RTP Classification
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_cos</name>
<matchType>match-all</matchType>
<ipRtp-items>
<range>3000</range>
</ipRtp-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
The IP Real-time Transport Protocol (RTP) is a transport protocol for real-time applications that transmit data such as audio or video and is defined by RFC 3550. Although RTP does not use a common TCP or UDP port, you typically configure RTP to use ports 16384 to 32767. UDP communications uses an even-numbered port and the next higher odd-numbered port is used for RTP Control Protocol (RTCP) communications.
You can configure classification based on UDP port ranges, which are likely to target applications using RTP.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_cos
match IP rtp 3000
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/media/dme/index.html
Matching an MPLS Experimental Label
Matching an MPLS Experimental Label
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosMPLSExperimental": {
"attributes": {
"val": "3"
}}}]}}
Response
{
imdata:[]
}
Matching an MPLS Experimental Label
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<mplsExperimental-items>
<MPLSExperimental-list>
<val>3</val>
</MPLSExperimental-list>
</mplsExperimental-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
The match mpls experimental topmost command classifies traffic on the basis of the EXP value in the topmost label header.
CLI Commands
These CLI commands and options are equivalent to the payload examples displayed in the pane on the right.
class-map class_c1
match mpls experimental topmost 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/media/dme/index.html
Negating CoS Matches
Negating CoS Matches
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosNotCos": {
"attributes": {
"val": "4"
}}}]}}
Response
{
imdata:[]
}
Negating CoS Matches
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<cosNot-items>
<NotCos-list>
<val>4</val>
</NotCos-list>
</cosNot-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example removes a specified class of service value as a match criteria.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match not cos 4
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/media/dme/index.html
Negating Packet Length Matches
Negating Packet Length Matches
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosNotPacketLength": {
"attributes": {
"range": "100"
}}}]}}
Response
{
imdata:[]
}
Negating Packet Length Matches
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<packetLengthNot-items>
<range>100</range>
</packetLengthNot-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example removes a specified Layer 3 packet length in bytes as a match criteria.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match not packet length 100
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/media/dme/index.html
Negating MPLS Experimental Label Matches
Negating MPLS Experimental Label Matches
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosNotMPLSExperimental": {
"attributes": {
"val": "3"
}}}]}}
Response
{
imdata:[]
}
Negating MPLS Experimental Label Matches
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_co1</name>
<matchType>match-all</matchType>
<mplsExperimentalNot-items>
<NotMPLSExperimental-list>
<val>3</val>
</NotMPLSExperimental-list>
</mplsExperimentalNot-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example removes specified MPLS experimental label values as a match criteria.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_co1
match not mpls experimental topmost 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/media/dme/index.html
Negating DSCP Matches
Negating DSCP Matches
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosNotDscp": {
"attributes": {
"val": "af21"
}}}]}}
Response
{
imdata:[]
}
Negating DSCP Matches
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<dscpNot-items>
<NotDscp-list>
<val>af21</val>
</NotDscp-list>
</dscpNot-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example removes specified DSCP values as a match criteria.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match not dscp af21
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/media/dme/index.html
Negating Precedence Matches
Negating Precedence Matches
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosNotPrecedence": {
"attributes": {
"val": "critical"
}}}]}}
Response
{
imdata:[]
}
Negating Precedence Matches
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<precedenceNot-items>
<NotPrecedence-list>
<val>critical</val>
</NotPrecedence-list>
</precedenceNot-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example removes a specified precedence value as a match criteria.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match not precedence critical
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/media/dme/index.html
Negating Protocol Matches
Negating Protocol Matches
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosNotProtocol": {
"attributes": {
"val": "arp"
}}}]}}
Response
{
imdata:[]
}
Negating Protocol Matches
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<protocolNot-items>
<NotProtocol-list>
<val>arp</val>
</NotProtocol-list>
</protocolNot-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example matches on protocols that do not match the specified protocol.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match not protocol arp
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/media/dme/index.html
Configuring Layer 3 Packet Length Classification
Configuring Layer 3 Packet Length Classification
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosPacketLength": {
"attributes": {
"range": "100"
}}}]}}
Response
{
imdata:[]
}
Configuring Layer 3 Packet Length Classification
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<packetLength-items>
<range>100</range>
</packetLength-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example configures the traffic class by matching packets based on various packet lengths (bytes). Values can range from 1 to 9198.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match packet length 100
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/media/dme/index.html
Configuring IP Precedence Marking
Configuring IP Precedence Marking
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/c/name-class_c1.json
{
"ipqosCMapInst": {
"attributes": {
"matchType": "match-all",
"name": "class_c1"
},
"children": [
{
"ipqosPrecedence": {
"attributes": {
"val": "critical"
}}}]}}
Response
{
imdata:[]
}
Configuring IP Precedence Marking
<System>
<ipqos-items>
<dflt-items>
<c-items>
<name-items>
<CMapInst-list>
<name>class_c1</name>
<matchType>match-all</matchType>
<precedence-items>
<Precedence-list>
<val>critical</val>
</Precedence-list>
</precedence-items>
</CMapInst-list>
</name-items>
</c-items>
</dflt-items>
</ipqos-items>
</System>
This example configures the traffic class by matching packets based on precedence-values.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
class-map class_c1
match precedence critical
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
Configuring Policy Maps
This section contains payload examples and CLIs to demonstrate many of the QoS policy map configuration options and to show how the REST APIs correspond to the CLI commands.
Defining a Policy Map
Defining a Policy Map
POST http://<mgmt0_IP>/api/mo/sys/ipqos/queuing/p.json
{
"ipqosPMapEntity": {
"children": [
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "foo"
}}}]}}
Response
{
imdata:[]
}
Defining a Policy Map
<System>
<ipqos-items>
<queuing-items>
<p-items>
<name-items>
<PMapInst-list>
<name>foo</name>
<matchType>match-all</matchType>
</PMapInst-list>
</name-items>
</p-items>
</queuing-items>
</ipqos-items>
</System>
This example creates a named object that represents a set of policies that are to be applied to a set of traffic classes.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map type queuing foo
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/media/dme/index.html
Configuring CoS Marking
Configuring CoS Marking
POST http://<mgmt0_IP>/api/mo/sys/ipqos/dflt/p/name-map1.json
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "map1"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "class1",
"userSetBit": "1"
},
"children": [
{
"ipqosSetCos": {
"attributes": {
"val": "1"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring CoS Marking
<System>
<ipqos-items>
<dflt-items>
<p-items>
<name-items>
<PMapInst-list>
<name>map1</name>
<matchType>match-all</matchType>
<cmap-items>
<MatchCMap-list>
<name>class1</name>
<userSetBit>1</userSetBit>
<setCos-items>
<val>1</val>
</setCos-items>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</dflt-items>
</ipqos-items>
</System>
This example sets the CoS value to cos-value. The value can range from 0 to 7.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map map1
class class1
set cos 1
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/media/dme/index.html
Setting the QoS Group
Setting the QoS Group
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/p/name-p1.json
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "p1"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "class-default",
"userSetBit": "1"
},
"children": [
{
"ipqosSetQoSGrp": {
"attributes": {
"id": "3"
}}}]}}]}}
Response
{
imdata:[]
}
Setting the QoS Group
<System>
<ipqos-items>
<dflt-items>
<p-items>
<name-items>
<PMapInst-list>
<name>p1</name>
<matchType>match-all</matchType>
<cmap-items>
<MatchCMap-list>
<name>class-default</name>
<userSetBit>1</userSetBit>
<setGrp-items>
<id>3</id>
</setGrp-items>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</dflt-items>
</ipqos-items>
</System>
This example configures one or more qos-group values to match on for classification of traffic into this class map.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map type qos p1
class class-default
set qos-group 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/media/dme/index.html
Disabling Dynamic Load Balancing
Disabling Dynamic Load Balancing
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/p/name-p1.json
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "p1"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "class1",
"userSetBit": "1"
},
"children": [
{
"ipqosSetDlbDisable": {
"attributes": {
"uid": "0"
}}}]}}]}}
Response
{
imdata:[]
}
Disabling Dynamic Load Balancing
<System>
<ipqos-items>
<dflt-items>
<p-items>
<name-items>
<PMapInst-list>
<name>p1</name>
<matchType>match-all</matchType>
<cmap-items>
<MatchCMap-list>
<name>class1</name>
<userSetBit>1</userSetBit>
<setDlbDisable-items>
<uid>0</uid>
</setDlbDisable-items>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</dflt-items>
</ipqos-items>
</System>
This example disables DLB.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map p1
class class1
set dlb-disable
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/media/dme/index.html
Configuring DSCP Marking
Configuring DSCP Marking
POST http://<IP_Address>/api/mo/sys/ipqos/dflt/p/name-p1.json
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "p1"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "class1",
"userSetBit": "1"
},
"children": [
{
"ipqosSetDscp": {
"attributes": {
"tunnel": "no",
"val": "cs6"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring DSCP Marking
<System>
<ipqos-items>
<dflt-items>
<p-items>
<name-items>
<PMapInst-list>
<name>p1</name>
<matchType>match-all</matchType>
<cmap-items>
<MatchCMap-list>
<name>class1</name>
<userSetBit>1</userSetBit>
<setDscp-items>
<tunnel>false</tunnel>
<val>cs6</val>
</setDscp-items>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</dflt-items>
</ipqos-items>
</System>
This example sets the DSCP value.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map p1
class class1
set dscp cs6
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/media/dme/index.html
Configuring Bandwidth
Configuring Bandwidthg
POST http://<mgmt0_IP>/api/mo/sys/ipqos/queuing/p/name-p1.json
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "p1"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "c-in-q1",
"userSetBit": "1"
},
"children": [
{
"ipqosSetBW": {
"attributes": {
"val": "40"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring Bandwidth
<System>
<ipqos-items>
<queuing-items>
<p-items>
<name-items>
<PMapInst-list>
<name>p1</name>
<matchType>match-all</matchType>
<cmap-items>
<MatchCMap-list>
<name>c-in-q1</name>
<userSetBit>1</userSetBit>
<setBW-items>
<val>40</val>
</setBW-items>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</queuing-items>
</ipqos-items>
</System>
This example assigns a minimum rate of the interface bandwidth to an output queue as the percentage of the underlying interface link rate. The range is from 0 to 100.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map type queuing p1
class type queuing c-in-q1
bandwidth percent 40
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/media/dme/index.html
Setting the MTU
Setting the MTU
POST http://<mgmt0_IP>/api/mo/sys/ipqos/nw/p/name-p1.json
{
"ipqosPMapInst": {
"attributes": {
"name": "p1"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "c-nq1",
"userSetBit": "1"
},
"children": [
{
"ipqosSetMTU": {
"attributes": {
"value": "2000"
}}}]}}]}}
Response
{
imdata:[]
}
Setting the MTU
<System>
<ipqos-items>
<nw-items>
<p-items>
<name-items>
<PMapInst-list>
<name>p1</name>
<cmap-items>
<MatchCMap-list>
<name>c-nq1</name>
<userSetBit>1</userSetBit>
<mtu-items>
<value>2000</value>
</mtu-items>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</nw-items>
</ipqos-items>
</System>
The example sets the MTU size.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map type network-qos p1
class type network-qos c-nq1
mtu 2000
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/media/dme/index.html
Configuring Pause to Network QoS Policy Class
Configuring Pause to Network QoS Policy Class
POST http://<IP_Address>/api/mo/sys/ipqos/nw/p/name-p2.json
{
"ipqosPMapInst": {
"attributes": {
"name": "p2"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "class3",
"userSetBit": "1"
},
"children": [
{
"ipqosPause": {
"attributes": {
"bufferSize": "50000",
"pauseThreshold": "40000",
"pfcCos0": "no",
"pfcCos1": "no",
"pfcCos2": "yes",
"pfcCos3": "no",
"pfcCos4": "no",
"pfcCos5": "no",
"pfcCos6": "no",
"pfcCos7": "no",
"resumeThreshold": "25000"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring Pause to Network QoS Policy Class
<System>
<ipqos-items>
<nw-items>
<p-items>
<name-items>
<PMapInst-list>
<name>p2</name>
<cmap-items>
<MatchCMap-list>
<name>class3</name>
<userSetBit>1</userSetBit>
<pause-items>
<bufferSize>50000</bufferSize>
<pauseThreshold>40000</pauseThreshold>
<pfcCos0>false</pfcCos0>
<pfcCos1>false</pfcCos1>
<pfcCos2>true</pfcCos2>
<pfcCos3>false</pfcCos3>
<pfcCos4>false</pfcCos4>
<pfcCos5>false</pfcCos5>
<pfcCos6>false</pfcCos6>
<pfcCos7>false</pfcCos7>
<resumeThreshold>25000</resumeThreshold>
</pause-items>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</nw-items>
</ipqos-items>
</System>
This example specifies the buffer threshold settings for pause and resume.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map type network-qos p2
class type network-qos class3
pause buffer-size 50000 pause-threshold 40000 resume-threshold 25000 pfc-cos 2
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/media/dme/index.html
Configuring Police to a Policy Class
Configuring Police to a Policy Class
POST http://<IP-Address>/api/mo/sys/ipqos/dflt/p/name-p1.json
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "p1"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "class2",
"userSetBit": "1"
},
"children": [
{
"ipqosPolice": {
"attributes": {
"bcRate": "200",
"bcUnit": "ms",
"beRate": "unspecified",
"beUnit": "unspecified",
"cirRate": "8000",
"cirUnit": "bps",
"conformAction": "unspecified",
"conformSetCosTransmit": "0",
"conformSetDscpTransmit": "default",
"conformSetPrecTransmit": "routine",
"conformSetQosGrpTransmit": "0",
"exceedAction": "unspecified",
"exceedSetCosTransmit": "0",
"exceedSetDscpTransmit": "default",
"exceedSetPrecTransmit": "routine",
"exceedSetQosGrpTransmit": "0",
"pirRate": "unspecified",
"pirUnit": "unspecified",
"violateAction": "unspecified",
"violateSetCosTransmit": "0",
"violateSetDscpTransmit": "default",
"violateSetPrecTransmit": "routine",
"violateSetQosGrpTransmit": "0"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring Police to a Policy Class
<System>
<ipqos-items>
<dflt-items>
<p-items>
<name-items>
<PMapInst-list>
<name>p1</name>
<matchType>match-all</matchType>
<cmap-items>
<MatchCMap-list>
<name>class2</name>
<userSetBit>1</userSetBit>
<police-items>
<bcRate>200</bcRate>
<bcUnit>ms</bcUnit>
<beRate>unspecified</beRate>
<beUnit>unspecified</beUnit>
<cirRate>8000</cirRate>
<cirUnit>bps</cirUnit>
<conformAction>unspecified</conformAction>
<conformSetCosTransmit>0</conformSetCosTransmit>
<conformSetDscpTransmit>default</conformSetDscpTransmit>
<conformSetPrecTransmit>routine</conformSetPrecTransmit>
<conformSetQosGrpTransmit>0</conformSetQosGrpTransmit>
<exceedAction>unspecified</exceedAction>
<exceedSetCosTransmit>0</exceedSetCosTransmit>
<exceedSetDscpTransmit>default</exceedSetDscpTransmit>
<exceedSetPrecTransmit>routine</exceedSetPrecTransmit>
<exceedSetQosGrpTransmit>0</exceedSetQosGrpTransmit>
<pirRate>unspecified</pirRate>
<pirUnit>unspecified</pirUnit>
<violateAction>unspecified</violateAction>
<violateSetCosTransmit>0</violateSetCosTransmit>
<violateSetDscpTransmit>default</violateSetDscpTransmit>
<violateSetPrecTransmit>routine</violateSetPrecTransmit>
<violateSetQosGrpTransmit>0</violateSetQosGrpTransmit>
</police-items>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</dflt-items>
</ipqos-items>
</System>
This example shows how to configure policing.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map type qos match-first p1
class type qos class2
police cir 8000 bc 200 ms
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/media/dme/index.html
Setting a Priority Level to a Queuing Policy Class
Setting a Priority Level to a Queuing Policy Class
POST http://<IP_Address>/api/mo/sys/ipqos/queuing/p/name-p1.json
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "p1"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "c-in-q1",
"userSetBit": "1"
},
"children": [
{
"ipqosQueueLimit": {
"attributes": {
"QueueLimitUnit": "none",
"QueueLimitVal": "2000",
"dynamic": "0"
}}}]}}]}}
Response
{
imdata:[]
}
Setting a Priority Level to a Queuing Policy Class
<System>
<ipqos-items>
<queuing-items>
<p-items>
<name-items>
<PMapInst-list>
<name>p1</name>
<matchType>match-all</matchType>
<cmap-items>
<MatchCMap-list>
<name>c-in-q1</name>
<userSetBit>1</userSetBit>
<QueueLimit-items>
<QueueLimitUnit>none</QueueLimitUnit>
<QueueLimitVal>2000</QueueLimitVal>
<dynamic>0</dynamic>
</QueueLimit-items>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</queuing-items>
</ipqos-items>
</System>
This example assigns a tail drop threshold based on the queue size in bytes, kilobytes, or megabytes or allows the queue’s threshold size to be determined dynamically depending on the number of free cells available. The device drops packets that exceed the specified threshold.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map type queuing p1
class type queuing c-in-q1
queue-limit 2000
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/media/dme/index.html
Configuring WRED on Egress Queues
Configuring WRED on Egress Queues
POST http://<IP_Address>/api/mo/sys/ipqos/queuing/p/name-p1.json
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "p1"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "c-out-q1",
"userSetBit": "1"
},
"children": [
{
"ipqosRandomDetect": {
"attributes": {
"capAverage": "no",
"dropAvail": "0",
"ecn": "no",
"maxThreshold": "0",
"maxThresholdUnit": "none",
"minThreshold": "0",
"minThresholdUnit": "none",
"weight": "0"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring WRED on Egress Queues
<System>
<ipqos-items>
<queuing-items>
<p-items>
<name-items>
<PMapInst-list>
<name>p1</name>
<matchType>match-all</matchType>
<cmap-items>
<MatchCMap-list>
<name>c-in-q1</name>
<userSetBit>1</userSetBit>
<RandDet-items>
<capAverage>false</capAverage>
<dropAvail>0</dropAvail>
<ecn>false</ecn>
<maxThreshold>0</maxThreshold>
<maxThresholdUnit>none</maxThresholdUnit>
<minThreshold>0</minThreshold>
<minThresholdUnit>none</minThresholdUnit>
<weight>0</weight>
</RandDet-items>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</queuing-items>
</ipqos-items>
</System>
This example configures WRED on the specified queuing class.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map type queuing p1
class type queuing c-in-q1
random-detect
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/media/dme/index.html
Configuring Traffic Shaping
Configuring Traffic Shaping
POST http://<IP_Address>/api/mo/sys/ipqos/queuing/p/name-p1.json
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "p1"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "c-in-q2",
"userSetBit": "1"
},
"children": [
{
"ipqosShape": {
"attributes": {
"max": "40000",
"maxRateUnit": "bps",
"min": "8000",
"minRateUnit": "bps"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring Traffic Shaping
<System>
<ipqos-items>
<queuing-items>
<p-items>
<name-items>
<PMapInst-list>
<name>p1</name>
<matchType>match-all</matchType>
<cmap-items>
<MatchCMap-list>
<name>c-in-q2</name>
<userSetBit>1</userSetBit>
<shape-items>
<max>40000</max>
<maxRateUnit>bps</maxRateUnit>
<min>8000</min>
<minRateUnit>bps</minRateUnit>
</shape-items>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</queuing-items>
</ipqos-items>
</System>
This example assigns a minimum and maximum bit rate on an output queue.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map type queuing p1
class type queuing c-in-q2
shape min 8000 bps max 40000
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/media/dme/index.html
Removing the Bandwidth Limit
Removing the Bandwidth Limit
POST http://<IP_Address>/api/mo/sys/ipqos/queuing/p/name-p1.json
{
"ipqosPMapInst": {
"attributes": {
"matchType": "match-all",
"name": "p1"
},
"children": [
{
"ipqosMatchCMap": {
"attributes": {
"name": "c-in-q2",
"userSetBit": "1"
},
"children": [
{
"ipqosSetBW": {
"attributes": {
"status": "deleted"
}}}]}}]}}
Response
{
imdata:[]
}
Removing the Bandwidth Limit
<System>
<ipqos-items>
<queuing-items>
<p-items>
<name-items>
<PMapInst-list>
<name>p1</name>
<matchType>match-all</matchType>
<cmap-items>
<MatchCMap-list>
<name>c-in-q2</name>
<userSetBit>1</userSetBit>
<setBW-items xc:operation="delete">
</setBW-items>
</MatchCMap-list>
</cmap-items>
</PMapInst-list>
</name-items>
</p-items>
</queuing-items>
</ipqos-items>
</System>
This example removes the bandwidth specification from this class.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
policy-map type queuing p1
class type queuing c-in-q2
no bandwidth percent 30
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/media/dme/index.html
QoS on an Interface (input)
QoS on an Interface (input)
POST http://<mgmt0_IP>/api/mo/sys/ipqos/dflt/policy/in/intf-[eth1/4].json
{
"ipqosIf": {
"attributes": {
"name": "eth1/4"
},
"children": [
{
"ipqosInst": {
"attributes": {
"name": "foo",
"stats": "yes"
}}}]}}
Response
{
imdata:[]
}
QoS on an Interface (input)
<System>
<ipqos-items>
<dflt-items>
<policy-items>
<in-items>
<intf-items>
<If-list>
<name>eth1/4</name>
<pmap-items>
<name>foo</name>
<stats>true</stats>
</pmap-items>
</If-list>
</intf-items>
</in-items>
</policy-items>
</dflt-items>
</ipqos-items>
</System>
This example adds the policy map to the input packets of an interface.
An instance of the interface for QoS must be initialized before configuring QoS. The interface can be any of the following types:
- ethernet - Ethernet IEEE 802.3z
- loopback - Loopback interface
- mgmt - Management interface
- port-channel - Port Channel interface
Note: Sub-interfaces and breakout ports for the above are also supported.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface eth1/4
service-policy type qos input foo
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/media/dme/index.html
QoS on an Interface (output)
QoS on an interface (output)
POST http://<mgmt0_IP>/api/mo/sys/ipqos/dflt/policy/out/intf-[eth1/4].json
{
"ipqosIf": {
"attributes": {
"name": "eth1/4"
},
"children": [
{
"ipqosInst": {
"attributes": {
"name": "foo",
"stats": "yes"
}}}]}}
Response
{
imdata:[]
}
QoS on an interface (output)
<System>
<ipqos-items>
<dflt-items>
<policy-items>
<out-items>
<intf-items>
<If-list>
<name>eth1/4</name>
<pmap-items>
<name>foo</name>
<stats>true</stats>
</pmap-items>
</If-list>
</intf-items>
</out-items>
</policy-items>
</dflt-items>
</ipqos-items>
</System>
This example adds the policy map to the output packets of an interface.
An instance of the interface for QoS must be initialized before configuring QoS. The interface can be any of the following types: - ethernet - Ethernet IEEE 802.3z - loopback - Loopback interface - mgmt - Management interface - port-channel - Port Channel interface
Note: Sub-interfaces and breakout ports for the above are also supported.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface eth 1/4
service-policy type qos output foo
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/media/dme/index.html
QoS on the System
QoS on the system (input)
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"ipqosEntity": {
"children": [
{
"ipqosQueuing": {
"children": [
{
"ipqosServPol": {
"children": [
{
"ipqosIngress": {
"children": [
{
"ipqosSystem": {
"attributes": {
"userSetBit": "0"
}}}]}},
{
"ipqosEgress": {
"children": [
{
"ipqosSystem": {
"attributes": {
"userSetBit": "0"
}}}]}}]}}]}},
{
"ipqosNwQoS": {
"children": [
{
"ipqosServPol": {
"children": [
{
"ipqosIngress": {
"children": [
{
"ipqosSystem": {
"attributes": {
"userSetBit": "0"
}}}]}},
{
"ipqosEgress": {
"children": [
{
"ipqosSystem": {
"attributes": {
"userSetBit": "0"
}}}]}}]}}]}},
{
"ipqosDefaultQoS": {
"children": [
{
"ipqosServPol": {
"children": [
{
"ipqosIngress": {
"children": [
{
"ipqosSystem": {
"children": [
{
"ipqosInst": {
"attributes": {
"name": "foo",
"stats": "yes"
}}}]}}]}}]}}]}}]}}]}}
Response
{
imdata:[]
}
QoS on the System (input)
<System>
<ipqos-items>
<queuing-items>
<policy-items>
<in-items>
<sys-items>
<userSetBit>0</userSetBit>
</sys-items>
</in-items>
<out-items>
<sys-items>
<userSetBit>0</userSetBit>
</sys-items>
</out-items>
</policy-items>
</queuing-items>
<nw-items>
<policy-items>
<in-items>
<sys-items>
<userSetBit>0</userSetBit>
</sys-items>
</in-items>
<out-items>
<sys-items>
<userSetBit>0</userSetBit>
</sys-items>
</out-items>
</policy-items>
</nw-items>
<dflt-items>
<policy-items>
<in-items>
<sys-items>
<pmap-items>
<name>foo</name>
<stats>true</stats>
</pmap-items>
</sys-items>
</in-items>
</policy-items>
</dflt-items>
</ipqos-items>
</System>
This example has all nw, queuing and dos policies being applied at the system level.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
system qos
service-policy type qos input foo
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/media/dme/index.html
Clearing Statistics
Clearing Statistics
POST http://<mgmt0_IP>/api/mo/sys/ipqos.json
{
"ipqosEntity": {
"children": [
{
"ipqosStatClear": {
"attributes": {
"direction": "ingress",
"ethernet": "0",
"pmapType": "qos",
"portChan": "0",
"vlan": "0"
}}}]}}
Response
{
imdata:[]
}
Clearing Statistics
<System>
<ipqos-items>
<statClear-items>
<direction>ingress</direction>
<ethernet>0</ethernet>
<pmapType>qos</pmapType>
<portChan>0</portChan>
<vlan>0</vlan>
</statClear-items>
</ipqos-items>
</System>
This example displays statistics and the configured policy maps on all interfaces or the specified interface or on a specified data direction or QoS type.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
clear qos statistics interface input type qos
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/media/dme/index.html
Configuring CoPP
Control Plane Policing (CoPP) allows a policy map to be applied to the control plane. The policy map is applied to all traffic entering the switch from a non-management port in order to prevent DoS attacks from impacting performance.
This section contains payload examples to demonstrate how to use the NX-API REST API to configure COPP on the Cisco Nexus 3000 and 9000 Series switches.
Creating a Class Map
Creating a Class Map
HTTP POST
http://<IP_Address>/api/node/mo/sys/copp.json
{
"coppEntity": {
"children": [
{
"coppClass": {
"attributes": {
"cName": "cmap1",
"flag": "no"
}
}
},
{
"coppClass": {
"attributes": {
"cName": "match-any",
"matchOption": "MatchAny"
}}}]}}
This example creates a class-map and a 'match-any' class.
Configuring a Class Map
Configuring a Class Map
HTTP POST
http://<IP_Address>/api/node/mo/sys/copp.json
{
"coppClass": {
"attributes": {
"cName": "cmap1",
"flag": "no"
},
"children": [
{
"coppMulticast": {
"attributes": {
"flag": "no",
"mcastOption": "rpf-failure"
}
}
},
{
"coppExeOptions": {
"attributes": {
"flag": "no",
"option": "mtu-failure"
}
}
},
{
"coppIp": {
"attributes": {
"flag": "no",
"options": "yes"
}
}
},
{
"coppIpv6Icmp": {
"attributes": {
"flag": "no",
"option": "unreachable"
}
}
},
{
"coppProtocol": {
"attributes": {
"flag": "no",
"type": "arp"
}
}
}
]
}
}
This example configures the class map.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
match protocol arp
match exception mtu-failure
match exception ip option
match exception ipv6 icmp unreachable
match exception multicast rpf-failure
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/media/dme/index.html
Creating a Policy Map
Creating a Policy Map
HTTP POST
http://<IP_Address>/api/node/mo/sys/copp/policy-[pmap1].json
{
"coppPolicy": {
"attributes": {
"flag": "no",
"name": "pmap1"
},
"children": [
{
"coppClassp": {
"attributes": {
"flag": "no",
"name": "cmap1"
},
"children": [
{
"coppLogging": {
"attributes": {
"levelRange": "2",
"threshold": "1345"
}
}
},
{
"coppSetCos": {
"attributes": {
"cosVal": "3",
"flag": "no"
}
}
},
{
"coppPolicerAction": {
"attributes": {
"burstC": "500",
"burstUnit": "packets",
"cirUnit": "pps",
"cirVal": "1345",
"conformAction": "transmit",
"flag": "no",
"violateAction": "drop"
}}}]}}]}}
This example creates a policy-map with class-map that sets the COS, has a logging action, and has a policing action.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
policy-map type control-plane pmap1
class cmap1
set cos 3
logging drop threshold 1345 level 2
police cir 1345 pps bc 500 packets conform transmit violate drop
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/media/dme/index.html
Deleting a Policy Map
HTTP DELETE
http://<IP_Address>/api/node/mo/sys/copp/policy-[pmap1].json
This example deletes a policy map.
Creating a Service Policy
Creating a Service Policy
HTTP POST
http://<IP_Address>/api/node/mo/sys/copp/service-[pmap1].json
{
"coppService": {
"attributes": {
"name": "pmap1"
}
}
}
HTTP POST
http://<IP_Address>/api/node/mo/sys/copp/service-[{service_policy_name}].json
This example creates a service policy.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Deleting a Service Policy
HTTP DELETE
http://<IP_Address>/api/node/mo/sys/copp/service-[pmap1].json
This example deletes a service policy.
Changing the Default CoPP Policy
Changing the Default CoPP Policy
HTTP POST
http://<IP_Address>/api/node/mo/sys/copp/profile.json
{
"coppProfile": {
"attributes": {
"prof": "moderate"
}
}
}
HTTP POST
http://<IP_Address>/api/node/mo/sys/copp/profile.json
This example applies a moderate default CoPP policy.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Applying a Scale Factor
Applying a Scale Factor
HTTP POST
http://<IP_Address>/api/node/mo/sys/copp/scale-[1].json
{
"coppScale": {
"attributes": {
"module": "1",
"scaleVal": "1.3"
}
}
}
This example applies a scale factor.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
HTTP POST
http://<IP_Address>/api/node/mo/sys/copp/scale-[{module}].json
Deleting a Scale Factor
HTTP DELETE
http://<IP_Address>/api/node/mo/sys/copp/scale-[1].json
This example deletes a scale factor.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring SNMP
This section contains payload examples to demonstrate how to use the NX-API REST API to configure SNMP on the Cisco Nexus 3000 and 9000 Series switches.
Configuring Local SNMP Users
Configuring Local SNMP Users
HTTP POST
http://<IP_Address>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpLocalUser": {
"attributes": {
"authpwd": "Cisco@123",
"authtype": "md5",
"isenforcepriv": "yes",
"islocalizedkey": "no",
"privpwd": "Cisco@123",
"privtype": "des",
"userName": "user1"
},
"children": [
{
"snmpUserGroup": {
"attributes": {
"groupName": "network-admin"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring Local SNMP Users
<System>
<snmp-items>
<inst-items>
<lclUser-items>
<LocalUser-list>
<userName>user1</userName>
<authpwd>Cisco@123</authpwd>
<authtype>md5</authtype>
<isenforcepriv>true</isenforcepriv>
<islocalizedkey>false</islocalizedkey>
<privpwd>Cisco@123</privpwd>
<privtype>des</privtype>
<group-items>
<UserGroup-list>
<groupName>network-admin</groupName>
</UserGroup-list>
</group-items>
</LocalUser-list>
</lclUser-items>
</inst-items>
</snmp-items>
</System>
Configures an SNMP user with authentication and privacy parameters.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right.
snmp-server user user1 auth md5 Cisco@123 priv Cisco@123 localizedkey
snmp-server user user1 enforcePriv
snmp-server user user1 network-admin
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/media/dme/index.html
Configuring Remote SNMP Users
Configuring Remote SNMP Users
HTTP POST
http://<IP_Address>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpRemoteUser": {
"attributes": {
"authpwd": "Cisco@123",
"authtype": "md5",
"islocalizedkey": "yes",
"privpwd": "Cisco@123",
"privtype": "des",
"userName": "user2",
"usrengineId": "1:2:3:4:5:6:7:8",
"usrengineIdlen": "15"
}}}]}}
Response
{
imdata:[]
}
Configuring Remote SNMP Users
<System>
<snmp-items>
<inst-items>
<rmtUser-items>
<RemoteUser-list>
<userName>user2</userName>
<usrengineId>1:2:3:4:5:6:7:8</usrengineId>
<authpwd>Cisco@123</authpwd>
<authtype>md5</authtype>
<islocalizedkey>true</islocalizedkey>
<privpwd>Cisco@123</privpwd>
<privtype>des</privtype>
<usrengineIdlen>15</usrengineIdlen>
</RemoteUser-list>
</rmtUser-items>
</inst-items>
</snmp-items>
</System>
Configures an SNMP user.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server user user2 auth md5 Cisco@123 priv Cisco@123 localizedkey engineID 1:2:3:4:5:6:7:8
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/media/dme/index.html
Creating SNMP Communities
You can create SNMP communities for SNMPv1 or SNMPv2c.
Setting SNMP Community Access Rights to Read Only
Setting SNMP Community Access Rights to Read Only
HTTP POST
http://<IP_Address>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpCommSecP": {
"attributes": {
"commAcess": "ro",
"grpName": "",
"name": "comm1"
}}}]}}
Response
{
imdata:[]
}
Setting SNMP Community Access Rights to Read Only
<System>
<snmp-items>
<inst-items>
<community-items>
<CommSecP-list>
<name>comm1</name>
<commAcess>ro</commAcess>
<grpName></grpName>
</CommSecP-list>
</community-items>
</inst-items>
</snmp-items>
</System>
Sets the access rights to read-only.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server community comm1 ro
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/media/dme/index.html
Setting SNMP Community Access Rights of the Specified Group
Setting SNMP Community Access Rights of the Specified Group
HTTP POST
http://<IP_Address>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpCommSecP": {
"attributes": {
"commAcess": "unspecified",
"grpName": "group1",
"name": "comm1"
}}}]}}
Response
{
imdata:[]
}
Setting SNMP Community Access Rights of the Specified Group
<System>
<snmp-items>
<inst-items>
<community-items>
<CommSecP-list>
<name>comm1</name>
<commAcess>unspecified</commAcess>
<grpName>group1</grpName>
</CommSecP-list>
</community-items>
</inst-items>
</snmp-items>
</System>
Uses the access rights of the specified group.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server community comm1 group group1
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/media/dme/index.html
Assigning an ACL to Filter SNMP Requests
Assigning an ACL to Filter SNMP Requests
HTTP POST
http://<IP_Address>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpCommSecP": {
"attributes": {
"name": "ComName1"
},
"children": [
{
"snmpAcl": {
"attributes": {
"useAclName": "",
"useIpv4AclName": "IPV4Name1",
"useIpv6AclName": "IPV6Name1"
}}}]}}]}}
Response
{
imdata:[]
}
Assigning an ACL to Filter SNMP Requests
<System>
<snmp-items>
<inst-items>
<community-items>
<CommSecP-list>
<name>ComName1</name>
<acl-items>
<useAclName>ACLName1</useAclName>
<useIpv4AclName>IPV4Name1</useIpv4AclName>
<useIpv6AclName>IPV6Name1</useIpv6AclName>
</acl-items>
</CommSecP-list>
</community-items>
</inst-items>
</snmp-items>
</System>
Assigns an ACL to filter SNMP requests.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server community ComName1 use-ipv4acl IPV4Name1 use-ipv6acl IPV6Name1
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/media/dme/index.html
Configuring a Source Interface for SNMP Notifications
You can configure SNMP to use the IP address of an interface as the source IP address for notifications. When a notification is generated, its source IP address is based on the IP address of this configured interface.
You can configure a source interface as follows:
- All notifications sent to all SNMP notification receivers.
- All notifications sent to a specific SNMP notification receiver. This configuration overrides the global source interface configuration.
Configuring a Source Interface for SNMP Notifications
HTTP POST
http://<IP_Address>/api/mo/sys/snmp/inst/globals.json
{
"snmpGlobals": {
"children": [
{
"snmpSourceInterfaceInforms": {
"attributes": {
"ifname": "eth1/1"
}}}]}}
Response
{
imdata:[]
}
Configuring a Source Interface for SNMP Notifications
<System>
<snmp-items>
<inst-items>
<globals-items>
<srcInterfaceInforms-items>
<ifname>eth1/1</ifname>
</srcInterfaceInforms-items>
</globals-items>
</inst-items>
</snmp-items>
</System>
Configures a source interface for sending out SNMPv2 informs.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server source-interface inform ethernet 1/1
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/media/dme/index.html
Configuring a Source Interface for Sending SNMPv2 Traps
Configuring a Source Interface for Sending SNMPv2 Traps
HTTP POST
http://<IP_Address>/api/mo/sys/snmp/inst/globals.json
{
"snmpGlobals": {
"children": [
{
"snmpSourceInterfaceTraps": {
"attributes": {
"ifname": "eth1/1"
}}}]}}
Response
{
imdata:[]
}
Configuring a Source Interface for Sending SNMPv2 Traps
<System>
<snmp-items>
<inst-items>
<globals-items>
<srcInterfaceTraps-items>
<ifname>eth1/1</ifname>
</srcInterfaceTraps-items>
</globals-items>
</inst-items>
</snmp-items>
</System>
Configures a source interface for sending out SNMPv2 informs.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server source-interface traps ethernet 1/1
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/media/dme/index.html
Configuring SNMP Global Settings
HTTP POST
http://<IP_Address>/api/mo/sys/snmp/inst/globals.json
{
"snmpGlobals": {
"attributes": {
"aaaUserCacheTimeout": "86400",
"counterCacheTimeout": "10",
"protocolEnable": "no",
"tcpSessionAuth": "no"
}
}
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring SNMP System Information
Configuring SNMP System Information
HTTP POST
http://<IP_Address>/api/mo/sys/snmp/inst.json
{
"snmpInst": {
"children": [
{
"snmpSysInfo": {
"attributes": {
"sysContact": "Admin",
"sysLocation": "Lab-7"
}}}]}}
Response
{
imdata:[]
}
Configuring SNMP System Information
<System>
<snmp-items>
<inst-items>
<sysinfo-items>
<sysContact>Admin</sysContact>
<sysLocation>Lab-7</sysLocation>
</sysinfo-items>
</inst-items>
</snmp-items>
</System>
Assigns the device contact information.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
snmp-server contact Admin
snmp-server location Lab-7
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/media/dme/index.html
Configuring RMON Events
Configuring RMON Events
HTTP POST
http://<IP_Address>/api/mo/sys/snmp/inst/rmon.json
{
"snmpRmon": {
"children": [
{
"snmpEvent": {
"attributes": {
"description": "",
"log": "no",
"num": "1",
"owner": "",
"trap": "trap1"
}}}]}}
Response
{
imdata:[]
}
Configuring RMON Events
<System>
<snmp-items>
<inst-items>
<rmon-items>
<event-items>
<Event-list>
<num>1</num>
<description></description>
<log>no</log>
<owner></owner>
<trap>trap1</trap>
</Event-list>
</event-items>
</rmon-items>
</inst-items>
</snmp-items>
</System>
Configures an RMON event. Ensure that you have configured an SNMP user and enabled SNMP notifications.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
rmon event 1 trap trap1
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/media/dme/index.html
Querying the Module Temperature Sensor Data (CISCO-ENTITY-SENSOR-MIB)
HTTP GET
http://<IP_Address>/api/mo/sys/ch/supslot-1/sup/sensor-1.json
Response
{
"eqptSensor": {
"attributes": {
"childAction": "",
"descr": "FRONT",
"dn": "sys/ch/supslot-1/sup/sensor-1",
"id": "1",
"majorThresh": "70",
"mfgTm": "not-applicable",
"minorThresh": "42",
"modTs": "2017-06-06T22:11:05.299+00:00",
"model": "FRONT",
"monPolDn": "",
"operSt": "normal",
"persistentOnReload": "false",
"rev": "n/a",
"ser": "n/a",
"status": "",
"tempValue": "25",
"type": "inlet",
"unit": "Celsius",
"vendor": "Cisco Systems"
}
}
}
Provides sensor data for environmental monitors such as temperature gauges.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
CLI Commands
The DME payload is the equivalent of the sensor name (descr
), MajorThresh (majorThresh
), MinorThres (minorThresh
), CurTemp (tempValue
), status (operSt
), and the temperature scale (unit
) given in the first row of the show environment temperature module module output table. Compare the payload with the CLI Output.
CLI Output Table
switch# show environment temperature module 1
Temperature:
--------------------------------------------------------------------
Module Sensor MajorThresh MinorThres CurTemp Status
(Celsius) (Celsius) (Celsius)
--------------------------------------------------------------------
1 FRONT 70 42 25 Ok
1 BACK 80 70 33 Ok
1 CPU 95 80 34 Ok
1 TH 105 90 50 Ok
1 VRM-1 110 100 50 Ok
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
SNMP Output
getmany -v2c 172.31.145.126 public entSensorValueTable entSensorThresholdTable | grep '\.38486 ='
entSensorType.38486 = celsius(8)
entSensorScale.38486 = units(9)
entSensorPrecision.38486 = 0
entSensorValue.38486 = 25
entSensorStatus.38486 = ok(1)
entSensorValueTimeStamp.38486 = 4 days, 02:11:34.11
entSensorValueUpdateRate.38486 = 60
~/bin$ getmany -v2c 172.31.145.126 public entSensorThresholdTable | grep '\.38486'
entSensorThresholdSeverity.38486.1 = minor(10)
entSensorThresholdSeverity.38486.2 = major(20)
entSensorThresholdRelation.38486.1 = greaterOrEqual(4)
entSensorThresholdRelation.38486.2 = greaterOrEqual(4)
entSensorThresholdValue.38486.1 = 42
entSensorThresholdValue.38486.2 = 70
entSensorThresholdEvaluation.38486.1 = false(2)
entSensorThresholdEvaluation.38486.2 = false(2)
entSensorThresholdNotificationEnable.38486.1 = true(1)
entSensorThresholdNotificationEnable.38486.2 = true(1)
Querying the Power Supply Data (ENTITY-MIB)
HTTP GET
http://<IP_Address>/api/mo/sys/ch/psuslot-1/psu.json
Response
{
"eqptPsu": {
"attributes": {
"almReg": "0",
"cap": "54.000000",
"childAction": "",
"descr": "NXA-PAC-650W-PI-1",
"dn": "sys/ch/psuslot-1/psu",
"drawnCurr": "0.422727",
"fanOpSt": "ok",
"hwVer": "V01",
"id": "1",
"mfgTm": "not-applicable",
"modTs": "2017-06-06T22:21:40.321+00:00",
"model": "NXA-PAC-650W-PI",
"monPolDn": "",
"operSt": "ok",
"persistentOnReload": "false",
"rev": "A0",
"ser": "LIT192818FC",
"status": "",
"vSrc": "220v",
"vendor": "Cisco Systems Inc",
"volt": "12.000000"
}
}
}
Provides system inventory power supply information.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
CLI Commands
The DME payload provides information on PID (model
), VID (hwVer
), and SN (ser
) numbers given in the show inventory power_supply output and provides the voltage (volt
), ampere input (drawnCurr
), and status (operSt
) given in the show environment power ampere output. Compare the payload with the CLI Output.
CLI Output
switch# show inventory power_supply
NAME: "Power Supply 1", DESCR: "Nexus3000 C3232C Chassis Power Supply"
PID: NXA-PAC-650W-PI , VID: V01 , SN: LIT192818FC
switch # show environment power ampere
Power Supply:
Voltage: 12 Volts
Power Actual Actual Total
Supply Model Output Input Capacity Status
(Ampere) (Ampere) (Ampere)
------- ------------------- ---------- ---------- ---------- --------------
1 NXA-PAC-650W-PI 6.58 A 0.42 A 54.16 A Ok
2 NXA-PAC-650W-PI 5.92 A 0.39 A 54.16 A Ok
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
SNMP Output
getmany -v2c 172.31.145.126 public entPhysicalTable | grep '\.470 ='
entPhysicalDescr.470 = NXA-PAC-650W-PI-1
entPhysicalVendorType.470 = cevPowerSupplyNXAPAC650WPI
entPhysicalContainedIn.470 = 278
entPhysicalClass.470 = powerSupply(6)
entPhysicalParentRelPos.470 = 1
entPhysicalName.470 = PowerSupply-1
entPhysicalHardwareRev.470 = V01
entPhysicalFirmwareRev.470 =
entPhysicalSoftwareRev.470 =
entPhysicalSerialNum.470 = LIT192818FC
entPhysicalMfgName.470 = Cisco Systems Inc
entPhysicalModelName.470 = NXA-PAC-650W-PI
entPhysicalAlias.470 =
entPhysicalAssetID.470 = 341-0728-01
entPhysicalIsFRU.470 = true(1)
Querying the Transceiver Data (ENTITY-MIB)
HTTP GET
http://<IP_Address>/api/mo/sys/intf/phys-[eth2/2]/phys/fcot.json
Response
{
"ethpmFcot": {
"attributes": {
"baseResvd1": "0",
"baseResvd2": "0",
"baseResvd3": "0",
"baseResvd4": "7,208,70",
"brIn100MHz": "103",
"brMaxMargin": "15",
"brMinMargin": "222",
"ccex": "162",
"ccid": "104",
"connectType": "12",
"dateCode": "49,50,48,50,49,50,32,32",
"description": "0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0",
"diagMonType": "10",
"distIn100mFor9u": "50",
"distIn10mFor50u": "30",
"distIn10mFor60u": "0",
"distIn1mForCu": "0",
"distInKmFor9u": "0",
"dn": "sys/intf/phys-[eth2/2]/phys/fcot",
"encoding": "5",
"enhOption": "0",
"extOption": "0,0",
"fCTxType": "1",
"fcotNum": "98",
"fcotStatus": "0",
"fcotType": "19",
"flags": "ok",
"gigEthCC": "0",
"guiCiscoEID": "unknown",
"guiCiscoPID": "",
"guiCiscoPN": "",
"guiName": "CISCO ",
"guiPN": "AFBR-79EIPZ-CS1 ",
"guiRev": "02Bh",
"guiSN": "AVP1606S381 ",
"isFcotPresent": "yes",
"maxSpeed": "5",
"minSpeed": "5",
"partNumber": "0,0,0,0,0,0,0,0,0,0,0",
"sff8472Compl": "0",
"state": "inserted",
"type": "qsfp",
"typeName": "",
"vendorData": "0,0,6,172,8,168,10,138,172,124,181,114,234,190,127,49,181,208,56,0,0,0,0,0,0,0,0,0,142,50,241,121",
"vendorId": "0,23,106",
"vendorName": "67,73,83,67,79,32,32,32,32,32,32,32,32,32,32,32",
"vendorPn": "65,70,66,82,45,55,57,69,73,80,90,45,67,83,49,32",
"vendorRev": "48,50,66,104",
"vendorSn": "65,86,80,49,54,48,54,83,51,56,49,32,32,32,32,32",
"versionId": "0,0,0,0,0",
"xcvrCode": "4,0,0,0,0,0,0,0",
"xcvrExtId": "16",
"xcvrId": "13"
}
}
}
Provides transceiver interface information.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
CLI Commands
The DME payload provides the slot and port numbers (dn: sys/intf/phys-{[id]}...
), interface name (guiName
), part number (guiPN
), serial number (guiSN
), link length (distIn10mFor50u
), and the Cisco extended ID number (xcvrExtId
) given in the show interface ethernet slot/port transceiver output. Compare the payload with the CLI Output.
CLI Output
switch# show interface e2/2 transceiver
Ethernet2/2
transceiver is present
type is QSFP-40G-SR4
name is CISCO
part number is AFBR-79EIPZ-CS1
revision is 02
serial number is AVP1606S381
nominal bitrate is 10300 MBit/sec per channel
Link length supported for 50/125um OM2 fiber is 30 m
Link length supported for 50/125um OM3 fiber is 100 m
cisco id is 13
cisco extended id number is 16
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
SNMP Output
entPhysicalName.49367 = Transceiver(slot:2-port:2)
...
entPhysicalSerialNum.49367 = AVP1606S381
...
entPhysicalAssetID.49367 = AFBR-79EIPZ-CS1
Querying the Transceiver Sensor Data (CISCO-ENTITY-SENSOR-MIB)
HTTP GET
http://<IP_Address>/api/mo/sys/intf/phys-[eth2/2]/phys/fcot/lane-1-sensor-2.json
Response
{
"eqptFcotSensor": {
"attributes": {
"description": "XCVR Lane-1 Sensor-2 Voltage Sensor",
"dn": "sys/intf/phys-[eth2/2]/phys/fcot/lane-1-sensor-2",
"highAlarm": "3.630000",
"highWarning": "3.465000",
"laneId": "1",
"laneType": "basic",
"lowAlarm": "2.970000",
"lowWarning": "3.100000",
"sensorId": "2",
"unit": "V",
"value": "3.403700"
}
}
},
Provides transceiver sensor information.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
CLI Commands
The DME payload provides the lane number and voltage (description
), curent measurement (value
), alarms (highAlarm
and lowAlarm
), warnings (highWarning
and lowWarning
), and the sensor unit (unit
) given in the show interface ethernet slot/port transceiver output. Compare the payload with the CLI Output.
CLI Output
switch# show interface e2/2 transceiver details
Ethernet2/2
transceiver is present
type is QSFP-40G-SR4
name is CISCO
part number is AFBR-79EIPZ-CS1
revision is 02
serial number is AVP1606S381
nominal bitrate is 10300 MBit/sec per channel
Link length supported for 50/125um OM2 fiber is 30 m
Link length supported for 50/125um OM3 fiber is 100 m
cisco id is 13
cisco extended id number is 16
Lane Number:1 Network Lane
SFP Detail Diagnostics Information (internal calibration)
----------------------------------------------------------------------------
Current Alarms Warnings
Measurement High Low High Low
----------------------------------------------------------------------------
Temperature 24.65 C 75.00 C -5.00 C 70.00 C 0.00 C
Voltage 3.40 V 3.63 V 2.97 V 3.46 V 3.09 V
Current N/A N/A N/A N/A N/A
Tx Power N/A N/A N/A N/A N/A
Rx Power N/A N/A N/A N/A N/A
Transmit Fault Count = 0
----------------------------------------------------------------------------
Note: ++ high-alarm; + high-warning; -- low-alarm; - low-warning
...
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
SNMP Output
ENTITY-MIB
entPhysicalName.300902883 = Ethernet2/2 Lane 1 Transceiver Voltage Sensor
CISCO-ENTITY-SENSOR-MIB
entSensorType.300902883 = voltsDC(4)
entSensorScale.300902883 = milli(8)
entSensorPrecision.300902883 = 0
entSensorValue.300902883 = 3403
entSensorStatus.300902883 = ok(1)
entSensorValueTimeStamp.300902883 = 96 days, 06:25:45.83
entSensorValueUpdateRate.300902883 = 180
…
entSensorThresholdSeverity.300902883.1 = major(20)
entSensorThresholdSeverity.300902883.2 = minor(10)
entSensorThresholdSeverity.300902883.3 = major(20)
entSensorThresholdSeverity.300902883.4 = minor(10)
entSensorThresholdRelation.300902883.1 = greaterThan(3)
entSensorThresholdRelation.300902883.2 = greaterThan(3)
entSensorThresholdRelation.300902883.3 = lessThan(1)
entSensorThresholdRelation.300902883.4 = lessThan(1)
entSensorThresholdValue.300902883.1 = 3630
entSensorThresholdValue.300902883.2 = 3465
entSensorThresholdValue.300902883.3 = 2970
entSensorThresholdValue.300902883.4 = 3100
Querying the Temperature Details for the Sensor (CISCO-ENTITY-SENSOR-MIB)
HTTP GET
http://<IP_Address>/api/mo/sys/intf/phys-[eth2/2]/phys/fcot/lane-1-sensor-1.json
Response
{
"totalCount": "1",
"imdata": [
{
"eqptFcotSensor": {
"attributes": {
"description": "XCVR Lane-1 Sensor-1 Temperature Sensor",
"dn": "sys/intf/phys-[eth2/2]/phys/fcot/lane-1-sensor-1",
"highAlarm": "75.000000",
"highWarning": "70.000000",
"laneId": "1",
"laneType": "basic",
"lowAlarm": "-5.000000",
"lowWarning": "0.000000",
"sensorId": "1",
"unit": "C",
"value": "25.058001"
}
}
}
]
}
Provides transceiver sensor information.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
CLI Commands
The DME payload provides the lane number and voltage (description
), current measurement (value
), alarms (highAlarm
and lowAlarm
), warnings (highWarning
and lowWarning
), and the sensor unit (unit
) given in the show interface ethernet slot/port transceiver output. Compare the payload with the CLI Output.
CLI Output
switch# show interface e2/2 transceiver details
Ethernet2/2
transceiver is present
type is QSFP-40G-SR4
name is CISCO
part number is AFBR-79EIPZ-CS1
revision is 02
serial number is AVP1606S381
nominal bitrate is 10300 MBit/sec per channel
Link length supported for 50/125um OM2 fiber is 30 m
Link length supported for 50/125um OM3 fiber is 100 m
cisco id is 13
cisco extended id number is 16
Lane Number:1 Network Lane
SFP Detail Diagnostics Information (internal calibration)
----------------------------------------------------------------------------
Current Alarms Warnings
Measurement High Low High Low
----------------------------------------------------------------------------
Temperature 24.65 C 75.00 C -5.00 C 70.00 C 0.00 C
Voltage 3.40 V 3.63 V 2.97 V 3.46 V 3.09 V
Current N/A N/A N/A N/A N/A
Tx Power N/A N/A N/A N/A N/A
Rx Power N/A N/A N/A N/A N/A
Transmit Fault Count = 0
----------------------------------------------------------------------------
Note: ++ high-alarm; + high-warning; -- low-alarm; - low-warning
...
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
SNMP Output
ENTITY-MIB
entPhysicalName.300902883 = Ethernet2/2 Lane 1 Transceiver Voltage Sensor
CISCO-ENTITY-SENSOR-MIB
entSensorType.300902883 = voltsDC(4)
entSensorScale.300902883 = milli(8)
entSensorPrecision.300902883 = 0
entSensorValue.300902883 = 3403
entSensorStatus.300902883 = ok(1)
entSensorValueTimeStamp.300902883 = 96 days, 06:25:45.83
entSensorValueUpdateRate.300902883 = 180
…
entSensorThresholdSeverity.300902883.1 = major(20)
entSensorThresholdSeverity.300902883.2 = minor(10)
entSensorThresholdSeverity.300902883.3 = major(20)
entSensorThresholdSeverity.300902883.4 = minor(10)
entSensorThresholdRelation.300902883.1 = greaterThan(3)
entSensorThresholdRelation.300902883.2 = greaterThan(3)
entSensorThresholdRelation.300902883.3 = lessThan(1)
entSensorThresholdRelation.300902883.4 = lessThan(1)
entSensorThresholdValue.300902883.1 = 3630
entSensorThresholdValue.300902883.2 = 3465
entSensorThresholdValue.300902883.3 = 2970
entSensorThresholdValue.300902883.4 = 3100
Configuring System Logging
This section contains payload examples to demonstrate how to use the NX-API REST API to configure system logging on the Cisco Nexus 3000 and 9000 Series switches.
Configuring Console logging
Configuring Console logging
HTTP POST
http://<IP_Address>/api/mo/sys/syslog/console.json
{
"syslogConsole": {
"attributes": {
"adminState": "enabled",
"severity": "critical"
}}}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configures console logging.
Configuring Module Logging
Configuring Module Logging
HTTP POST
http://<IP_Address>/api/mo/sys/syslog/inst.json
{
"syslogInst": {
"attributes": {
"modAdminState": "<state>",
"modSeverity": "<severity>"
}}}
Configures the linecard logging instance.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring the Log File
Configuring the Log File
HTTP POST
http://<IP_Address>/api/mo/sys/syslog/file.json
{
"syslogFile": {
"attributes": {
"adminState": "enabled",
"name": "<logFileName>",
"severity": "<severity>",
"size": "<size>"
}}}
Configures the log file.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring Monitor Logging
Configuring Monitor Logging
HTTP POST
http://<IP_Address>/api/mo/sys/syslog/monitor.json
{
"syslogTermMonitor": {
"attributes": {
"adminState": "<state>",
"severity": "<severity>"
}}}
Configures monitor logging.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring the Logging Timestamp
Configuring the Logging Timestamp
HTTP POST
http://<IP_Address>/api/mo/sys/syslog/timestamp.json
{
"syslogTimeStamp": {
"attributes": {
"format": "<granularity>"
}}}
Configures logging timestamp granularity.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring Interface Logging
Configuring Interface Logging
HTTP POST
http://<IP_Address>/api/mo/sys/syslog/source.json
{
"syslogSourceInterface": {
"attributes": {
"adminState": "<state>",
"ifName": "<interface><slot>/<port>"
}}}
Enables and configures logging on an interface.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring Logging Level
Enables and configures logging level on a system facility.
HTTP POST
http://<IP_Address>/api/mo/sys/syslog/level-<facility-name>.json
The json example below configures the logging level for AAA at "Alert" level.
{
"aaaUserEp": {
"children": [
{
"aaaAuthRealm": {
"attributes": {
"loggingLevel": "Alert"
}}}]}}
Enables and configures logging level on a system facility.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring Remote Logging Server
Configuring Remote Logging Server
HTTP POST
http://<IP_Address>/api/mo/sys/syslog.json
{
"syslogSyslog": {
"children": [
{
"syslogRemoteDest": {
"attributes": {
"forwardingFacility": "<facility>",
"host": "<hostname>",
"severity": "<severity>",
"vrfName": "<vrfName>"
}}}]}}
Configures remote logging on a server.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Clearing a Logfile
Clearing a Logfile
HTTP POST
http://<IP_Address>/api/mo/sys/action.json
{
"actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys/syslog]"
}
"children" : [{
"syslogFileClearLogfileLTask" : {
"attributes" : {
"adminSt" : "start",
"dn" : "sys/action/lsubj-[sys/syslog]/syslogFileClearLogfileLTask",
"freq": "one-shot"
}}}]}}
Clears the logfile.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring Telemetry
This section contains payload examples to demonstrate how to use the NX-API REST API to configure telemetry on the Cisco Nexus 3000 and 9000 Series switches.
Telemetry offers a push model of network monitoring that provides clients with a near-real-time stream of network data.
Enabling the Telemetry Feature
The following steps enable the telemetry feature.
Step 1: Use GET to Check that the NX-API is Enabled
Use GET to check that the NX-API is enabled.
HTTP GET
http://<IP_Address>/api/mo/sys/fm/nxapi.json
{
"fmNxapi": {
"attributes": {
...
"adminSt": "enabled"
...
}}}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Step 2: Enable the Telemetry Feature
Step 2: Enable the Telemetry Feature
HTTP POST
http://<IP_Address>/api/mo/sys/fm/telemetry.json
{
"fmTelemetry": {
"attributes": {
"adminSt": "enabled"
}}}
Response
{
imdata:[]
}
Step 2: Enable the Telemetry Feature
<System>
<fm-items>
<telemetry-items>
<adminSt>enabled</adminSt>
</telemetry-items>
</fm-items>
</System>
This example enables the streaming telemetry feature.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
feature telemetry
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/media/dme/index.html
Step 3: Enable Telemetry Configuration
Step 3: Enable Telemetry Configuration
HTTP POST
http://<IP_Address>/api/mo/sys/tm.json
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
}}}
Response
{
imdata:[]
}
Step 3: Enable Telemetry Configuration
<System>
<tm-items>
<adminSt>enabled</adminSt>
</tm-items>
</System>
Enters configuration mode for streaming telemetry.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
telemetry
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/media/dme/index.html
Configuring Sensor Groups
This section contains examples that demonstrate how to configure a sensor group.
Creating a Sensor Group
Creating a Sensor Group
HTTP POST
http://<IP_Address>/api/mo/sys/tm.json
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetrySensorGroup": {
"attributes": {
"id": "100"
}}}]}}
Response
{
imdata:[]
}
Creating a Sensor Group
<System>
<tm-items>
<adminSt>enabled</adminSt>
<sensor-items>
<SensorGroup-list>
<id>100</id>
</SensorGroup-list>
</sensor-items>
</tm-items>
</System>
Creates a sensor group and enters sensor group configuration mode.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
telemetry
sensor-group 100
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/media/dme/index.html
Adding a Sensor Group Path
Adding a Sensor Group Path
HTTP POST
http://<IP_Address>/api/mo/sys/tm.json
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetrySensorGroup": {
"attributes": {
"id": "100"
},
"children": [
{
"telemetrySensorPath": {
"attributes": {
"depth": "0",
"filterCondition": "",
"path": "sys/bgp",
"queryCondition": ""
}}}]}}]}}
Response
{
imdata:[]
}
Adding a Sensor Group Path
<System>
<tm-items>
<adminSt>enabled</adminSt>
<sensor-items>
<SensorGroup-list>
<id>100</id>
<path-items>
<SensorPath-list>
<path>sys/bgp</path>
<depth>0</depth>
<filterCondition></filterCondition>
<queryCondition></queryCondition>
</SensorPath-list>
</path-items>
</SensorGroup-list>
</sensor-items>
</tm-items>
</System>
Adds a sensor path to the sensor group. The depth setting specifies the retrieval level for the sensor path. A depth setting of 0, the only supported setting, retrieves only the root MO properties. The optional filter-condition parameter can be specified to create a specific filter for event-based subscriptions.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
telemetry
sensor-group 100
path sys/bgp depth 0
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/media/dme/index.html
Configuring Intended Data Depth in Streaming Telemetry
Configuring Intended Data Depth in Streaming Telemetry
HTTP POST
http://<IP_Address>/api/mo/sys/tm/sensor-10/path-[sys/bgp/inst/dom-default/af-ipv4-ucast].depth=3.json
{
"telemetryEntity": {
"attributes": {
},
"children": [
{
"telemetrySensorGroup": {
"attributes": {
"id": "10"
},
"children": [
{
"telemetrySensorPath": {
"attributes": {
"depth": "3",
"path": "sys/bgp/inst/dom-default/af-ipv4-ucast",
}}]}}}]}}
Response
{
imdata:[]
}
Configuring Intended Data Depth in Streaming Telemetry
<System>
<tm-items>
<adminSt>enabled</adminSt>
<sensor-items>
<SensorGroup-list>
<id>10</id>
<path-items>
<SensorPath-list>
<path>sys/bgp</path>
<depth>3</depth>
<filterCondition></filterCondition>
<queryCondition></queryCondition>
</SensorPath-list>
</path-items>
</SensorGroup-list>
</sensor-items>
</tm-items>
</System>
Note: This is an existing command with newly allowed depth values. Unbounded in Release 7.0.3.6(1), the value could only be 0 or 1. Beginning in Release 7.0.3.7(1), the value can be either from 0 up to 32 or the special value unbounded
. The command indicates the number of child levels to retrieve given a MO.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands and options are equivalent to the payload example displayed in the pane on the right.
telemetry
sensor-group 10
path sys/bgp depth 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/media/dme/index.html
Streaming Foreign Data from as Part of Streaming Telemetry
Streaming Foreign Data from as Part of Streaming Telemetry
HTTP POST
http://<IP_Address>/api/mo/sys/tm/sensor-[10]/path-[sys/bgp/inst/dom-default/af-ipv4-ucast].queryCondition=<rsp-foreign-subtree=ephemeral>.json
{
"telemetryEntity": {
"attributes": {
},
"children": [
{
"telemetrySensorGroup": {
"attributes": {
"id": "10"
},
"children": [
{
"telemetrySensorPath": {
"attributes": {
"path": "sys/bgp/inst/dom-default/af-ipv4-ucast",
"queryCondition": "rsp-foreign-subtree=ephemeral "
}}]}}}]}}
Response
{
imdata:[]
}
Streaming Foreign Data from as Part of Streaming Telemetry
<System>
<tm-items>
<adminSt>enabled</adminSt>
<sensor-items>
<SensorGroup-list>
<id>10</id>
<path-items>
<SensorPath-list>
<path>sys/bgp/inst/dom-default/af-ipv4-ucast</path>
<depth>3</depth>
<filterCondition></filterCondition>
<queryCondition>rsp-foreign-subtree=applied-config</queryCondition>
</SensorPath-list>
<SensorPath-list>
<path>sys/bgp/inst/dom-default/af-[l2vpn-evpn]</path>
<depth>1</depth>
<filterCondition></filterCondition>
<queryCondition>rsp-foreign-subtree=ephemeral</queryCondition>
</SensorPath-list>
</path-items>
</SensorGroup-list>
</sensor-items>
</tm-items>
</System>
The query-condition
option takes rsp-foreign-subtree=applied-config
and rsp-foreign-subtree=ephemeral
; it indicates whether to look up an applied configuration or an ephemeral MO.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands and options are equivalent to the payload example displayed in the pane on the right.
telemetry
sensor-group 10
path sys/bgp/inst/dom-default/af-ipv4-ucast depth 3 query-condition rsp-foreign-subtree=applied-config
path sys/bgp/inst/dom-default/af-[l2vpn-evpn] depth 1 query-condition rsp-foreign-subtree=ephemeral
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/media/dme/index.html
Configuring Destination Groups
The destination group specifies the destination address, port, encoding and transport that the router uses to send out telemetry data.
This section contains payload examples and CLIs to demonstrate many of the destination group configuration options and to show how the REST APIs correspond to the CLI commands.
Adding a Destination Group
Adding a Destination Group
HTTP POST
http://<IP_Address>/api/mo/sys/tm.json
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetryDestGroup": {
"attributes": {
"id": "100"
}}}]}}
Response
{
imdata:[]
}
Adding a Destination Group
<System>
<tm-items>
<adminSt>enabled</adminSt>
<dest-items>
<DestGroup-list>
<id>100</id>
</DestGroup-list>
</dest-items>
</tm-items>
</System>
Creates a destination group with ID destination_group_ID and enters destination group configuration mode. Currently only numeric ID values are supported.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
telemetry
destination-group 100
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/media/dme/index.html
Configuring the HTTP Protocol for a Destination Group
Configuring the HTTP Protocol for a Destination Group
POST http://<mgmt0_IP>/api/mo/sys/tm.json
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetryDestGroup": {
"attributes": {
"id": "100"
},
"children": [
{
"telemetryDest": {
"attributes": {
"addr": "1.2.3.4",
"enc": "JSON",
"port": "50008",
"proto": "HTTP"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the HTTP Protocol for a Destination Group
<System>
<tm-items>
<adminSt>enabled</adminSt>
<dest-items>
<DestGroup-list>
<id>100</id>
<addr-items>
<Dest-list>
<addr>1.2.3.4</addr>
<port>50008</port>
<enc>JSON</enc>
<proto>HTTP</proto>
</Dest-list>
</addr-items>
</DestGroup-list>
</dest-items>
</tm-items>
</System>
Configures the HTTP Protocol for a Destination Group
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
telemetry
destination-group 100
ip address 1.2.3.4 port 50008 protocol http encoding json
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/media/dme/index.html
Configuring the UDP Protocol for a Destination Group
Configuring the UDP Protocol for a Destination Group
POST http://<mgmt0_IP>/api/mo/sys/tm.json
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetryDestGroup": {
"attributes": {
"id": "100"
},
"children": [
{
"telemetryDest": {
"attributes": {
"addr": "1.2.3.4",
"enc": "JSON",
"port": "50008",
"proto": "UDP"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the UDP Protocol for a Destination Group
<System>
<tm-items>
<adminSt>enabled</adminSt>
<dest-items>
<DestGroup-list>
<id>100</id>
<addr-items>
<Dest-list>
<addr>1.2.3.4</addr>
<port>50008</port>
<enc>JSON</enc>
<proto>UDP</proto>
</Dest-list>
</addr-items>
</DestGroup-list>
</dest-items>
</tm-items>
</System>
Configures the UDP Protocol for a Destination Group
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
telemetry
destination-group 100
ip address 1.2.3.4 port 50008 protocol udp encoding json
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/media/dme/index.html
Creating a Destination Profile for Outgoing Data
Creating a Destination Profile for Outgoing Data
HTTP POST
http://<IP_Address>/api/mo/sys/tm.json
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetryDestGroup": {
"attributes": {
"id": "100"
},
"children": [
{
"telemetryDest": {
"attributes": {
"addr": "1.2.3.4",
"port": "50003"
}}}]}}]}}
Response
{
imdata:[]
}
Creating a Destination Profile for Outgoing Data
<System>
<tm-items>
<adminSt>enabled</adminSt>
<dest-items>
<DestGroup-list>
<id>100</id>
<addr-items>
<Dest-list>
<addr>1.2.3.4</addr>
<port>50003</port>
</Dest-list>
</addr-items>
</DestGroup-list>
</dest-items>
</tm-items>
</System>
Configures telemetry to send data to a destination IP address. You can specify transporting the data using the Google remote procedure call (gRPC) protocol, and to encode the data using Google Protocol Buffers (GPB) format.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
telemetry
destination-group 100
ip address 1.2.3.4 port 50003
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/media/dme/index.html
Configuring a Subscription
This section contains payload examples and CLIs to demonstrate many of the subscription configuration options and to show how the REST APIs correspond to the CLI commands.
Creating a Subscription Node
Creating a Subscription Node
HTTP POST
http://<IP_Address>/api/mo/sys/tm.json
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetrySubscription": {
"attributes": {
"id": "100"
}}}]}}
Response
{
imdata:[]
}
Creating a Subscription Node
<System>
<tm-items>
<adminSt>enabled</adminSt>
<subs-items>
<Subscription-list>
<id>100</id>
</Subscription-list>
</subs-items>
</tm-items>
</System>
Creates a subscription node with ID sub_id and enters the subscription configuration mode. Currently only numeric ID values are supported.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
telemetry
subscription 100
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/media/dme/index.html
Configuring a Subscription Sensor Group
Configuring a Subscription Sensor Group
HTTP POST
http://<IP_Address>/api/mo/sys/tm.json
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetrySubscription": {
"attributes": {
"id": "100"
},
"children": [
{
"telemetryRsSensorGroupRel": {
"attributes": {
"sampleIntvl": "15000",
"tDn": "sys/tm/sensor-100"
}}}]}}]}}
Response
{
imdata:[]
}
Creating a Subscription Node
<System>
<tm-items>
<adminSt>enabled</adminSt>
<subs-items>
<Subscription-list>
<id>100</id>
</Subscription-list>
</subs-items>
</tm-items>
</System>
Links the sensor group with ID sensor_group_ID to this subscription and also sets the data sampling interval in milliseconds. An interval value of 0 creates an event-based subscription, in which telemetry data is sent only upon changes under the specified MO. An interval value greater than 0 creates a frequency-based subscription, in which telemetry data is sent periodically at the specified interval. For example, an interval value of 15000 results in the sending of telemetry data every 15 seconds.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
telemetry
subscription 100
snsr-grp 100 sample-interval 1500
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/media/dme/index.html
Configuring a Subscription Destination Group
Configuring a Subscription Destination Group
HTTP POST
http://<IP_Address>/api/mo/sys/tm.json
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetrySubscription": {
"attributes": {
"id": "100"
},
"children": [
{
"telemetryRsDestGroupRel": {
"attributes": {
"tDn": "sys/tm/dest-100"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring a Subscription Destination Group
<System>
<tm-items>
<adminSt>enabled</adminSt>
<subs-items>
<Subscription-list>
<id>100</id>
<rsdestGroupRel-items>
<RsDestGroupRel-list>
<tDn>/System/tm-items/dest-items/DestGroup-list[id='100']</tDn>
</RsDestGroupRel-list>
</rsdestGroupRel-items>
</Subscription-list>
</subs-items>
</tm-items>
</System>
Links the destination group with ID destination_group_ID to this subscription.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
telemetry
subscription 100
sdst-grp 100
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/media/dme/index.html
Configuring a Subscription for Event Notification Without Filter Conditions
Configuring a Subscription for Event Notification Without Filter Conditions
HTTP POST
http://<IP_Address>/api/mo/tm.json
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetrySensorGroup": {
"attributes": {
"id": "10"
},
"children": [
{
"telemetrySensorPath": {
"attributes": {
"depth": "0",
"filterCondition": "",
"path": "sys/fm/bgp",
"queryCondition": ""
}}}]}}]}}
Response
{
imdata:[]
}
Configuring a Subscription for Event Notification Without Filter Conditions
<System>
<tm-items>
<adminSt>enabled</adminSt>
<sensor-items>
<SensorGroup-list>
<id>10</id>
<path-items>
<SensorPath-list>
<path>sys/fm/bgp</path>
<depth>0</depth>
<filterCondition></filterCondition>
<queryCondition></queryCondition>
</SensorPath-list>
</path-items>
</SensorGroup-list>
</sensor-items>
</tm-items>
</System>
The following example shows how to subscribe to notifications for when BGP is enabled or disabled using the path
attribute.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
telemetry
subscription 100
path sys/fm/bgp depth 0
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/media/dme/index.html
Configuring a Subscription for Event Notifications with Filter Conditions
Configuring a Subscription for Event Notifications with Filter Conditions
HTTP POST
http://<IP_Address>/api/mo/sys/tm.json
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetrySensorGroup": {
"attributes": {
"id": "10"
},
"children": [
{
"telemetrySensorPath": {
"attributes": {
"depth": "0",
"filterCondition": "eq(fmBgp.operSt,\\\"disabled\\\")",
"path": "sys/fm/bgp",
"queryCondition": ""
}}}]}}]}}
Response
{
imdata:[]
}
Configuring a Subscription for Event Notifications with Filter Conditions
<System>
<tm-items>
<adminSt>enabled</adminSt>
<sensor-items>
<SensorGroup-list>
<id>10</id>
<path-items>
<SensorPath-list>
<path>sys/fm/bgp</path>
<depth>0</depth>
<filterCondition>eq(fmBgp.operSt,\"disabled\")</filterCondition>
<queryCondition></queryCondition>
</SensorPath-list>
</path-items>
</SensorGroup-list>
</sensor-items>
</tm-items>
</System>
The following example will only generate notifications for BGP when BGP is disabled using the path
attribute. The DME provides the filter expressions for the filterCondition
attribute.
CLI Commands
The CLI commands and options are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
telemetry
subscription 100
path sys/fm/bgp depth 0 filter-condition eq(fmBgp.operSt,\"disabled\")
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/media/dme/index.html
Configuring Destination Profiles
This section contains payload examples and CLIs to demonstrate many of the destination profile configuration options and to show how the REST APIs correspond to the CLI commands.
Configuring the Destination VRF for a Destination Profile
Configuring the Destination VRF for a Destination Profile
POST http://<mgmt0_IP>/api/mo/sys/tm.json
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetryDestProfile": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetryDestOptVrf": {
"attributes": {
"name": "default"
}}}]}}]}}
Response
{
imdata:[]
}
Configuring the Destination VRF for a Destination Profile
<System>
<tm-items>
<adminSt>enabled</adminSt>
<destprof-items>
<adminSt>enabled</adminSt>
<vrf-items>
<name>default</name>
</vrf-items>
</destprof-items>
</tm-items>
</System>
Configures the destination VRF for a destination profile.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands are equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload. Click the YANG tab to view the XML payload.
telemetry
destination-profile
use-vrf default
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/media/dme/index.html
Enabling Gzip Compression for a Destination Profile
Enabling Gzip Compression for a Destination Profile
HTTP POST
http://<IP_Address>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetryDestProfile": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetryDestOptCompression": {
"attributes": {
"name": "gzip"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Enabling Gzip compression for a destination profile
<System>
<tm-items>
<adminSt>enabled</adminSt>
<destprof-items>
<adminSt>enabled</adminSt>
<compression-items>
<name>gzip</name>
</compression-items>
</destprof-items>
</tm-items>
</System>
Enables gzip compression.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands and options are equivalent to the payload example displayed in the pane on the right.
telemetry
destination-profile
use-compression gzip
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/media/dme/index.html
Disabling Gzip Compression for a Destination Profile
Disabling Gzip Compression for a Destination Profile
HTTP POST
http://<IP_Address>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"telemetryEntity": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetryDestProfile": {
"attributes": {
"adminSt": "enabled"
},
"children": [
{
"telemetryDestOptCompression": {
"attributes": {
"status": "deleted"
}}}]}}]}}]}}
Response
{
imdata:[]
}
Disabling Gzip Compression for a Destination Profile
<System>
<tm-items>
<adminSt>enabled</adminSt>
<destprof-items>
<adminSt>enabled</adminSt>
<compression-items xc:operation="delete">
</compression-items>
</destprof-items>
</tm-items>
</System>
Disables gzip compression.
Note: This example was added in Release 7.0(3)I7(1).
CLI Commands
The CLI commands and options are equivalent to the payload example displayed in the pane on the right.
telemetry
destination-profile
no use-compression gzip
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/media/dme/index.html
Configuring Object Tracking
This section contains payload examples to demonstrate how to use the NX-API REST API to configure object tracking on the Cisco Nexus 3000 and 9000 Series switches.
Object tracking monitors the status of an object (such as an interface, an IP route, an IP SLA, or a list of multiple objects) and sends any changes to interested clients.
Configuring a Tracked Object to Track an Ethernet Interface
Configuring a Tracked Object to Track an Ethernet Interface
HTTP POST
http://<IP_Address>/api/mo/sys/track/object-25.json
{
"trackIf": {
"attributes": {
"id": "eth1/1",
"protocolType": "line-protocol"
}
}
}
Creates and configures tracked object 25 to track Ethernet interface 1/1 with a line protocol.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Creating and Configuring a Tracked Object to for SLA Tracking
Creating and Configuring a Tracked Object to for SLA Tracking
HTTP POST
http://<IP_Address>/api/mo/sys/track.json
{
"trackEntity": {
"children": [
{
"trackObject": {
"attributes": {
"id": "5"
},
"children": [
{
"trackIpSla": {
"attributes": {
"probeId": "3",
"probeState": "state"
}}}]}}]}}
Creates and configures tracked object 5 for SLA tracking.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Creating and Configuring a Tracked List
Creating and Configuring a Tracked List
HTTP POST
http://<IP_Address>/api/mo/sys/track.json
{
"trackEntity": {
"children": [
{
"trackObject": {
"attributes": {
"id": "6"
},
"children": [
{
"trackList": {
"attributes": {
"type": "percentage"
"percentageUp": "30"
}}}]}}]}}
Creates and configures a tracked object with an ID of 6 list and a threshold up percentage of 30.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring UDLD
UDLD is configured at global config level and/or under each interfaces. It monitors a physical connection to detect unidirectional links to avoid spanning-tree topology loops or silent drop traffic.
You can configure normal unidirectional link detection (UDLD) modes for Ethernet interfaces on devices configured to run UDLD.
Before you can enable a UDLD mode for an interface, you must make sure that UDLD is already enabled on the device that includes the interface. UDLD must also be enabled on the other linked interface and its device.
This section contains payload examples to demonstrate how to use the NX-API REST API to configure UDLD on the Cisco Nexus 3000 and 9000 Series switches.
Enabling UDLD
Enabling UDLD
POST http://<IP_Address>/api/node/mo/sys/fm.json
{
"fmEntity": {
"children": [
{
"fmUdld": {
"attributes": {
"adminSt": "enabled"
}}}]}}
{
"imdata": []
}
Enabling UDLD
<System>
<fm-items>
<udld-items>
<adminSt>enabled</adminSt>
</udld-items>
</fm-items>
</System>
Enables UDLD for the device.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
feature udld
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/media/dme/index.html
Disabling UDLD
Disabling UDLD
POST http://<IP_Address>/api/node/mo/sys/fm.json
{
"fmEntity": {
"children": [
{
"fmUdld": {
"attributes": {
"adminSt": "disabled"
}}}]}}
{
"imdata": []
}
Disabling UDLD
<System>
<fm-items>
<udld-items>
<adminSt>enabled</adminSt>
</udld-items>
</fm-items>
</System>
Disables UDLD for the device.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
no feature udld
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/media/dme/index.html
Enabling UDLD Aggressive Mode at the Global Level
Enabling UDLD Aggressive Mode at the Global Level
POST http://<IP_Address>/api/mo/sys/udld/inst.json
{
"udldInst": {
"attributes": {
"aggressive": "enabled"
}
}
}
{
"imdata": []
}
Enabling UDLD Aggressive Mode at the Global Level
<System>
<udld-items>
<inst-items>
<aggressive>enabled</aggressive>
</inst-items>
</udld-items>
</System>
Enables UDLD aggressive mode at the global level.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
udld aggressive
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/media/dme/index.html
Specifying UDLD Aggressive
Specifying UDLD Aggressive
POST http://<IP_Address>/api/node/mo/sys/udld/inst.json
{
"udldInst": {
"attributes": {
"adminSt": "enabled",
"aggressive": "enabled",
"childAction": "",
"ctrl": "",
"dn": "sys/udld/inst",
"status": ""
}
}
}
{
"imdata": []
}
Enables UDLD in aggressive mode.
Note: For copper interfaces, you enter the interface command mode for those interfaces you want to configure for UDLD aggressive mode and issue this command in interface command model.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
udld aggressive
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/media/dme/index.html
No UDLD Aggressive
No UDLD Aggressive
POST http://<IP_Address>/api/node/mo/sys/udld/inst.json
{
"udldInst": {
"attributes": {
"adminSt": "enabled",
"aggressive": "disabled",
"childAction": "",
"ctrl": "",
"dn": "sys/udld/inst",
"status": ""
}
}
{
"imdata": []
}
Disables aggressive mode UDLD.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
no udld aggressive
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/media/dme/index.html
Enabling UDLD Aggressive at the Interface Level
Enabling UDLD Aggressive at the Interface Level
POST http://{{mgmt-ip}}/api/node/mo/sys/udld/inst.json
{
"udldInst": {
"children": [
{
"udldPhysIf": {
"attributes": {
"aggressive": "enabled",
"biDirDetect": "port-default",
"id": "eth1/8"
}}}]}}
{
"imdata": []
}
Enabling UDLD Aggressive at the Interface Level
<System>
<udld-items>
<inst-items>
<physif-items>
<PhysIf-list>
<id>eth1/8</id>
<aggressive>enabled</aggressive>
<biDirDetect>port-default</biDirDetect>
</PhysIf-list>
</physif-items>
</inst-items>
</udld-items>
</System>
Enables UDLD aggressive for an ethernet interface.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
interface ethernet1/8
udld aggressive
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/media/dme/index.html
Disabling UDLD at the Interface Level
Disabling UDLD at the Interface Level
POST http://{{mgmt-ip}}/api/node/mo/sys/udld/inst.json
{
"udldInst": {
"children": [
{
"udldPhysIf": {
"attributes": {
"aggressive": "disabled",
"id": "eth1/8"
}}}]}}
{
"imdata": []
}
Disabling UDLD Aggressive at the Interface Level
<System>
<udld-items>
<inst-items>
<physif-items>
<PhysIf-list>
<id>eth1/8</id>
<aggressive>disabled</aggressive>
</PhysIf-list>
</physif-items>
</inst-items>
</udld-items>
</System>
Disables UDLD aggressive for an interface.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
interface ethernet1/8
no udld aggressive
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/media/dme/index.html
Enabling UDLD on Copper Ports
Enabling UDLD on Copper Ports
POST
http://{{mgmt-ip}}/api/node/mo/sys/udld/inst.json
{
"udldInst": {
"children": [
{
"udldPhysIf": {
"attributes": {
"aggressive": "disabled",
"biDirDetect": "port-enabled",
"id": "eth1/8"
}}}]}}
{
"imdata": []
}
Enabling UDLD on Copper Ports
<System>
<udld-items>
<inst-items>
<physif-items>
<PhysIf-list>
<id>eth1/8</id>
<aggressive>disabled</aggressive>
<biDirDetect>port-enabled</biDirDetect>
</PhysIf-list>
</physif-items>
</inst-items>
</udld-items>
</System>
Enables UDLD on copper ports.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
uinterface ethernet1/8
udld enable
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/media/dme/index.html
Enabling UDLD on Fiber Ports
Enabling UDLD on Fiber Ports
POST http://{{mgmt-ip}}/api/node/mo/sys/udld/inst.json
{
"udldInst": {
"children": [
{
"udldPhysIf": {
"attributes": {
"biDirDetect": "port-enabled",
"id": "eth1/8"
}}}]}}
{
"imdata": []
}
Enabling UDLD on Fiber Ports
<System>
<udld-items>
<inst-items>
<physif-items>
<PhysIf-list>
<id>eth1/8</id>
<aggressive>disabled</aggressive>
<biDirDetect>port-enabled</biDirDetect>
</PhysIf-list>
</physif-items>
</inst-items>
</udld-items>
</System>
Enables UDLD on fiber ports.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
uinterface ethernet1/8
no udld enable
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/media/dme/index.html
Disabling UDLD on Fiber Port
Disabling UDLD on Fiber Ports
POST http://{{mgmt-ip}}/api/node/mo/sys/udld/inst.json
{
"udldInst": {
"children": [
{
"udldPhysIf": {
"attributes": {
"aggressive": "disabled",
"biDirDetect": "port-fiber-disabled",
"id": "eth1/8"
}}}]}
{
"imdata": []
}
Disabling UDLD on Fiber Ports
<System>
<udld-items>
<inst-items>
<physif-items>
<PhysIf-list>
<id>eth1/8</id>
<aggressive>disabled</aggressive>
<biDirDetect>port-fiber-disabled</biDirDetect>
</PhysIf-list>
</physif-items>
</inst-items>
</udld-items>
</System>
Disables UDLD on fiber ports.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
interface ethernet1/8
udld disable
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/media/dme/index.html
Enabling UDLD on Fiber Ports
Enabling UDLD on Fiber Ports
POST http://{{mgmt-ip}}/api/node/mo/sys/udld/inst.json
{
"udldInst": {
"children": [
{
"udldPhysIf": {
"attributes": {
"biDirDetect": "port-default",
"id": "eth1/8"
}}}]}}
{
"imdata": []
}
Enabling UDLD on Fiber Ports
<System>
<udld-items>
<inst-items>
<physif-items>
<PhysIf-list>
<id>eth1/8</id>
<biDirDetect>port-default</biDirDetect>
</PhysIf-list>
</physif-items>
</inst-items>
</udld-items>
</System>
Enables UDLD on fiber ports.
CLI Commands
The CLI commands and options listed below are the equivalent to the payload example displayed in the pane on the right.
interface ethernet1/8
no udld disable
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/media/dme/index.html
Configuring UDLD for any Interface
POST http://<IP_Address>/api/mo/sys/udld/inst.json
{
"udldInst": {
"children" : [{
"udldPhysIf" : {
"attributes" : {
"id" : "eth1/2"
"aggressive": "2"
"biDirDetect": "0"
}
}
}]
}
}
{
"imdata": []
}
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring Checkpoints and Rollback
The rollback feature allows you to take a snapshot, or user checkpoint, of the Cisco NX-OS configuration and then reapply that configuration to your device at any point without having to reload the device. A rollback allows any authorized administrator to apply this checkpoint configuration without requiring expert knowledge of the features configured in the checkpoint.
You can create a checkpoint copy of the current running configuration at any time. Cisco NX-OS saves this checkpoint as an ASCII file which you can use to roll back the running configuration to the checkpoint configuration at a future time. You can create multiple checkpoints to save different versions of your running configuration.
This section contains payload examples to demonstrate how to use the NX-API REST API to configure checkpoints and rollback on the Cisco Nexus 3000 and 9000 Series switches.
Triggering a checkpoint
Triggering a checkpoint
HTTP POST
http://<IP_Address>/api/mo/sys/action.json
{
"actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
},
"children": [
{
"topSystemCreateCheckpointLTask": {
"attributes": {
"adminSt": "start",
"name": "checkpt-20160930",
"description": "End of quarter before upgrade",
"filename": "",
"delete": "no",
"dn": "sys/action/lsubj-[sys]/topSystemCreateCheckpointLTask",
"freq": "one-shot"
}
}
}
]
}
}
This example creates a checkpoint with a name and description.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Triggering a checkpoint (with file name)
Triggering a checkpoint (with file name)
{
"actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
},
"children": [
{
"topSystemCreateCheckpointLTask": {
"attributes": {
"adminSt": "start",
"name": "",
"description": "",
"filename": "bootflash:ckp2",
"delete": "no",
"dn": "sys/action/lsubj-[sys]/topSystemCreateCheckpointLTask",
"freq": "one-shot"
}
}
}
]
}
}
Response
{
"imdata": []
}
This example creates a checkpoint with a file name.
No information is present in the immediate JSON response. To verify success or failure and to view reasons for a failure, query the response object described below.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
checkpoint {[<name>] [description <descr>] | file <file_uri>}
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/media/dme/index.html
Deleting a checkpoint
Deleting a checkpoint
HTTP POST
http://<IP_Address>/api/mo/sys/action/lsubj-[sys].json
{
"actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
},
"children": [
{
"topSystemCreateCheckpointLTask": {
"attributes": {
"adminSt": "start",
"name": "checkpt-20160930",
"description": "",
"filename": "",
"delete": "yes",
"dn": "sys/action/lsubj-[sys]/topSystemCreateCheckpointLTask",
"freq": "one-shot"
}
}
}
]
}
}
Response
{
"imdata": []
}
Deletes the checkpoint named "checkpt-20160930"
By including "delete": "yes" in the payload, this example deletes the checkpoint.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
no checkpoint {[<name>] [description <descr>] | file <file_uri>}
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/media/dme/index.html
Clearing groups of checkpoints
Clearing groups of checkpoints
HTTP POST
`http://<IP_Address>/api/mo/sys/action.json`
{
"actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
},
"children": [
{
"topSystemClearCheckpointDBLTask": {
"attributes": {
"adminSt": "start",
"mode": "all",
"dn": "sys/action/lsubj-[sys]/topSystemClearCheckpointDBLTask",
"freq": "one-shot"
}
}
}
]
}
}
Response
{
"imdata": []
}
Deletes the checkpoint named "checkpt-20160930"
This example clears all checkpoints in the system.
No information is present in the immediate JSON response. To verify success or failure and to view reasons for a failure, query the response object described below.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
clear checkpoint database [user|system]
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/media/dme/index.html
Triggering a rollback
Triggering a rollback
HTTP POST
`http://<IP_Address>/api/mo/sys/action.json`
{
"actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
},
"children": [
{
"topSystemRollbackLTask": {
"attributes": {
"adminSt": "start",
"name": "checkpt-20160930",
"uri": "",
"dn": "sys/action/lsubj-[sys]/topSystemRollbackLTask",
"freq": "one-shot"
}
}
}
]
}
}
This example rolls back to a checkpoint with a name.
Triggering a rollback (bootflash)
Triggering a rollback (bootflash)
{
"actionLSubj": {
"attributes": {
"dn": "sys/action/lsubj-[sys]"
},
"children": [
{
"topSystemRollbackLTask": {
"attributes": {
"adminSt": "start",
"name": "",
"uri": "bootflash:ckp2",
"dn": "sys/action/lsubj-[sys]/topSystemRollbackLTask",
"freq": "one-shot"
}
}
}
]
}
}
Response
{
"imdata": []
}
This example rolls back to a checkpoint file in bootflash.
No information is present in the immediate JSON response. To verify success or failure and to view reasons for a failure, query the response object described below.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
rollback running-config {checkpoint <checkpoint_name> | file <file_uri>} [best-effort | stop-at-first-failure | atomic] [verbose]
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/media/dme/index.html
Limitations on Configuring Checkpoints and Rollbacks with NX-API
- When sending a checkpoint payload, provide the complete attribute list. Any attribute that is not required should be sent empty.
- When posting a task for creating a checkpoint to a name, the “file” attribute must be empty in the payload.
- When posting a task for creating a checkpoint to a file, only the “file” attribute should contain text, except for the “delete” attribute, which must contain “no”. The remaining attributes must be empty.
- When deleting a checkpoint, the payload must contain only the “name” attribute with the checkpoint name to be deleted, except for the “delete” attribute, which must contain “yes”. The remaining attributes must be empty.
- A payload must be provided as described above for all tasks.
- A maximum of 10 user-triggered checkpoints can be created on the device. Any user command to create an additional checkpoint is ignored. To add a new checkpoint when the limit has been reached, you must first delete one of the existing checkpoints.
- You can modify the "description" attribute with a new checkpoint request whose payload contains the same “name” attribute. Because you cannot overwrite a previously saved checkpoint, only the description will be changed.
- You must allow 5 to 10 seconds between consecutive REST requests.
- You cannot start a checkpoint filename with the word system.
Configuring Hostname Loopback
This section contains payload examples to demonstrate how to use the NX-API REST API to configure hostname lookup on the Cisco Nexus 3000 and 9000 Series switches.
Configuring Loopback: sys/intf/lb-[lo30]
Payload to configure loopback: sys/intf/lb-[lo30]
{
"l3LbRtdIf" : {
"attributes" : {
"descr": "New Loopback"
}
}
}
{
"imdata": []
}
This example demonstrates the payload for configuring loopback
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring ARP
This section contains payload examples to demonstrate how to use the NX-API REST API to configure ARP on the Cisco Nexus 3000 and 9000 Series switches.
Configuring Global ARP Settings
Configuring Global ARP Settings
HTTP POST
http://<IP_Address>/api/node/mo/sys/arp/inst.json
{
"arpInst": {
"attributes": {
"allowStaticArpOutsideSubnet": "disabled",
"cacheLimit": "174080",
"offListTimeout": "180",
"rarpFabricFwding": "disabled",
"rarpFabricFwdingRate": "200",
"timeout": "1500"
}
}
}
This example configures global ARP settings.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring ARP Interface Settings
Configuring ARP Interface Settings
HTTP POST
http://<IP_Address>/api/mo/sys/arp/inst/dom-default/if-[eth1/2].json
{
"arpIf": {
"attributes": {
"gratuitousHsrpDup": "enabled",
"gratuitousRequest": "enabled",
"gratuitousUpdate": "enabled",
"localProxyArp": "disabled",
"proxyArp": "disabled",
"timeout": "1500"
}
}
}
This example configures ARP settings for an interface
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring Static Adjacency
Configuring Static Adjacency
HTTP POST
http://<IP_Address>/api/mo/sys/arp/inst/dom-default/if-[eth4/2]/sadj-[192.0.20.123].json
{
"arpStAdjEp": {
"attributes": {
"ip": "192.0.20.123",
"mac": "00:01:00:01:00:01"
}
}
}
This example configures a static adjacent endpoint.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring Glean Throttling
Configuring Glean Throttling
HTTP POST
http://<IP_Address>/api/mo/sys/arp/inst/ipgleanthrottle.json
{
"arpIpv4Throttle": {
"attributes": {
"adminSt": "enabled",
"maxPacket": "1000",
"syslog": "10000",
"timeout": "300"
}
}
}
When forwarding an incoming IP packet in a line card, if the ARP request for the next hop is not resolved, the line card forwards the packets to the supervisor. The supervisor resolves the MAC address for the next hop and programs the hardware. You can enable glean throttling rate limiters to protect the supervisor from the glean traffic.
This example configures glean throttling.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring ARP Event Logging
Configuring ARP Event Logging
HTTP POST
http://<IP_Address>/api/mo/sys/arp/inst/evtLogs-cli.json.json
{
"arpEventLogs": {
"attributes": {
"eventType": "cli",
"logSize": "large"
}
}
}
This example configures logging of ARP CLI events
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Configuring ARP Synchronize for VPC
HTTP POST
http://<IP_Address>/api/mo/sys/arp/inst/vpc.json
{
"arpVpc": {
"attributes": {
"arpSync": "enabled"
},
"children": [
{
"arpVpcDom": {
"attributes": {
"arpSync": "enabled"
}
}
}
]
}
}
Enabling IP ARP synchronization allows faster convergence of address tables between the VPC peers.
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
Querying ARP and Adjacency Statistics and Tables
Controller Statistics
Controller Statistics
HTTP POST
http://<IP_Address>/api/node/mo/sys/arp/inst/globalstats/controllerstats.json?rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20000
Response
{
"totalCount": "1",
"imdata": [
{
"arpControllerStats": {
"attributes": {
"adjAddCount": "0",
"adjAddErrorCount": "0",
"adjDelCount": "0",
"adjDelErrorCount": "0",
"childAction": "",
"dn": "sys/arp/inst/globalstats/controllerstats",
"modTs": "never",
"persistentOnReload": "false",
"status": ""
}
}
}
]
}
`GET http://<IP_Address>/api/node/mo/sys/arp/inst/globalstats/controllerstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20000`
This example queries for controller statistics.
VPC Statistics
GET http://<IP_Address>/api/node/mo/sys/arp/inst/globalstats/vpcstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20000
Tunnel Statistics
GET http://<IP_Address>/api/node/mo/sys/arp/inst/globalstats/tunnelstats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20000
Suppression Cache Information
GET http://<IP_Address>/api/node/mo/sys/arp/inst/globalstats/supcachestats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20000
Query for suppression cache statistics.
GET http://<IP_Address>/api/node/mo/sys/arp/inst/db-supcache/vlan-{id}.json
GET http://<IP_Address>/api/node/mo/sys/arp/inst/db-supcache/vlan-{id}/ip-{ip}.json
Query for suppression cache table information:
OpenFlow Statistics
GET http://<IP_Address>/api/node/mo/sys/arp/inst/globalstats/ofastats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20000
Interface Statistics
GET http://<IP_Address>/api/mo/sys/arp/inst/dom-{name}/if-[{id}].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20000
Adjacency Information
GET http://<IP_Address>/api/node/mo/sys/arp/inst/dom-{name}/db-ip/if-[{id}]/ip-[{ip}].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20000
Query for IPv4 adjacency information dynamically learned through ARP:
GET http://<IP_Address>/api/node/mo/sys/adjacency/inst/dom-{name}/db-{ip | ipv6}/if-[{id}]/ip-[{ip}]].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20000`
Query for complete adjacency table learned in the system:
Configuring NTP
This section contains payload examples to demonstrate how to use the NX-API REST API to configure NTP on the Cisco Nexus 3000 and 9000 Series switches.
Enabling and Disabling NTP
Enabling and Disabling NTP
POST http://<IP_Address>/api/node/mo/sys/fm/ntpd.json
{
"topSystem": {
"children": [
{
"fmEntity": {
"children": [
{
"fmNtpd": {
"attributes": {
"adminSt": "enabled"
}
}
}
]
}
}
]
}
}
This example enables the NTP feature
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
feature ntp
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
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
Configuring General NTP Settings
Configuring General NTP Settings
POST http://<IP_Address>/api/node/mo/sys/time.json
{
"datetimeClkPol": {
"attributes": {
"authSt": "enabled",
"logging": "enabled",
"loggingLevel": "critical",
"master": "disabled",
"masterStratum": "8"
}
}
}
This example enables NTP authentication and logging.
CLI Commands
The CLI commands and options listed below are used to create the payload example displayed in the pane on the right.
[no] ntp authenticate
[no] ntp authentication-key <number> md5 <md5-string> <0|7>
[no] ntp logging
[no] logging level ntp <level>
[no] ntp master <stratum>
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
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
Configuring NTP Access Restrictions
Configuring NTP Access Restrictions
POST http://<IP_Address>/api/node/mo/sys/time/accessgroup.json
{
"datetimeAccessGroup": {
"attributes": {
"serveOnly": "acl_5"
}
}
}
This example allows receiving only time requests from servers in the list 'acl_5.'
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
[no] ntp access-group {peer | serve | serve-only | query-only} <ACL-name>
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
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
Configuring NTP Authentication Key
Configuring NTP Authentication Key
POST http://<IP_Address>/api/node/mo/sys/time/auth-5.json
{
"datetimeNtpAuth": {
"attributes": {
"id": "5",
"isEncrypt": "no",
"key": "asdf1234xyz",
"trusted" : "yes"
}
}
}
This example configures a clear text trusted key as key number 5.
CLI Commands
The CLI commands and options listed below are used to create the payload example displayed in the pane on the right.
[no] ntp authentication-key <number> md5 <md5-string> <0|7>
[no] ntp trusted-key <number>
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
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
Configuring an NTP Server and Peer
Configuring an NTP Server and Peer
POST http://<IP_Address>/api/node/mo/sys/time/prov-NtpServer1.json
{
"datetimeNtpProvider": {
"attributes": {
"keyId": "5",
"maxPoll": "16",
"minPoll": "4",
"name": "NtpServer1",
"preferred": "yes",
"provT": "server",
"vrf": "management"
}
}
}
This example forms an association with an NTP server.
CLI Commands
The CLI commands and options listed below are used to create the payload example displayed in the pane on the right.
[no] ntp peer <ip-address|name> key <key-id> maxpoll <max-poll> minpoll <min-poll> prefer use-vrf <vrf-name>
[no] ntp server <ip-address|name> key <key-id> maxpoll <max-poll> minpoll <min-poll> prefer use-vrf <vrf-name>
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
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
Configuring the NTP Source IP Address
Configuring the NTP Source IP Address
POST http://<IP_Address>/api/node/mo/sys/time/srcIp.json
{
"datetimeNtpSrcIp": {
"attributes": {
"srcIp": "192.0.20.123",
"srcIpv6": "0::0"
}
}
}
This example sets the NTP source IP address to 192.0.20.123.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
[no] ntp source <ip-address|ipv6-address>
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/media/dme/index.html
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
Configuring the NTP Source Interface
Configuring the NTP Source Interface
POST http://<IP_Address>/api/node/mo/sys/time/srcIf.json
{
"datetimeNtpSrcIf": {
"attributes": {
"srcIf": "eth1/5"
}
}
}
This example sets the NTP source interface to Ethernet port 1/5.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
[no] ntp source-interface <interface>
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
Configuring NFM
This section contains payload examples to demonstrate how to use the NX-API REST API to configure Network Fabric Manager (NFM) on on the Cisco Nexus 3000 and 9000 Series switches.
TCAM
Ternary content-addressable memory (TCAM) is a type of high-speed memory that can be entirely searched in a single clock cycle. The term “ternary” refers to the memory's ability to store and query data using three different inputs: 0, 1 and X.
The TCAM stores access control-lists (ACLs) which are ordered sets of rules that you can use to filter your network traffic. Each rule specifies a set of conditions that a packet must satisfy to match the rule. When the device determines that an ACL applies to a packet, it tests the packet against the conditions of all rules. The first matching rule determines whether the packet is permitted or denied. If there is no match, the device applies the applicable implicit rule. The device continues processing packets that are permitted and drops packets that are denied. The egress TCAM size is 1K, divided into four 256 entries.
TCAM space is limited. The choice for what is best for your implementation depends on the specific use.
By default, all TCAM space is already allocated, so you need to decide where you want to 'steal' TCAM space from in order to allocate elsewhere.
Configuring ACL TCAM Region with e-racl TCAM Carving
Configuring ACL TCAM Region with e-racl TCAM Carving
POST http://<mgmt0_IP>/api/mo/sys/pltfm.json
{
"platformEntity": {
"children": [
{
"platformTcamRegion": {
"attributes": {
"eRaclSize": "256"
}}}]}}
Response
{
imdata:[]
}
Configuring ACL TCAM Region with e-racl TCAM Carving
<System>
<pltfm-items>
<tcamRegion-items>
<eRaclSize>256</eRaclSize>
</tcamRegion-items>
</pltfm-items>
</System>
Configures the size of the IPv4 egress router ACL (ERACL) TCAM region.
Note: This example was added in Release 7.03I61.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
hardware access-list tcam region e-racl 256
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/media/dme/index.html
Configuring ACL TCAM Region with vpc-convergence TCAM Carving
Configuring ACL TCAM Region with vpc-convergence TCAM Carving
POST http://<mgmt0_IP>/api/mo/sys/pltfm.json
{
"platformEntity": {
"children": [
{
"platformTcamRegion": {
"attributes": {
"vpcConvergenceSize": "0"
}}}]}}
Response
{
imdata:[]
}
Configuring ACL TCAM Region with vpc-convergence TCAM Carving
<System>
<pltfm-items>
<tcamRegion-items>
<vpcConvergenceSize>0</vpcConvergenceSize>
</tcamRegion-items>
</pltfm-items>
</System>
Configures the size of the vPC convergence TCAM region.
Note: This example was added in Release 7.03I61.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
hardware access-list tcam region vpc-convergence 0
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/media/dme/index.html
Configuring ACL TCAM Region with racl-lite TCAM Carving
Configuring ACL TCAM Region with racl-lite TCAM Carving
POST http://<mgmt0_IP>/api/node/mo/sys/pltfm/tcamRegion.json
{
"platformEntity": {
"children": [
{
"platformTcamRegion": {
"attributes": {
"ifaclLiteSize": "256"
}}}]}}
Response
{
imdata:[]
}
Configuring ACL TCAM Region with racl-lite TCAM Carving
<System>
<pltfm-items>
<tcamRegion-items>
<eRaclSize>256</eRaclSize>
</tcamRegion-items>
</pltfm-items>
</System>
Configures the size of the IPv4 RACL lite TCAM region.
Note: This example was added in Release 7.03I61.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
hardware access-list tcam region racl-lite 256
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/media/dme/index.html
Configuring ACL TCAM Region with ipv6-ifacl TCAM Carving
Configuring ACL TCAM Region with ipv6-ifacl TCAM Carving
POST http://<mgmt0_IP>/api/mo/sys/pltfm.json
{
"platformEntity": {
"children": [
{
"platformTcamRegion": {
"attributes": {
"ipv6IfaclSize": "256"
}}}]}}
Response
{
imdata:[]
}
Configuring ACL TCAM Region with ipv6-ifacl TCAM Carving
<System>
<pltfm-items>
<tcamRegion-items>
<ipv6IfaclSize>256</ipv6IfaclSize>
</tcamRegion-items>
</pltfm-items>
</System>
Configures the size of the IPv6 port ACL TCAM region.
Note: This example was added in Release 7.03I61.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
hardware access-list tcam region ipv6-ifacl 256
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/media/dme/index.html
Configuring ACL TCAM Region Size with e-ipv6-racl TCAM Carving
Configuring ACL TCAM Region Size with e-ipv6-racl TCAM Carving
POST http://<mgmt0_IP>/api/mo/sys/pltfm.json
{
"platformEntity": {
"children": [
{
"platformTcamRegion": {
"attributes": {
"eIpv6RaclSize": "256"
}}}]}}
Response
{
imdata:[]
}
Configuring ACL TCAM Region Size with e-ipv6-racl TCAM Carving
<System>
<pltfm-items>
<tcamRegion-items>
<eIpv6RaclSize>256</eIpv6RaclSize>
</tcamRegion-items>
</pltfm-items>
</System>
Configures the size of the IPv6 egress router ACL (ERACL) TCAM region.
Note: This example was added in Release 7.03I61.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
hardware access-list tcam region e-ipv6-racl 256
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/media/dme/index.html
Configuring ACL TCAM Region with ifacl-lite TCAM Region Size
Configuring ACL TCAM Region with ifacl-lite TCAM Region Size
POST http://<mgmt0_IP>/api/node/mo/sys/pltfm/tcamRegion.json
{
"platformEntity": {
"children": [
{
"platformTcamRegion": {
"attributes": {
"raclLiteSize": "256"
}}}]}}
Response
{
imdata:[]
}
Configures the size of the IPv4 port ACL lite TCAM region.
Note: This example was added in Release 7.03I61.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
hardware access-list tcam region ifacl-lite 256
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/media/dme/index.html
Configuring Max-Host Routing Mode
Configuring Max-Host Routing Mode
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"platformEntity": {
"attributes": {
"routingMode": "TOR_MAX_L3"
}
}
}
]
}
}
Response
{
imdata:[]
}
Configuring Max-Host Routing Mode
<System>
<pltfm-items>
<routingMode>TOR_MAX_L3</routingMode>
</pltfm-items>
</System>
Puts the line cards in Broadcom T2 mode 2 and the fabric modules in Broadcom T2 mode 3 to increase the number of supported hosts.
Note: This example was added in Release 7.03I61.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
system routing max-mode l3
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/media/dme/index.html
Configuring ALPM for IPv6
Configuring ALPM for IPv6
POST http://<mgmt0_IP>/api/mo/sys.json
{
"topSystem": {
"children": [
{
"platformEntity": {
"attributes": {
"IPV6alpmCarveValue": "4096"
}
}
}
]
}
}
Response
{
imdata:[]
}
Configuring ALPM for IPv6
<System>
<pltfm-items>
<IPV6alpmCarveValue>4096</IPV6alpmCarveValue>
</pltfm-items>
</System>
Enables /128 IPv6 routes and carves the LPM table for all IPv6 entries.
Note: This example was added in Release 7.03I61.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
hardware profile ipv6 alpm carve-value 4096
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/media/dme/index.html
Enabling the SCP Server
Enabling the SCP Server
POST http://<mgmt0_IP>/api/mo/sys/fm.json
{
"fmEntity": {
"children": [
{
"fmScpServer": {
"attributes": {
"adminSt": "enabled"
}}}]}}
Response
{
imdata:[]
}
Enabling the SCP Server
<System>
<fm-items>
<scpserver-items>
<adminSt>enabled</adminSt>
</scpserver-items>
</fm-items>
</System>
Enables the scp-server feature.
Note: This example was added in Release 7.0(3)I6(1).
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
feature scp-server
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/media/dme/index.html
Configuring anycast gateway MAC
Configuring anycast gateway MAC
POST http://<mgmt0_IP>/api/mo/sys/hmm.json
{
"hmmEntity": {
"children": [
{
"hmmFwdInst": {
"attributes": {
"amac": "CA:BB:D3:69:0C:60"
}}}]}}
Response
{
imdata:[]
}
Configuring anycast gateway MAC
<System>
<hmm-items>
<fwdinst-items>
<amac>CA:BB:D3:69:0C:60</amac>
</fwdinst-items>
</hmm-items>
</System>
Configures anycast gateway MAC of the switch.
Note: This example was added in Release 7.0(3)I6(1).
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
fabric forwarding anycast-gateway-mac cabb.d369.0c60
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/media/dme/index.html
Configuring description for VRF
Configuring description for VRF
POST http://<mgmt0_IP>/api/mo/sys/inst-{name}.json
{
"topSystem": {
"children": [
{
"l3Inst": {
"attributes": {
"descr": "Default VRF for user L3 routing shutdown",
"name": "switchpool-default"
}
}
}
]
}
}
Response
{
imdata:[]
}
Configuring description for VRF
<System>
<inst-items>
<Inst-list>
<name>switchpool-default</name>
<descr>Default VRF for user L3 routing shutdown</descr>
</Inst-list>
</inst-items>
</System>
Creates a description of the VRF.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
vrf context switchpool-default
description Default VRF for user L3 routing shutdown
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/media/dme/index.html
Configuring MOTD Banner
Configuring MOTD Banner
POST http://<mgmt0_IP>/api/mo/sys/userext.json
{
"aaaUserEp": {
"children": [
{
"aaaPreLoginBanner": {
"attributes": {
"delimiter": "_",
"message": ""
}}}]}}
Response
{
imdata:[]
}
Configuring MOTD Banner
<System>
<userext-items>
<preloginbanner-items>
<delimiter>_</delimiter>
<message></message>
</preloginbanner-items>
</userext-items>
</System>
Configures the MOTB (message-of-the-day) banner.
Note: This example was added in Release 7.0(3)I6(1).
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
banner motd __
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/media/dme/index.html
Configuring BFD Interval
Configuring BFD Interval
POST http://<mgmt0_IP>/api/mo/sys/bfd/inst/if-{[id]}.json
{
"bfdIf": {
"attributes": {
"id": "eth1/1"
},
"children": [
{
"bfdKaP": {
"attributes": {
"detectMult": "3",
"minRxIntvl": "50",
"minTxIntvl": "50"
}}}]}}
Response
{
imdata:[]
}
Configuring BFD Interval
<System>
<bfd-items>
<inst-items>
<if-items>
<If-list>
<id>eth1/1</id>
<ka-items>
<detectMult>3</detectMult>
<minRxIntvl>50</minRxIntvl>
<minTxIntvl>50</minTxIntvl>
</ka-items>
</If-list>
</if-items>
</inst-items>
</bfd-items>
</System>
Configures the BFD session parameters for all BFD sessions on the device. This command overrides these values by configuring the BFD session parameters on an interface.
Note: This example was added in Release 7.0(3)I6(1).
CLI Commands
The CLI commands and options listed below are the equivalent to the payload examples displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.
interface ethernet1/1
bfd interval 50 min_rx 50 multiplier 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/media/dme/index.html
Configuring Hardware Profile racl TCAM Region Size
Configuring Hardware Profile racl TCAM Region Size
POST http://<mgmt0_IP>/api/mo/sys/pltfm.json
{
"platformEntity": {
"children": [
{
"platformTcamRegion": {
"attributes": {
"raclSize": "3072"
}}}]}}
Response