Skip to content
Ask AI

Srv6-Netconf

YANG Pathget/get-configedit-configrpc
/segment-routingYmerge, replace, create, delete—
/segment-routing/srv6Ymerge, replace, create, delete—
/segment-routing/srv6/encapsulationYmerge, replace, create, delete—
/segment-routing/srv6/locators/{name}Ymerge, replace, create, delete—
/segment-routing/srv6/static-sids/{sid}Ymerge, 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

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

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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>

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 list
module: 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-address

Table of Properties

NameRequiredType/RangeDescription
segment-routingMPath-only node, has no configurable value.
Segment Routing configuration.
srv6MPath-only node, has no configurable value.
Segment Routing over IPv6 (SRv6) configuration.
locatorsMPath-only node, has no configurable value.
SRv6 locators
locatorMPath-only node, has no configurable value.
Configure a SRv6 locator
nameOstringLocator name
prefixMinet:ipv6-prefixIPv6 network prefix
encapsulationMPath-only node, has no configurable value.
Configure encapsulation related parameters
source-addressOinet:ipv6-addressSpecify a source address (for T.Encap).

The address must locally exists and be routable
static-sidsMPath-only node, has no configurable value.
This container lists the SRv6 Static SIDs instantiated on the local node.
static-sidMPath-only node, has no configurable value.
List of SRv6 Static SIDs.
sidMinet:ipv6-prefixValue of the SRv6 SID.
behaviorM”End"
"End.X"
"End.DT6"
"End.DT4"
"End.DT46”
Behavior bound to the SRv6 SID.
locator-nameMstringSRv6 locator name.
vrf-nameOvrf:vrf-refThe VRF name.
pathsMPath-only node, has no configurable value.
path-indexROintegerPath index
interfaceOif:interface-refInterface name.
nexthopOinet:ip-addressNexthop 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 list
module: 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-address

Table of Properties

NameRequiredType/RangeDescription
srv6MPath-only node, has no configurable value.
Segment Routing over IPv6 (SRv6) configuration.
locatorsMPath-only node, has no configurable value.
SRv6 locators
locatorMPath-only node, has no configurable value.
Configure a SRv6 locator
nameOstringLocator name
prefixMinet:ipv6-prefixIPv6 network prefix
encapsulationMPath-only node, has no configurable value.
Configure encapsulation related parameters
source-addressOinet:ipv6-addressSpecify a source address (for T.Encap).

The address must locally exists and be routable
static-sidsMPath-only node, has no configurable value.
This container lists the SRv6 Static SIDs instantiated on the local node.
static-sidMPath-only node, has no configurable value.
List of SRv6 Static SIDs.
sidMinet:ipv6-prefixValue of the SRv6 SID.
behaviorM”End"
"End.X"
"End.DT6"
"End.DT4"
"End.DT46”
Behavior bound to the SRv6 SID.
locator-nameMstringSRv6 locator name.
vrf-nameOvrf:vrf-refThe VRF name.
pathsMPath-only node, has no configurable value.
path-indexROintegerPath index
interfaceOif:interface-refInterface name.
nexthopOinet:ip-addressNexthop IP address.
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 list
module: asternos-srv6
+--rw segment-routing
+--rw srv6
+--rw encapsulation
+--rw source-address? inet:ipv6-address

Table of Properties

NameRequiredType/RangeDescription
encapsulationMPath-only node, has no configurable value.
Configure encapsulation related parameters
source-addressOinet:ipv6-addressSpecify a source address (for T.Encap).

The address must locally exists and be routable

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 list
module: asternos-srv6
+--rw segment-routing
+--rw srv6
+--rw locators
+--rw locator* [name]
+--rw name string
+--rw prefix inet:ipv6-prefix

Table of Properties

NameRequiredType/RangeDescription
locatorsMPath-only node, has no configurable value.
SRv6 locators
locatorMPath-only node, has no configurable value.
Configure a SRv6 locator
nameOstringLocator name
prefixMinet:ipv6-prefixIPv6 network prefix

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 list
module: 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-address

Table of Properties

NameRequiredType/RangeDescription
static-sidsMPath-only node, has no configurable value.
This container lists the SRv6 Static SIDs instantiated on the local node.
static-sidMPath-only node, has no configurable value.
List of SRv6 Static SIDs.
sidMinet:ipv6-prefixValue of the SRv6 SID.
behaviorM”End"
"End.X"
"End.DT6"
"End.DT4"
"End.DT46”
Behavior bound to the SRv6 SID.
locator-nameMstringSRv6 locator name.
vrf-nameOvrf:vrf-refThe VRF name.
pathsMPath-only node, has no configurable value.
path-indexROintegerPath index
interfaceOif:interface-refInterface name.
nexthopOinet:ip-addressNexthop IP address.

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 list
module: 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? string

Table of Properties

NameRequiredType/RangeDescription
show-segment-routing-srv6-local-sid-jsonO
dataMPath-only node, has no configurable value.
local-sidsMPath-only node, has no configurable value.
SRv6 local SID.
sidOstringSRv6 SID.
actionO”End"
"End.X"
"End.DT6"
"End.DT4"
"End.DT46”
SRv6 action.
vrfOstringSRv6 VRF.
adjOstringSRv6 adjacency.

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 list
module: 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? string

Table of Properties

NameRequiredType/RangeDescription
show-segment-routing-srv6-locator-jsonO
dataMPath-only node, has no configurable value.
locatorsMPath-only node, has no configurable value.
List of SRv6 locators.
nameOstringLocator name.
prefixOinet:ipv6-prefixSRv6 locator prefix.
blockBitsLengthO0..128Block bits length.
nodeBitsLengthO0..128Node bits length.
functionBitsLengthO0..128Function bits length.
argumentBitsLengthO0..128Argument bits length.
statusUpO”true"
"false”
Locator operational status.
chunksMPath-only node, has no configurable value.
Locator chunks.
prefixOinet:ipv6-prefixChunk prefix.
protoOstringProtocol that allocated the chunk.

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 list
module: asternos-srv6
rpcs:
+---x show-segment-routing-srv6-manager-json
+--ro output
+--ro data
+--ro parameters
+--ro encapsulation
+--ro sourceAddress
+--ro configured? string

Table of Properties

NameRequiredType/RangeDescription
show-segment-routing-srv6-manager-jsonO
dataMPath-only node, has no configurable value.
SRv6 manager configuration data.
parametersMPath-only node, has no configurable value.
SRv6 global parameters.
encapsulationMPath-only node, has no configurable value.
Encapsulation parameters.
sourceAddressMPath-only node, has no configurable value.
Source address configuration.
configuredOstringConfigured source IPv6 address for encapsulation.

Default is ’::’ (unspecified address).