Cisco Service Layer API Documentation

SLRouteCommon

Service Description

The following messages are used in IPv4, IPv6 Route, MPLS and PathGroup operations.

Messages

message  SLRouteGlobalsGetMsg
 Route Globals Get Message. More...
 
message  SLRouteGlobalsGetMsgRsp
 Route Globals Get Message Response. More...
 
message  SLRouteGlobalStatsGetMsg
 Route Global Stats Get Message. More...
 
message  SLRouteGlobalStatsGetMsgRsp
 Route Global Stats Get Message Response. More...
 
message  SLVrfReg
 VRF Registration message. More...
 
message  SLVrfRegMsg
 VRF Registration messages. More...
 
message  SLVrfRegMsgRes
 VRF Registration message Result. More...
 
message  SLVrfRegMsgRsp
 VRF Registration message Response. More...
 
message  SLVrfRegGetMsg
 VRF Get Message. More...
 
message  SLVrfRegGetMsgRsp
 VRF Get Message Response. More...
 
message  SLVRFGetStatsMsgRes
 VRF Get Stats Message Response. More...
 
message  SLVRFGetStatsMsgRsp
 VRF Get Stats Message Response. More...
 
message  SLRouteGetNotifMsg
 Common Get Notifications message. More...
 
message  SLRouteNotifStatus
 Common Route Notification Status message. More...
 
message  SLRouteNotifMarker
 Common Marker Notification message. More...
 
message  SLVrfNotif
 Common Vrf Notification message. More...
 
message  SLRouteGetMatch
 Get objects whose attibutes match one of below entries. More...
 
message  SLRouteCommon
 Common IPv4/IPv6 route attributes. More...
 
message  SLVxLANPath
 Attributes for constructing VxLAN encapsulation for a IP packet. More...
 
message  SLRoutePath
 Route Path attributes. More...
 

Enumerations

enum  SLNotifType {
  SL_EVENT_TYPE_RESERVED = 0x0, SL_EVENT_TYPE_ERROR = 0x1, SL_EVENT_TYPE_STATUS = 0x2, SL_EVENT_TYPE_ROUTE = 0x3,
  SL_EVENT_TYPE_START_MARKER = 0x4, SL_EVENT_TYPE_END_MARKER = 0x5, SL_EVENT_TYPE_VRF = 0x6
}
 L3 Event Notification types. More...
 
enum  SLRouteFlags {
  SL_ROUTE_FLAG_RESERVED = 0x00, SL_ROUTE_FLAG_PREFER_OVER_LDP = 0x01, SL_ROUTE_FLAG_DISABLE_LABEL_MERGE = 0x2, SL_ROUTE_FLAG_VIABLE_PATHS_ONLY = 0x04,
  SL_ROUTE_FLAG_ACTIVE_ON_VIABLE_PATH = 0x08
}
 
enum  SLPathFlags { SL_PATH_FLAG_RESERVED = 0x00, SL_PATH_FLAG_SINGLE_PATH_OPT = 0x01 }
 

Message Documentation

message SLRouteGlobalsGetMsg

Route Globals Get Message.

message SLRouteGlobalsGetMsgRsp

Route Globals Get Message Response.

Attributes

SLErrorStatus ErrStatus = 1
 Corresponding error code.
 
uint32 MaxVrfregPerVrfregmsg = 2
 Max VrfReg objects within a single VrfRegMsg message.
 
uint32 MaxRoutePerRoutemsg = 3
 Max Route objects within a single RouteMsg message.
 
message SLRouteGlobalStatsGetMsg

Route Global Stats Get Message.

message SLRouteGlobalStatsGetMsgRsp

Route Global Stats Get Message Response.

Attributes

SLErrorStatus ErrStatus = 1
 Corresponding error code.
 
uint32 VrfCount = 2
 Num VRFs registered through the service layer for the requested client.
 
uint32 RouteCount = 3
 Num Routes added through the service layer for the requested client.
 
message SLVrfReg

VRF Registration message.

Attributes

string VrfName = 1
 VRF Name.
 
uint32 AdminDistance = 2
 Default Admin distance for routes programmed by this application Range [0-255] This default value is used if route objects' AdminDistance is 0. More...
 
uint32 VrfPurgeIntervalSeconds = 3
 In case the Service Layer -> RIB connection is lost, this specifies the timeout period after which RIB will automatically purge the installed routes, unless the service layer: More...
 

Member Data Documentation

uint32 SLVrfReg::AdminDistance = 2

Default Admin distance for routes programmed by this application Range [0-255] This default value is used if route objects' AdminDistance is 0.

Refer to SLRouteCommon

uint32 SLVrfReg::VrfPurgeIntervalSeconds = 3

In case the Service Layer -> RIB connection is lost, this specifies the timeout period after which RIB will automatically purge the installed routes, unless the service layer:

  1. Re-registers (VRF)
  2. Replay all routes
  3. And send EOF, before the purge timeout

AdminDistance and VrfPurgeIntervalSeconds values are ignored for SL_PATH_GROUP_TABLE type registration

message SLVrfRegMsg

VRF Registration messages.

Attributes

SLRegOp Oper = 1
 Registration Operation.
 
repeated SLVrfReg VrfRegMsgs = 2
 List of VRF registrations.
 
message SLVrfRegMsgRes

VRF Registration message Result.

Attributes

SLErrorStatus ErrStatus = 1
 Corresponding error code.
 
string VrfName = 2
 VRF Name.
 
message SLVrfRegMsgRsp

VRF Registration message Response.

Attributes

SLErrorStatus StatusSummary = 1
 Summary result of the bulk operation (refer to enum SLErrorStatus) In general, the StatusSummary implies one of 3 things: More...
 
repeated SLVrfRegMsgRes Results = 2
 In case of errors, this field indicates which entry in the bulk was erroneous. More...
 

Member Data Documentation

repeated SLVrfRegMsgRes SLVrfRegMsgRsp::Results = 2

In case of errors, this field indicates which entry in the bulk was erroneous.

SLErrorStatus SLVrfRegMsgRsp::StatusSummary = 1

Summary result of the bulk operation (refer to enum SLErrorStatus) In general, the StatusSummary implies one of 3 things:

  1. SL_SUCCESS: signifies that the entire bulk operation was successful. In this case, the Results list is empty.
  2. SL_SOME_ERR: signifies that the operation failed for one or more entries. In this case, Results holds the result for each individual entry in the bulk.
  3. SL_RPC_XXX: signifies that the entire bulk operation failed. In this case, the Results list is empty.
message SLVrfRegGetMsg

VRF Get Message.

Attributes

string VrfName = 1
 VRF name (key). More...
 
uint32 EntriesCount = 2
 Number of entries requested.
 
bool GetNext = 3
 if GetNext is FALSE: request up to 'EntriesCount' entries starting from the key If GetNext is TRUE, or if the key exact match is not found: request up to 'EntriesCount' entries starting from the key's next GetNext does not get the routes in the next client. More...
 

Member Data Documentation

bool SLVrfRegGetMsg::GetNext = 3

if GetNext is FALSE: request up to 'EntriesCount' entries starting from the key If GetNext is TRUE, or if the key exact match is not found: request up to 'EntriesCount' entries starting from the key's next GetNext does not get the routes in the next client.

string SLVrfRegGetMsg::VrfName = 1

VRF name (key).

If the Key is not specified, then request up to the first 'EntriesCount' entries.

message SLVrfRegGetMsgRsp

VRF Get Message Response.

Attributes

bool Eof = 1
 End Of File. More...
 
SLErrorStatus ErrStatus = 2
 Status of the Get operation.
 
repeated SLVrfReg Entries = 3
 Returned entries as requested in the Get operation. More...
 

Member Data Documentation

repeated SLVrfReg SLVrfRegGetMsgRsp::Entries = 3

Returned entries as requested in the Get operation.

if ErrStatus is SL_SUCCESS, Entries contains the info requested

bool SLVrfRegGetMsgRsp::Eof = 1

End Of File.

When set to True, it indicates that the server has returned M, where M < N, of the original N requested Entries.

