跳转到内容
Ask AI

HASH-Netconf

此内容尚不支持你的语言。

YANG Pathget/get-configedit-configrpc
/hashYmerge, replace, create, delete—
/hash/capabilitiesY——
/hash/globalYmerge, replace, create, delete—
/hash/global/ecmpYmerge, replace, create, delete—
/hash/global/lagYmerge, replace, create, delete—

This chapter provides examples on how to use Netconf to manage hash configurations on AsterNOS devices.

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>

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>

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>

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>

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>

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>

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* identityref

Table of Properties

NameRequiredType/RangeDescription
hashMPath-only node, has no configurable value.
Hash configuration
globalMPath-only node, has no configurable value.
Global hash configuration
lagMPath-only node, has no configurable value.
LAG hash configuration
algorithmO”CRC_32HI"
"XOR"
"CRC_32LO"
"CRC”
Hash algorithm for LAG
seedOintegerSeed for LAG hash
hash-fieldsO”DST_IP"
"L4_DST_PORT"
"L4_SRC_PORT"
"IN_PORT"
"VLAN_ID"
"DST_MAC"
"SRC_IP"
"SRC_MAC”
Hash fields for LAG
ecmpMPath-only node, has no configurable value.
ECMP hash configuration
algorithmO”CRC_32HI"
"XOR"
"CRC_32LO"
"CRC”
Hash algorithm for LAG
seedOintegerSeed for LAG hash
hash-fieldsO”DST_IP"
"L4_DST_PORT"
"L4_SRC_PORT"
"IN_PORT"
"VLAN_ID"
"DST_MAC"
"SRC_IP"
"SRC_MAC”
Hash fields for LAG
capabilitiesROPath-only node, has no configurable value.
Hash capabilities
ecmpROPath-only node, has no configurable value.
ECMP capabilities
hash-algorithmsRO”CRC_32HI"
"XOR"
"CRC_32LO"
"CRC”
Supported hash algorithms
hash-fieldsRO”DST_IP"
"L4_DST_PORT"
"IN_PORT"
"L4_SRC_PORT"
"VLAN_ID"
"DST_MAC"
"SRC_IP"
"SRC_MAC”
Supported hash fields
lagROPath-only node, has no configurable value.
LAG capabilities
hash-algorithmsRO”CRC_32HI"
"XOR"
"CRC_32LO"
"CRC”
Supported hash algorithms
hash-fieldsRO”DST_IP"
"L4_DST_PORT"
"IN_PORT"
"L4_SRC_PORT"
"VLAN_ID"
"DST_MAC"
"SRC_IP"
"SRC_MAC”
Supported hash fields

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* identityref

Table of Properties

NameRequiredType/RangeDescription
capabilitiesROPath-only node, has no configurable value.
Hash capabilities
ecmpROPath-only node, has no configurable value.
ECMP capabilities
hash-algorithmsRO”CRC_32HI"
"XOR"
"CRC_32LO"
"CRC”
Supported hash algorithms
hash-fieldsRO”DST_IP"
"L4_DST_PORT"
"IN_PORT"
"L4_SRC_PORT"
"VLAN_ID"
"DST_MAC"
"SRC_IP"
"SRC_MAC”
Supported hash fields
lagROPath-only node, has no configurable value.
LAG capabilities
hash-algorithmsRO”CRC_32HI"
"XOR"
"CRC_32LO"
"CRC”
Supported hash algorithms
hash-fieldsRO”DST_IP"
"L4_DST_PORT"
"IN_PORT"
"L4_SRC_PORT"
"VLAN_ID"
"DST_MAC"
"SRC_IP"
"SRC_MAC”
Supported hash fields

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

Table of Properties

NameRequiredType/RangeDescription
globalMPath-only node, has no configurable value.
Global hash configuration
lagMPath-only node, has no configurable value.
LAG hash configuration
algorithmO”CRC_32HI"
"XOR"
"CRC_32LO"
"CRC”
Hash algorithm for LAG
seedOintegerSeed for LAG hash
hash-fieldsO”DST_IP"
"L4_DST_PORT"
"L4_SRC_PORT"
"IN_PORT"
"VLAN_ID"
"DST_MAC"
"SRC_IP"
"SRC_MAC”
Hash fields for LAG
ecmpMPath-only node, has no configurable value.
ECMP hash configuration
algorithmO”CRC_32HI"
"XOR"
"CRC_32LO"
"CRC”
Hash algorithm for LAG
seedOintegerSeed for LAG hash
hash-fieldsO”DST_IP"
"L4_DST_PORT"
"L4_SRC_PORT"
"IN_PORT"
"VLAN_ID"
"DST_MAC"
"SRC_IP"
"SRC_MAC”
Hash fields for LAG

Tree Diagram

module: asternos-hash
+--rw hash
+--rw global
+--rw ecmp
+--rw algorithm? identityref
+--rw seed? uint32
+--rw hash-fields* identityref

Table of Properties

NameRequiredType/RangeDescription
ecmpMPath-only node, has no configurable value.
ECMP hash configuration
algorithmO”CRC_32HI"
"XOR"
"CRC_32LO"
"CRC”
Hash algorithm for LAG
seedOintegerSeed for LAG hash
hash-fieldsO”DST_IP"
"L4_DST_PORT"
"L4_SRC_PORT"
"IN_PORT"
"VLAN_ID"
"DST_MAC"
"SRC_IP"
"SRC_MAC”
Hash fields for LAG

Tree Diagram

module: asternos-hash
+--rw hash
+--rw global
+--rw lag
+--rw algorithm? identityref
+--rw seed? uint32
+--rw hash-fields* identityref

Table of Properties

NameRequiredType/RangeDescription
lagMPath-only node, has no configurable value.
LAG hash configuration
algorithmO”CRC_32HI"
"XOR"
"CRC_32LO"
"CRC”
Hash algorithm for LAG
seedOintegerSeed for LAG hash
hash-fieldsO”DST_IP"
"L4_DST_PORT"
"L4_SRC_PORT"
"IN_PORT"
"VLAN_ID"
"DST_MAC"
"SRC_IP"
"SRC_MAC”
Hash fields for LAG