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.
MO | DN |
---|---|
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 Name | Data Type | Description | Values |
---|---|---|---|
name | naming: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 Name | Data Type | Description | Values |
---|---|---|---|
prefix | address:Ip | Prefix | Value 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 Name | Data Type | Description | Values |
---|---|---|---|
nhAddr | address:Ip | Nexthop Address | Value must match ipv4 or ipv6 known format |
nhIf | nw:IfId (base:IfIndex) | Nexthop Interface | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
nhVrf | l3:VrfName (string:Basic) | Nexthop VRF | A sequence of characters |
pref | scalar:UByte | Route preference | RANGE: [0, 255] |
rtname | string:Basic | Next hop name | A sequence of characters |
tag | scalar:Uint32 | tag value | RANGE: [0, 4294967295] |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
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.
MO | DN |
---|---|
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 Name | Data Type | Description | Values |
---|---|---|---|
name | naming: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 Name | Data Type | Description | Values |
---|---|---|---|
prefix | address:Ip | Prefix | Value 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 Name | Data Type | Description | Values |
---|---|---|---|
nhAddr | address:Ip | Nexthop Address | Value must match ipv4 or ipv6 known format |
nhIf | nw:IfId (base:IfIndex) | Nexthop Interface | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
nhVrf | l3:VrfName (string:Basic) | Nexthop VRF | A sequence of characters |
pref | scalar:UByte | Route preference | RANGE: [0, 255] |
rtname | string:Basic | Next hop name | A sequence of characters |
tag | scalar:Uint32 | tag value | RANGE: [0, 4294967295] |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
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.
MO | DN |
---|---|
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 Name | Data Type | Description | Values |
---|---|---|---|
name | naming: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 Name | Data Type | Description | Values |
---|---|---|---|
intf | nw:IfId (base:IfIndex) | Interface | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
nexthop | address:Ip | Nexthop Address | Value must match ipv4 or ipv6 known format |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
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.
MO | DN |
---|---|
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 Name | Data Type | Description | Values |
---|---|---|---|
name | naming: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 Name | Data Type | Description | Values |
---|---|---|---|
prefix | address:Ip | Prefix | Value 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 Name | Data Type | Description | Values |
---|---|---|---|
nhAddr | address:Ip | Nexthop Address | Value must match ipv4 or ipv6 known format |
nhIf | nw:IfId (base:IfIndex) | Nexthop Interface | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
nhVrf | l3:VrfName (string:Basic) | Nexthop VRF | A sequence of characters |
status | mo: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:
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:
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.
MO | DN |
---|---|
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 Name | Data Type | Description | Values |
---|---|---|---|
name | naming: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 Name | Data Type | Description | Values |
---|---|---|---|
prefix | address:Ip | Prefix | Value 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 Name | Data Type | Description | Values |
---|---|---|---|
nhAddr | address:Ip | Nexthop Address | Value must match ipv4 or ipv6 known format |
nhIf | nw:IfId (base:IfIndex) | Nexthop Interface | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
nhVrf | l3:VrfName (string:Basic) | Nexthop VRF | A sequence of characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
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.
MO | DN |
---|---|
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 Name | Data Type | Description | Values |
---|---|---|---|
name | naming: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 Name | Data Type | Description | Values |
---|---|---|---|
prefix | address:Ip | Prefix | Value 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 Name | Data Type | Description | Values |
---|---|---|---|
nhAddr | address:Ip | Nexthop Address | Value must match ipv4 or ipv6 known format |
nhIf | nw:IfId (base:IfIndex) | Nexthop Interface | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
nhVrf | l3:VrfName (string:Basic) | Nexthop VRF | A sequence of characters |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
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.
MO | DN |
---|---|
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 Name | Data Type | Description | Values |
---|---|---|---|
name | naming: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 Name | Data Type | Description | Values |
---|---|---|---|
intf | nw:IfId (base:IfIndex) | Interface | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
nexthop | address:Ip | Nexthop Address | Value must match ipv4 or ipv6 known format |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
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.
MO | DN |
---|---|
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 Name | Data Type | Description | Values |
---|---|---|---|
name | naming: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 Name | Data Type | Description | Values |
---|---|---|---|
intf | nw:IfId (base:IfIndex) | Interface | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
nexthop | address:Ip | Nexthop Address | Value must match ipv4 or ipv6 known format |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
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.
MO | DN |
---|---|
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 Name | Data Type | Description | Values |
---|---|---|---|
childAction | mo:ModificationChildAction scalar:Bitmask32 | Delete or ignore. For internal use only. | SELECTION:
|
ctrl | ip:RtControl (scalar:Bitmask8) | Controls | SELECTION: 1 - pervasive 2 - bfd |
descr | pol: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. | |
modTs | mo:TStamp (scalar:Date) | The time when this object was last modified. | SELECTION: 0 - never DEFAULT: never |
monPolDn | reference:BinRef | ||
name | pol:ObjName (naming:Name256) | Object name | MAX SIZE: 64 |
pcTag | actrl:PcTag (vz:GPCTag) | PC Tag | SELECTION: 0 - any |
persistentOnReload | mo:Persistent scalar:Enum8 | NO COMMENTS | SELECTION:
|
pref | rt:Preference (scalar:UByte) | Preference | RANGE: [1 , 255] DEFAULT: 1 |
prefix | address:Ip | Prefix | Value must match ipv4 or ipv6 known format |
status | mo:ModificationStatus (scalar:Bitmask32) | The upgrade status. This property is for internal use only. | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
tag | rt: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 Name | Data Type | Description | Values |
---|---|---|---|
childAction | mo:ModificationChildAction scalar:Bitmask32 | Delete or ignore. For internal use only. | SELECTION:
|
descr | pol:Descr | Description of the specified attribute | |
flags | ip:NhFlags (scalar:Bitmask64) | Rnh Flags | SELECTION: 0 - unspecified 1 - rnh DEFAULT: unspecified |
ipv4CfgFailedBmp | scalar:Bitmask64 | NO COMMENTS | SELECTION:
|
ipv4CfgFailedTs | scalar:Uint64 | NO COMMENTS | |
ipv4CfgState | scalar:UByte | NO COMMENTS | |
modTs | mo:TStamp (scalar:Date) | The time when this object was last modified. | SELECTION: 0 - never DEFAULT: never |
monPolDn | reference:BinRef | ||
name | pol:ObjName (naming:Name256) | Object name | MAX SIZE: 64 |
nhAddr | address:Ip | Nexthop Address | Value must match ipv4 or ipv6 known format |
nhIf | nw:IfId (base:IfIndex) | Nexthop Interface | Must match first field in the output of `show intf brief`. Example: Eth1/1 or Vlan100 |
nhVrf | l3:VrfName (string:Basic) | Nexthop VRF | A sequence of characters |
object | scalar:Uint32 | Object to be tracked | RANGE: [0, 4294967295] |
operSt | ip:OperSt (scalar:Enum8) | Operational State | SELECTION: 0 - unspecified 1 - down 2 - up 3 - failed DEFAULT: up |
operStQual | ip:NhOperStQual scalar:Enum8 | SELECTION:
| |
persistentOnReload | mo:Persistent scalar:Enum8 | NO COMMENTS | SELECTION:
|
pref | scalar:UByte | Route preference | RANGE: [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. | |
rtname | string:Basic | Next hop name | A sequence of characters |
rwEncap | base:Encap | Rewrite Encapsulation | SELECTION: unknown, vlan-%d or vxlan-%d |
status | mo:ModificationStatus (scalar:Bitmask32) | The upgrade status. This property is for internal use only. | SELECTION: 2 - created 4 - modified 8 - deleted 16 - replaced |
tag | scalar:Uint32 | tag value | RANGE: [0, 4294967295] |
Related Documentation
For other CLI options, see the Cisco Nexus 9000 Series NX-OS Command Reference:
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:
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