message SLVRFGetStatsMsgRes

VRF Get Stats Message Response.

Attributes

string VrfName = 1
 VRF name as key.
 
uint32 RouteCount = 2
 Num VRF Routes added through the service layer.
 
message SLVRFGetStatsMsgRsp

VRF Get Stats Message Response.

Attributes

bool Eof = 1
 End Of File. More...
 
SLErrorStatus ErrStatus = 2
 Status of the Get Stats operation.
 
repeated SLVRFGetStatsMsgRes Entries = 3
 Returned entries as requested in the Get Stats operation on per client basis if ErrStatus is SL_SUCCESS, Entries contains the info requested.
 

Member Data Documentation

bool SLVRFGetStatsMsgRsp::Eof = 1

End Of File.

When set to True, it indicates that the server has returned M, where M < N, of the original N requested Entries.

message SLRouteGetNotifMsg

Common Get Notifications message.

Attributes

SLNotifOp Oper = 1
 Oper = SL_NOTIFOP_ENABLE This is to enable route notifications in a VRF Oper = SL_NOTIFOP_DISABLE This is to disable route notifications in a VRF.
 
uint64 Correlator = 2
 Correlator. More...
 
string VrfName = 3
 Vrf that the client is interested in.
 
string SrcProto = 4
 Source Protocol. More...
 
string SrcProtoTag = 5
 Source Protocol Tag. More...
 

Member Data Documentation

uint64 SLRouteGetNotifMsg::Correlator = 2

Correlator.

This is used to correlate SLRouteGetNotifMsg with SLRouteNotifStatus. The server reflects this field in the reply. A client can send a SLRouteGetNotifMsg with the Correlator only. Once accepted and reply is sent, VRF notifications are sent. This is useful if a client wants to receive VRF notifications (SLVrfNotif) only and is not interested in receiving route notifications (SLRoutev4NotifRoute/SLRoutev6NotifRoute) from any VRF.

string SLRouteGetNotifMsg::SrcProto = 4

Source Protocol.

Only routes with specified source protocol and protocol tag will be notified. Contact Cisco for supported protocol string names.

string SLRouteGetNotifMsg::SrcProtoTag = 5

Source Protocol Tag.

This can be empty if N/A. Contact Cisco for supported protocol tags.

message SLRouteNotifStatus

Common Route Notification Status message.

Attributes

uint64 Correlator = 1
 Correlator in the request.
 
string VrfName = 2
 Vrf in the request.
 
SLErrorStatus NotifStatus = 3
 The NotifStatus implies one of 2 things: SL_SUCCESS: signifies that the notification request was successful SL_XXX: signifies an error in setting up a notification for the Vrf. More...
 

Member Data Documentation

SLErrorStatus SLRouteNotifStatus::NotifStatus = 3

The NotifStatus implies one of 2 things: SL_SUCCESS: signifies that the notification request was successful SL_XXX: signifies an error in setting up a notification for the Vrf.

Implies that notifications for this VRF will not be sent.

message SLRouteNotifMarker

Common Marker Notification message.

Attributes

string VrfName = 1
 Vrf that this notification message applies to.
 
message SLVrfNotif

Common Vrf Notification message.

Attributes

string VrfName = 1
 Vrf that this notification message applies to.
 
SLObjectOp Status = 2
 Status of this Vrf: add/update/delete.
 
message SLRouteGetMatch

Get objects whose attibutes match one of below entries.

Specify a regular expression for PathGroup name or a numerical value for Vxlan VNI.

Attributes

oneof {
   string   PathGroupRegex = 1
 SLAFGetMsgRsp.AFList.AFOp.AFObject.entry.PathGroupKey.PathGroupId.Name.
 
   uint32   VxlanVniId = 2
 SLAFGetMsgRsp.AFList.AFOp.AFObject.PathList.VxLANPath.VNI.
 
}; 
 
message SLRouteCommon

Common IPv4/IPv6 route attributes.

Attributes

uint32 AdminDistance = 1
 Adminstrative distance of the route. More...
 
uint32 LocalLabel = 2
 Local label associated with this route. More...
 
