Load-Balance-Netconf
Load Balance
Section titled “Load Balance”Resources Summary
Section titled “Resources Summary”| YANG Path | get/get-config | edit-config | rpc |
|---|---|---|---|
| /load-balance | Y | merge, replace, create, delete | — |
| /load-balance/elastic-hashs/{prefix} | Y | merge, replace, create, delete | — |
| /load-balance/elastic-hashs/{prefix}/active-hops | Y | — | — |
| /load-balance/elastic-hashs/{prefix}/hash-views | Y | — | — |
Examples
Section titled “Examples”This chapter provides examples on how to use Netconf to manage load balance on AsterNOS devices.
Create Elastic Hash Entry
Section titled “Create Elastic Hash Entry”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>Get Elastic Hash Entry
Section titled “Get Elastic Hash Entry”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>Merge Elastic Hash Entry
Section titled “Merge Elastic Hash Entry”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>Delete Elastic Hash Entry
Section titled “Delete Elastic Hash Entry”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>Get Elastic Hash Hash-View
Section titled “Get Elastic Hash Hash-View”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>Get Elastic Hash Active Hops
Section titled “Get Elastic Hash Active Hops”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>Properties Descriptions
Section titled “Properties Descriptions”Load Balance
Section titled “Load Balance”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-addressTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| load-balance | M | Path-only node, has no configurable value. | |
| elastic-hashs | M | Path-only node, has no configurable value. List of load balancing IP routes of elastic hash. | |
| elastic-hash | M | Path-only node, has no configurable value. IP prefix. | |
| prefix | O | inet:ip-prefix | IP prefix. |
| hash-views | M | Path-only node, has no configurable value. Provide information on load sharing and allocation. | |
| hash-view | RO | Path-only node, has no configurable value. | |
| fg-nhg-prefix | RO | inet:ip-prefix | FG NHG Prefix. |
| nexthop | RO | inet:ip-address | Next Hop. |
| hash-bucket | RO | string | Hash Bucket. |
| active-hops | RO | Path-only node, has no configurable value. Provide information on active next hops of elastic hash. | |
| fg-nhg-prefix | RO | inet:ip-prefix | FG NHG Prefix. |
| nexthops | RO | inet:ip-address | Next 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-addressTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| elastic-hashs | M | Path-only node, has no configurable value. List of load balancing IP routes of elastic hash. | |
| elastic-hash | M | Path-only node, has no configurable value. IP prefix. | |
| prefix | O | inet:ip-prefix | IP prefix. |
| hash-views | M | Path-only node, has no configurable value. Provide information on load sharing and allocation. | |
| hash-view | RO | Path-only node, has no configurable value. | |
| fg-nhg-prefix | RO | inet:ip-prefix | FG NHG Prefix. |
| nexthop | RO | inet:ip-address | Next Hop. |
| hash-bucket | RO | string | Hash Bucket. |
| active-hops | RO | Path-only node, has no configurable value. Provide information on active next hops of elastic hash. | |
| fg-nhg-prefix | RO | inet:ip-prefix | FG NHG Prefix. |
| nexthops | RO | inet:ip-address | Next Hop. |
Active Hops
Section titled “Active Hops”Tree Diagram
module: asternos-load-balance +--rw load-balance +--rw elastic-hashsHash View
Section titled “Hash View”Tree Diagram
module: asternos-load-balance +--rw load-balance +--rw elastic-hashs