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.
Enabling LACP
Enabling LACP
POST http://<IP_Address>/api/mo/sys/fm.json
{
"fmEntity": {
"children": [
{
"fmLacp": {
"attributes": {
"adminSt": "enabled"
}}}]}}
{
imdata": []
}
<System>
<fm-items>
<lacp-items>
<adminSt>enabled</adminSt>
</lacp-items>
</fm-items>
</System>
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
feature lacp
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Disabling LACP
Disabling LACP
POST http://<IP_Address>/api/mo/sys/fm.json
{
"fmEntity": {
"children": [
{
"fmLacp": {
"attributes": {
"adminSt": "disabled"
}}}]}}
{
imdata": []
}
<System>
<fm-items>
<lacp-items>
<adminSt>disabled</adminSt>
</lacp-items>
</fm-items>
</System>
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
no feature lacp
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Configuring LACP Rate Fast
Configuring LACP Rate Fast
POST http://<IP_Address>/api/mo/sys/lacp.json
{
"lacpEntity": {
"children": [
{
"lacpInst": {
"children": [
{
"lacpIf": {
"attributes": {
"id": "eth1/2",
"txRate": "fast"
}}}]}}]}}
{
imdata": []
}
<System>
<lacp-items>
<inst-items>
<if-items>
<If-list>
<id>eth1/2</id>
<txRate>fast</txRate>
</If-list>
</if-items>
</inst-items>
</lacp-items>
</System>
The LACP rate fast feature is used to set the rate (once every second) at which the LACP control packets are sent to an LACP-supported interface.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
interface ethernet 1/2
lacp rate fast
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Configuring LACP Rate Normal
Configuring LACP Rate Normal
POST http://<IP_Address>/api/mo/sys/lacp.json
{
"lacpEntity": {
"children": [
{
"lacpInst": {
"children": [
{
"lacpIf": {
"attributes": {
"id": "eth1/2",
"txRate": "normal"
}}}]}}]}}
{
imdata": []
}
<System>
<lacp-items>
<inst-items>
<if-items>
<If-list>
<id>eth1/2</id>
<txRate>normal</txRate>
</If-list>
</if-items>
</inst-items>
</lacp-items>
</System>
Specifies that LACP control packets are ingressed at the normal rate, every 30 seconds after the link is bundled.
CLI Command
The CLI command below is the equivalent to the payload example displayed in the pane on the right.
interface ethernet 1/2
lacp rate normal
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the NX-API DME Model Reference for detailed information about classes and attributes described in the payload: https://developer.cisco.com/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Configuring the MAC Address to be Used for the LACP Protocol Exchanges (Role: Primary)
Configuring the MAC Address to be Used for the LACP Protocol Exchanges (Role: Primary)
POST http://<mgmt0_IP>/api/mo/sys.json
{
"lacpEntity": {
"children": [
{
"lacpInst": {
"attributes": {
"adminRole": "primary",
"adminSysMac": "12:34:12:34:12:34"
}}}]}}
{
"imdata": []
}
<System>
<lacp-items>
<inst-items>
<adminRole>primary</adminRole>
<adminSysMac>12:34:12:34:12:34</adminSysMac>
</inst-items>
</lacp-items>
</System>
Note: This example was added in Release 7.0(3)I7(3).
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.
lacp system-mac 1234.1234.1234 role 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
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Configuring the MAC Address to be Used for the LACP Protocol Exchanges (Role: Secondary)
Configuring the MAC Address to be Used for the LACP Protocol Exchanges (Role: Secondary)
POST http://<mgmt0_IP>/api/mo/sys.json
{
"lacpEntity": {
"children": [
{
"lacpInst": {
"attributes": {
"adminRole": "secondary",
"adminSysMac": "12:34:12:34:12:34"
}}}]}}
{
"imdata": []
}
<System>
<lacp-items>
<inst-items>
<adminRole>secondary</adminRole>
<adminSysMac>12:34:12:34:12:34</adminSysMac>
</inst-items>
</lacp-items>
</System>
Note: This example was added in Release 7.0(3)I7(3).
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.
lacp system-mac 1234.1234.1234 role 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
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Resetting to Use the Default VDC MAC Address
Resetting to Use the Default VDC MAC Address
POST http://<mgmt0_IP>/api/mo/sys.json
{
"lacpEntity": {
"children": [
{
"lacpInst": {
"attributes": {
"adminRole": "primary",
"adminSysMac": "00:50:56:8A:67:9F"
}}}]}}
{
"imdata": []
}
<System>
<lacp-items>
<inst-items>
<adminRole>primary</adminRole>
<adminSysMac>00:50:56:8A:67:9F</adminSysMac>
</inst-items>
</lacp-items>
</System>
Note: This example was added in Release 7.0(3)I7(3).
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.
no lacp system-mac
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference: http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-list.html
See the 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 information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html
Querying the LACP Configuration
Querying the LACP Configuration
GET http://<IP_Address>/api/node/mo/sys/lacp/inst.json
{
"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/site/nx-os/docs/nexus-model-reference/
For information about using the payloads, see the Cisco Nexus 9000 Series NX-OS Programmability Guide https://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-programming-reference-guides-list.html