SRv6 Functions¶
The Controller supports the creation and management of several types
of SRv6 entities. These functions are available under the section
srv6
of the Command-Line Interface.
Entering the srv6
section¶
controller> srv6
controller(srv6)>
The srv6
section supports the following commands:
behavior biditunnel exit help path unitunnel usid_policy
behavior
¶
Create, get, change or remove a SRv6 behavior in a node.
controller(srv6)> behavior --help
usage: behavior [-h] -g GRPC_IP -r GRPC_PORT [-s] [--server-cert SERVER_CERT] --op OP
--segment SEGMENT --action ACTION [--device DEVICE]
[--table TABLE] [--nexthop NEXTHOP]
[--lookup-table LOOKUP_TABLE] [--interface INTERFACE]
[--segments SEGMENTS] [--metric METRIC] [-d]
Create, get, change or remove a SRv6 behavior in a node
optional arguments:
-h, --help show this help message and exit
-g GRPC_IP, --grpc-ip GRPC_IP
IP of the gRPC server
-r GRPC_PORT, --grpc-port GRPC_PORT
Port of the gRPC server
-s, --secure Activate secure mode
--server-cert SERVER_CERT
CA certificate file
--op OP Operation
--segment SEGMENT Segment
--action ACTION Action
--device DEVICE Device
--table TABLE Table
--nexthop NEXTHOP Next-hop
--lookup-table LOOKUP_TABLE
Lookup Table
--interface INTERFACE
Interface
--segments SEGMENTS Segments
--metric METRIC Metric
-d, --debug Activate debug logs
Argument |
Type |
Default |
Optional |
Description |
---|---|---|---|---|
|
– |
– |
– |
Show an help message and exit. |
|
string |
– |
no |
IP of the gRPC server executed
on the node.
|
|
integer |
12345 |
yes |
Port of the gRPC server executed
on the node.
|
|
boolean |
False |
yes |
If True, the Controller will use the TLS to
encrypt and authenticate the traffic sent
to the Node Manager on the gRPC
Channel.
|
|
string |
None |
yes |
Name of CA certificate for the TLS,
required if GRPC_SECURE is True.
|
|
string |
– |
no |
Operation (add, change, get, del). |
|
string |
– |
no |
Local segment associated to the SRv6
behavior.
|
|
string |
– |
no |
SRv6 behavior to install in the node
(e.g. End.DT6 or End.DX4)
|
|
string |
– |
yes |
Device to be associated to the SRv6
behavior. If not specified, the Node
Manager will select an interface
automatically from the list of the
interfaces of the device.
|
|
integer |
254 |
yes |
The ID of the table where the SRv6
behavior must be created or removed
from. If not specified, the main table will
be used (table ID 254).
|
|
string |
– |
*yes |
The next-hop used as argument of the
End.X, End.DX4 and End.DX6 behaviors.
This argument is mandatory if action is
End.X, End.DX4 or End.DX6, otherwise it
is not required.
|
|
integer |
– |
*yes |
The table used as argument of the End.T,
End.DT4 and End.DT6 behaviors. This
argument is mandatory if action is End.T,
End.DT4 or End.DT6, otherwise it is not
required.
|
|
string |
– |
*yes |
The outgoing interface used as argument
of the End.DX2 behavior. This argument is
mandatory if action is End.DX2, otherwise
it is not required.
|
|
string |
– |
*yes |
The segment list used as argument of the
End.B6 and End.B6.Encaps behaviors.
This argument is mandatory if action is
End.B6 or End.B6.Encaps, otherwise it is
not required.
|
|
integer |
– |
yes |
The metric to be assigned to the route. |
|
– |
– |
yes |
If True, the debug logging is enabled. |
Note
An asterisk (*) in the Optional column means that the argument is optional or not depending on a condition. More information about this condition is provided under the column Description.
biditunnel
¶
Create, get, change or remove a bidirectional SRv6 tunnel between two nodes.
controller(srv6)> biditunnel --help
usage: biditunnel [-h] --op OP --left-grpc-ip L_GRPC_IP --right-grpc-ip
R_GRPC_IP --left-grpc-port L_GRPC_PORT --right-grpc-port
R_GRPC_PORT [-s] [--server-cert SERVER_CERT] --left-right-dest DEST_LR
--right-left-dest DEST_RL
[--left-right-localseg LOCALSEG_LR]
[--right-left-localseg LOCALSEG_RL] --left-right-sidlist
SIDLIST_LR --right-left-sidlist SIDLIST_RL [-d]
Create, get, change or remove a bidirectional SRv6 tunnel between two nodes
optional arguments:
-h, --help show this help message and exit
--op OP Operation
--left-grpc-ip L_GRPC_IP
IP of the gRPC server
--right-grpc-ip R_GRPC_IP
IP of the gRPC server
--left-grpc-port L_GRPC_PORT
Port of the gRPC server
--right-grpc-port R_GRPC_PORT
Port of the gRPC server
-s, --secure Activate secure mode
--server-cert SERVER_CERT
CA certificate file
--left-right-dest DEST_LR
Left to Right destination
--right-left-dest DEST_RL
Right to Left destination
--left-right-localseg LOCALSEG_LR
Left to Right Local segment
--right-left-localseg LOCALSEG_RL
Right to Left Local segment
--left-right-sidlist SIDLIST_LR
Left to Right SID list
--right-left-sidlist SIDLIST_RL
Right to Left SID list
-d, --debug Activate debug logs
Argument |
Type |
Default |
Optional |
Description |
---|---|---|---|---|
|
– |
– |
– |
Show an help message and exit. |
|
string |
– |
no |
Operation (add, change, get, del). |
|
string |
– |
no |
IP of the gRPC server on the
Left node.
|
|
string |
– |
no |
IP of the gRPC server on the
Right node.
|
|
integer |
12345 |
yes |
Port of the gRPC server on the
Left node.
|
|
integer |
12345 |
yes |
Port of the gRPC server on the
Right node.
|
|
boolean |
False |
yes |
If True, the Controller will use the
TLS to encrypt and authenticate
the traffic sent to the Node
Manager on the gRPC Channel.
|
|
boolean |
False |
yes |
If True, the Controller will use the
TLS to encrypt and authenticate
the traffic sent to the Node
Manager on the gRPC Channel.
|
|
string |
None |
yes |
Name of CA certificate for the TLS,
required if GRPC_SECURE is True.
|
|
string |
– |
no |
Destination prefix used for the
Left to Right path.
|
|
string |
– |
no |
Destination prefix used for the
Right to Left path.
|
|
string |
– |
yes |
Local segment used for the Left to
Right path (associated to the
End.DT6 behavior). If not
specified, the End.DT6 behavior
is not created.
|
|
string |
– |
yes |
Local segment used for the Right to
Left path (associated to the
End.DT6 behavior). If not
specified, the End.DT6 behavior
is not created.
|
|
string |
– |
no |
SID list used for the Left to Right
path.
|
|
string |
– |
no |
SID list used for the Right to Left
path.
|
|
– |
– |
yes |
If True, the debug logging is
enabled.
|
path
¶
Create, get, change or remove a SRv6 path in a node.
controller(srv6)> path --help
usage: path [-h] -g GRPC_IP -r GRPC_PORT [-s] [--server-cert SERVER_CERT] --op OP
--destination DESTINATION --segments SEGMENTS [--device DEVICE]
[--encapmode {encap,inline,l2encap}] [--table TABLE]
[--metric METRIC] [-d]
Create, get, change or remove a SRv6 path in a node
optional arguments:
-h, --help show this help message and exit
-g GRPC_IP, --grpc-ip GRPC_IP
IP of the gRPC server
-r GRPC_PORT, --grpc-port GRPC_PORT
Port of the gRPC server
-s, --secure Activate secure mode
--server-cert SERVER_CERT
CA certificate file
--op OP Operation
--destination DESTINATION
Destination
--segments SEGMENTS Segments
--device DEVICE Device
--encapmode {encap,inline,l2encap}
Encap mode
--table TABLE Table
--metric METRIC Metric
-d, --debug Activate debug logs
Argument |
Type |
Default |
Optional |
Description |
---|---|---|---|---|
|
– |
– |
– |
Show an help message and exit. |
|
string |
– |
no |
IP of the gRPC server executed
on the node.
|
|
integer |
12345 |
yes |
Port of the gRPC server executed
on the node.
|
|
boolean |
False |
yes |
If True, the Controller will use the TLS to
encrypt and authenticate the traffic sent
to the Node Manager on the gRPC
Channel.
|
|
string |
None |
yes |
Name of CA certificate for the TLS,
required if GRPC_SECURE is True.
|
|
string |
– |
no |
Operation (add, change, get, del). |
|
string |
– |
no |
Destination of the SRv6 path. |
|
string |
– |
yes |
The segment list used for the SRv6 path.
|
|
string |
– |
yes |
Device to be associated to the SRv6
path. If not specified, the Node
Manager will select an interface
automatically from the list of the
interfaces of the device.
|
|
string |
encap |
yes |
The encap mode used for SRv6
(i.e. encap, inline or l2encap).
|
|
integer |
254 |
yes |
The ID of the table where the SRv6
route must be created or removed
from. If not specified, the main table will
be used (table ID 254).
|
|
integer |
– |
yes |
The metric to be assigned to the route. |
|
– |
– |
yes |
If True, the debug logging is enabled. |
unitunnel
¶
Create, get, change or remove a unidirectional SRv6 tunnel between two nodes.
controller(srv6)> unitunnel --help
usage: unitunnel [-h] --op OP --ingress-grpc-ip INGRESS_GRPC_IP
--egress-grpc-ip EGRESS_GRPC_IP --ingress-grpc-port
INGRESS_GRPC_PORT --egress-grpc-port EGRESS_GRPC_PORT [-s]
[--server-cert SERVER_CERT] --dest DEST [--localseg LOCALSEG] --sidlist
SIDLIST [-d]
Create, get, change or remove a unidirectional SRv6 tunnel between two nodes
optional arguments:
-h, --help show this help message and exit
--op OP Operation
--ingress-grpc-ip INGRESS_GRPC_IP
IP of the gRPC server
--egress-grpc-ip EGRESS_GRPC_IP
IP of the gRPC server
--ingress-grpc-port INGRESS_GRPC_PORT
Port of the gRPC server
--egress-grpc-port EGRESS_GRPC_PORT
Port of the gRPC server
-s, --secure Activate secure mode
--server-cert SERVER_CERT
CA certificate file
--dest DEST Destination
--localseg LOCALSEG Local segment
--sidlist SIDLIST SID list
-d, --debug Activate debug logs
Argument |
Type |
Default |
Optional |
Description |
---|---|---|---|---|
|
– |
– |
– |
Show an help message and exit. |
|
string |
– |
no |
Operation (add, change, get, del). |
|
string |
– |
no |
IP of the gRPC server on the
ingress node.
|
|
string |
– |
no |
IP of the gRPC server on the
egress node.
|
|
integer |
12345 |
yes |
Port of the gRPC server on the
ingress node.
|
|
integer |
12345 |
yes |
Port of the gRPC server on the
egress node.
|
|
boolean |
False |
yes |
If True, the Controller will use the
TLS to encrypt and authenticate
the traffic sent to the Node
Manager on the gRPC Channel.
|
|
string |
None |
yes |
Name of CA certificate for the TLS,
required if GRPC_SECURE is True.
|
|
string |
– |
no |
Destination prefix used for the
SRv6 path.
|
|
string |
– |
yes |
Local segment used for the SRv6
path (associated to the
End.DT6 behavior). If not
specified, the End.DT6 behavior
is not created.
|
|
string |
– |
no |
SID list used for the SRv6 path.
|
|
– |
– |
yes |
If True, the debug logging is
enabled.
|
usid_policy
¶
Create, get, change or remove a SRv6 uSID policy in a node.
controller(srv6)> policy --help
usage: policy [-h] [--secure] [--server-cert SERVER_CERT] --op OP
[--lr-destination LR_DESTINATION]
[--rl-destination RL_DESTINATION] [--nodes NODES]
[--nodes-rev NODES_REV] [--table TABLE] [--metric METRIC]
[--id ID] [--debug]
gRPC Southbound APIs for SRv6 Controller
optional arguments:
-h, --help show this help message and exit
--secure Activate secure mode
--server-cert SERVER_CERT
CA certificate file
--op OP Operation
--lr-destination LR_DESTINATION
Left to Right Destination
--rl-destination RL_DESTINATION
Right to Left Destination
--nodes NODES Nodes
--nodes-rev NODES_REV
Reverse nodes list
--table TABLE Table
--metric METRIC Metric
--id ID id
--debug Activate debug logs
Argument |
Type |
Default |
Optional |
Description |
---|---|---|---|---|
|
– |
– |
– |
Show an help message and exit. |
|
boolean |
False |
yes |
If True, the Controller will use the TLS to
encrypt and authenticate the traffic sent
to the Node Manager on the gRPC
Channel.
|
|
string |
None |
yes |
Name of CA certificate for the TLS,
required if GRPC_SECURE is True.
|
|
string |
– |
no |
Operation (add, change, get, del). |
|
string |
– |
yes |
Destination of the SRv6 left-to-right path. |
|
string |
– |
yes |
Destination of the SRv6 right-to-left path. |
|
string |
– |
yes |
The list of the waypoints (device names) of
the SRv6 path (left-to-right).
|
|
string |
– |
yes |
The list of the waypoints (device names) of the
reverse SRv6 path (right-to-left).
If not provided, the same nodes of the
left-to-right path in reverse order
will be used.
|
|
string |
– |
yes |
Device to be associated to the SRv6
path. If not specified, the Node
Manager will select an interface
automatically from the list of the
interfaces of the device.
|
|
string |
encap |
yes |
The encap mode used for SRv6
(i.e. encap, inline or l2encap).
|
|
integer |
254 |
yes |
The ID of the table where the SRv6
route must be created or removed
from. If not specified, the main table will
be used (table ID 254).
|
|
integer |
– |
yes |
The metric to be assigned to the route. |
|
– |
– |
yes |
If True, the debug logging is enabled. |