uint32 Tag = 3
 Route Tag. More...
 
string SrcProto = 4
 Source Protocol. More...
 
string SrcProtoTag = 5
 Source Protocol Tag. More...
 
uint32 Flags = 6
 Route Flags. More...
 

Member Data Documentation

uint32 SLRouteCommon::AdminDistance = 1

Adminstrative distance of the route.

[0-255]. RIB uses this field to break the tie when multiple sources install the same route. Lower distance is preferred over higher distance. The per route object admin distance overrides the default admin distance set at VRF registration. see SLVrfReg

uint32 SLRouteCommon::Flags = 6

Route Flags.

Flags to control programming of the route to Routing Information Base. Each flag is indicated as a bit field. See SLRouteFlags for flag enumerations. Supported values are:

SL_ROUTE_FLAG_PREFER_OVER_LDP - This route takes precedence over a route learnt by LDP.

SL_ROUTE_FLAG_DISABLE_LABEL_MERGE If this route is preferred over any other producer of the same prefix and the latter is programmed with a SR label as well, do not merge that label's programming this route.

SL_ROUTE_FLAG_VIABLE_PATHS_ONLY - This flag on the route is applicable only if the route contains the PathList.

  • If the flag is not set, all paths in the PathList are installed in the route's load balance group, even if paths are unviable. The Network element does not automatically update the route's load balance group when path viability changes and expects the client to take corrective action.
  • If the flag is set, the network element only installs viable paths from the PathList in the route's load balance group. The Network element also automatically updates the route's load balance group when path viability changes.
  • This flag is ignored if the route refers to the PathGroup and the corresponding setting on the PathGroup dictates path programming.

SL_ROUTE_FLAG_ACTIVE_ON_VIABLE_PATH - This flag is supported only for routes that contain the PathList.

  • If this flag is not set, the route is active if it is preferred based on administrative distance. Viability of the paths in the PathList is not used as a criterion to determine route's activeness. If the route is active, the PathList programming is dictated by SL_ROUTE_FLAG_VIABLE_PATHS_ONLY.
  • If this flag is set, SL_ROUTE_FLAG_VIABLE_PATHS_ONLY must also be set. The route is considered as active if it is preferred based on administrative distance AND at least one path in the PathList is viable. The Network element also automatically promotes or demotes the route when the first path becomes viable or none of the paths are no longer viable.
  • If the route refers to the PathGroup, then this flag on the route is ignored. Instead, the corresponding setting on PathGroup dictates whether this route should be considered in best route calculations.

All others are reserved.

uint32 SLRouteCommon::LocalLabel = 2

Local label associated with this route.

This is an optional field that can be used to simulatenously setup an ILM entry (e.g. head end of an MPLS LSP) for the same route. This is especially useful when setting up an MPLS LSP (a /32-route towards the remote LSP peer e.g. 2.2.2.2/32) which is required for MPLS VPN labeled routes.

Note: MPLS VPN labeled routes can resolve only on:

  • /32-routes with valid LocalLabel and a valid egress MPLS path label
string SLRouteCommon::SrcProto = 4

Source Protocol.

For redistributed messages via notification stream only, ignored otherwise. Contact Cisco for supported protocol string names.

string SLRouteCommon::SrcProtoTag = 5

Source Protocol Tag.

This can be empty if N/A. For redistributed messages via notification stream only, ignored otherwise. Contact Cisco for supported protocol tags.

uint32 SLRouteCommon::Tag = 3

Route Tag.

Routes are usually tagged to prevent loops during redistribution between protocols.

message SLVxLANPath

Attributes for constructing VxLAN encapsulation for a IP packet.

Attributes

uint32 VNI = 1
 Virtual network identifier. Client must set a valid non-zero idenifier.
 
bytes SourceMacAddress = 2
 Source MAC address is optional.
 
bytes DestMacAddress = 3
 Destination MAC address is optional.
 
SLIpAddress SrcIpAddress = 4
 Tunnel Source or Local IP address is mandatory.
 
SLIpAddress DestIpAddress = 5
 Tunnel Destination or Remote IP address is mandatory.
 
