Configuring HSRP IPv4 on an Ethernet Interface

Configuring MD5 Authentication

Configuring MD5 Authentication
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "hsrpEntity": {
          "children": [
            {
              "hsrpInst": {
                "children": [
                  {
                    "hsrpIf": {
                      "attributes": {
                        "id": "eth1/2"
                      },
                      "children": [
                        {
                          "hsrpGroup": {
                            "attributes": {
                              "af": "ipv4",
                              "authMd5CompatibilityMode": "enabled",
                              "authMd5KeyChainName": "",
                              "authMd5KeyName": "SampleString_123",
                              "authMd5KeyStringType": "unencrypted",
                              "authMd5Timeout": "1",
                              "authMd5Type": "key-string",
                              "authType": "md5",
                              "id": "1"
                            }
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "id": "eth1/2"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/2</id>
          <grp-items>
            <Group-list>
              <id>1</id>
              <af>ipv4</af>
              <authMd5CompatibilityMode>enabled</authMd5CompatibilityMode>
              <authMd5KeyChainName></authMd5KeyChainName>
              <authMd5KeyName>SampleString_123</authMd5KeyName>
              <authMd5KeyStringType>unencrypted</authMd5KeyStringType>
              <authMd5Timeout>1</authMd5Timeout>
              <authMd5Type>key-string</authMd5Type>
              <authType>md5</authType>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/2</id>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>

Note: This example was added in Release 9.3(5).


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.

interface ethernet 1/2
  hsrp 1 ipv4
   authentication md5 key-string 0 SampleString_123 compatibility timeout 1


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
topSystem sys
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-[eth1/2]
hsrpGroup sys/hsrp/inst/if-[eth1/2]/grp-1-ipv4
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-[eth1/2]


hsrpIf Properties

The following table contains information about the hsrpIf 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


hsrpGroup Properties

The following table contains information about the hsrpGroup 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
afhsrp:GroupAf
(scalar:Enum8)
Group Address FamilySELECTION:
1 - ipv4
2 - ipv6
DEFAULT: ipv4
authMd5CompatibilityModehsrp:State
(scalar:Enum8)
Enables compatibility mode for MD5 type-7 authenticationSELECTION:
0 - disabled
1 - enabled
DEFAULT: disabled
authMd5KeyChainNamestring:Basic
Authentication MD5 Key Chain Name
MAX SIZE: 63
authMd5KeyNamestring:Basic
Authentication Md5 Key Name
MAX SIZE: 64
authMd5KeyStringTypehsrp:Md5KeyStringType
(scalar:Enum8)
Authentication MD5 Key String TypeSELECTION:
0 - unencrypted
7 - hidden
DEFAULT: unencrypted
authMd5Timeoutscalar:Uint32
timeout for when HSRP will only accept a new key
RANGE: [0 , 32767]
authMd5Typehsrp:AuthMd5T
(scalar:Enum8)
Type of MD5 AuthenticationSELECTION:
0 - key-chain
1 - key-string
authTypehsrp:AuthT
(scalar:Enum8)
Authentication Type for the groupSELECTION:
1 - simple
2 - md5
DEFAULT: simple
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0


l1PhysIf Properties

The following table contains information about the l1PhysIf 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


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

Deleting MD5 Authentication

Deleting MD5 Authentication
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "hsrpEntity": {
          "children": [
            {
              "hsrpInst": {
                "children": [
                  {
                    "hsrpIf": {
                      "attributes": {
                        "id": "eth1/2"
                      },
                      "children": [
                        {
                          "hsrpGroup": {
                            "attributes": {
                              "af": "ipv4",
                              "authMd5CompatibilityMode": "disabled",
                              "authMd5KeyChainName": "",
                              "authMd5KeyName": "",
                              "authMd5KeyStringType": "unencrypted",
                              "authMd5Timeout": "0",
                              "authMd5Type": "key-chain",
                              "authType": "simple",
                              "id": "1"
                            }
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "id": "eth1/2"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/2</id>
          <grp-items>
            <Group-list>
              <id>1</id>
              <af>ipv4</af>
              <authMd5CompatibilityMode>disabled</authMd5CompatibilityMode>
              <authMd5KeyChainName></authMd5KeyChainName>
              <authMd5KeyName></authMd5KeyName>
              <authMd5KeyStringType>unencrypted</authMd5KeyStringType>
              <authMd5Timeout>0</authMd5Timeout>
              <authMd5Type>key-chain</authMd5Type>
              <authType>simple</authType>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/2</id>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>

Note: This example was added in Release 9.3(5).


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.

interface ethernet 1/2
  hsrp 1 ipv4
   no authentication md5 key-string 0 SampleString_123 compatibility timeout 1


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
topSystem sys
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-[eth1/2]
hsrpGroup sys/hsrp/inst/if-[eth1/2]/grp-1-ipv4
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-[eth1/2]


hsrpIf Properties

The following table contains information about the hsrpIf 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


hsrpGroup Properties

The following table contains information about the hsrpGroup 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
afhsrp:GroupAf
(scalar:Enum8)
Group Address FamilySELECTION:
1 - ipv4
2 - ipv6
DEFAULT: ipv4
authMd5CompatibilityModehsrp:State
(scalar:Enum8)
Enables compatibility mode for MD5 type-7 authenticationSELECTION:
0 - disabled
1 - enabled
DEFAULT: disabled
authMd5KeyChainNamestring:Basic
Authentication MD5 Key Chain Name
MAX SIZE: 63
authMd5KeyNamestring:Basic
Authentication Md5 Key Name
MAX SIZE: 64
authMd5KeyStringTypehsrp:Md5KeyStringType
(scalar:Enum8)
Authentication MD5 Key String TypeSELECTION:
0 - unencrypted
7 - hidden
DEFAULT: unencrypted
authMd5Timeoutscalar:Uint32
timeout for when HSRP will only accept a new key
RANGE: [0 , 32767]
authMd5Typehsrp:AuthMd5T
(scalar:Enum8)
Type of MD5 AuthenticationSELECTION:
0 - key-chain
1 - key-string
authTypehsrp:AuthT
(scalar:Enum8)
Authentication Type for the groupSELECTION:
1 - simple
2 - md5
DEFAULT: simple
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0


l1PhysIf Properties

The following table contains information about the l1PhysIf 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


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

Configuring Track Object to HSRP Group

Configuring Track Object to HSRP Group 
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "hsrpEntity": {
          "children": [
            {
              "hsrpInst": {
                "children": [
                  {
                    "hsrpIf": {
                      "attributes": {
                        "id": "eth1/2"
                      },
                      "children": [
                        {
                          "hsrpGroup": {
                            "attributes": {
                              "af": "ipv4",
                              "id": "1"
                            },
                            "children": [
                              {
                                "hsrpObjectTrack": {
                                  "attributes": {
                                    "decrPrio": "10",
                                    "id": "380"
                                  }
                                }
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "id": "eth1/2"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/2</id>
          <grp-items>
            <Group-list>
              <id>1</id>
              <af>ipv4</af>
              <track-items>
                <ObjectTrack-list>
                  <id>380</id>
                  <decrPrio>10</decrPrio>
                </ObjectTrack-list>
              </track-items>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/2</id>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>

Note: This example was added in Release 9.3(5).


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.

interface ethernet 1/2
  hsrp 1 ipv4
   track 380


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
topSystem sys
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-[eth1/2]
hsrpGroup sys/hsrp/inst/if-[eth1/2]/grp-1-ipv4
hsrpObjectTrack sys/hsrp/inst/if-[eth1/2]/grp-1-ipv4/track-380
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-[eth1/2]


hsrpIf Properties

The following table contains information about the hsrpIf 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


hsrpGroup Properties

The following table contains information about the hsrpGroup 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
afhsrp:GroupAf
(scalar:Enum8)
Group Address FamilySELECTION:
1 - ipv4
2 - ipv6
DEFAULT: ipv4
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0


hsrpObjectTrack Properties

The following table contains information about the hsrpObjectTrack 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
decrPrioscalar:Uint16
Priority to be decremented when tracked object is down. Default value is 10
RANGE: [1 , 255]
DEFAULT: 10
idtrack:TrackId
(scalar:Uint16)
Object Id to be tracked
RANGE: [1 , 512]


l1PhysIf Properties

The following table contains information about the l1PhysIf 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


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

Deleting Track Object to HSRP Group

Deleting Track Object to HSRP Group 
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "hsrpEntity": {
          "children": [
            {
              "hsrpInst": {
                "children": [
                  {
                    "hsrpIf": {
                      "attributes": {
                        "id": "eth1/2"
                      },
                      "children": [
                        {
                          "hsrpGroup": {
                            "attributes": {
                              "af": "ipv4",
                              "id": "1"
                            },
                            "children": [
                              {
                                "hsrpObjectTrack": {
                                  "attributes": {
                                    "id": "380",
                                    "status": "deleted"
                                  }
                                }
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "id": "eth1/2"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/2</id>
          <grp-items>
            <Group-list>
              <id>1</id>
              <af>ipv4</af>
              <track-items>
                <ObjectTrack-list nc:operation="delete">
                  <id>380</id>
                </ObjectTrack-list>
              </track-items>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/2</id>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>

Note: This example was added in Release 9.3(5).


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.

interface ethernet 1/2
  hsrp 1 ipv4
   no track 380


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
topSystem sys
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-[eth1/2]
hsrpGroup sys/hsrp/inst/if-[eth1/2]/grp-1-ipv4
hsrpObjectTrack sys/hsrp/inst/if-[eth1/2]/grp-1-ipv4/track-380
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-[eth1/2]


hsrpIf Properties

The following table contains information about the hsrpIf 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


hsrpGroup Properties

The following table contains information about the hsrpGroup 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
afhsrp:GroupAf
(scalar:Enum8)
Group Address FamilySELECTION:
1 - ipv4
2 - ipv6
DEFAULT: ipv4
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0


hsrpObjectTrack Properties

The following table contains information about the hsrpObjectTrack 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
idtrack:TrackId
(scalar:Uint16)
Object Id to be tracked
RANGE: [1 , 512]
statusmo:ModificationStatus
(scalar:Bitmask32)
The upgrade status. This property is for internal use only.SELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


l1PhysIf Properties

The following table contains information about the l1PhysIf 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


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

Configuring Decrements When Tracked Object Goes Down

Configuring Decrements When Tracked Object Goes Down 
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "hsrpEntity": {
          "children": [
            {
              "hsrpInst": {
                "children": [
                  {
                    "hsrpIf": {
                      "attributes": {
                        "id": "eth1/2"
                      },
                      "children": [
                        {
                          "hsrpGroup": {
                            "attributes": {
                              "af": "ipv4",
                              "id": "1"
                            },
                            "children": [
                              {
                                "hsrpObjectTrack": {
                                  "attributes": {
                                    "decrPrio": "246",
                                    "id": "83"
                                  }
                                }
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "id": "eth1/2"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/2</id>
          <grp-items>
            <Group-list>
              <id>1</id>
              <af>ipv4</af>
              <track-items>
                <ObjectTrack-list>
                  <id>83</id>
                  <decrPrio>246</decrPrio>
                </ObjectTrack-list>
              </track-items>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/2</id>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>

Note: This example was added in Release 9.3(5).


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.

interface ethernet 1/2
  hsrp 1 ipv4
   track 83 decrement 246


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
topSystem sys
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-[eth1/2]
hsrpGroup sys/hsrp/inst/if-[eth1/2]/grp-1-ipv4
hsrpObjectTrack sys/hsrp/inst/if-[eth1/2]/grp-1-ipv4/track-83
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-[eth1/2]


hsrpIf Properties

The following table contains information about the hsrpIf 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


hsrpGroup Properties

The following table contains information about the hsrpGroup 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
afhsrp:GroupAf
(scalar:Enum8)
Group Address FamilySELECTION:
1 - ipv4
2 - ipv6
DEFAULT: ipv4
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0


hsrpObjectTrack Properties

The following table contains information about the hsrpObjectTrack 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
decrPrioscalar:Uint16
Priority to be decremented when tracked object is down. Default value is 10
RANGE: [1 , 255]
DEFAULT: 10
idtrack:TrackId
(scalar:Uint16)
Object Id to be tracked
RANGE: [1 , 512]


l1PhysIf Properties

The following table contains information about the l1PhysIf 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


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

Deleting Decrements When Tracked Object Goes Down

Deleting Decrements When Tracked Object Goes Down 
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "hsrpEntity": {
          "children": [
            {
              "hsrpInst": {
                "children": [
                  {
                    "hsrpIf": {
                      "attributes": {
                        "id": "eth1/2"
                      },
                      "children": [
                        {
                          "hsrpGroup": {
                            "attributes": {
                              "af": "ipv4",
                              "id": "1"
                            },
                            "children": [
                              {
                                "hsrpObjectTrack": {
                                  "attributes": {
                                    "id": "83",
                                    "status": "deleted"
                                  }
                                }
                              }
                            ]
                          }
                        }
                      ]
                    }
                  }
                ]
              }
            }
          ]
        }
      },
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "id": "eth1/2"
                }
              }
            }
          ]
        }
      }
    ]
  }
}
{
    imdata:[]
}
<System>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/2</id>
          <grp-items>
            <Group-list>
              <id>1</id>
              <af>ipv4</af>
              <track-items>
                <ObjectTrack-list nc:operation="delete">
                  <id>83</id>
                </ObjectTrack-list>
              </track-items>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/2</id>
      </PhysIf-list>
    </phys-items>
  </intf-items>
</System>

Note: This example was added in Release 9.3(5).


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.

interface ethernet 1/2
  hsrp 1 ipv4
   no track 83 decrement 246


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
topSystem sys
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-[eth1/2]
hsrpGroup sys/hsrp/inst/if-[eth1/2]/grp-1-ipv4
hsrpObjectTrack sys/hsrp/inst/if-[eth1/2]/grp-1-ipv4/track-83
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-[eth1/2]


hsrpIf Properties

The following table contains information about the hsrpIf 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


hsrpGroup Properties

The following table contains information about the hsrpGroup 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
afhsrp:GroupAf
(scalar:Enum8)
Group Address FamilySELECTION:
1 - ipv4
2 - ipv6
DEFAULT: ipv4
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0


hsrpObjectTrack Properties

The following table contains information about the hsrpObjectTrack 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
idtrack:TrackId
(scalar:Uint16)
Object Id to be tracked
RANGE: [1 , 512]
statusmo:ModificationStatus
(scalar:Bitmask32)
The upgrade status. This property is for internal use only.SELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


l1PhysIf Properties

The following table contains information about the l1PhysIf 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


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