Srv6-Netconf
Resources Summary
Section titled “Resources Summary”| YANG Path | get/get-config | edit-config | rpc |
|---|---|---|---|
| /segment-routing | Y | merge, replace, create, delete | — |
| /segment-routing/srv6 | Y | merge, replace, create, delete | — |
| /segment-routing/srv6/encapsulation | Y | merge, replace, create, delete | — |
| /segment-routing/srv6/locators/{name} | Y | merge, replace, create, delete | — |
| /segment-routing/srv6/static-sids/{sid} | Y | merge, replace, create, delete | — |
| /show-segment-routing-srv6-local-sid-json | — | — | Y |
| /show-segment-routing-srv6-locator-json | — | — | Y |
| /show-segment-routing-srv6-manager-json | — | — | Y |
Examples
Section titled “Examples”This chapter provides examples on how to use Netconf to manage SRv6 configurations on AsterNOS devices.
SRv6 Locator
Section titled “SRv6 Locator”Get All SRv6 Locators
Section titled “Get All SRv6 Locators”Request example to retrieve all SRv6 locators via get-config.
<filter type="subtree"> <top> <segment-routing> <srv6> <locators> </locators> </srv6> </segment-routing> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <data> <top> <segment-routing xmlns="http://asterfusion.com/ns/yang/asternos-srv6"> <srv6> <locators> <locator> <name>loc10</name> <prefix>fc00:0:10::/48</prefix> </locator> <locator> <name>loc20</name> <prefix>fc00:0:20::/48</prefix> </locator> </locators> </srv6> </segment-routing> </top> </data></rpc-reply>Create SRv6 Locator
Section titled “Create SRv6 Locator”Request example to create SRv6 locator via edit-config.
<config> <top> <segment-routing> <srv6> <locators> <locator operation="create"> <name>loc1</name> <prefix>fc00:0:1::/48</prefix> </locator> </locators> </srv6> </segment-routing> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <ok/></rpc-reply>Modify SRv6 Locator
Section titled “Modify SRv6 Locator”Request example to modify SRv6 locator via edit-config.
<config> <top> <segment-routing> <srv6> <locators> <locator operation="merge"> <name>loc1</name> <prefix>fc00:0:11::/48</prefix> </locator> </locators> </srv6> </segment-routing> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <ok/></rpc-reply>Delete SRv6 Locator
Section titled “Delete SRv6 Locator”Request example to delete SRv6 locator via edit-config.
<config> <top> <segment-routing> <srv6> <locators> <locator operation="delete"> <name>loc1</name> </locator> </locators> </srv6> </segment-routing> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <ok/></rpc-reply>Get Specific SRv6 Locator
Section titled “Get Specific SRv6 Locator”Request example to retrieve a specific SRv6 locator via get-config.
<filter type="subtree"> <top> <segment-routing> <srv6> <locators> <locator> <name>loc10</name> </locator> </locators> </srv6> </segment-routing> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <data> <top> <segment-routing xmlns="http://asterfusion.com/ns/yang/asternos-srv6"> <srv6> <locators> <locator> <name>loc10</name> <prefix>fc00:0:10::/48</prefix> </locator> </locators> </srv6> </segment-routing> </top> </data></rpc-reply>SRv6 Encapsulation
Section titled “SRv6 Encapsulation”Get SRv6 Encapsulation Configuration
Section titled “Get SRv6 Encapsulation Configuration”Request example to retrieve SRv6 encapsulation configuration via get-config.
<filter type="subtree"> <top> <segment-routing> <srv6> <encapsulation/> </srv6> </segment-routing> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <data> <top> <segment-routing xmlns="http://asterfusion.com/ns/yang/asternos-srv6"> <srv6> <encapsulation> <source-address>fc00:0:20::1</source-address> </encapsulation> </srv6> </segment-routing> </top> </data></rpc-reply>Create SRv6 Encapsulation Configuration
Section titled “Create SRv6 Encapsulation Configuration”Request example to create SRv6 encapsulation configuration via edit-config.
<config> <top> <segment-routing> <srv6> <encapsulation operation="create"> <source-address>fc00:0:20::1</source-address> </encapsulation> </srv6> </segment-routing> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <ok/></rpc-reply>Modify SRv6 Encapsulation Configuration
Section titled “Modify SRv6 Encapsulation Configuration”Request example to modify SRv6 encapsulation configuration via edit-config.
<config> <top> <segment-routing> <srv6> <encapsulation operation="merge"> <source-address>fc00:0:20::2</source-address> </encapsulation> </srv6> </segment-routing> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <ok/></rpc-reply>Delete SRv6 Encapsulation Configuration
Section titled “Delete SRv6 Encapsulation Configuration”Request example to delete SRv6 encapsulation configuration via edit-config.
<config> <top> <segment-routing> <srv6> <encapsulation operation="delete"/> </srv6> </segment-routing> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <ok/></rpc-reply>SRv6 Static SID
Section titled “SRv6 Static SID”Get All SRv6 Static SIDs
Section titled “Get All SRv6 Static SIDs”Request example to retrieve all SRv6 static SIDs via get-config.
<filter type="subtree"> <top> <segment-routing> <srv6> <static-sids> </static-sids> </srv6> </segment-routing> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <data> <top> <segment-routing xmlns="http://asterfusion.com/ns/yang/asternos-srv6"> <srv6> <static-sids> <static-sid> <sid>fc00:0:10::1/128</sid> <behavior>End</behavior> <locator-name>loc10</locator-name> </static-sid> <static-sid> <sid>fc00:0:10::2/128</sid> <behavior>End.X</behavior> <locator-name>loc10</locator-name> <paths> <path-index>0</path-index> <interface>Ethernet1</interface> </paths> </static-sid> <static-sid> <sid>fc00:0:10::3/128</sid> <behavior>End.DT46</behavior> <locator-name>loc10</locator-name> <vrf-name>Vrf1</vrf-name> </static-sid> </static-sids> </srv6> </segment-routing> </top> </data></rpc-reply>Create SRv6 Static SID with End Behavior
Section titled “Create SRv6 Static SID with End Behavior”Request example to create SRv6 static SID with End behavior via edit-config.
<config> <top> <segment-routing> <srv6> <static-sids> <static-sid operation="create"> <sid>fc00:0:10::1/128</sid> <behavior>End</behavior> <locator-name>loc10</locator-name> </static-sid> </static-sids> </srv6> </segment-routing> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <ok/></rpc-reply>Create SRv6 Static SID with End.X Behavior
Section titled “Create SRv6 Static SID with End.X Behavior”Request example to create SRv6 static SID with End.X behavior via edit-config.
<config> <top> <segment-routing> <srv6> <static-sids> <static-sid operation="create"> <sid>fc00:0:10::2/128</sid> <behavior>End.X</behavior> <locator-name>loc10</locator-name> <paths> <interface>Ethernet1</interface> </paths> </static-sid> </static-sids> </srv6> </segment-routing> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <ok/></rpc-reply>Create SRv6 Static SID with End.DT46 Behavior
Section titled “Create SRv6 Static SID with End.DT46 Behavior”Request example to create SRv6 static SID with End.DT46 behavior via edit-config.
<config> <top> <segment-routing> <srv6> <static-sids> <static-sid operation="create"> <sid>fc00:0:10::3/128</sid> <behavior>End.DT46</behavior> <locator-name>loc10</locator-name> <vrf-name>Vrf1</vrf-name> </static-sid> </static-sids> </srv6> </segment-routing> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <ok/></rpc-reply>Modify SRv6 Static SID
Section titled “Modify SRv6 Static SID”Request example to modify SRv6 static SID via edit-config.
<config> <top> <segment-routing> <srv6> <static-sids> <static-sid operation="merge"> <sid>fc00:0:10::2/128</sid> <behavior>End.X</behavior> <locator-name>loc10</locator-name> <paths> <interface>Ethernet2</interface> </paths> </static-sid> </static-sids> </srv6> </segment-routing> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <ok/></rpc-reply>Delete SRv6 Static SID
Section titled “Delete SRv6 Static SID”Request example to delete SRv6 static SID via edit-config.
<config> <top> <segment-routing> <srv6> <static-sids> <static-sid operation="delete"> <sid>fc00:0:10::1/128</sid> </static-sid> </static-sids> </srv6> </segment-routing> </top></config>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <ok/></rpc-reply>Get Specific SRv6 Static SID
Section titled “Get Specific SRv6 Static SID”Request example to retrieve a specific SRv6 static SID via get-config.
<filter type="subtree"> <top> <segment-routing> <srv6> <static-sids> <static-sid> <sid>fc00:0:10::1/128</sid> </static-sid> </static-sids> </srv6> </segment-routing> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <data> <top> <segment-routing xmlns="http://asterfusion.com/ns/yang/asternos-srv6"> <srv6> <static-sids> <static-sid> <sid>fc00:0:10::1/128</sid> <behavior>End</behavior> <locator-name>loc10</locator-name> </static-sid> </static-sids> </srv6> </segment-routing> </top> </data></rpc-reply>Get All SRv6 Configuration
Section titled “Get All SRv6 Configuration”Request example to retrieve all SRv6 configuration via get-config.
<filter type="subtree"> <top> <segment-routing> <srv6/> </segment-routing> </top></filter>Response example
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:4c8c8f28-72ba-47c8-9b9e-adcd932c19db"> <data> <top> <segment-routing xmlns="http://asterfusion.com/ns/yang/asternos-srv6"> <srv6> <locators> <locator> <name>loc10</name> <prefix>fc00:0:10::/48</prefix> </locator> </locators> <encapsulation> <source-address>fc00:0:20::1</source-address> </encapsulation> <static-sids> <static-sid> <sid>fc00:0:10::1/128</sid> <behavior>End</behavior> <locator-name>loc10</locator-name> </static-sid> </static-sids> </srv6> </segment-routing> </top> </data></rpc-reply>Properties Descriptions
Section titled “Properties Descriptions”Segment Routing configuration
Section titled “Segment Routing configuration”Tree Diagram
/workspaces/as-mgmt-doc/doc/resource/yang/asternos-srv6.yang:137: error: the key "path-index" does not have same "config" as its listmodule: asternos-srv6 +--rw segment-routing +--rw srv6 +--rw locators | +--rw locator* [name] | +--rw name string | +--rw prefix inet:ipv6-prefix +--rw encapsulation | +--rw source-address? inet:ipv6-address +--rw static-sids +--rw static-sid* [sid] +--rw sid inet:ipv6-prefix +--rw behavior srv6-behavior-codepoint +--rw locator-name string +--rw vrf-name? vrf:vrf-ref +--rw paths* [path-index] +--ro path-index uint8 +--rw interface? if:interface-ref +--rw nexthop? inet:ip-addressTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| segment-routing | M | Path-only node, has no configurable value. Segment Routing configuration. | |
| srv6 | M | Path-only node, has no configurable value. Segment Routing over IPv6 (SRv6) configuration. | |
| locators | M | Path-only node, has no configurable value. SRv6 locators | |
| locator | M | Path-only node, has no configurable value. Configure a SRv6 locator | |
| name | O | string | Locator name |
| prefix | M | inet:ipv6-prefix | IPv6 network prefix |
| encapsulation | M | Path-only node, has no configurable value. Configure encapsulation related parameters | |
| source-address | O | inet:ipv6-address | Specify a source address (for T.Encap). The address must locally exists and be routable |
| static-sids | M | Path-only node, has no configurable value. This container lists the SRv6 Static SIDs instantiated on the local node. | |
| static-sid | M | Path-only node, has no configurable value. List of SRv6 Static SIDs. | |
| sid | M | inet:ipv6-prefix | Value of the SRv6 SID. |
| behavior | M | ”End" "End.X" "End.DT6" "End.DT4" "End.DT46” | Behavior bound to the SRv6 SID. |
| locator-name | M | string | SRv6 locator name. |
| vrf-name | O | vrf:vrf-ref | The VRF name. |
| paths | M | Path-only node, has no configurable value. | |
| path-index | RO | integer | Path index |
| interface | O | if:interface-ref | Interface name. |
| nexthop | O | inet:ip-address | Nexthop IP address. |
Segment Routing over IPv6 (SRv6) configuration
Section titled “Segment Routing over IPv6 (SRv6) configuration”Tree Diagram
/workspaces/as-mgmt-doc/doc/resource/yang/asternos-srv6.yang:137: error: the key "path-index" does not have same "config" as its listmodule: asternos-srv6 +--rw segment-routing +--rw srv6 +--rw locators | +--rw locator* [name] | +--rw name string | +--rw prefix inet:ipv6-prefix +--rw encapsulation | +--rw source-address? inet:ipv6-address +--rw static-sids +--rw static-sid* [sid] +--rw sid inet:ipv6-prefix +--rw behavior srv6-behavior-codepoint +--rw locator-name string +--rw vrf-name? vrf:vrf-ref +--rw paths* [path-index] +--ro path-index uint8 +--rw interface? if:interface-ref +--rw nexthop? inet:ip-addressTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| srv6 | M | Path-only node, has no configurable value. Segment Routing over IPv6 (SRv6) configuration. | |
| locators | M | Path-only node, has no configurable value. SRv6 locators | |
| locator | M | Path-only node, has no configurable value. Configure a SRv6 locator | |
| name | O | string | Locator name |
| prefix | M | inet:ipv6-prefix | IPv6 network prefix |
| encapsulation | M | Path-only node, has no configurable value. Configure encapsulation related parameters | |
| source-address | O | inet:ipv6-address | Specify a source address (for T.Encap). The address must locally exists and be routable |
| static-sids | M | Path-only node, has no configurable value. This container lists the SRv6 Static SIDs instantiated on the local node. | |
| static-sid | M | Path-only node, has no configurable value. List of SRv6 Static SIDs. | |
| sid | M | inet:ipv6-prefix | Value of the SRv6 SID. |
| behavior | M | ”End" "End.X" "End.DT6" "End.DT4" "End.DT46” | Behavior bound to the SRv6 SID. |
| locator-name | M | string | SRv6 locator name. |
| vrf-name | O | vrf:vrf-ref | The VRF name. |
| paths | M | Path-only node, has no configurable value. | |
| path-index | RO | integer | Path index |
| interface | O | if:interface-ref | Interface name. |
| nexthop | O | inet:ip-address | Nexthop IP address. |
Configure encapsulation related parameters
Section titled “Configure encapsulation related parameters”Tree Diagram
/workspaces/as-mgmt-doc/doc/resource/yang/asternos-srv6.yang:137: error: the key "path-index" does not have same "config" as its listmodule: asternos-srv6 +--rw segment-routing +--rw srv6 +--rw encapsulation +--rw source-address? inet:ipv6-addressTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| encapsulation | M | Path-only node, has no configurable value. Configure encapsulation related parameters | |
| source-address | O | inet:ipv6-address | Specify a source address (for T.Encap). The address must locally exists and be routable |
SRv6 locators
Section titled “SRv6 locators”Tree Diagram
/workspaces/as-mgmt-doc/doc/resource/yang/asternos-srv6.yang:137: error: the key "path-index" does not have same "config" as its listmodule: asternos-srv6 +--rw segment-routing +--rw srv6 +--rw locators +--rw locator* [name] +--rw name string +--rw prefix inet:ipv6-prefixTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| locators | M | Path-only node, has no configurable value. SRv6 locators | |
| locator | M | Path-only node, has no configurable value. Configure a SRv6 locator | |
| name | O | string | Locator name |
| prefix | M | inet:ipv6-prefix | IPv6 network prefix |
Static Sids
Section titled “Static Sids”Tree Diagram
/workspaces/as-mgmt-doc/doc/resource/yang/asternos-srv6.yang:137: error: the key "path-index" does not have same "config" as its listmodule: asternos-srv6 +--rw segment-routing +--rw srv6 +--rw static-sids +--rw static-sid* [sid] +--rw sid inet:ipv6-prefix +--rw behavior srv6-behavior-codepoint +--rw locator-name string +--rw vrf-name? vrf:vrf-ref +--rw paths* [path-index] +--ro path-index uint8 +--rw interface? if:interface-ref +--rw nexthop? inet:ip-addressTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| static-sids | M | Path-only node, has no configurable value. This container lists the SRv6 Static SIDs instantiated on the local node. | |
| static-sid | M | Path-only node, has no configurable value. List of SRv6 Static SIDs. | |
| sid | M | inet:ipv6-prefix | Value of the SRv6 SID. |
| behavior | M | ”End" "End.X" "End.DT6" "End.DT4" "End.DT46” | Behavior bound to the SRv6 SID. |
| locator-name | M | string | SRv6 locator name. |
| vrf-name | O | vrf:vrf-ref | The VRF name. |
| paths | M | Path-only node, has no configurable value. | |
| path-index | RO | integer | Path index |
| interface | O | if:interface-ref | Interface name. |
| nexthop | O | inet:ip-address | Nexthop IP address. |
Show Segment Routing Srv6 Local Sid Json
Section titled “Show Segment Routing Srv6 Local Sid Json”Tree Diagram
/workspaces/as-mgmt-doc/doc/resource/yang/asternos-srv6.yang:137: error: the key "path-index" does not have same "config" as its listmodule: asternos-srv6
rpcs: +---x show-segment-routing-srv6-local-sid-json +--ro output +--ro data +--ro local-sids* [sid] +--ro sid string +--ro action? srv6-behavior-codepoint +--ro vrf? string +--ro adj? stringTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| show-segment-routing-srv6-local-sid-json | O | ||
| data | M | Path-only node, has no configurable value. | |
| local-sids | M | Path-only node, has no configurable value. SRv6 local SID. | |
| sid | O | string | SRv6 SID. |
| action | O | ”End" "End.X" "End.DT6" "End.DT4" "End.DT46” | SRv6 action. |
| vrf | O | string | SRv6 VRF. |
| adj | O | string | SRv6 adjacency. |
Show Segment Routing Srv6 Locator Json
Section titled “Show Segment Routing Srv6 Locator Json”Tree Diagram
/workspaces/as-mgmt-doc/doc/resource/yang/asternos-srv6.yang:137: error: the key "path-index" does not have same "config" as its listmodule: asternos-srv6
rpcs: +---x show-segment-routing-srv6-locator-json +--ro output +--ro data +--ro locators* [name] +--ro name string +--ro prefix? inet:ipv6-prefix +--ro blockBitsLength? uint8 +--ro nodeBitsLength? uint8 +--ro functionBitsLength? uint8 +--ro argumentBitsLength? uint8 +--ro statusUp? boolean +--ro chunks* [prefix] +--ro prefix inet:ipv6-prefix +--ro proto? stringTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| show-segment-routing-srv6-locator-json | O | ||
| data | M | Path-only node, has no configurable value. | |
| locators | M | Path-only node, has no configurable value. List of SRv6 locators. | |
| name | O | string | Locator name. |
| prefix | O | inet:ipv6-prefix | SRv6 locator prefix. |
| blockBitsLength | O | 0..128 | Block bits length. |
| nodeBitsLength | O | 0..128 | Node bits length. |
| functionBitsLength | O | 0..128 | Function bits length. |
| argumentBitsLength | O | 0..128 | Argument bits length. |
| statusUp | O | ”true" "false” | Locator operational status. |
| chunks | M | Path-only node, has no configurable value. Locator chunks. | |
| prefix | O | inet:ipv6-prefix | Chunk prefix. |
| proto | O | string | Protocol that allocated the chunk. |
Show Segment Routing Srv6 Manager Json
Section titled “Show Segment Routing Srv6 Manager Json”Tree Diagram
/workspaces/as-mgmt-doc/doc/resource/yang/asternos-srv6.yang:137: error: the key "path-index" does not have same "config" as its listmodule: asternos-srv6
rpcs: +---x show-segment-routing-srv6-manager-json +--ro output +--ro data +--ro parameters +--ro encapsulation +--ro sourceAddress +--ro configured? stringTable of Properties
| Name | Required | Type/Range | Description |
|---|---|---|---|
| show-segment-routing-srv6-manager-json | O | ||
| data | M | Path-only node, has no configurable value. SRv6 manager configuration data. | |
| parameters | M | Path-only node, has no configurable value. SRv6 global parameters. | |
| encapsulation | M | Path-only node, has no configurable value. Encapsulation parameters. | |
| sourceAddress | M | Path-only node, has no configurable value. Source address configuration. | |
| configured | O | string | Configured source IPv6 address for encapsulation. Default is ’::’ (unspecified address). |