message SLRoutePath

Route Path attributes.

In the multi-path associated with a IP route, MPLS label or a Path Group, paths with identical keys are coalesced and cannot be used as a mechanism to achieve unequal cost multi-path distribution.

Path key includes NextHopAdress, NextHopInterface, LabelStack and VrfName.

FRR Note: Failover from primary to backup is based on the trigger used (e.g. link down, BFD, etc.). Revertion is mainly timeout based. The timeout value is platform specific and is not configurable.

Attributes

SLIpAddress NexthopAddress = 1
 One of IPv4 or IPv6 address. More...
 
SLInterface NexthopInterface = 2
 Outgoing interface name for the path. More...
 
uint32 LoadMetric = 3
 Load metric for this path. More...
 
string VrfName = 4
 Path VRF name. More...
 
uint32 Metric = 5
 Route Metric. More...
 
uint32 PathId = 6
 Path identifier. More...
 
repeated uint64 ProtectedPathBitmap = 7
 Path protection bitmap. More...
 
repeated uint32 LabelStack = 8
 MPLS label stack. More...
 
repeated SLIpAddress RemoteAddress = 9
 MPLS Remote router backup address. More...
 
SLEncapType EncapType = 10
 For VxLAN, Encapsulation type must be set to SL_ENCAP_VXLAN.
 
bytes VtepRouterMacAddress = 11
 VTEP (VxLAN tunnel end point) router MAC address. More...
 
SLVxLANPath VxLANPath = 12
 Create L3 VxLAN tunnel endpoint. More...
 
uint32 Flags = 13
 Path Flags. More...
 

Member Data Documentation

uint32 SLRoutePath::Flags = 13

Path Flags.

Each flag is indicated as a bit field. Supported values are:

  • 0x00000001 = SINGLE_PATH_OPT Enables hardware optimization for single path VxLAN tunnels.
repeated uint32 SLRoutePath::LabelStack = 8

MPLS label stack.

Stack of labels that is pushed when the packet is switched out. Label size is LSB 20 bits. Forwarding will set EXP, TTL and BOS. For primary path, typically only 1 label is used. For backup paths, more than 1 label can be used. If more than one label is used, remote backup addresses must be specified.

The maximum number of labels pushed for primary and backup are platform dependent.

uint32 SLRoutePath::LoadMetric = 3

Load metric for this path.

Used for equal/unequal cost load balancing of traffic distribution. For equal cost load balancing, all paths associated with the route, MPLS label or PathGroup must have a value of 0. For unequal cost load balancing, all paths must have non-zero value otherwise system defaults to equal cost load balancing.

uint32 SLRoutePath::Metric = 5

Route Metric.

The metric is typically based on information like load, hop count, MTU, reliability of the path, etc.

SLIpAddress SLRoutePath::NexthopAddress = 1

One of IPv4 or IPv6 address.

For ENCAP_VXLAN, this field is not supported and will be ignored.

SLInterface SLRoutePath::NexthopInterface = 2

Outgoing interface name for the path.

For ENCAP_VXLAN, this field is not supported and will be ignored.

uint32 SLRoutePath::PathId = 6

Path identifier.

Path-id is used to uniquely identify a path when it comes to protection (Fast Re-Route - FRR). It is not used otherwise.

In general, for FRR, There are 3 main path attributes:

  1. Primary. The path is the main path to carry traffic.
  2. Protected. A primary path with a configured backup path.
  3. Backup. The path is protecting a primary path.

NOTE1: a primary path (A) can be simultaneously protected (by B), and acting as a backup for another path (C). In this example, the primary path C is protected by A (which happens to be primary). So the primary path (A) is Primary, Protected, and Backup.

The following are various path types based on combinations of attributes:

  1. Pure Primary i.e. Not Protected and is not a Backup. => PathId is optional. ProtectedPathBitmap = 0x0
  2. Primary and Protected. Path is not a Backup. => PathId is mandatory. ProtectedPathBitmap = 0x0
  3. Primary and Not Protected. Path is also a Backup. => PathId is mandatory. ProtectedPathBitmap = 0xYYYY
  4. Primary and Protected. Path is also a Backup. => PathId is mandatory. ProtectedPathBitmap = 0xYYYY
  5. Pure Backup. Protection is not allowed for backup paths. => PathId is mandatory. ProtectedPathBitmap = 0xYYYY

