Configuring VRRPv2
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.
Enabling VRRPv2
Enabling VRRPv2
POST http://<IP_Address>/api/mo/sys/fm/vrrp.json
{
"fmEntity": {
"children": [
{
"fmVrrp": {
"attributes": {
"adminSt": "enabled"
}}}]}}
{
imdata:[]
}
<System>
<fm-items>
<vrrp-items>
<adminSt>enabled</adminSt>
</vrrp-items>
</fm-items>
</System>
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
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
fmEntity | sys/fm |
fmVrrp | sys/fm/vrrp |
fmVrrp Properties
The following table contains information about the fmVrrp properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
adminSt | fm:AdminState (scalar:Enum8) | Admin status | SELECTION: 1 - enabled 2 - disabled DEFAULT: disabled |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
Disabling VRRPv2
Disabling VRRPv2
POST http://<IP_Address>/api/mo/sys/fm/vrrp.json
{
"fmEntity": {
"children": [
{
"fmVrrp": {
"attributes": {
"adminSt": "disabled"
}}}]}}
{
imdata:[]
}
<System>
<fm-items>
<vrrp-items>
<adminSt>disabled</adminSt>
</vrrp-items>
</fm-items>
</System>
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 feature vrrp
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
fmEntity | sys/fm |
fmVrrp | sys/fm/vrrp |
fmVrrp Properties
The following table contains information about the fmVrrp properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
adminSt | fm:AdminState (scalar:Enum8) | Admin status | SELECTION: 1 - enabled 2 - disabled DEFAULT: disabled |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
Creating a VRRPv2 Interface
Creating a VRRPv2 Interface
POST http://<IP_Address>/api/mo/sys/fm/vrrp.json
{
"vrrpInst": {
"children": [
{
"vrrpInterface": {
"attributes": {
"id": "eth1/7"
},
"children": [
{
"vrrpId": {
"attributes": {
"id": "123"
}}}]}}]}}
{
imdata:[]
}
<System>
<vrrp-items>
<inst-items>
<if-items>
<Interface-list>
<id>eth1/7</id>
<id-items>
<Id-list>
<id>123</id>
<adminSt>enabled</adminSt>
</Id-list>
</id-items>
</Interface-list>
</if-items>
</inst-items>
</vrrp-items>
</System>
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 ethernet 1/7
vrrp 123
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
vrrpInst | sys/vrrp/inst |
vrrpInterface | sys/vrrp/inst/if-{[id]} |
vrrpId | sys/vrrp/inst/if-{[id]}/id-{id} |
vrrpInterface Properties
The following table contains information about the vrrpInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
id | nw:IfId (base:IfIndex) | An identifier . | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
vrrpId Properties
The following table contains information about the vrrpId properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
id | vrrp:Id (scalar:UByte) | VRRP Id | RANGE: [1 , 255] |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
Creating a Primary VRRPv2 ID
Creating a Primary VRRPv2 ID
POST http://<IP_address>/api/mo/sys/vrrp/inst.json
{
"vrrpInst": {
"children": [
{
"vrrpInterface": {
"attributes": {
"id": "eth1/7"
},
"children": [
{
"vrrpId": {
"attributes": {
"adminSt": "enabled",
"id": "123",
"primary": "1.2.3.4"
}}}]}}]}}
{
imdata:[]
}
<System>
<vrrp-items>
<inst-items>
<if-items>
<Interface-list>
<id>eth1/7</id>
<id-items>
<Id-list>
<id>123</id>
<primary>1.2.3.4</primary>
</Id-list>
</id-items>
</Interface-list>
</if-items>
</inst-items>
</vrrp-items>
</System>
The HTTP request shown in this example creates a Managed Object called with an ID of 123 and a primary IP address of 1.2.3.4.
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 ethernet 1/7
vrrp 123
address 1.2.3.4`
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
vrrpInst | sys/vrrp/inst |
vrrpInterface | sys/vrrp/inst/if-{[id]} |
vrrpId | sys/vrrp/inst/if-{[id]}/id-{id} |
vrrpInterface Properties
The following table contains information about the vrrpInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
id | nw:IfId (base:IfIndex) | An identifier . | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
vrrpId Properties
The following table contains information about the vrrpId properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
adminSt | vrrp:AdminSt (scalar:Enum8) | Admin state | SELECTION: 1 - disabled 2 - enabled DEFAULT: disabled |
id | vrrp:Id (scalar:UByte) | VRRP Id | RANGE: [1 , 255] |
primary | address:Ip | primary IP address | Value must match ipv4 or ipv6 known format |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
Creating a Secondary VRRPv2 ID
Creating a Secondary VRRPv2 ID
POST http://<IP_address>/api/mo/sys/vrrp/inst.json
{
"vrrpInst": {
"children": [
{
"vrrpInterface": {
"attributes": {
"id": "eth1/7"
},
"children": [
{
"vrrpId": {
"attributes": {
"id": "123"
},
"children": [
{
"vrrpSecondary": {
"attributes": {
"secondary": "4.3.2.1"
}}}]}}]}}]}}
{
imdata:[]
}
<System>
<vrrp-items>
<inst-items>
<if-items>
<Interface-list>
<id>eth1/7</id>
<id-items>
<Id-list>
<id>123</id>
<secondary-items>
<Secondary-list>
<secondary>4.3.2.1</secondary>
</Secondary-list>
</secondary-items>
</Id-list>
</id-items>
</Interface-list>
</if-items>
</inst-items>
</vrrp-items>
</System>
The HTTP request in this example creates a secondary VRRPv2 ID named 4.3.2.1 under the primary VRRP ID 123.
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 ethernet 1/7
vrrp 123
address 4.3.2.1 secondary`
Note: The property information for this example was added in Release 9.3(3).
Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.
MO | DN |
---|---|
vrrpInst | sys/vrrp/inst |
vrrpInterface | sys/vrrp/inst/if-{[id]} |
vrrpId | sys/vrrp/inst/if-{[id]}/id-{id} |
vrrpSecondary | sys/vrrp/inst/if-{[id]}/id-{id}/secondary-{[secondary]} |
vrrpInterface Properties
The following table contains information about the vrrpInterface properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
id | nw:IfId (base:IfIndex) | An identifier . | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
vrrpId Properties
The following table contains information about the vrrpId properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
id | vrrp:Id (scalar:UByte) | VRRP Id | RANGE: [1 , 255] |
vrrpSecondary Properties
The following table contains information about the vrrpSecondary properties in the DME payload. For more information about the properties and MOs, see the NX-API DME Model Reference linked in the Related Documentation section below.
Property Name | Data Type | Description | Values |
---|---|---|---|
secondary | address:Ip | Secondary IP address for the VRRP Router | Value must match ipv4 or ipv6 known format |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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: