Configuring Load Sharing in the Unicast FIB
Dynamic routing protocols such as Open Shortest Path First (OSPF) support load balancing with equal-cost multipath (ECMP). The routing protocol determines its best routes based on the metrics configured for the protocol and installs up to the protocol-configured maximum paths in the unicast RIB. The unicast RIB compares the administrative distances of all routing protocol paths in the RIB and selects a best path set from all of the path sets installed by the routing protocols. The unicast RIB installs this best path set into the FIB for use by the forwarding plane. The forwarding plane uses a load-sharing algorithm to select one of the installed paths in the FIB to use for a given data packet.
Note: Load sharing uses the same path for all packets in a given flow. A flow is defined by the load-sharing method that you configure. For example, if you configure source-destination load sharing, then all packets with the same source IP address and destination IP address pair follow the same path.
For more information, see the Cisco Nexus 9000 Series NX-OS Unicast Routing Configuration Guide:
Configuring the TTL Value to be Used in Hash for Source Port
Configuring the TTL Value to be Used in Hash for Source Port
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4IPLoadSharing": {
"attributes": {
"concatenation": "disabled",
"greOuterHash": "disabled",
"loadShareMode": "srcDestTTL",
"rotate": "32",
"udfLength": "0",
"udfOffset": "0",
"universalID": "0"
}}}]}}
{
imdata:[]
}
<System>
<ipv4-items>
<inst-items>
<iploadsharing-items>
<concatenation>disabled</concatenation>
<greOuterHash>disabled</greOuterHash>
<loadShareMode>srcDestTTL</loadShareMode>
<rotate>32</rotate>
<udfLength>0</udfLength>
<udfOffset>0</udfOffset>
<universalID>0</universalID>
</iploadsharing-items>
</inst-items>
</ipv4-items>
</System>
Note: This example was added in Release 9.3(3).
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.
ip load-sharing address source-destination ttl
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 |
ipv4IPLoadSharing | sys/ipv4/inst/iploadsharing |
ipv4IPLoadSharing Properties
The following table contains information about the ipv4IPLoadSharing 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 |
---|---|---|---|
concatenation | nw:AdminSt (scalar:Enum8) | Concatenation | SELECTION: 1 - enabled 2 - disabled DEFAULT: disabled |
greOuterHash | nw:AdminSt (scalar:Enum8) | GRE Outer Hash | SELECTION: 1 - enabled 2 - disabled DEFAULT: disabled |
loadShareMode | ip:LoadShareFormat (scalar:Enum8) | Load sharing mode | SELECTION: 1 - disabled 2 - destPort 3 - srcDest 4 - srcDestGre 5 - srcDestPort 6 - source 7 - srcDestGTPU 8 - srcDestSymmetric 9 - srcDestInnerAll 10 - srcDestInnerGre 11 - srcDestInnerGreSymmetric 12 - srcDestIPv6FlowLabel 13 - srcDestTTL 14 - srcDestUDF DEFAULT: disabled |
rotate | scalar:Uint16 | Rotate | RANGE: [1 , 63] DEFAULT: 32 |
udfLength | scalar:Uint16 | source-destination udf length | RANGE: [0 , 32] |
udfOffset | scalar:Uint16 | source-destination udf | RANGE: [0 , 127] |
universalID | scalar:Uint32 | Universal-ID(Random seed) | 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:
Unconfiguring the TTL Value to be Used in Hash for Source Port
Unconfiguring the TTL Value to be Used in Hash for Source Port
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4IPLoadSharing": {
"attributes": {
"status": "deleted"
}}}]}}
{
imdata:[]
}
<System>
<ipv4-items>
<inst-items>
<iploadsharing-items nc:operation="delete">
</iploadsharing-items>
</inst-items>
</ipv4-items>
</System>
Note: This example was added in Release 9.3(3).
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 ip load-sharing address source-destination ttl
Warning: This would disable inner header based hashing for GRE traffic on Port channel and ECMP (if enabled)
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 |
ipv4IPLoadSharing | sys/ipv4/inst/iploadsharing |
ipv4IPLoadSharing Properties
The following table contains information about the ipv4IPLoadSharing 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 |
---|---|---|---|
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:
Configuring the UDF Value to be Used in Hash for Source Port
Configuring the UDF Value to be Used in Hash for Source Port
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4IPLoadSharing": {
"attributes": {
"concatenation": "disabled",
"greOuterHash": "disabled",
"loadShareMode": "srcDestUDF",
"rotate": "32",
"udfLength": "32",
"udfOffset": "100",
"universalID": "0"
}}}]}}
{
imdata:[]
}
<System>
<ipv4-items>
<inst-items>
<iploadsharing-items>
<concatenation>disabled</concatenation>
<greOuterHash>disabled</greOuterHash>
<loadShareMode>srcDestUDF</loadShareMode>
<rotate>32</rotate>
<udfLength>32</udfLength>
<udfOffset>100</udfOffset>
<universalID>0</universalID>
</iploadsharing-items>
</inst-items>
</ipv4-items>
</System>
Note: This example was added in Release 9.3(3).
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.
ip load-sharing address source-destination udf offset 100 length 32
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 |
ipv4IPLoadSharing | sys/ipv4/inst/iploadsharing |
ipv4IPLoadSharing Properties
The following table contains information about the ipv4IPLoadSharing 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 |
---|---|---|---|
concatenation | nw:AdminSt (scalar:Enum8) | Concatenation | SELECTION: 1 - enabled 2 - disabled DEFAULT: disabled |
greOuterHash | nw:AdminSt (scalar:Enum8) | GRE Outer Hash | SELECTION: 1 - enabled 2 - disabled DEFAULT: disabled |
loadShareMode | ip:LoadShareFormat (scalar:Enum8) | Load sharing mode | SELECTION: 1 - disabled 2 - destPort 3 - srcDest 4 - srcDestGre 5 - srcDestPort 6 - source 7 - srcDestGTPU 8 - srcDestSymmetric 9 - srcDestInnerAll 10 - srcDestInnerGre 11 - srcDestInnerGreSymmetric 12 - srcDestIPv6FlowLabel 13 - srcDestTTL 14 - srcDestUDF DEFAULT: disabled |
rotate | scalar:Uint16 | Rotate | RANGE: [1 , 63] DEFAULT: 32 |
udfLength | scalar:Uint16 | source-destination udf length | RANGE: [0 , 32] |
udfOffset | scalar:Uint16 | source-destination udf | RANGE: [0 , 127] |
universalID | scalar:Uint32 | Universal-ID(Random seed) | 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:
Unconfiguring the UDF Value to be Used in Hash for Source Port
Unconfiguring the UDF Value to be Used in Hash for Source Port
POST http://<mgmt0_IP>/api/mo/sys/ipv4/inst.json
{
"ipv4Inst": {
"children": [
{
"ipv4IPLoadSharing": {
"attributes": {
"status": "deleted"
}}}]}}
{
imdata:[]
}
<System>
<ipv4-items>
<inst-items>
<iploadsharing-items nc:operation="delete">
</iploadsharing-items>
</inst-items>
</ipv4-items>
</System>
Note: This example was added in Release 9.3(3).
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 ip load-sharing address source-destination udf offset 100 length 32
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 |
ipv4IPLoadSharing | sys/ipv4/inst/iploadsharing |
ipv4IPLoadSharing Properties
The following table contains information about the ipv4IPLoadSharing 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 |
---|---|---|---|
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:
ECMP Hashing Without L3-proto
ECMP Hashing Without L3-proto
{
"ipv4IPLoadSharing": {
"attributes": {
"childAction": "",
"concatenation": "disabled",
"dn": "sys/ipv4/inst/iploadsharing",
"ecmpLoadSharing": "disabled",
"excludeL3Proto": "disabled",
"greOuterHash": "disabled",
"lb2ndHierKeyshift": "0",
"lbKeyshift": "0",
"loadShareMode": "destPort",
"modTs": "2024-01-11T04:38:55.426+00:00",
"rotate": "32",
"status": "",
"udfLength": "0",
"udfOffset": "0",
"universalID": "0"
}
}
}
Note: This example was added in Release 10.5(1).
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.
ip load-sharing address source exclude-l3-proto
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 |
---|---|
iploadsharing | sys/ipv4/inst/iploadsharing |
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: