Skip to content
Ask AI

Load-Balance-Netconf

YANG Pathget/get-configedit-configrpc
/load-balanceYmerge, replace, create, delete—
/load-balance/elastic-hashs/{prefix}Ymerge, replace, create, delete—
/load-balance/elastic-hashs/{prefix}/active-hopsY——
/load-balance/elastic-hashs/{prefix}/hash-viewsY——

This chapter provides examples on how to use Netconf to manage load balance on AsterNOS devices.

Request example to create an elastic hash entry via edit-config.

<config>
<top>
<load-balance>
<elastic-hashs>
<elastic-hash operation="create">
<prefix>3.1.1.1/24</prefix>
</elastic-hash>
</elastic-hashs>
</load-balance>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:69d18bf8-16ae-4756-b2fc-817f67127545">
<ok/>
</rpc-reply>

Request example to get an elastic hash entry via get-config.

<filter type="subtree">
<top>
<load-balance>
<elastic-hashs>
<elastic-hash/>
</elastic-hashs>
</load-balance>
</top>
</filter>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:68ae983f-a058-4757-939b-b30b03294a76">
<data>
<top>
<load-balance xmlns="http://asterfusion.com/ns/yang/asternos-load-balance">
<elastic-hashs>
<elastic-hash>
<prefix>3.1.1.0/24</prefix>
</elastic-hash>
</elastic-hashs>
</load-balance>
</top>
</data>
</rpc-reply>

Request example to merge an elastic hash entry via edit-config.

<config>
<top>
<load-balance>
<elastic-hashs>
<elastic-hash operation="merge">
<prefix>9.1.1.0/24</prefix>
</elastic-hash>
</elastic-hashs>
</load-balance>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:69d18bf8-16ae-4756-b2fc-817f67127545">
<ok/>
</rpc-reply>

Request example to delete an elastic hash entry via edit-config.

<config>
<top>
<load-balance>
<elastic-hashs>
<elastic-hash operation="delete">
<prefix>3.1.1.1/24</prefix>
</elastic-hash>
</elastic-hashs>
</load-balance>
</top>
</config>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:e441bed9-14b2-4286-a717-e38b97e88fa7">
<ok/>
</rpc-reply>

Request example to show elastic hash hash-view via get with subtree filter.

<filter type="subtree">
<top>
<load-balance>
<elastic-hashs>
<elastic-hash>
<prefix>9.1.1.0/24</prefix>
<hash-views/>
</elastic-hash>
</elastic-hashs>
</load-balance>
</top>
</filter>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:f531ac6b-5277-444c-b131-d954ccf82516">
<data>
<top>
<load-balance xmlns="http://asterfusion.com/ns/yang/asternos-load-balance">
<elastic-hashs>
<elastic-hash>
<prefix>9.1.1.0/24</prefix>
<hash-views>
<hash-view>
<fg-nhg-prefix>9.1.1.0/24</fg-nhg-prefix>
<nexthop>8.1.1.2</nexthop>
<hash-bucket>0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63</hash-bucket>
</hash-view>
</hash-views>
</elastic-hash>
</elastic-hashs>
</load-balance>
</top>
</data>
</rpc-reply>

Request example to show elastic hash active hops via get with subtree filter.

<filter type="subtree">
<top>
<load-balance>
<elastic-hashs>
<elastic-hash>
<prefix>9.1.1.0/24</prefix>
<active-hops/>
</elastic-hash>
</elastic-hashs>
</load-balance>
</top>
</filter>

Response example

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5392e116-831a-44f9-b885-75e0c4b10786">
<data>
<top>
<load-balance xmlns="http://asterfusion.com/ns/yang/asternos-load-balance">
<elastic-hashs>
<elastic-hash>
<prefix>9.1.1.0/24</prefix>
<active-hops>
<fg-nhg-prefix>9.1.1.0/24</fg-nhg-prefix>
<nexthops>8.1.1.2</nexthops>
</active-hops>
</elastic-hash>
</elastic-hashs>
</load-balance>
</top>
</data>
</rpc-reply>

Tree Diagram

module: asternos-load-balance
+--rw load-balance
+--rw elastic-hashs
+--rw elastic-hash* [prefix]
+--rw prefix inet:ip-prefix
+--rw hash-views
| +--ro hash-view* []
| +--ro fg-nhg-prefix? inet:ip-prefix
| +--ro nexthop? inet:ip-address
| +--ro hash-bucket? string
+--ro active-hops
+--ro fg-nhg-prefix? inet:ip-prefix
+--ro nexthops* inet:ip-address

Table of Properties

NameRequiredType/RangeDescription
load-balanceMPath-only node, has no configurable value.
elastic-hashsMPath-only node, has no configurable value.
List of load balancing IP routes of elastic hash.
elastic-hashMPath-only node, has no configurable value.
IP prefix.
prefixOinet:ip-prefixIP prefix.
hash-viewsMPath-only node, has no configurable value.
Provide information on load sharing and allocation.
hash-viewROPath-only node, has no configurable value.
fg-nhg-prefixROinet:ip-prefixFG NHG Prefix.
nexthopROinet:ip-addressNext Hop.
hash-bucketROstringHash Bucket.
active-hopsROPath-only node, has no configurable value.
Provide information on active next hops of elastic hash.
fg-nhg-prefixROinet:ip-prefixFG NHG Prefix.
nexthopsROinet:ip-addressNext Hop.

List of load balancing IP routes of elastic hash

Section titled “List of load balancing IP routes of elastic hash”

Tree Diagram

module: asternos-load-balance
+--rw load-balance
+--rw elastic-hashs
+--rw elastic-hash* [prefix]
+--rw prefix inet:ip-prefix
+--rw hash-views
| +--ro hash-view* []
| +--ro fg-nhg-prefix? inet:ip-prefix
| +--ro nexthop? inet:ip-address
| +--ro hash-bucket? string
+--ro active-hops
+--ro fg-nhg-prefix? inet:ip-prefix
+--ro nexthops* inet:ip-address

Table of Properties

NameRequiredType/RangeDescription
elastic-hashsMPath-only node, has no configurable value.
List of load balancing IP routes of elastic hash.
elastic-hashMPath-only node, has no configurable value.
IP prefix.
prefixOinet:ip-prefixIP prefix.
hash-viewsMPath-only node, has no configurable value.
Provide information on load sharing and allocation.
hash-viewROPath-only node, has no configurable value.
fg-nhg-prefixROinet:ip-prefixFG NHG Prefix.
nexthopROinet:ip-addressNext Hop.
hash-bucketROstringHash Bucket.
active-hopsROPath-only node, has no configurable value.
Provide information on active next hops of elastic hash.
fg-nhg-prefixROinet:ip-prefixFG NHG Prefix.
nexthopsROinet:ip-addressNext Hop.

Tree Diagram

module: asternos-load-balance
+--rw load-balance
+--rw elastic-hashs

Tree Diagram

module: asternos-load-balance
+--rw load-balance
+--rw elastic-hashs