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.

Enabling HSRP

Enabling HSRP
POST http://<mgmt0_IP>/api/mo/sys/fm.json
{
"fmEntity": {
  "children": [
    {
      "fmHsrp": {
        "attributes": {
          "adminSt": "enabled"
}}}]}}
{
    imdata:[]
}
<System>
  <fm-items>
    <hsrp-items>
      <adminSt>enabled</adminSt>
    </hsrp-items>
  </fm-items>
</System>


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.

feature hsrp

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
fmHsrp sys/fm/hsrp


fmHsrp Properties

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

Disabling HSRP
POST http://<mgmt0_IP>/api/mo/sys/fm.json
{
"fmEntity": {
  "children": [
    {
      "fmHsrp": {
        "attributes": {
          "adminSt": "disabled"
}}}]}}
{
    imdata:[]
}
<System>
  <fm-items>
    <hsrp-items>
      <adminSt>disabled</adminSt>
    </hsrp-items>
  </fm-items>
</System>


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 feature hsrp

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
fmHsrp sys/fm/hsrp


fmHsrp Properties

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

Configuring HSRP Version 1

Configuring an IPv4 HSRP Group

Configuring an IPv4 HSRP Group
POST http://<IP_Address>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "ipv4Entity": {
          "children": [
            {
              "ipv4Inst": {
                "children": [
                  {
                    "ipv4Dom": {
                      "attributes": {
                        "name": "default"
                      },
                      "children": [
                        {
                          "ipv4If": {
                            "attributes": {
                              "id": "eth1/2"
                            },
                            "children": [
                              {
                                "ipv4Addr": {
                                  "attributes": {
                                    "addr": "1.2.3.4/2"
 }}}]}}]}}]}}]}},{       
"interfaceEntity": {
  "children": [
    {
      "l1PhysIf": {
        "attributes": {
          "adminSt": "up",
          "id": "eth1/2",
          "userCfgdFlags": "admin_state"      
}}}]}},{
"hsrpEntity": {
  "children": [
    {
      "hsrpInst": {
        "children": [
          {
            "hsrpIf": {
              "attributes": {
                "id": "eth1/2"
              },
              "children": [
                {
                  "hsrpGroup": {
                    "attributes": {
                      "af": "ipv4",
                      "id": "123",
                      "ip": "4.3.2.1",
                      "ipObtainMode": "admin"
}}}]}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/2</id>
              <addr-items>
                <Addr-list>
                  <addr>1.2.3.4/2</addr>
                </Addr-list>
              </addr-items>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/2</id>
        <adminSt>up</adminSt>
        <userCfgdFlags>admin_state</userCfgdFlags>
      </PhysIf-list>
    </phys-items>
  </intf-items>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/2</id>
          <grp-items>
            <Group-list>
              <id>123</id>
              <af>ipv4</af>
              <ip>4.3.2.1</ip>
              <ipObtainMode>admin</ipObtainMode>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
</System>

This example configures an IPv4 group on an interface.


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
 ip address 1.2.3.4/2
 hsrp 123 ipv4
  ip 4.3.2.1
 no shutdown

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
topSystem sys
ipv4Entity sys/ipv4
ipv4Inst sys/ipv4/inst
ipv4Dom sys/ipv4/inst/dom-{name}
ipv4If sys/ipv4/inst/dom-{name}/if-{[id]}
ipv4Addr sys/ipv4/inst/dom-{name}/if-{[id]}/addr-{[addr]}
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-{[id]}
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-{[id]}
hsrpGroup sys/hsrp/inst/if-{[id]}/grp-{id}-{af}


ipv4Dom Properties

The following table contains information about the ipv4Dom 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
namenaming:Name256
(string:Basic)
The name of the object.
MAX SIZE: 63


ipv4If Properties

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


ipv4Addr Properties

The following table contains information about the ipv4Addr 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
addraddress:Ip
AddressValue must match ipv4 or ipv6 known format


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
adminStl1:AdminSt
(scalar:Enum8)
Administrative port stateSELECTION:
1 - down
2 - up
DEFAULT: up
idnw:IfId
(base:IfIndex)
An identifier .Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
userCfgdFlagsl1:userCfgdFlags
(scalar:Bitmask8)
Port User Config FlagsSELECTION:
0 - none
1 - admin_state
2 - admin_layer
4 - admin_router_mac
8 - admin_dce_mode
16 - admin_mtu
DEFAULT: none


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
ipaddress:Ip
Primary IP AddressValue must match ipv4 or ipv6 known format
ipObtainModehsrp:GrpIpObtainMode
(scalar:Enum8)
IP Obtain ModeSELECTION:
0 - admin
1 - auto
2 - learn
DEFAULT: admin


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 a Redundancy-Name String under an IPv4 HSRP Interface

Configuring a Redundancy-Name String under an IPv4 HSRP Interface
POST http://<mgmt0_IP>/api/mo/sys/hsrp/inst.json
{
  "hsrpInst": {
    "children": [
      {
        "hsrpIf": {
          "attributes": {
            "id": "eth1/1"
          },
          "children": [
            {
              "hsrpGroup": {
                "attributes": {
                  "af": "ipv4",
                  "follow": " ",
                  "id": "123",
                  "name": "SomeName"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/1</id>
          <grp-items>
            <Group-list>
              <id>123</id>
              <af>ipv4</af>
              <follow> </follow>
              <name>SomeName</name>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
</System>


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/1
 hsrp 123 ipv4
  name SomeName

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
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-{[id]}
hsrpGroup sys/hsrp/inst/if-{[id]}/grp-{id}-{af}


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
followhsrp:GrpName
(string:Basic)
Master name string to follow
MAX SIZE: 250
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0
namehsrp:GrpName
(string:Basic)
Master name string
MAX SIZE: 250


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 a Redundancy-Name String under an IPv4 HSRP Interface

Deleting a Redundancy-Name String under an IPv4 HSRP Interface
POST http://<mgmt0_IP>/api/mo/sys/hsrp/inst.json
{
  "hsrpInst": {
    "children": [
      {
        "hsrpIf": {
          "attributes": {
            "id": "eth1/1"
          },
          "children": [
            {
              "hsrpGroup": {
                "attributes": {
                  "af": "ipv4",
                  "follow": "",
                  "id": "123",
                  "name": ""
}}}]}}]}}
{
    imdata:[]
}
<System>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/1</id>
          <grp-items>
            <Group-list>
              <id>123</id>
              <af>ipv4</af>
              <follow></follow>
              <name></name>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
</System>


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/1
 hsrp 123 ipv4
  no name

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
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-{[id]}
hsrpGroup sys/hsrp/inst/if-{[id]}/grp-{id}-{af}


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
followhsrp:GrpName
(string:Basic)
Master name string to follow
MAX SIZE: 250
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0
namehsrp:GrpName
(string:Basic)
Master name string
MAX SIZE: 250


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 HSRP Version 2

Configuring an IPv6 HSRP Group

Configuring an IPv6 HSRP Group
POST http://<IP_Address>/api/node/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "adminSt": "up",
                  "id": "eth1/2",
                  "userCfgdFlags": "admin_state"
}}}]}},{
"hsrpEntity": {
  "children": [
    {
      "hsrpInst": {
        "children": [
          {
            "hsrpIf": {
              "attributes": {
                "id": "eth1/2",
                "version": "v2"
              },
              "children": [
                {
                  "hsrpGroup": {
                    "attributes": {
                      "af": "ipv6",
                      "id": "321"
                    },
                    "children": [
                      {
                        "hsrpAddr": {
                          "attributes": {
                            "ip": "2:4::6:8"
}}}]}}]}}]}}]}},{
"ipv6Entity": {
  "children": [
    {
      "ipv6Inst": {
        "children": [
          {
            "ipv6Dom": {
              "attributes": {
                "name": "default"
              },
              "children": [
                {
                  "ipv6If": {
                    "attributes": {
                      "id": "eth1/2"
                    },
                    "children": [
                      {
                        "ipv6Addr": {
                          "attributes": {
                            "addr": "1:2::3:4/2"
}}}]}}]}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/2</id>
          <version>v2</version>
          <grp-items>
            <Group-list>
              <id>321</id>
              <af>ipv6</af>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
  <ipv6-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <if-items>
            <If-list>
              <id>eth1/2</id>
              <addr-items>
                <Addr-list>
                  <addr>2:4::6:8/2</addr>
                </Addr-list>
                <Addr-list>
                  <addr>1:2::3:4/2</addr>
                </Addr-list>
              </addr-items>
            </If-list>
          </if-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv6-items>
</System>

This example configures an IPv6 group on an interface.


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  ipv6 address 1:2::3:4/2   hsrp version 2
   hsrp 321 ipv6
    ip 2:4::6:8
 no shutdown

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
topSystem sys
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-{[id]}
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-{[id]}
hsrpGroup sys/hsrp/inst/if-{[id]}/grp-{id}-{af}
hsrpAddr sys/hsrp/inst/if-{[id]}/grp-{id}-{af}/addr-{[ip]}
ipv6Entity sys/ipv6
ipv6Inst sys/ipv6/inst
ipv6Dom sys/ipv6/inst/dom-{name}
ipv6If sys/ipv6/inst/dom-{name}/if-{[id]}
ipv6Addr sys/ipv6/inst/dom-{name}/if-{[id]}/addr-{[addr]}


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
adminStl1:AdminSt
(scalar:Enum8)
Administrative port stateSELECTION:
1 - down
2 - up
DEFAULT: up
idnw:IfId
(base:IfIndex)
An identifier .Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
userCfgdFlagsl1:userCfgdFlags
(scalar:Bitmask8)
Port User Config FlagsSELECTION:
0 - none
1 - admin_state
2 - admin_layer
4 - admin_router_mac
8 - admin_dce_mode
16 - admin_mtu
DEFAULT: none


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
versionhsrp:HsrpVersion
(scalar:Enum8)
Hsrp versionSELECTION:
1 - v1
2 - v2
DEFAULT: v1


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


hsrpAddr Properties

The following table contains information about the hsrpAddr 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
ipaddress:Ip
Secondary IP AddressValue must match ipv4 or ipv6 known format


ipv6Dom Properties

The following table contains information about the ipv6Dom 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
namenaming:Name256
(string:Basic)
The name of the object.
MAX SIZE: 63


ipv6If Properties

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


ipv6Addr Properties

The following table contains information about the ipv6Addr 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
addraddress: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

Configuring a String to Follow Under an IPv4 HSRP Interface

Configuring a String to Follow Under an IPv4 HSRP Interface
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "adminSt": "up",
                  "id": "eth1/7",
                  "layer": "Layer3",
                  "userCfgdFlags": "admin_layer,admin_state"
}}}]}},{
"hsrpEntity": {
  "children": [
    {
      "hsrpInst": {
        "children": [
          {
            "hsrpIf": {
              "attributes": {
                "id": "eth1/7",
                "version": "v2"
              },
              "children": [
                {
                  "hsrpGroup": {
                    "attributes": {
                      "af": "ipv4",
                      "follow": "SomeName",
                      "id": "123",
                      "name": " "
}}}]}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/7</id>
        <adminSt>up</adminSt>
        <layer>Layer3</layer>
        <userCfgdFlags>admin_layer,admin_state</userCfgdFlags>
      </PhysIf-list>
    </phys-items>
  </intf-items>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/7</id>
          <version>v2</version>
          <grp-items>
            <Group-list>
              <id>123</id>
              <af>ipv4</af>
              <follow>SomeName</follow>
              <name> </name>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
</System>

Note that when configuring a string to follow under an IPv4 HSRP interface, the master and slave cannot be configured on the same Group.


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 Ethernet1/2
 no switchport
 no shutdown
 hsrp version 2
 hsrp 123
  follow SomeName

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
topSystem sys
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-{[id]}
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-{[id]}
hsrpGroup sys/hsrp/inst/if-{[id]}/grp-{id}-{af}


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
adminStl1:AdminSt
(scalar:Enum8)
Administrative port stateSELECTION:
1 - down
2 - up
DEFAULT: up
idnw:IfId
(base:IfIndex)
An identifier .Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
layerl1:Layer
(scalar:Enum8)
Administrative port layerSELECTION:
1 - Layer2
2 - Layer3
DEFAULT: Layer2
userCfgdFlagsl1:userCfgdFlags
(scalar:Bitmask8)
Port User Config FlagsSELECTION:
0 - none
1 - admin_state
2 - admin_layer
4 - admin_router_mac
8 - admin_dce_mode
16 - admin_mtu
DEFAULT: none


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
versionhsrp:HsrpVersion
(scalar:Enum8)
Hsrp versionSELECTION:
1 - v1
2 - v2
DEFAULT: v1


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
followhsrp:GrpName
(string:Basic)
Master name string to follow
MAX SIZE: 250
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0
namehsrp:GrpName
(string:Basic)
Master name string
MAX SIZE: 250


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 a String to Follow Under an IPv4 HSRP Interface

Deleting a String to Follow Under an IPv4 HSRP Interface
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "adminSt": "up",
                  "id": "eth1/7",
                  "layer": "Layer3",
                  "userCfgdFlags": "admin_layer,admin_state"
}}}]}},{
"hsrpEntity": {
  "children": [
    {
      "hsrpInst": {
        "children": [
          {
            "hsrpIf": {
              "attributes": {
                "id": "eth1/7",
                "version": "v2"
              },
              "children": [
                {
                  "hsrpGroup": {
                    "attributes": {
                      "af": "ipv4",
                      "follow": "",
                      "id": "123",
                      "name": ""
}}}]}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/7</id>
        <adminSt>up</adminSt>
        <layer>Layer3</layer>
        <userCfgdFlags>admin_layer,admin_state</userCfgdFlags>
      </PhysIf-list>
    </phys-items>
  </intf-items>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/7</id>
          <version>v2</version>
          <grp-items>
            <Group-list>
              <id>123</id>
              <af>ipv4</af>
              <follow></follow>
              <name></name>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
</System>


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 Ethernet1/7
 no switchport
 no shutdown
 hsrp version 2
 hsrp 123
  no follow

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
topSystem sys
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-{[id]}
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-{[id]}
hsrpGroup sys/hsrp/inst/if-{[id]}/grp-{id}-{af}


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
adminStl1:AdminSt
(scalar:Enum8)
Administrative port stateSELECTION:
1 - down
2 - up
DEFAULT: up
idnw:IfId
(base:IfIndex)
An identifier .Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
layerl1:Layer
(scalar:Enum8)
Administrative port layerSELECTION:
1 - Layer2
2 - Layer3
DEFAULT: Layer2
userCfgdFlagsl1:userCfgdFlags
(scalar:Bitmask8)
Port User Config FlagsSELECTION:
0 - none
1 - admin_state
2 - admin_layer
4 - admin_router_mac
8 - admin_dce_mode
16 - admin_mtu
DEFAULT: none


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
versionhsrp:HsrpVersion
(scalar:Enum8)
Hsrp versionSELECTION:
1 - v1
2 - v2
DEFAULT: v1


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
followhsrp:GrpName
(string:Basic)
Master name string to follow
MAX SIZE: 250
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0
namehsrp:GrpName
(string:Basic)
Master name string
MAX SIZE: 250


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 a Redundancy-Name String under an IPv4 HSRP Interface

Configuring a Redundancy-Name String under an IPv4 HSRP Interface
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "adminSt": "up",
                  "id": "eth1/7",
                  "layer": "Layer3",
                  "userCfgdFlags": "admin_layer,admin_state"
}}}]}},{
"hsrpEntity": {
  "children": [
    {
      "hsrpInst": {
        "children": [
          {
            "hsrpIf": {
              "attributes": {
                "id": "eth1/7",
                "version": "v2"
              },
              "children": [
                {
                  "hsrpGroup": {
                    "attributes": {
                      "af": "ipv4",
                      "follow": " ",
                      "id": "123",
                      "name": "SomeName"
}}}]}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/7</id>
        <adminSt>up</adminSt>
        <layer>Layer3</layer>
        <userCfgdFlags>admin_layer,admin_state</userCfgdFlags>
      </PhysIf-list>
    </phys-items>
  </intf-items>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/7</id>
          <version>v2</version>
          <grp-items>
            <Group-list>
              <id>123</id>
              <af>ipv4</af>
              <follow> </follow>
              <name>SomeName</name>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
</System>


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 Ethernet1/7
 no switchport
 no shutdown
 hsrp version 2
 hsrp 123
  name SomeName

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
topSystem sys
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-{[id]}
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-{[id]}
hsrpGroup sys/hsrp/inst/if-{[id]}/grp-{id}-{af}


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
adminStl1:AdminSt
(scalar:Enum8)
Administrative port stateSELECTION:
1 - down
2 - up
DEFAULT: up
idnw:IfId
(base:IfIndex)
An identifier .Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
layerl1:Layer
(scalar:Enum8)
Administrative port layerSELECTION:
1 - Layer2
2 - Layer3
DEFAULT: Layer2
userCfgdFlagsl1:userCfgdFlags
(scalar:Bitmask8)
Port User Config FlagsSELECTION:
0 - none
1 - admin_state
2 - admin_layer
4 - admin_router_mac
8 - admin_dce_mode
16 - admin_mtu
DEFAULT: none


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
versionhsrp:HsrpVersion
(scalar:Enum8)
Hsrp versionSELECTION:
1 - v1
2 - v2
DEFAULT: v1


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
followhsrp:GrpName
(string:Basic)
Master name string to follow
MAX SIZE: 250
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0
namehsrp:GrpName
(string:Basic)
Master name string
MAX SIZE: 250


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 a Redundancy-Name String under an IPv4 HSRP Interface

Deleting a Redundancy-Name String under an IPv4 HSRP Interface
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "adminSt": "up",
                  "id": "eth1/7",
                  "layer": "Layer3",
                  "userCfgdFlags": "admin_layer,admin_state"
}}}]}},{
"hsrpEntity": {
  "children": [
    {
      "hsrpInst": {
        "children": [
          {
            "hsrpIf": {
              "attributes": {
                "id": "eth1/7",
                "version": "v2"
              },
              "children": [
                {
                  "hsrpGroup": {
                    "attributes": {
                      "af": "ipv4",
                      "follow": "",
                      "id": "123",
                      "name": ""
}}}]}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/7</id>
        <adminSt>up</adminSt>
        <layer>Layer3</layer>
        <userCfgdFlags>admin_layer,admin_state</userCfgdFlags>
      </PhysIf-list>
    </phys-items>
  </intf-items>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/7</id>
          <version>v2</version>
          <grp-items>
            <Group-list>
              <id>123</id>
              <af>ipv4</af>
              <follow></follow>
              <name></name>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
</System>


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 Ethernet1/7
 no switchport
 no shutdown
 hsrp version 2
 hsrp 123
  no name

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
topSystem sys
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-{[id]}
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-{[id]}
hsrpGroup sys/hsrp/inst/if-{[id]}/grp-{id}-{af}


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
adminStl1:AdminSt
(scalar:Enum8)
Administrative port stateSELECTION:
1 - down
2 - up
DEFAULT: up
idnw:IfId
(base:IfIndex)
An identifier .Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
layerl1:Layer
(scalar:Enum8)
Administrative port layerSELECTION:
1 - Layer2
2 - Layer3
DEFAULT: Layer2
userCfgdFlagsl1:userCfgdFlags
(scalar:Bitmask8)
Port User Config FlagsSELECTION:
0 - none
1 - admin_state
2 - admin_layer
4 - admin_router_mac
8 - admin_dce_mode
16 - admin_mtu
DEFAULT: none


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
versionhsrp:HsrpVersion
(scalar:Enum8)
Hsrp versionSELECTION:
1 - v1
2 - v2
DEFAULT: v1


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
followhsrp:GrpName
(string:Basic)
Master name string to follow
MAX SIZE: 250
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0
namehsrp:GrpName
(string:Basic)
Master name string
MAX SIZE: 250


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 a String to Follow Under an IPv6 HSRP Interface

Configuring a String to Follow Under an IPv6 HSRP Interface
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "adminSt": "up",
                  "id": "eth1/7",
                  "layer": "Layer3",
                  "userCfgdFlags": "admin_layer,admin_state"
}}}]}},{
"hsrpEntity": {
  "children": [
    {
      "hsrpInst": {
        "children": [
          {
            "hsrpIf": {
              "attributes": {
                "id": "eth1/7",
                "version": "v2"
              },
              "children": [
                {
                  "hsrpGroup": {
                    "attributes": {
                      "af": "ipv6",
                      "follow": "SomeName",
                      "id": "123",
                      "name": " "
}}}]}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/7</id>
        <adminSt>up</adminSt>
        <layer>Layer3</layer>
        <userCfgdFlags>admin_layer,admin_state</userCfgdFlags>
      </PhysIf-list>
    </phys-items>
  </intf-items>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/7</id>
          <version>v2</version>
          <grp-items>
            <Group-list>
              <id>123</id>
              <af>ipv6</af>
              <follow>SomeName</follow>
              <name> </name>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
</System>


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 Ethernet1/7
 no switchport
 no shutdown
 hsrp version 2
 hsrp 123 ipv6
  follow SomeName

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
topSystem sys
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-{[id]}
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-{[id]}
hsrpGroup sys/hsrp/inst/if-{[id]}/grp-{id}-{af}


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
adminStl1:AdminSt
(scalar:Enum8)
Administrative port stateSELECTION:
1 - down
2 - up
DEFAULT: up
idnw:IfId
(base:IfIndex)
An identifier .Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
layerl1:Layer
(scalar:Enum8)
Administrative port layerSELECTION:
1 - Layer2
2 - Layer3
DEFAULT: Layer2
userCfgdFlagsl1:userCfgdFlags
(scalar:Bitmask8)
Port User Config FlagsSELECTION:
0 - none
1 - admin_state
2 - admin_layer
4 - admin_router_mac
8 - admin_dce_mode
16 - admin_mtu
DEFAULT: none


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
versionhsrp:HsrpVersion
(scalar:Enum8)
Hsrp versionSELECTION:
1 - v1
2 - v2
DEFAULT: v1


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
followhsrp:GrpName
(string:Basic)
Master name string to follow
MAX SIZE: 250
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0
namehsrp:GrpName
(string:Basic)
Master name string
MAX SIZE: 250


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 a String to Follow Under an IPv6 HSRP Interface

Deleting a String to Follow Under an IPv6 HSRP Interface
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "adminSt": "up",
                  "id": "eth1/7",
                  "layer": "Layer3",
                  "userCfgdFlags": "admin_layer,admin_state"
}}}]}},{
"hsrpEntity": {
  "children": [
    {
      "hsrpInst": {
        "children": [
          {
            "hsrpIf": {
              "attributes": {
                "id": "eth1/7",
                "version": "v2"
              },
              "children": [
                {
                  "hsrpGroup": {
                    "attributes": {
                      "af": "ipv6",
                      "follow": "",
                      "id": "123",
                      "name": ""
}}}]}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/7</id>
        <adminSt>up</adminSt>
        <layer>Layer3</layer>
        <userCfgdFlags>admin_layer,admin_state</userCfgdFlags>
      </PhysIf-list>
    </phys-items>
  </intf-items>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/7</id>
          <version>v2</version>
          <grp-items>
            <Group-list>
              <id>123</id>
              <af>ipv6</af>
              <follow></follow>
              <name></name>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
</System>


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 Ethernet1/7
 no switchport
 no shutdown
 hsrp version 2
 hsrp 123 ipv6
  no follow

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
topSystem sys
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-{[id]}
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-{[id]}
hsrpGroup sys/hsrp/inst/if-{[id]}/grp-{id}-{af}


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
adminStl1:AdminSt
(scalar:Enum8)
Administrative port stateSELECTION:
1 - down
2 - up
DEFAULT: up
idnw:IfId
(base:IfIndex)
An identifier .Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
layerl1:Layer
(scalar:Enum8)
Administrative port layerSELECTION:
1 - Layer2
2 - Layer3
DEFAULT: Layer2
userCfgdFlagsl1:userCfgdFlags
(scalar:Bitmask8)
Port User Config FlagsSELECTION:
0 - none
1 - admin_state
2 - admin_layer
4 - admin_router_mac
8 - admin_dce_mode
16 - admin_mtu
DEFAULT: none


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
versionhsrp:HsrpVersion
(scalar:Enum8)
Hsrp versionSELECTION:
1 - v1
2 - v2
DEFAULT: v1


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
followhsrp:GrpName
(string:Basic)
Master name string to follow
MAX SIZE: 250
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0
namehsrp:GrpName
(string:Basic)
Master name string
MAX SIZE: 250


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 a Redundancy-Name String under an IPv6 HSRP Interface

Configuring a Redundancy-Name String under an IPv6 HSRP Interface
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "adminSt": "up",
                  "id": "eth1/7",
                  "layer": "Layer3",
                  "userCfgdFlags": "admin_layer,admin_state"
}}}]}},{
"hsrpEntity": {
  "children": [
    {
      "hsrpInst": {
        "children": [
          {
            "hsrpIf": {
              "attributes": {
                "id": "eth1/7",
                "version": "v2"
              },
              "children": [
                {
                  "hsrpGroup": {
                    "attributes": {
                      "af": "ipv6",
                      "follow": " ",
                      "id": "123",
                      "name": "SomeName"
}}}]}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/7</id>
        <adminSt>up</adminSt>
        <layer>Layer3</layer>
        <userCfgdFlags>admin_layer,admin_state</userCfgdFlags>
      </PhysIf-list>
    </phys-items>
  </intf-items>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/7</id>
          <version>v2</version>
          <grp-items>
            <Group-list>
              <id>123</id>
              <af>ipv6</af>
              <follow> </follow>
              <name>SomeName</name>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
</System>


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 Ethernet1/7
 no switchport
 no shutdown
 hsrp version 2
 hsrp 123 ipv6   name SomeName

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
topSystem sys
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-{[id]}
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-{[id]}
hsrpGroup sys/hsrp/inst/if-{[id]}/grp-{id}-{af}


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
adminStl1:AdminSt
(scalar:Enum8)
Administrative port stateSELECTION:
1 - down
2 - up
DEFAULT: up
idnw:IfId
(base:IfIndex)
An identifier .Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
layerl1:Layer
(scalar:Enum8)
Administrative port layerSELECTION:
1 - Layer2
2 - Layer3
DEFAULT: Layer2
userCfgdFlagsl1:userCfgdFlags
(scalar:Bitmask8)
Port User Config FlagsSELECTION:
0 - none
1 - admin_state
2 - admin_layer
4 - admin_router_mac
8 - admin_dce_mode
16 - admin_mtu
DEFAULT: none


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
versionhsrp:HsrpVersion
(scalar:Enum8)
Hsrp versionSELECTION:
1 - v1
2 - v2
DEFAULT: v1


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
followhsrp:GrpName
(string:Basic)
Master name string to follow
MAX SIZE: 250
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0
namehsrp:GrpName
(string:Basic)
Master name string
MAX SIZE: 250


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 a Redundancy-Name String under an IPv6 HSRP Interface

Deleting a Redundancy-Name String under an IPv6 HSRP Interface
POST http://<mgmt0_IP>/api/mo/sys.json
{
  "topSystem": {
    "children": [
      {
        "interfaceEntity": {
          "children": [
            {
              "l1PhysIf": {
                "attributes": {
                  "adminSt": "up",
                  "id": "eth1/7",
                  "layer": "Layer3",
                  "userCfgdFlags": "admin_layer,admin_state"
}}}]}},{
"hsrpEntity": {
  "children": [
    {
      "hsrpInst": {
        "children": [
          {
            "hsrpIf": {
              "attributes": {
                "id": "eth1/7",
                "version": "v2"
              },
              "children": [
                {
                  "hsrpGroup": {
                    "attributes": {
                      "af": "ipv6",
                      "follow": "",
                      "id": "123",
                      "name": ""
}}}]}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <intf-items>
    <phys-items>
      <PhysIf-list>
        <id>eth1/7</id>
        <adminSt>up</adminSt>
        <layer>Layer3</layer>
        <userCfgdFlags>admin_layer,admin_state</userCfgdFlags>
      </PhysIf-list>
    </phys-items>
  </intf-items>
  <hsrp-items>
    <inst-items>
      <if-items>
        <If-list>
          <id>eth1/7</id>
          <version>v2</version>
          <grp-items>
            <Group-list>
              <id>123</id>
              <af>ipv6</af>
              <follow></follow>
              <name></name>
            </Group-list>
          </grp-items>
        </If-list>
      </if-items>
    </inst-items>
  </hsrp-items>
</System>


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 Ethernet1/7
 no switchport
 no shutdown
 hsrp version 2
 hsrp 123 ipv6
  no name

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
topSystem sys
interfaceEntity sys/intf
l1PhysIf sys/intf/phys-{[id]}
hsrpEntity sys/hsrp
hsrpInst sys/hsrp/inst
hsrpIf sys/hsrp/inst/if-{[id]}
hsrpGroup sys/hsrp/inst/if-{[id]}/grp-{id}-{af}


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
adminStl1:AdminSt
(scalar:Enum8)
Administrative port stateSELECTION:
1 - down
2 - up
DEFAULT: up
idnw:IfId
(base:IfIndex)
An identifier .Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
layerl1:Layer
(scalar:Enum8)
Administrative port layerSELECTION:
1 - Layer2
2 - Layer3
DEFAULT: Layer2
userCfgdFlagsl1:userCfgdFlags
(scalar:Bitmask8)
Port User Config FlagsSELECTION:
0 - none
1 - admin_state
2 - admin_layer
4 - admin_router_mac
8 - admin_dce_mode
16 - admin_mtu
DEFAULT: none


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
versionhsrp:HsrpVersion
(scalar:Enum8)
Hsrp versionSELECTION:
1 - v1
2 - v2
DEFAULT: v1


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
followhsrp:GrpName
(string:Basic)
Master name string to follow
MAX SIZE: 250
idhsrp:GroupId
(scalar:Uint16)
Group Id
RANGE: [0 , 4095]
DEFAULT: 0
namehsrp:GrpName
(string:Basic)
Master name string
MAX SIZE: 250


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