Cisco Service Layer API Documentation

SLMpls

Service Description

Clients Must register for MPLS operations e.g. Incoming Label Map operations. Once registered, a client Must reserve an MPLS label (dynamic allocation) before using it as an incoming label map. Labels are reserved in blocks through the block reservation operations.

This file also defines RPC calls for adding, deleting, updating, and querying incoming label map entries (see RFC 3031)

Incoming Label Map (ILM): A mapping from incoming labels to corresponding NHLFEs. It is used when forwarding packets that arrive as labeled packets.

Next Hop Forwarding Entry (NHLE): An entry containing next-hop information and label manipulation instructions. This is also referred to as the ILM Path.

RPC Calls

rpc SLMplsOper::SLMplsRegOp (SLMplsRegMsg) returns(SLMplsRegMsgRsp)
 MPLS Registration operations. More...
 
rpc SLMplsOper::SLMplsGet (SLMplsGetMsg) returns(SLMplsGetMsgRsp)
 Retrieve global MPLS info from the server.
 
rpc SLMplsOper::SLMplsGetStats (SLMplsGetMsg) returns(SLMplsGetStatsMsgRsp)
 Retrieve global MPLS Stats from the server.
 
rpc SLMplsOper::SLMplsLabelBlockOp (SLMplsLabelBlockMsg) returns(SLMplsLabelBlockMsgRsp)
 MPLS Label Block operations. More...
 
rpc SLMplsOper::SLMplsLabelBlockGet (SLMplsLabelBlockGetMsg) returns(SLMplsLabelBlockGetMsgRsp)
 Retrieve Label Block attributes.
 
rpc SLMplsOper::SLMplsIlmOp (SLMplsIlmMsg) returns(SLMplsIlmMsgRsp)
 MPLS ILM operations. More...
 
rpc SLMplsOper::SLMplsIlmGet (SLMplsIlmGetMsg) returns(SLMplsIlmGetMsgRsp)
 Retrieve MPLS ILM entry attributes.
 
rpc SLMplsOper::SLMplsIlmOpStream (stream SLMplsIlmMsg) returns(stream SLMplsIlmMsgRsp)
 MPLS ILM stream operations. More...
 
rpc SLMplsOper::SLMplsIlmGetStream (stream SLMplsIlmGetMsg) returns(stream SLMplsIlmGetMsgRsp)
 Stream-Get of incoming label map.
 

Messages

message  SLMplsLabelBlockKey
 MPLS Label block key. More...
 
message  SLMplsLabelBlockMsg
 MPLS Label block batch reservation message. More...
 
message  SLMplsLabelBlockMsgRes
 MPLS Label block reservation result. More...
 
message  SLMplsLabelBlockMsgRsp
 MPLS Label block batch reservation response. More...
 
message  SLMplsLabelBlockGetMsg
 MPLS Label Block Get Message This message is used to query previous label block reservations. More...
 
message  SLMplsLabelBlockGetMsgRsp
 MPLS Label Block get message response This message is the response to the label block query. More...
 
message  SlMplsReg
 MPLS Registration message. More...
 
message  SLMplsRegMsg
 MPLS Registration message. More...
 
message  SLMplsRegMsgRsp
 MPLS Registration response message. More...
 
message  SLMplsGetMsg
 MPLS Get Global Info message. More...
 
message  SLMplsGetMsgRsp
 MPLS Get Global Info response message. More...
 
message  SLMplsGetStatsMsgRsp
 MPLS Get Global Stats response message. More...
 
message  SLMplsPath
 MPLS Path (or NHLFE) information. More...
 
message  SLMplsIlmKey
 MPLS ILM entry's key. More...
 
message  SLMplsCos
 MPLS ILM entry's CoS value This message contains either EXP bits or a forwarding class. More...
 
message  SLMplsIlmEntry
 MPLS ILM entry. More...
 
message  SLMplsIlmMsg
 A batch of MPLS ILM entries. More...
 
message  SLMplsIlmRes
 MPLS ILM result. More...
 
message  SLMplsIlmMsgRsp
 MPLS ILM batch response. More...
 
message  SLMplsIlmGetMsg
 MPLS ILM Get Message This message is used to query the attributes of an ILM entry. More...
 
message  SLMplsIlmGetMsgRsp
 MPLS ILM Get Message Response. More...
 

Enumerations

enum  SlLabelAction {
  SL_LABEL_ACTION_RESERVED = 0x0, SL_LABEL_ACTION_SWAP = 0x1, SL_LABEL_ACTION_POP_AND_FORWARD = 0x2, SL_LABEL_ACTION_POP_AND_LOOKUP_IPV4 = 0x3,
  SL_LABEL_ACTION_POP_AND_LOOKUP_IPV6 = 0x4, SL_LABEL_ACTION_POP_AND_LOOKUP = 0x5
}
 MPLS label actions. More...
 
