jnx_routing_bgp_service.proto

Service

Bgp

JET RPC service providing BGP route operations to manage BGP services.

Method Name Request Type Response Type Description
Initialize InitializeRequest InitializeResponse BGP Routing Initialize operation.
Cleanup CleanupRequest CleanupResponse BGP Routing Cleanup operation.
RouteAdd RouteUpdateRequest RouteOperResponse BGP Route Add operation.
RouteModify RouteUpdateRequest RouteOperResponse BGP Route Modify operation.
RouteUpdate RouteUpdateRequest RouteOperResponse BGP Route Update operation.
RouteDelete RouteDeleteRequest RouteOperResponse BGP Route Delete operation.
RouteGet RouteGetRequest RouteGetResponse BGP Route Get operation.
RouteSubscribe RouteSubscribeRequest RouteSubscribeResponse BGP Route Subscribe.
RouteUnsubscribe RouteUnsubscribeRequest RouteUnsubscribeResponse BGP Route Unsubscribe.
RouteRefresh RouteRefreshRequest RouteRefreshResponse BGP Route Refresh.

RPC(s)

The following APIs are provided by this service:

Initialize

Initialize RPC must be called upon connection or reconnection to the server. If the client is connecting for the first time, the server will initialize per-client state for the connection. If the client is reconnecting with the same client name following a connection fault (having not closed a previous connection with Cleanup), then gateway and route state will be rebound to the new connection. In this case, the return status will indicate that state was rebound and the client need not reply the previous routing state to the server. Initialization RPC can be called multiple times and the default parameters will be updated with the latest values from the initialization request.

Input: InitializeRequest

Output: InitializeResponse

Cleanup

Cleanup will purge all gateway and route state for the client.

Input: CleanupRequest

Output: CleanupResponse

RouteAdd

Add a BGP-Static route to the routing table. RouteAdd may be called multiple times for the same prefix to add multiple paths with distinct path_cookie for the same destination. If a matching route already exists in the given table, then an error will be returned. RouteUpdateRequest may contain from one to 1000 routes to be added. If the request contains multiple routes, the routes will be processed in the order given and the first error encountered will cause the request to abort. The API always returns the final status (success or first error encountered) and the number of routes that were successfully created prior to any error or full completion of the request.

Input: RouteUpdateRequest

Output: RouteOperResponse

RouteModify

Modify an existing BGP-Static route in the routing table. For each route in the request, if the key is matched, the matched route will be updated with the supplied route attributes. If a matching route does not exist in the given table, then an error will be returned. RouteUpdateRequest may contain from one to 1000 routes to be added. If the request contains multiple routes, the routes will be processed in the order given and the first error encountered will cause the request to abort. The API always returns the final status (success or first error encountered) and the number of routes that were successfully modified prior to any error or full completion of the request.

Input: RouteUpdateRequest

Output: RouteOperResponse

RouteUpdate

Create a new BGP-Static route if a matching route does not exist, OR modify an existing BGP-Static route if it is already present in the routing table. RouteUpdateRequest may contain from one to 1000 routes to be added. If the request contains multiple routes, the routes will be processed in the order given and the first error encountered will cause the request to abort. The API always returns the final status (success or first error encountered) and the number of routes that were successfully modified prior to any error or full completion of the request.

Input: RouteUpdateRequest

Output: RouteOperResponse

RouteDelete

Delete a BGP-Static route from the routing table. RouteDelete may be called multiple times for the same prefix to delete multiple paths with distinct path_cookie for the same destination. The request may contain from one to 1000 routes to be deleted. If the request contains multiple routes, the routes will be processed in the order given and the first error encountered will cause the request to abort. The API always returns the final status (success or first error encountered) and the number of routes that were successfully modified prior to any error or full completion of the request.

Input: RouteDeleteRequest

Output: RouteOperResponse

RouteGet

Lookup a BGP or BGP-Static protocol route from the routing table. All match parameters are optional. Match fields that are not specified or that may match more than one route (e.g. a less-specific destination prefix) may result in multiple routes being returned in the replies. Only BGP and BGP-Static routes will be matched. Replies are streamed until all match routes have been sent. The client will receive a final null message once all routes have been received. The server's walk of search results is not atomic so route changes during streaming and consumption of replies may or may not be reflected in the results.

Input: RouteGetRequest

Output: RouteGetResponse

RouteSubscribe

Subscribe to receive updates streamed from BGP when routes matching the bgp-import "analyze" policy action are added, modified, or withdrawn by BGP peers. Updates will be streamed as RouteSubscribeResponse messages after RouteSubscribe RPC is called. Upon initial registration, a full download of route ADD operations for all routes matching the "analyze" import policy action will be streamed, followed by a closing END_OF_RIB operation. Subsequently, incremental updates will be streamed whenever BGP advertisements from peers are added, modified, or withdrawn, or when BGP import "analyze" policy is changed. There is no strict ordering of routes in the update stream and state compression is applied when applicable to a set of operations.

Input: RouteSubscribeRequest

Output: RouteSubscribeResponse

RouteUnsubscribe

Unsubscribe to receive updates streamed from BGP when routes are added, modified, or withdrawn by BGP peers.

Input: RouteUnsubscribeRequest

Output: RouteUnsubscribeResponse

RouteRefresh

Request to refresh all route entries to the client.

Input: RouteRefreshRequest

Output: RouteRefreshResponse

Message(s)

This IDL defines the following message type(s)

InitializeRequest

Request to initialize the BGP route service. No parameters are needed.

Field Type Description
default_address_format AddressFormat The format for IP addresses to be used in response message of get and subscribe.
default_table_format RouteTableFormat The format for table name to be used in response message of get and subscribe.

InitializeResponse

BGP route service initialize reply containing the status of the operation. Replies indicate to the client whether any old routing state was recovered and rebound to this connection.

Field Type Description
status RpcStatus Top level return code.
sub_code StatusCode Return code to indicate operation status.
num_client_routes uint32 Number of routes on gateway.

CleanupRequest

Any routes that were added by the client will be removed during the cleanup of the client's state. No parameters are needed.

Field Type Description

CleanupResponse

Route service cleanup reply containing the status of the operation.

Field Type Description
status RpcStatus Top level return code.
sub_code StatusCode The final return code for the request.

RouteUpdateRequest

Route add/modify/update operation request parameters.

Field Type Description
routes RouteEntry One or more programmed BGP routes to add.

RouteOperResponse

Route operation response contains the status of the operation. Response always returns the final status (either success or the first error encountered) and the number of routes that were successfully processed prior to any error or full completion of the request.

Field Type Description
status RpcStatus Top level return code.
sub_code StatusCode The final return code for the request.
operations_completed uint32 Number of successful operations.

RouteDeleteRequest

Route delete operation request parameters.

Field Type Description
or_longer bool Flag to match longer prefix.
routes RouteMatch One or more programmed BGP routes to delete.

RouteGetRequest

Route get operation request parameters.

Field Type Description
route RouteMatch Route matching parameters.
or_longer bool Flag to match longer prefix.
active_only bool Flag to select active only routes.
route_count uint32 Maximum routes in reply.

RouteGetResponse

Route get reply containing the status of the operation and the full or partial set of matching routes, depending on how many reply RPCs the stream of routes is split among.

Field Type Description
status RpcStatus Top level return code.
sub_code StatusCode The final return code for the request.
routes RouteEntry One or more matching BGP routes.

RouteSubscribeRequest

Route subscribe operation request parameters. Subscribes the client for streaming route subscribing.

Field Type Description
route_count uint32 Number of routes in response.

RouteSubscribeResponse

The route subscription response is returned immediately upon initial subscription for route subscribing via a call to BgpRouteSubscribe. Subsequently, subscribing entries are streamed via response containing route information and status.

Field Type Description
status RpcStatus Top level return code.
sub_code StatusCode The return code for the registration operation.
subscribe_entries RouteSubscribeEntry A set of subscribe entries for individual routes or the end-of-ribs indication.

RouteUnsubscribeRequest

Request to unsubscribe the client from the BGP route subscribe. No parameters are needed.

Field Type Description

RouteUnsubscribeResponse

The route unsubscribe reply confirms that the client has unsubscribeed for route updates.

Field Type Description
status RpcStatus Top level return code.
sub_code StatusCode The return code for the unregister operation.

RouteRefreshRequest

Request to refresh all route subscribing entries to the client. No parameters are needed.

Field Type Description

RouteRefreshResponse

The route Refresh response confirms that the client has triggered a refresh of route subscribing entries, which will be delivered followed by End-of-RIBs via the BgpRouteSubscribeResponse stream.

Field Type Description
status RpcStatus Top level return code.
sub_code StatusCode The return code for the refresh operation.

RouteEntry

A route entry specifying a single route destination and BGP path along with the route attributes for that path.

