HASH-Netconf
Resources Summary
Section titled “Resources Summary”| YANG Path | get/get-config | edit-config | rpc |
|---|---|---|---|
| /hash | Y | merge, replace, create, delete | — |
| /hash/capabilities | Y | — | — |
| /hash/global | Y | merge, replace, create, delete | — |
| /hash/global/ecmp | Y | merge, replace, create, delete | — |
| /hash/global/lag | Y | merge, replace, create, delete | — |
Examples
Section titled “Examples”This chapter provides examples on how to use Netconf to manage hash configurations on AsterNOS devices.
Show Hash Capabilities
Section titled “Show Hash Capabilities”Request example to get hash capabilities via get.
<filter type="subtree"> <top> <hash> <capabilities/> </hash> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:c92a2dd0-3ed0-42e8-a7dd-20a280bec590"> <data> <top> <hash xmlns="http://asterfusion.com/ns/yang/asternos-hash"> <capabilities> <ecmp> <hash-algorithms>CRC</hash-algorithms> <hash-algorithms>XOR</hash-algorithms> <hash-algorithms>CRC_32LO</hash-algorithms> <hash-algorithms>CRC_32HI</hash-algorithms> <hash-fields>SRC_IP</hash-fields> <hash-fields>DST_IP</hash-fields> <hash-fields>VLAN_ID</hash-fields> <hash-fields>L4_SRC_PORT</hash-fields> <hash-fields>L4_DST_PORT</hash-fields> <hash-fields>SRC_MAC</hash-fields> <hash-fields>DST_MAC</hash-fields> <hash-fields>IN_PORT</hash-fields> </ecmp> <lag> <hash-algorithms>CRC</hash-algorithms> <hash-algorithms>XOR</hash-algorithms> <hash-algorithms>CRC_32LO</hash-algorithms> <hash-algorithms>CRC_32HI</hash-algorithms> <hash-fields>SRC_IP</hash-fields> <hash-fields>DST_IP</hash-fields> <hash-fields>VLAN_ID</hash-fields> <hash-fields>L4_SRC_PORT</hash-fields> <hash-fields>L4_DST_PORT</hash-fields> <hash-fields>SRC_MAC</hash-fields> <hash-fields>DST_MAC</hash-fields> <hash-fields>IN_PORT</hash-fields> </lag> </capabilities> </hash> </top> </data></rpc-reply>Show Global Hash Configurations
Section titled “Show Global Hash Configurations”Request example to get global hash configuration via get-config.
<filter type="subtree"> <top> <hash> <global/> </hash> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:01ab5ce2-b1f9-4f2d-b502-451cf536acef"> <data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <top> <hash xmlns="http://asterfusion.com/ns/yang/asternos-hash"> <global> <lag> <algorithm>CRC</algorithm> <seed>10</seed> <hash-fields>DST_IP</hash-fields> <hash-fields>SRC_IP</hash-fields> <hash-fields>L4_DST_PORT</hash-fields> <hash-fields>L4_SRC_PORT</hash-fields> </lag> <ecmp> <algorithm>CRC</algorithm> <seed>10</seed> <hash-fields>DST_IP</hash-fields> <hash-fields>SRC_IP</hash-fields> <hash-fields>L4_DST_PORT</hash-fields> <hash-fields>L4_SRC_PORT</hash-fields> </ecmp> </global> </hash> </top> </data></rpc-reply>Create Global Hash Configurations
Section titled “Create Global Hash Configurations”The algorithm must be manually specified as CRC before configuring the seed field.
Request example to create global hash configuration via edit-config.
<config message-id="100"> <top> <hash> <global operation="create"> <lag> <algorithm>CRC</algorithm> <seed>100</seed> <hash-fields>SRC_IP</hash-fields> <hash-fields>DST_IP</hash-fields> </lag> <ecmp> <algorithm>XOR</algorithm> <hash-fields>SRC_IP</hash-fields> <hash-fields>DST_IP</hash-fields> </ecmp> </global> </hash> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5a4635a2-4758-41de-9693-9e9da22374a2"> <ok/></rpc-reply>Modify Global Hash Configurations
Section titled “Modify Global Hash Configurations”Request example to modify global hash configuration via edit-config.
<config message-id="100"> <top> <hash> <global operation="merge"> <lag> <algorithm>CRC</algorithm> <seed>100</seed> <hash-fields>SRC_MAC</hash-fields> <hash-fields>DST_MAC</hash-fields> </lag> <ecmp> <algorithm>XOR</algorithm> <hash-fields>SRC_MAC</hash-fields> <hash-fields>DST_MAC</hash-fields> </ecmp> </global> </hash> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5104c146-8ad4-487b-a196-14c34b0db0bf"> <ok/></rpc-reply>Delete Lag Hash Configurations
Section titled “Delete Lag Hash Configurations”Request example to delete global lag hash configuration via edit-config.
<config message-id="100"> <top> <hash> <global> <lag operation="delete"> </lag> </global> </hash> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:1f5de122-d95f-40d3-9738-45bc39ad4090"> <ok/></rpc-reply>Delete Global Hash Configurations
Section titled “Delete Global Hash Configurations”Request example to delete global hash configuration via edit-config.
<config message-id="100"> <top> <hash> <global operation="delete"> </global> </hash> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ce5f342d-c0a3-45e0-9e2b-bb32578e4628"> <ok/></rpc-reply>Properties Descriptions
Section titled “Properties Descriptions”Hash configuration
Section titled “Hash configuration”Tree Diagram
module: asternos-hash +--rw hash +--rw global | +--rw lag | | +--rw algorithm? identityref | | +--rw seed? uint32 | | +--rw hash-fields* identityref | +--rw ecmp | +--rw algorithm? identityref | +--rw seed? uint32 | +--rw hash-fields* identityref +--ro capabilities +--ro ecmp | +--ro hash-algorithms* identityref | +--ro hash-fields* identityref +--ro lag +--ro hash-algorithms* identityref +--ro hash-fields* identityrefTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| hash | M | Path-only node, has no configurable value. Hash configuration | |
| global | M | Path-only node, has no configurable value. Global hash configuration | |
| lag | M | Path-only node, has no configurable value. LAG hash configuration | |
| algorithm | O | ”CRC_32HI" "XOR" "CRC_32LO" "CRC” | Hash algorithm for LAG |
| seed | O | integer | Seed for LAG hash |
| hash-fields | O | ”DST_IP" "L4_DST_PORT" "L4_SRC_PORT" "IN_PORT" "VLAN_ID" "DST_MAC" "SRC_IP" "SRC_MAC” | Hash fields for LAG |
| ecmp | M | Path-only node, has no configurable value. ECMP hash configuration | |
| algorithm | O | ”CRC_32HI" "XOR" "CRC_32LO" "CRC” | Hash algorithm for LAG |
| seed | O | integer | Seed for LAG hash |
| hash-fields | O | ”DST_IP" "L4_DST_PORT" "L4_SRC_PORT" "IN_PORT" "VLAN_ID" "DST_MAC" "SRC_IP" "SRC_MAC” | Hash fields for LAG |
| capabilities | RO | Path-only node, has no configurable value. Hash capabilities | |
| ecmp | RO | Path-only node, has no configurable value. ECMP capabilities | |
| hash-algorithms | RO | ”CRC_32HI" "XOR" "CRC_32LO" "CRC” | Supported hash algorithms |
| hash-fields | RO | ”DST_IP" "L4_DST_PORT" "IN_PORT" "L4_SRC_PORT" "VLAN_ID" "DST_MAC" "SRC_IP" "SRC_MAC” | Supported hash fields |
| lag | RO | Path-only node, has no configurable value. LAG capabilities | |
| hash-algorithms | RO | ”CRC_32HI" "XOR" "CRC_32LO" "CRC” | Supported hash algorithms |
| hash-fields | RO | ”DST_IP" "L4_DST_PORT" "IN_PORT" "L4_SRC_PORT" "VLAN_ID" "DST_MAC" "SRC_IP" "SRC_MAC” | Supported hash fields |
Hash capabilities
Section titled “Hash capabilities”Tree Diagram
module: asternos-hash +--rw hash +--ro capabilities +--ro ecmp | +--ro hash-algorithms* identityref | +--ro hash-fields* identityref +--ro lag +--ro hash-algorithms* identityref +--ro hash-fields* identityrefTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| capabilities | RO | Path-only node, has no configurable value. Hash capabilities | |
| ecmp | RO | Path-only node, has no configurable value. ECMP capabilities | |
| hash-algorithms | RO | ”CRC_32HI" "XOR" "CRC_32LO" "CRC” | Supported hash algorithms |
| hash-fields | RO | ”DST_IP" "L4_DST_PORT" "IN_PORT" "L4_SRC_PORT" "VLAN_ID" "DST_MAC" "SRC_IP" "SRC_MAC” | Supported hash fields |
| lag | RO | Path-only node, has no configurable value. LAG capabilities | |
| hash-algorithms | RO | ”CRC_32HI" "XOR" "CRC_32LO" "CRC” | Supported hash algorithms |
| hash-fields | RO | ”DST_IP" "L4_DST_PORT" "IN_PORT" "L4_SRC_PORT" "VLAN_ID" "DST_MAC" "SRC_IP" "SRC_MAC” | Supported hash fields |
Global hash configuration
Section titled “Global hash configuration”Tree Diagram
module: asternos-hash +--rw hash +--rw global +--rw lag | +--rw algorithm? identityref | +--rw seed? uint32 | +--rw hash-fields* identityref +--rw ecmp +--rw algorithm? identityref +--rw seed? uint32 +--rw hash-fields* identityrefTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| global | M | Path-only node, has no configurable value. Global hash configuration | |
| lag | M | Path-only node, has no configurable value. LAG hash configuration | |
| algorithm | O | ”CRC_32HI" "XOR" "CRC_32LO" "CRC” | Hash algorithm for LAG |
| seed | O | integer | Seed for LAG hash |
| hash-fields | O | ”DST_IP" "L4_DST_PORT" "L4_SRC_PORT" "IN_PORT" "VLAN_ID" "DST_MAC" "SRC_IP" "SRC_MAC” | Hash fields for LAG |
| ecmp | M | Path-only node, has no configurable value. ECMP hash configuration | |
| algorithm | O | ”CRC_32HI" "XOR" "CRC_32LO" "CRC” | Hash algorithm for LAG |
| seed | O | integer | Seed for LAG hash |
| hash-fields | O | ”DST_IP" "L4_DST_PORT" "L4_SRC_PORT" "IN_PORT" "VLAN_ID" "DST_MAC" "SRC_IP" "SRC_MAC” | Hash fields for LAG |
ECMP hash configuration
Section titled “ECMP hash configuration”Tree Diagram
module: asternos-hash +--rw hash +--rw global +--rw ecmp +--rw algorithm? identityref +--rw seed? uint32 +--rw hash-fields* identityrefTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| ecmp | M | Path-only node, has no configurable value. ECMP hash configuration | |
| algorithm | O | ”CRC_32HI" "XOR" "CRC_32LO" "CRC” | Hash algorithm for LAG |
| seed | O | integer | Seed for LAG hash |
| hash-fields | O | ”DST_IP" "L4_DST_PORT" "L4_SRC_PORT" "IN_PORT" "VLAN_ID" "DST_MAC" "SRC_IP" "SRC_MAC” | Hash fields for LAG |
LAG hash configuration
Section titled “LAG hash configuration”Tree Diagram
module: asternos-hash +--rw hash +--rw global +--rw lag +--rw algorithm? identityref +--rw seed? uint32 +--rw hash-fields* identityrefTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| lag | M | Path-only node, has no configurable value. LAG hash configuration | |
| algorithm | O | ”CRC_32HI" "XOR" "CRC_32LO" "CRC” | Hash algorithm for LAG |
| seed | O | integer | Seed for LAG hash |
| hash-fields | O | ”DST_IP" "L4_DST_PORT" "L4_SRC_PORT" "IN_PORT" "VLAN_ID" "DST_MAC" "SRC_IP" "SRC_MAC” | Hash fields for LAG |