NOTE2: Pure backup path-id uses a different range than primary path-ids. The valid range of primary path IDs, and pure backup path IDS are platform dependent and can be retrieved through the client init message.

repeated uint64 SLRoutePath::ProtectedPathBitmap = 7

Path protection bitmap.

The bitmap of paths this Backup path is protecting. Example: If this path is protecting paths with IDs 4, 5 and 6, then set bitmap to: 0x38 ==> 0011 1000 || |– path 4 ||– path 5 |– path 6 (1 << (pathId_1 - 1)) | (1 << (pathId_2 - 1)) | (1 << (pathId_3 - 1))

repeated SLIpAddress SLRoutePath::RemoteAddress = 9

MPLS Remote router backup address.

This field is used only for backup MPLS path with more than one label For N+1 backup labels, N remote backup addresses must be specified.

string SLRoutePath::VrfName = 4

Path VRF name.

This field is used ONLY if the path is in a different VRF than the route (e.g. VPN cases).

bytes SLRoutePath::VtepRouterMacAddress = 11

VTEP (VxLAN tunnel end point) router MAC address.

A unique system MAC address that other VTEPs can use for inter-VNI routing. The router MAC address is used as the inner destination MAC address for routed VXLAN packet. If this attribute is set, route can be only be signalled via BGP for EVPN use and local tunnel endpoint is not created.

This field and VxLANPath are mutually exclusive. This field is deprecated and will eventually be removed.

SLVxLANPath SLRoutePath::VxLANPath = 12

Create L3 VxLAN tunnel endpoint.

Apply VxLAN encapsulation on the IP packet.

Enumeration Type Documentation

L3 Event Notification types.

Enumerator
SL_EVENT_TYPE_RESERVED 

Reserved. 0x0.

SL_EVENT_TYPE_ERROR 

Error - ErrStatus field elaborates on the error.

The client can decide to close the stream based on the error. 0x1

SL_EVENT_TYPE_STATUS 

Status of GetNotifMsg per VRF.

NotifStatus field elaborates on the result. If there is an error, only the notification for the VRF in the status message is not setup. 0x2

SL_EVENT_TYPE_ROUTE 

Route Notification. 0x3.

SL_EVENT_TYPE_START_MARKER 

Start marker per VRF - sent before any ROUTE notification is sent.

This is an indication to stale any objects received until now. 0x4

SL_EVENT_TYPE_END_MARKER 

End marker per VRF - sent after all ROUTE notifications are sent.

This is an indication to sweep any stale objects, if present. 0x5

SL_EVENT_TYPE_VRF 

VRF Add/Update/Delete Notification. 0x6.

Enumerator
SL_PATH_FLAG_RESERVED 

Path Flags.

Each flag is indicated as a bit field. Supported values are: Reserved.

SL_PATH_FLAG_SINGLE_PATH_OPT 

Enables hardware optimization for single path VxLAN tunnels.

Enumerator
SL_ROUTE_FLAG_RESERVED 

Flags to control programming of the route and Path Group to Routing Information Base.

Each flag is indicated as a bit field. Supported values are: Reserved.

SL_ROUTE_FLAG_PREFER_OVER_LDP 

This route takes precedence over a route learnt by LDP.

SL_ROUTE_FLAG_DISABLE_LABEL_MERGE 

If this route is preferred over any other producer of the same prefix and the latter is programmed with a SR label as well, do not merge that label's programming this route.

SL_ROUTE_FLAG_VIABLE_PATHS_ONLY 

Install viable paths only. See text in SLRoutecommon/PathGroup for more details.

SL_ROUTE_FLAG_ACTIVE_ON_VIABLE_PATH 

Route is considered active if there is atleast one viable path.

See text in SLRoutecommon/PathGroup for more details.