Configuring Static Routing

Static routes are route table entries that you manually configure. These static routes do not change unless you reconfigure them. Static routes are simple to design and work well in environments where network traffic is relatively predictable and where network design is relatively simple.

This section contains payload examples to demonstrate how to use the NX-API REST API to configure static routes on the Cisco Nexus 3000 and 9000 Series switches.

Configuring an IPv4 Static Route

Configuring an IPv4 Static Route
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
  "ipv4Inst": {
    "children": [
      {
        "ipv4Dom": {
          "attributes": {
            "name": "default"
          },
          "children": [
            {
              "ipv4Route": {
                "attributes": {
                  "prefix": "192.0.0.0/8"
                },
                "children": [
                  {
                    "ipv4Nexthop": {
                      "attributes": {
                        "nhAddr": "192.0.2.4/32",
                        "nhIf": "eth1/8",
                        "nhVrf": "default",
                        "pref": "1",
                        "rtname": "StatRt5",
                        "tag": "1234"
}}}]}}]}}]}}         
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <rt-items>
            <Route-list>
              <prefix>192.0.0.0/8</prefix>
              <nh-items>
                <Nexthop-list>
                  <nhIf>eth1/8</nhIf>
                  <nhAddr>192.0.2.4/32</nhAddr>
                  <nhVrf>default</nhVrf>
                  <pref>1</pref>
                  <rtname>StatRt5</rtname>
                  <tag>1234</tag>
                </Nexthop-list>
              </nh-items>
            </Route-list>
          </rt-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
</System>

Configures an IPv4 unicast static route.


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right.Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.

ip route 192.0.2.0/8 ethernet 1/8 192.0.2.4 name StatRt5 tag 1234 1

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
ipv4Inst sys/ipv4/inst
ipv4Dom sys/ipv4/inst/dom-{name}
ipv4Route sys/ipv4/inst/dom-{name}/rt-{[prefix]}
ipv4Nexthop sys/ipv4/inst/dom-{name}/rt-{[prefix]}/nh-{[nhIf]}-addr-{[nhAddr]}-vrf-{[nhVrf]}


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


ipv4Route Properties

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


ipv4Nexthop Properties

The following table contains information about the ipv4Nexthop 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
nhAddraddress:Ip
Nexthop AddressValue must match ipv4 or ipv6 known format
nhIfnw:IfId
(base:IfIndex)
Nexthop InterfaceMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
nhVrfl3:VrfName
(string:Basic)
Nexthop VRFA sequence of characters
prefscalar:UByte
Route preferenceRANGE: [0, 255]
rtnamestring:Basic
Next hop nameA sequence of characters
tagscalar:Uint32
tag valueRANGE: [0, 4294967295]


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 an IPv6 Static Route

Configuring an IPv6 Static Route
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
"ipv6Inst": {
 "children": [
{
"ipv6Dom": {
  "attributes": {
    "name": "default"
},
"children": [
{
  "ipv6Route": {
    "attributes": {
      "prefix": "2001:db8::/48"
    },
    "children": [
      {
        "ipv6Nexthop": {
          "attributes": {
            "nhAddr": "6::6/128",
            "nhIf": "eth2/1",
            "nhVrf": "default",
            "pref": "1",
            "rtname": "StatRtV6-5",
            "tag": "1234"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv6-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <rt-items>
            <Route-list>
              <prefix>2001:db8::/48</prefix>
              <nh-items>
                <Nexthop-list>
                  <nhIf>eth2/1</nhIf>
                  <nhAddr>6::6/128</nhAddr>
                  <nhVrf>default</nhVrf>
                  <pref>1</pref>
                  <rtname>StatRtV6-5</rtname>
                  <tag>1234</tag>
                </Nexthop-list>
              </nh-items>
            </Route-list>
          </rt-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv6-items>
</System>

Configures an IPv6 unicast static route.


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.

ipv6 route 2001:db8::/48 6::6 eth2/1 name StatRtV6-5 tag 1234 1

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
ipv6Inst sys/ipv6/inst
ipv6Dom sys/ipv6/inst/dom-{name}
ipv6Route sys/ipv6/inst/dom-{name}/rt-{[prefix]}
ipv6Nexthop sys/ipv6/inst/dom-{name}/rt-{[prefix]}/nh-{[nhIf]}-addr-{[nhAddr]}-vrf-{[nhVrf]}


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


ipv6Route Properties

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


ipv6Nexthop Properties

The following table contains information about the ipv6Nexthop 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
nhAddraddress:Ip
Nexthop AddressValue must match ipv4 or ipv6 known format
nhIfnw:IfId
(base:IfIndex)
Nexthop InterfaceMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
nhVrfl3:VrfName
(string:Basic)
Nexthop VRFA sequence of characters
prefscalar:UByte
Route preferenceRANGE: [0, 255]
rtnamestring:Basic
Next hop nameA sequence of characters
tagscalar:Uint32
tag valueRANGE: [0, 4294967295]


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 an IPv4 Static Route with BFD

Configuring an IPv4 Static Route with BFD
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
 "children": [
{
"ipv4Dom": {
  "attributes": {
    "name": "default"
},
"children": [
{
  "ipv4RtStaticBfd": {
    "attributes": {
      "intf": "eth1/9",
      "nexthop": "192.0.20.123"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <rtstaticbfd-items>
            <RtStaticBfd-list>
              <intf>eth1/9</intf>
              <nexthop>192.0.20.123</nexthop>
            </RtStaticBfd-list>
          </rtstaticbfd-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
</System>

Enables BFD for all static routes on an interface. Use the? keyword to display the supported interfaces.

Prerequisite: BFD is enabled


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.

ip route static bfd eth1/9 192.0.20.123

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
ipv4Inst sys/ipv4/inst
ipv4Dom sys/ipv4/inst/dom-{name}
ipv4RtStaticBfd sys/ipv4/inst/dom-{name}/rtstaticbfd-interface-{[intf]}-nexthop-{[nexthop]}


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


ipv4RtStaticBfd Properties

The following table contains information about the ipv4RtStaticBfd 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
intfnw:IfId
(base:IfIndex)
InterfaceMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
nexthopaddress:Ip
Nexthop 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

Deleting an IPv4 Static Route

Deleting an IPv4 Static Route
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4Dom": {
  "attributes": {
    "name": "default"
},
"children": [
{
  "ipv4Route": {
    "attributes": {
      "prefix": "192.0.0.0/8"
},
    "children": [
      {
        "ipv4Nexthop": {
          "attributes": {
            "nhAddr": "192.0.2.4",
            "nhIf": "eth1/8",
            "nhVrf": "default",
            "status": "deleted"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <rt-items>
            <Route-list>
              <prefix>192.0.0.0/8</prefix>
              <nh-items>
                <Nexthop-list xc:operation="delete">
                  <nhIf>eth1/8</nhIf>
                  <nhAddr>192.0.2.4</nhAddr>
                  <nhVrf>default</nhVrf>
                </Nexthop-list>
              </nh-items>
            </Route-list>
          </rt-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
</System>

Deletes an IPv4 static route.


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.

no ip route 192.0.2.0/8 ethernet 1/8 192.0.2.4

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
ipv4Inst sys/ipv4/inst
ipv4Dom sys/ipv4/inst/dom-{name}
ipv4Route sys/ipv4/inst/dom-{name}/rt-{[prefix]}
ipv4Nexthop sys/ipv4/inst/dom-{name}/rt-{[prefix]}/nh-{[nhIf]}-addr-{[nhAddr]}-vrf-{[nhVrf]}


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


ipv4Route Properties

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


ipv4Nexthop Properties

The following table contains information about the ipv4Nexthop 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
nhAddraddress:Ip
Nexthop AddressValue must match ipv4 or ipv6 known format
nhIfnw:IfId
(base:IfIndex)
Nexthop InterfaceMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
nhVrfl3:VrfName
(string:Basic)
Nexthop VRFA sequence of characters
statusmo:ModificationStatus
(scalar:Bitmask32)
The upgrade status. This property is for internal use only.SELECTION:
2 - created
4 - modified
8 - deleted
16 - replaced


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

Specifying a Next-Hop Address

Specifying an IPv4 Next-Hop Address
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
 "children": [
{
"ipv4Dom": {
  "attributes": {
    "name": "default"
},
"children": [
{
  "ipv4Route": {
    "attributes": {
      "prefix": "0.0.0.0/1"
},
"children": [
{
"ipv4Nexthop": {
  "attributes": {
    "nhAddr": "2.2.2.2/32",
    "nhIf": "unspecified",
    "nhVrf": "default"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <rt-items>
            <Route-list>
              <prefix>0.0.0.0/1</prefix>
              <nh-items>
                <Nexthop-list>
                  <nhIf>unspecified</nhIf>
                  <nhAddr>2.2.2.2/32</nhAddr>
                  <nhVrf>default</nhVrf>
                </Nexthop-list>
              </nh-items>
            </Route-list>
          </rt-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
</System>

Configures an IPv4 next hop.


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.

ip route 1.1.1.1/1 2.2.2.2

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
ipv4Inst sys/ipv4/inst
ipv4Dom sys/ipv4/inst/dom-{name}
ipv4Route sys/ipv4/inst/dom-{name}/rt-{[prefix]}
ipv4Nexthop sys/ipv4/inst/dom-{name}/rt-{[prefix]}/nh-{[nhIf]}-addr-{[nhAddr]}-vrf-{[nhVrf]}


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


ipv4Route Properties

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


ipv4Nexthop Properties

The following table contains information about the ipv4Nexthop 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
nhAddraddress:Ip
Nexthop AddressValue must match ipv4 or ipv6 known format
nhIfnw:IfId
(base:IfIndex)
Nexthop InterfaceMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
nhVrfl3:VrfName
(string:Basic)
Nexthop VRFA sequence of characters


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

Specifying an IPv6 Next-Hop Address

Specifying an IPv6 Next-Hop Address
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
"ipv6Inst": {
 "children": [
{
"ipv6Dom": {
  "attributes": {
    "name": "default"
},
"children": [
{
  "ipv6Route": {
    "attributes": {
      "prefix": "2:3::4:5/3"
},
"children": [
  {
    "ipv6Nexthop": {
      "attributes": {
        "nhAddr": "1:2::3:4/128",
        "nhIf": "eth1/1",
        "nhVrf": "default"
}}}]}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv6-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <rt-items>
            <Route-list>
              <prefix>2:3::4:5/3</prefix>
              <nh-items>
                <Nexthop-list>
                  <nhIf>eth1/1</nhIf>
                  <nhAddr>1:2::3:4/128</nhAddr>
                  <nhVrf>default</nhVrf>
                </Nexthop-list>
              </nh-items>
            </Route-list>
          </rt-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv6-items>
</System>

Configures an IPv6 unicast static route.


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.

ipv6 route 2:3::4:5/3 ethernet 1/1 1:2::3:4

Note: The property information for this example was added in Release 9.3(3).


Verifying a DME Configuration
The following table contains the distinguished name (DN) for each managed object (MO) in the DME payload. Issue a GET request using the DN to verify the configuration was posted or to get information about the configured properties of a particular object.

MODN
ipv6Inst sys/ipv6/inst
ipv6Dom sys/ipv6/inst/dom-{name}
ipv6Route sys/ipv6/inst/dom-{name}/rt-{[prefix]}
ipv6Nexthop sys/ipv6/inst/dom-{name}/rt-{[prefix]}/nh-{[nhIf]}-addr-{[nhAddr]}-vrf-{[nhVrf]}


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


ipv6Route Properties

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


ipv6Nexthop Properties

The following table contains information about the ipv6Nexthop 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
nhAddraddress:Ip
Nexthop AddressValue must match ipv4 or ipv6 known format
nhIfnw:IfId
(base:IfIndex)
Nexthop InterfaceMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
nhVrfl3:VrfName
(string:Basic)
Nexthop VRFA sequence of characters


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 IP Static Routes on an Interface

Configuring IP Static Routes on an Interface
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4Dom": {
  "attributes": {
    "name": "default"
},
"children": [
{
  "ipv4RtStaticBfd": {
    "attributes": {
      "intf": "eth1/1",
      "nexthop": "2.2.2.2"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv4-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <rtstaticbfd-items>
            <RtStaticBfd-list>
              <intf>eth1/1</intf>
              <nexthop>2.2.2.2</nexthop>
            </RtStaticBfd-list>
          </rtstaticbfd-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv4-items>
</System>

Enables BFD detection on a static route.


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.

interface ethernet1/1
 ip route static bfd ethernet1/1 2.2.2.2

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
ipv4Inst sys/ipv4/inst
ipv4Dom sys/ipv4/inst/dom-{name}
ipv4RtStaticBfd sys/ipv4/inst/dom-{name}/rtstaticbfd-interface-{[intf]}-nexthop-{[nexthop]}


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


ipv4RtStaticBfd Properties

The following table contains information about the ipv4RtStaticBfd 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
intfnw:IfId
(base:IfIndex)
InterfaceMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
nexthopaddress:Ip
Nexthop 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 IPv6 Static Routes on an Interface

Configuring IPv6 Static Routes
POST http://<mgmt0_IP>/api/mo/sys/ipv6/inst.json
{
"ipv6Inst": {
"children": [
{
"ipv6Dom": {
  "attributes": {
    "name": "default"
},
"children": [
{
  "ipv6RtStaticBfd": {
    "attributes": {
      "intf": "eth1/1",
      "nexthop": "2:4::6:8/128"
}}}]}}]}}
{
    imdata:[]
}
<System>
  <ipv6-items>
    <inst-items>
      <dom-items>
        <Dom-list>
          <name>default</name>
          <rtstaticbfd-items>
            <RtStaticBfd-list>
              <intf>eth1/1</intf>
              <nexthop>1:2::3:42/128</nexthop>
            </RtStaticBfd-list>
          </rtstaticbfd-items>
        </Dom-list>
      </dom-items>
    </inst-items>
  </ipv6-items>
</System>

Enables BFD detection on a static route.


CLI Command

The CLI command below is the equivalent to the payload example displayed in the pane on the right. Click the DME tab in the top-left corner of the right pane to view the JSON payload or the YANG tab to view the XML payload.

interface ethernet1/1
 ipv6 route static bfd ethernet1/1 2:4::6:8

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
ipv6Inst sys/ipv6/inst
ipv6Dom sys/ipv6/inst/dom-{name}
ipv6RtStaticBfd sys/ipv6/inst/dom-{name}/rtstaticbfd-interface-{[intf]}-nexthop-{[nexthop]}


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


ipv6RtStaticBfd Properties

The following table contains information about the ipv6RtStaticBfd 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
intfnw:IfId
(base:IfIndex)
InterfaceMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
nexthopaddress:Ip
Nexthop 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

Querying an IPv4 Static Route

Querying an IPv4 Static Route
GET http://<IP_Address>/api/node/mo/sys/ipv4/inst/dom-default/rt-[192.0.0.0/8].json
{
  "totalCount": "1",
  "imdata": [
{
  "ipv4Route": {
    "attributes": {
      "childAction": "",
      "ctrl": "",
      "descr": "",
      "dn": "sys/ipv4/inst/dom-default/rt-[192.0.0.0/8]",
      "modTs": "2016-12-16T00:41:12.115+00:00",
      "monPolDn": "uni/fabric/monfab-default",
      "name": "",
      "pcTag": "any",
      "persistentOnReload": "true",
      "pref": "1",
      "prefix": "192.0.0.0/8",
      "status": "",
      "tag": "0"
},
"children": [
  {
    "ipv4Nexthop": {
      "attributes": {
        "childAction": "",
        "descr": "",
        "flags": "",
        "ipv4CfgFailedBmp": "",
        "ipv4CfgFailedTs": "00:00:00:00.000",
        "ipv4CfgState": "0",
        "modTs": "2016-12-16T00:41:12.115+00:00",
        "monPolDn": "uni/fabric/monfab-default",
        "name": "",
        "nhAddr": "192.0.2.4/32",
        "nhIf": "eth1/9",
        "nhVrf": "default",
        "object": "0",
        "operSt": "up",
        "operStQual": "unspecified",
        "persistentOnReload": "true",
        "pref": "1",
        "rn": "nh-[eth1/9]-addr-[192.0.2.4/32]-vrf-[default]",
        "rtname": "StatRt5",
        "rwEncap": "unknown",
        "status": "",
        "tag": "1234"
}}}]}}]}

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
ipv4Route sys/ipv4/inst/dom-{name}/rt-{[prefix]}
ipv4Nexthop sys/ipv4/inst/dom-{name}/rt-{[prefix]}/nh-{[nhIf]}-addr-{[nhAddr]}-vrf-{[nhVrf]}


ipv4Route Properties

The following table contains information about the ipv4Route 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
childAction
mo:ModificationChildAction
scalar:Bitmask32
Delete or ignore. For internal use only.SELECTION:
  • 16384u - deleteAll
  • 4096u - ignore
  • 8192u - deleteNonPresent
  • DEFAULT: 0
  • ctrlip:RtControl
    (scalar:Bitmask8)
    ControlsSELECTION:
    1 - pervasive
    2 - bfd
    descrpol:Descr
    Description of the specified attribute
    dn
    reference:BinRef
    A tag or metadata is a non-hierarchical keyword or term assigned to the fabric module.
    modTsmo:TStamp
    (scalar:Date)
    The time when this object was last modified.SELECTION:
    0 - never
    DEFAULT: never
    monPolDn
    reference:BinRef
    namepol:ObjName
    (naming:Name256)
    Object name
    MAX SIZE: 64
    pcTagactrl:PcTag
    (vz:GPCTag)
    PC TagSELECTION:
    0 - any
    persistentOnReload
    mo:Persistent
    scalar:Enum8
    NO COMMENTSSELECTION:
  • 0 - false
  • 1 - true
  • DEFAULT: true(1)
  • prefrt:Preference
    (scalar:UByte)
    Preference
    RANGE: [1 , 255]
    DEFAULT: 1
    prefixaddress:Ip
    PrefixValue must match ipv4 or ipv6 known format
    statusmo:ModificationStatus
    (scalar:Bitmask32)
    The upgrade status. This property is for internal use only.SELECTION:
    2 - created
    4 - modified
    8 - deleted
    16 - replaced
    tagrt:Tag
    (scalar:Uint32)
    Tag
    RANGE: [0 , 0xffffffff]
    DEFAULT: 0


    ipv4Nexthop Properties

    The following table contains information about the ipv4Nexthop 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
    childAction
    mo:ModificationChildAction
    scalar:Bitmask32
    Delete or ignore. For internal use only.SELECTION:
  • 16384u - deleteAll
  • 4096u - ignore
  • 8192u - deleteNonPresent
  • DEFAULT: 0
  • descrpol:Descr
    Description of the specified attribute
    flagsip:NhFlags
    (scalar:Bitmask64)
    Rnh FlagsSELECTION:
    0 - unspecified
    1 - rnh
    DEFAULT: unspecified
    ipv4CfgFailedBmp
    scalar:Bitmask64
    NO COMMENTSSELECTION:
  • -9223372036854775808ull - ipv4:NexthopmodTs_failed_flag
  • 1024ull - ipv4:Nexthoppref_failed_flag
  • 128ull - ipv4:NexthopnhVrf_failed_flag
  • 16ull - ipv4:NexthopnhAddr_failed_flag
  • 1ull - ipv4:Nexthopname_failed_flag
  • 2048ull - ipv4:Nexthoprtname_failed_flag
  • 2305843009213693952ull - ipv4:Nexthopuid_failed_flag
  • 256ull - ipv4:NexthoprwEncap_failed_flag
  • 2ull - ipv4:Nexthopdescr_failed_flag
  • 32ull - ipv4:NexthopnhIf_failed_flag
  • 4096ull - ipv4:Nexthoptag_failed_flag
  • 4611686018427387904ull - ipv4:NexthoppersistentOnReload_failed_flag
  • 512ull - ipv4:Nexthopobject_failed_flag
  • 8ull - ipv4:NexthopmonPolDn_failed_flag
  • DEFAULT: 0
  • ipv4CfgFailedTs
    scalar:Uint64
    NO COMMENTS
    ipv4CfgState
    scalar:UByte
    NO COMMENTS
    modTsmo:TStamp
    (scalar:Date)
    The time when this object was last modified.SELECTION:
    0 - never
    DEFAULT: never
    monPolDn
    reference:BinRef
    namepol:ObjName
    (naming:Name256)
    Object name
    MAX SIZE: 64
    nhAddraddress:Ip
    Nexthop AddressValue must match ipv4 or ipv6 known format
    nhIfnw:IfId
    (base:IfIndex)
    Nexthop InterfaceMust match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100
    nhVrfl3:VrfName
    (string:Basic)
    Nexthop VRFA sequence of characters
    objectscalar:Uint32
    Object to be trackedRANGE: [0, 4294967295]
    operStip:OperSt
    (scalar:Enum8)
    Operational StateSELECTION:
    0 - unspecified
    1 - down
    2 - up
    3 - failed
    DEFAULT: up
    operStQual
    ip:NhOperStQual
    scalar:Enum8
    SELECTION:
  • 0 - unspecified
  • 1 - up
  • 2 - rt-unreachable
  • 3 - if-down
  • 4 - link-local-pfx
  • 5 - invalid-pfx-mask
  • 6 - invalid-pfx
  • 7 - invalid-pin-if-vrf
  • 8 - invalid-nh
  • 9 - invalid-nh-mask
  • 10 - invalid-if
  • 11 - local-nh
  • 12 - mcast-nh
  • 13 - lo-addr
  • 14 - max-nh-exceeded
  • 15 - invalid-route-vrf
  • 16 - no-nexthop
  • 17 - route-exists
  • 18 - rnh-not-resolved
  • 19 - internal-cfg-err
  • 20 - local-addr
  • 21 - vrf-down
  • DEFAULT: unspecified(0)
  • persistentOnReload
    mo:Persistent
    scalar:Enum8
    NO COMMENTSSELECTION:
  • 0 - false
  • 1 - true
  • DEFAULT: true(1)
  • prefscalar:UByte
    Route preferenceRANGE: [0, 255]
    rn
    reference:BinRN
    Identifies an object from its siblings within the context of its parent object. The distinguished name contains a sequence of relative names.
    rtnamestring:Basic
    Next hop nameA sequence of characters
    rwEncapbase:Encap
    Rewrite EncapsulationSELECTION: unknown, vlan-%d or vxlan-%d
    statusmo:ModificationStatus
    (scalar:Bitmask32)
    The upgrade status. This property is for internal use only.SELECTION:
    2 - created
    4 - modified
    8 - deleted
    16 - replaced
    tagscalar:Uint32
    tag valueRANGE: [0, 4294967295]


    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

    Querying a Static Route

    Querying a Static Route
    
    GET https://<IP_Address>/api/mo/sys/ipv4/inst/dom-default/routestat.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=10
    


    CLI Command

    show ip static-route [vrf {<vrf-name> | <vrf-known-name> | all}]

    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

    Querying IPv6 Static Routes

    Querying IPv6 Static Routes
    
    GET https://<IP_Address>/mo/sys/ipv6/inst/dom-default/routestats.json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
    
    Querying IPv6 Static Routes
    
    GET https://<IP_Address>/api/mo/sys/ipv6/inst/dom-default/routestats/pfx-[102:102:102::102/128]-nh-[12:1:1::2/128].json?rsp-subtree=full&rsp-foreign-subtree=ephemeral&batch-id=1&batch-size=20
    


    CLI Command

    show ipv6 static-route [<prefix>] [multicast] [track-table]

    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