Field Type Description
key RouteMatch Route key attribute.
route_preference UInt32Value Route preference.
local_preference UInt32Value Local preference.
med UInt32Value Multi-Exit Discriminator.
aigp_distance UInt64Value AIGP distance.
label uint32 Label.
labels LabelStack Label stack.
aspath AsPath AS Path.
originator_id UInt32Value BGP originator ID.
cluster_list UInt32Value BGP cluster list.
cluster_id UInt32Value BGP cluster ID.
protocol_nexthops IpAddress Protocol next-hops.
route_type PeerType BGP Peer type for this route.
route_flags RouteFlags Flags for routes. These flags are generally non-mutually exclusive states.
addr_family_data AddressFamilySpecificData Address family specific route data.

RouteFlags

Route Flags values that alter route add behavior.

Field Type Description
no_advertise bool Route flag indicating whether to attach the well-known no-advertise community.
no_export bool Route flag indicating whether to attach the well-known no-export community.
use_nexthop_reject bool Route flag indicating whether to use NH_REJECT for the route.
use_nexthop_fictitious bool Route flag indicating whether the next-hop is fictitious.

RouteMatch

Route matching parameters provide the key for identifying BGP routes. Programmed BGP-Static routes must be unique for the bgp_route_match parameters. Dynamic BGP routes may may have multiple matches to a given set of RouteMatch parameters.

Field Type Description
dest_prefix RoutePrefix Destination prefix of the route.
dest_prefix_len uint32 Destination prefix length in bits.
table RouteTable Route table specified by either name or ID.
protocol RouteProtoType Protocol that installed the route in the table.
cookie uint64 Path cookie.
communities Communities List of communities.

RouteSubscribeEntry

A subscribing entry for a single BGP route streamed from BGP when the client has subscribed for route subscribing with RouteSubscribe().

Field Type Description
operation RouteSubscribeOper The route subscribe operation type.
route RouteEntry Route entry for subscribing route.

Enum(s)

RouteSubscribeOper

The route operation types for the subscribe entries.

Value Description
ROUTE_UPDATE A new route is being added or modified. bgp_route will contain the route info.
ROUTE_DELETE An existing route is being deleted. bgp_route will contain the route info.
END_OF_RIBS The initial set of route subscribing entries following a fresh client registration has been completed. bgp_route will be null for this operation.

StatusCode

Possible return codes for route subscribe operations.

Value Description
SUCCESS Request successfully completed in full.
INTERNAL_ERROR Request failed due to an internal server error.
NOT_INITIALIZED The BGP route service has not been initialized.
REGISTRATIONS_EXCEEDED Too many clients or BMP stations are already subscribed.
ALREADY_SUBSCRIBED Client is already subscribed.
ROUTE_COUNT_INVALID Request contains a route_count that exceeds the max of 1000.
ADDRESS_FORMAT_INVALID Request contains invalid address format.
TABLE_FORMAT_INVALID Request contains invalid table format.

StatusCode

Possible return codes for route service initialize operations.

Value Description
SUCCESS Request successfully completed. Note that no preexisting state for old clients with the same name was rebound.
SUCCESS_STATE_REBOUND Request successfully completed AND preexisting routing state for an old client connection of the same name has been recovered and bound to this client connection.
INTERNAL_ERROR Request failed due to an internal server error.
ALREADY_INITIALIZED Failed due to previous initialization operation.
GATEWAY_INVALID Failed to find or create a gateway.
CLEANUP_PENDING Previous clean up work is pending try again later.
BGP_NOT_READY The BGP protocol is not configured and initialized.

StatusCode

Possible return sub-code for route add/modify/update/remove operations.

