Hash
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> <top> <hash xmlns="http://asterfusion.com/ns/yang/asternos-hash"> <global> <lag> <algorithm>CRC</algorithm> <seed>100</seed> <hash-fields>DST_IP</hash-fields> <hash-fields>SRC_IP</hash-fields> </lag> <ecmp> <algorithm>XOR</algorithm> <seed>10</seed> <hash-fields>DST_IP</hash-fields> <hash-fields>SRC_IP</hash-fields> </ecmp> </global> </hash> </top> </data></rpc-reply>Create Global Hash Configurations
Section titled “Create Global Hash Configurations”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>