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>

Note: This example was added in Release 7.0(3)I7(2).


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

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>

Note: This example was added in Release 7.0(3)I7(2).


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

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

This section contains payload and CLI examples to demonstrate many of the HSRP version 1 configuration options and to show how the REST APIs correspond to the CLI commands.

Configuring an IPv4 HSRP Group (HSRP Version 1)

Configuring an IPv4 HSRP Group (HSRP Version 1)
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

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 (HSRP Version 1)

Configuring a Redundancy-Name String under an IPv4 HSRP Interface (HSRP Version 1)
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>

Note: This example was added in Release 7.0(3)I7(2).


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

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 (HSRP Version 1)

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>

Note: This example was added in Release 7.0(3)I7(2).


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

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

This section contains payload and CLI examples to demonstrate many of the HSRP version 2 configuration options and to show how the REST APIs correspond to the CLI commands.

Configuring an IPv6 HSRP Group (HSRP Version 2)

Configuring an IPv6 HSRP Group (HSRP Version 2)
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

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

Configuring a String to Follow Under an IPv4 HSRP Interface (HSRP Version 2)
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.

Note: This example was added in Release 7.0(3)I7(2).


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

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

Deleting a String to Follow Under an IPv4 HSRP Interface (HSRP Version 2)
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>

Note: This example was added in Release 7.0(3)I7(2).


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

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

Configuring a Redundancy-Name String under an IPv4 HSRP Interface (HSRP Version 2)
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>

Note: This example was added in Release 7.0(3)I7(2).


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

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

Deleting a Redundancy-Name String under an IPv4 HSRP Interface (HSRP Version 2)
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>

Note: This example was added in Release 7.0(3)I7(2).


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

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

Configuring a String to Follow Under an IPv6 HSRP Interface (HSRP Version 2)
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>

Note: This example was added in Release 7.0(3)I7(2).


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

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

Deleting a String to Follow Under an IPv6 HSRP Interface (HSRP Version 2)
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>

Note: This example was added in Release 7.0(3)I7(2).


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

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

Configuring a Redundancy-Name String under an IPv6 HSRP Interface (HSRP Version 2)
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>

Note: This example was added in Release 7.0(3)I7(2).


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

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

Deleting a Redundancy-Name String under an IPv6 HSRP Interface  (HSRP Version 2)
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>

Note: This example was added in Release 7.0(3)I7(2).


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

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