---
title: Hash
slug: enterprise-v6p1/hash
createdAt: 2025-12-18T08:23:49.713Z
---

# <font color="#1d50a2">AsterNOS-Hash</font>

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

## <font color="#1d50a2">Show Hash Capabilities</font>

Request example to get hash capabilities via **get**.

```xml
<filter type="subtree">
  <top>
    <hash>
      <capabilities/>
    </hash>
  </top>
</filter>
```

Response example

```xml
<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>
```

## <font color="#1d50a2">Show Global Hash Configurations</font>

Request example to get global hash configuration via **get-config**.

```xml
<filter type="subtree">
  <top>
    <hash>
      <global/>
    </hash>
  </top>
</filter>
```

Response example

```xml
<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>
```

## <font color="#1d50a2">Create Global Hash Configurations</font>

:::hint{type="warning"}
**NOTE:**
The algorithm must be manually specified as CRC before configuring the seed field.
:::

Request example to create global hash configuration via **edit-config**.

```xml
<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

```xml
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5a4635a2-4758-41de-9693-9e9da22374a2">
  <ok/>
</rpc-reply>
```

## <font color="#1d50a2">Modify Global Hash Configurations</font>

Request example to modify global hash configuration via **edit-config**.

```xml
<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

```xml
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5104c146-8ad4-487b-a196-14c34b0db0bf">
  <ok/>
</rpc-reply>
```

## <font color="#1d50a2">Delete Lag Hash Configurations</font>

Request example to delete global lag hash configuration via **edit-config**.

```xml
<config message-id="100">
  <top>
    <hash>
      <global>
        <lag operation="delete">
        </lag>
      </global>
    </hash>
  </top></config>
```

Response example

```xml
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:1f5de122-d95f-40d3-9738-45bc39ad4090">
  <ok/>
</rpc-reply>
```

## <font color="#1d50a2">Delete Global Hash Configurations</font>

Request example to delete global hash configuration via **edit-config**.

```xml
<config message-id="100">
  <top>
    <hash>
      <global operation="delete">
      </global>
    </hash>
  </top></config>
```

Response example

```xml
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:ce5f342d-c0a3-45e0-9e2b-bb32578e4628">
  <ok/>
</rpc-reply>
```