Value Description
SUCCESS Request successfully completed in full.
INTERNAL_ERROR Request failed due to an internal server error.
NOT_INITIALIZED The BGP route service has not been initialized.
NO_OP Request did not result in any operations.
TOO_MANY_OPS Request contained too many operations.
TABLE_INVALID Request contained an invalid table.
TABLE_NOT_READY Request contained a table that was not ready for operations.
PREFIX_INVALID Request contained an invalid destination address prefix.
PREFIX_LEN_TOO_SHORT Request contained a destination prefix length too short for the supplied address/NLRI.
PREFIX_LEN_TOO_LONG Request contained a destination prefix length too long for the supplied address/NLRI.
GATEWAY_INVALID The server did not have a valid gateway associated with the client.
NEXTHOP_INVALID Request contained an invalid nexthop.
NEXTHOP_ADDRESS_INVALID Request contained a nexthop with an invalid address.
NEXTHOP_ECMP_LIMIT Request to add paths exceeding maximum ECMP paths for a destination.
COMMUNITY_LIST_INVALID Request contained an invalid community.
ASPATH_INVALID Request contained an invalid AS path.
LABEL_INFO_INVALID Request contained a invalid label information.
ROUTE_EXISTS Request contains a route that is already present in the table.
ROUTE_NOT_FOUND Request contains a route that is NOT present in the table.
CLUSTER_LIST_INVALID Request contains an invalid cluster list.
PROTOCOL_INVALID Request contains an invalid protocol. Only PROTO_UNSPECIFID or PROTO_BGP_STATIC are allowed in route change operations.
ROUTE_ADD_FAILED Request contains a route that is NOT present in the table.
BGP_NOT_READY The BGP protocol is not initialized and ready to accept route change operations.
REQUEST_NOT_DONE Request cannot be serviced until current requests are processed.
REQUEST_UNSUPPORTED Request contains a parameter that is not currently supported.
PEER_TYPE_INVALID Request contained an invalid BGP peer type.
SEGMENT_LIST_INVALID SR-TE Segment Lists is invalid, like zero segment list.
SEGMENT_INVALID SR-TE Segment is invalid, like zero segment list.
SEGMENT_LABEL_INVALID SR-TE Segment label is invalid; reserved label or label TTL > 255.
SEGMENT_ID_INVALID SR-TE Segment ID is invalid like segment type is not set.
SEGMENT_LIST_COUNT_INVALID Number of SR-TE Segment Lists exceeded limit (8).
SEGMENT_COUNT_INVALID Number of SR-TE Segments exceeded limit (5).
SRTE_ROUTE_DATA_INVALID SRTE Route Data is not set.
FLOWSPEC_ADDR_INVALID Flow spec address field is invalid.
FLOWSPEC_MTCH_FLDS_INVALID Flow spec match fields invalid or no match field is specified.
FLOWSPEC_ACTION_INVALID Flow spec prefix contains invalid action or no action specified.
FLOWSPEC_STATIC_RT_EXISTS Flow spec prefix matches an existing flow-spec route added by CLI.

StatusCode

Possible return codes for route service cleanup operations.

Value Description
SUCCESS Request successfully completed.
INTERNAL_ERROR Request failed due to an internal server error.
NOT_INITIALIZED Request failed because there was no initialized state to cleanup.

StatusCode

Possible return codes for route refersh operation.

Value Description
SUCCESS Request successfully completed in full.
INTERNAL_ERROR Request failed due to an internal server error.
NOT_INITIALIZED The BGP route service has not been initialized.
NOT_SUBSCRIBED Client is already subscribed.

StatusCode

Possible return codes for route unsubscribe operation.

Value Description
SUCCESS Request successfully completed in full.
INTERNAL_ERROR Request failed due to an internal server error.
NOT_INITIALIZED The BGP route service has not been initialized.
NOT_SUBSCRIBED Client is already subscribed.

StatusCode

Possible return codes for route service get operations.

Value Description
SUCCESS Request successfully completed in full.
INTERNAL_ERROR Request failed due to an internal server error.
NOT_INITIALIZED Request failed because there was no initialized state to cleanup.
TABLE_INVALID Request contained an invalid table.
TABLE_NOT_READY Request contained a table that was not ready for operations.
PREFIX_INVALID Request contained an invalid destination address prefix.
PREFIX_LEN_TOO_SHORT Request contained a destination prefix length too short for the supplied address/NLRI.
PREFIX_LEN_TOO_LONG Request contained a destination prefix length too long for the supplied address/NLRI.
ROUTE_NOT_FOUND Request contained a route that does not match destinations in the routing table.
PROTOCOL_INVALID Request specified an invalid protocol to match.
ROUTE_INVALID Request does not contain valid route match parameters.
REQUEST_UNSUPPORTED Request contains a parameter that is not currently supported.
TRY_AGAIN Request cannot be serviced until current requests are processed.
ROUTE_COUNT_INVALID Request contains a route_count that exceeds the max of 1000.
COMMUNITY_LIST_INVALID Request contained an invalid community.
FLOWSPEC_ADDR_INVALID Flow spec address field is invalid.
FLOWSPEC_MTCH_FLDS_INVALID Flow spec match fields invalid or no match field is specified.
FLOWSPEC_ACTION_INVALID Flow spec prefix contains invalid action or no action specified.

PeerType

BGP peer type identifies if the associated route as an internal (IBGP) or external (EBGP) route.

Value Description
BGP_INTERNAL IBGP Route
BGP_EXTERNAL EBGP Route