enum  SLMplsLabelBlockType { SL_MPLS_LABEL_BLOCK_TYPE_RESERVED = 0x0, SL_MPLS_LABEL_BLOCK_TYPE_SRGB = 0x1, SL_MPLS_LABEL_BLOCK_TYPE_CBF = 0x2 }
 Label Block Types. More...
 

RPC Documentation

rpc SLMplsOper::SLMplsIlmOp ( SLMplsIlmMsg  )

SLMplsIlmMsg.Oper = SL_OBJOP_ADD: Add incoming label map entry.

SLMplsIlmMsg.Oper = SL_OBJOP_UPDATE: Update incoming label map entry.

SLMplsIlmMsg.Oper = SL_OBJOP_DELETE: Delete incoming label map entry.

rpc SLMplsOper::SLMplsIlmOpStream ( stream  SLMplsIlmMsg)

SLMplsIlmMsg.Oper = SL_OBJOP_ADD: Add incoming label map entry.

SLMplsIlmMsg.Oper = SL_OBJOP_UPDATE: Update incoming label map entry.

SLMplsIlmMsg.Oper = SL_OBJOP_DELETE: Delete incoming label map entry.

rpc SLMplsOper::SLMplsLabelBlockOp ( SLMplsLabelBlockMsg  )

SLMplsLabelBlockMsg.Oper = SL_OBJOP_ADD. Add a contiguous label block. Add request may fail if the full block cannot be allocated.

SLMplsLabelBlockMsg.Oper = SL_OBJOP_DELETE. Delete a contiguous label block. Delete request may fail if the block is in use or the keys don't match the keys used on add.

rpc SLMplsOper::SLMplsRegOp ( SLMplsRegMsg  )

SLMplsRegMsg.Oper = SL_REGOP_REGISTER. Global MPLS registration. A client Must Register BEFORE MPLS objects can be added/modified.

SLMplsRegMsg.Oper = SL_REGOP_UNREGISTER. Global MPLS un-registration. This call is used to end all MPLS notifications and unregister any interest in MPLS object configuration. This call cleans up all MPLS objects previously requested.

SLMplsRegMsg.Oper = SL_REGOP_EOF. MPLS End Of File. After Registration, the client is expected to send an EOF message to convey the end of replay of the client's known objects. This is especially useful under certain restart scenarios when the client and the server are trying to synchronize their MPLS objects.


Message Documentation

message SLMplsLabelBlockKey

This message is used to relay the label block key attributes.

Attributes

uint32 StartLabel = 1
 Starting label value of the block.
 
uint32 LabelBlockSize = 2
 Label block size. More...
 
SLMplsLabelBlockType BlockType = 3
 Label block type. More...
 
string ClientName = 4
 Label block client name as configured e.g. More...
 

Member Data Documentation

SLMplsLabelBlockType SLMplsLabelBlockKey::BlockType = 3

See definition of SlMplsLabelBlockType for valid values. If none specified, defaults to SL_MPLS_LABEL_BLOCK_TYPE_SRGB.

string SLMplsLabelBlockKey::ClientName = 4

through CLI. Client name is ignored if BlockType is not SL_MPLS_LABEL_BLOCK_TYPE_CBF.

uint32 SLMplsLabelBlockKey::LabelBlockSize = 2

Block size should be <= SLServerResponse.MaxLabelsPerBlock

message SLMplsLabelBlockMsg

This message is used to send a batch of label block requests. The Oper attributes indicates add or delete operations.

Attributes

SLObjectOp Oper = 1
 MPLS Label Block Operations.
 
repeated SLMplsLabelBlockKey MplsBlocks = 2
 List of label blocks requests. More...
 

Member Data Documentation

repeated SLMplsLabelBlockKey SLMplsLabelBlockMsg::MplsBlocks = 2

List size should be <= SLServerResponse.MaxLabelBlocksPerRequest

message SLMplsLabelBlockMsgRes

This message is used to convey the result status corresponding to the label block operation.

Attributes

SLErrorStatus ErrStatus = 1
 Corresponding error code.
 
SLMplsLabelBlockKey Key = 2
 Key for which the error code is reported.
 
message SLMplsLabelBlockMsgRsp

This message is used to convey a summary status for the batch operation. If there are errors encountered, the Results field would indicate which label block reservation failed.

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 SLMplsLabelBlockMsgRes Results = 2
 In case of errors, this field indicates which entry in the bulk was erroneous. More...
 

