Cisco Service Layer API Documentation

SLRouteCommon

Service Description

The following messages are used in both IPv4 and IPv6 Route 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  SLRouteCommon
 Common IPv4/IPv6 route attributes. 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...
 

Message Documentation

message SLRouteGlobalsGetMsg
message SLRouteGlobalsGetMsgRsp

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
message SLRouteGlobalStatsGetMsgRsp

Attributes

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

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

Refer to SLRouteCommon

uint32 SLVrfReg::VrfPurgeIntervalSeconds = 3
  1. Re-registers (VRF)
  2. Replay all routes
  3. And send EOF, before the purge timeout
message SLVrfRegMsg

Attributes

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

Attributes

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

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
SLErrorStatus SLVrfRegMsgRsp::StatusSummary = 1
  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

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
 

Member Data Documentation

string SLVrfRegGetMsg::VrfName = 1

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

message SLVrfRegGetMsgRsp

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

if ErrStatus is SL_SUCCESS, Entries contains the info requested

bool SLVrfRegGetMsgRsp::Eof = 1

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

message SLVRFGetStatsMsgRes

Attributes

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

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. More...
 

Member Data Documentation

repeated SLVRFGetStatsMsgRes SLVRFGetStatsMsgRsp::Entries = 3

if ErrStatus is SL_SUCCESS, Entries contains the info requested

bool SLVRFGetStatsMsgRsp::Eof = 1

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

message SLRouteGetNotifMsg

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

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

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

string SLRouteGetNotifMsg::SrcProtoTag = 5

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

message SLRouteNotifStatus

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

Implies that notifications for this VRF will not be sent.

message SLRouteNotifMarker

Attributes

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

Attributes

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

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

[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's admin distance set at VRF registration. see SLVrfReg

uint32 SLRouteCommon::Flags = 6

Flags to control programming of the route to Routing Information Base. Each flag is indicated as a bit field. Supported values are: 0x1 - This route takes precedence over a route learnt by LDP.

uint32 SLRouteCommon::LocalLabel = 2

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

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

string SLRouteCommon::SrcProtoTag = 5

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

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

message SLRoutePath

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 For ENCAP_VXLAN, this will specify the tunnel end point IP address. More...
 
SLInterface NexthopInterface = 2
 Outgoing interface name for the path.
 
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 or VxLAN Virtual Network Identifier. More...
 
repeated SLIpAddress RemoteAddress = 9
 MPLS Remote router backup address. More...
 
SLEncapType EncapType = 10
 Encapsulation type (VXLAN or MPLS)
 
bytes VtepRouterMacAddress = 11
 VTEP (VxLAN tunnel end point) router MAC address. More...
 

Member Data Documentation

repeated uint32 SLRoutePath::LabelStack = 8

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. For ENCAP_VXLAN, this field will specify the Virtual Network Identifier (VNI)

uint32 SLRoutePath::LoadMetric = 3

Used for equal/unequal cost load balancing of traffic distribution.

uint32 SLRoutePath::Metric = 5

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

SLIpAddress SLRoutePath::NexthopAddress = 1
uint32 SLRoutePath::PathId = 6

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

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

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

This field is used ONLY if the path is in a different VRF than the route (e.g. VPN cases) For ENCAP_VXLAN, this field can be used to specify the VRF where the tunnel end point IP address resides ("default" will be assumed if not specified).

bytes SLRoutePath::VtepRouterMacAddress = 11

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. Used for ENCAP_VXLAN (mandatory) only.

Enumeration Type Documentation

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.