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.

MODN
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 NameData TypeDescriptionValues
adminStfm:AdminState
(scalar:Enum8)
Admin statusSELECTION:
1 - enabled
2 - disabled
DEFAULT: disabled


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-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 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.

MODN
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 NameData TypeDescriptionValues
adminStfm:AdminState
(scalar:Enum8)
Admin statusSELECTION:
1 - enabled
2 - disabled
DEFAULT: disabled


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-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

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.

MODN
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 NameData TypeDescriptionValues
idnw: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 NameData TypeDescriptionValues
idvrrp:Id
(scalar:UByte)
VRRP Id
RANGE: [1 , 255]


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-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

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
 &nbsp;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.

MODN
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 NameData TypeDescriptionValues
idnw: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 NameData TypeDescriptionValues
adminStvrrp:AdminSt
(scalar:Enum8)
Admin stateSELECTION:
1 - disabled
2 - enabled
DEFAULT: disabled
idvrrp:Id
(scalar:UByte)
VRRP Id
RANGE: [1 , 255]
primaryaddress:Ip
primary IP addressValue must match ipv4 or ipv6 known format


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-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

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
 &nbsp;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.

MODN
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 NameData TypeDescriptionValues
idnw: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 NameData TypeDescriptionValues
idvrrp: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 NameData TypeDescriptionValues
secondaryaddress:Ip
Secondary IP address for the VRRP RouterValue must match ipv4 or ipv6 known format


Related Documentation

For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:

http://www.cisco.com/c/en/us/support/switches/nexus-9000-series-switches/products-command-reference-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