Member Data Documentation

repeated SLMplsLabelBlockMsgRes SLMplsLabelBlockMsgRsp::Results = 2
SLErrorStatus SLMplsLabelBlockMsgRsp::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 SLMplsLabelBlockGetMsg

Attributes

SLMplsLabelBlockKey Key = 1
 MPLS Label Block 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

SLMplsLabelBlockKey SLMplsLabelBlockGetMsg::Key = 1

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

message SLMplsLabelBlockGetMsgRsp

Attributes

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

Member Data Documentation

repeated SLMplsLabelBlockKey SLMplsLabelBlockGetMsgRsp::Entries = 3

if ErrStatus is SL_SUCCESS, Entries contains the info requested

bool SLMplsLabelBlockGetMsgRsp::Eof = 1

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

message SlMplsReg

Attributes

uint32 PurgeIntervalSeconds = 1
 In case the Service Layer -> LSD connection is lost, this specifies the timeout period after which LSD will automatically purge the installed ILMs, unless the service layer: More...
 

Member Data Documentation

uint32 SlMplsReg::PurgeIntervalSeconds = 1
  1. Sends MPLS Registration message
  2. Replays all label blocks and ILMs
  3. and sends MPLS EOF message Similarly, in the event of an RP Switchover the ILMs must be replayed within the purge interval. Purge timer is ignored for all registration messages except for SL_REGOP_REGISTER
message SLMplsRegMsg

This message is used for MPLS global registration. Clients must register before using any MPLS service.

Attributes

SLRegOp Oper = 1
 Registration Operation.
 
SlMplsReg RegMsg = 2
 Registration Message.
 
message SLMplsRegMsgRsp

This message is used to convey the result of the MPLS registration.

Attributes

SLErrorStatus ErrStatus = 1
 Error code.
 
message SLMplsGetMsg

This message is used to query MPLS global capabilities.

message SLMplsGetMsgRsp

This message is used to convey the response to the global capabilities query.

Attributes

SLErrorStatus ErrStatus = 1
 Error code.
 
uint32 MaxLabelsPerBlock = 2
 Maximum labels that can be allocated/freed per label block.
 
uint32 MaxLabelblocksPerLabelblockmsg = 3
 Maximum label blocks that can be allocated/freed per MplsLabelBlockMsg.
 
uint32 MinStartLabel = 4
 Minimum label value that can be reserved on the platform. More...
 
uint32 LabelTableSize = 5
 Label table size for the platform. More...
 
uint32 MaxIlmPerIlmmsg = 6
 Max ILM objects within a single IlmMsg message.
 
uint32 MaxPathsPerIlm = 7
 Maximum paths per ILM.
 

Member Data Documentation

uint32 SLMplsGetMsgRsp::LabelTableSize = 5

MplsLabelBlockKey.StartLabel <= LabelTableSize

uint32 SLMplsGetMsgRsp::MinStartLabel = 4

MplsLabelBlockKey.StartLabel >= MinStartLabel

message SLMplsGetStatsMsgRsp

This message is used to convey the response to the MPLS statistics query.

Attributes

SLErrorStatus ErrStatus = 1
 Error code.
 
uint32 LabelBlockCount = 2
 Num of label blocks created.
 
uint32 IlmCount = 3
 Num ILMs added through the service layer.
 
message SLMplsPath

This message holds the ILM path attributes.

Attributes

SLIpAddress NexthopAddress = 1
 One of IPv4 or IPv6 address.
 
SLInterface NexthopInterface = 2
 Next hop interface.
 
uint32 LoadMetric = 3
 ECMP load weight metric.
 
string VrfName = 4
 VRF name.
 
SlLabelAction Action = 5
 Associated MPLS incoming label's action. 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...
 

Member Data Documentation

SlLabelAction SLMplsPath::Action = 5

The label action dictates what to do with the incoming label. Possible actions are:

  • SL_LABEL_ACTION_SWAP: SWAP the incoming label with the specified LabelStack (see below), and forward the packet. Path attributes: NexthopInterface, VrfName, NexthopAddress.
  • SL_LABEL_ACTION_POP_AND_FORWARD: Pop the label, and forward the packet to the specified nexthop. Path attributes: NexthopInterface, VrfName, NexthopAddress.
  • SL_LABEL_ACTION_POP_AND_LOOKUP: Pop the label, and lookup the packet's next header's address in the specified VrfName. Path attributes: VrfName.
repeated uint32 SLMplsPath::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.

uint32 SLMplsPath::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 SLMplsPath::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 SLMplsPath::RemoteAddress = 9

This field is used for backup MPLS path with more than one label, Typically associated with the PQ routers and remote Loop Free Alternatives. For N+1 backup labels, N remote backup addresses must be specified.

message SLMplsIlmKey

This message defines the Incoming Label Map key attributes.

Attributes

uint32 LocalLabel = 1
 Incoming local label.
 
SLMplsCos SlMplsCosVal = 2
 Either Exp bits or CoS forwarding class.
 
message SLMplsCos

Attributes

oneof value
 
bool DefaultElspPath = 2
 Flag to indicate that this is also an E-LSP entry and all paths will be using this default path.
 
uint32 ForwardingClass = 3
 forwarding class with valid range <0-7>
 

Member Data Documentation

oneof SLMplsCos::value
Initial value:
{
uint32 Exp = 1
message SLMplsIlmEntry

This messages defines an ILM entry.

Attributes

SLMplsIlmKey Key = 1
 ILM Key.
 
repeated SLMplsPath Paths = 2
 List of path (NHLFE) information.
 
message SLMplsIlmMsg

This message is used to send a batch of ILM entries.

Attributes

SLObjectOp Oper = 1
 MPLS Object Operations.
 
uint64 Correlator = 2
 Correlator. More...
 
repeated SLMplsIlmEntry MplsIlms = 3
 List of ILM entries.
 

Member Data Documentation

uint64 SLMplsIlmMsg::Correlator = 2

This can be used to correlate replies with requests. The Server simply reflects this field back in the reply.

message SLMplsIlmRes

This message is used to convey the result of the ILM entry operation.

Attributes

SLErrorStatus ErrStatus = 1
 Corresponding error code.
 
SLMplsIlmKey Key = 2
 ILM Key.
 
message SLMplsIlmMsgRsp

This message is used to convey the result of the ILM batch operation.

Attributes

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

Member Data Documentation

uint64 SLMplsIlmMsgRsp::Correlator = 1

This can be used to correlate replies with requests. The Server simply reflects this field back in the reply.

repeated SLMplsIlmRes SLMplsIlmMsgRsp::Results = 3
SLErrorStatus SLMplsIlmMsgRsp::StatusSummary = 2
  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 SLMplsIlmGetMsg

Attributes

uint64 Correlator = 1
 Correlator. More...
 
SLMplsIlmKey Key = 2
 MPLS ILM key. More...
 
uint32 EntriesCount = 3
 Number of entries requested.
 
bool GetNext = 4
 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

uint64 SLMplsIlmGetMsg::Correlator = 1

This can be used to correlate replies with requests. The Server simply reflects this field back in the reply.

SLMplsIlmKey SLMplsIlmGetMsg::Key = 2

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

message SLMplsIlmGetMsgRsp

Attributes

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

Member Data Documentation

uint64 SLMplsIlmGetMsgRsp::Correlator = 1

This can be used to correlate replies with requests. The Server simply reflects this field back in the reply.

repeated SLMplsIlmEntry SLMplsIlmGetMsgRsp::Entries = 4

if ErrStatus is SL_SUCCESS, Entries contains the info requested

bool SLMplsIlmGetMsgRsp::Eof = 2

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

Enumeration Type Documentation

Enumerator
SL_LABEL_ACTION_RESERVED 

Reserved. 0x0.

SL_LABEL_ACTION_SWAP 

Swap.

0x1 Swap outer label and forward. Used at tunnel midpoint for swapping labels.

SL_LABEL_ACTION_POP_AND_FORWARD 

Pop and forward.

0x2 Pop outer label and forward. Used for per CE and per prefix label disposition at egress PE.

SL_LABEL_ACTION_POP_AND_LOOKUP_IPV4 

Pop and lookup IPv4.

0x3 Pop and lookup the IPv4 next header in the specified Vrf. Used for per vrf labels at egress PE.

SL_LABEL_ACTION_POP_AND_LOOKUP_IPV6 

Pop and lookup IPv6.

0x4 Pop and lookup the IPv6 next header in the specified Vrf. Used for per vrf labels at egress PE.

SL_LABEL_ACTION_POP_AND_LOOKUP 

Pop and lookup.

0x5 Pop and lookup the next header in the packet (MPLS, IPv4, IPv6) in the specified Vrf. Used for per vrf labels at egress PE.

Enumerator
SL_MPLS_LABEL_BLOCK_TYPE_RESERVED 

Reserved. 0x0.

SL_MPLS_LABEL_BLOCK_TYPE_SRGB 

Segment Routing Global Block (SRGB) Block Type. 0x1.

SL_MPLS_LABEL_BLOCK_TYPE_CBF 

Class Based Forwarding (CBF) Block Type. 0x2.