Protocol Documentation
prpd_common.proto
AddressFamilySpecificData
Route data defined for each supported address family
Field | Type | Label | Description |
---|---|---|---|
srte_policy_data | SRTERouteData | Address specific route data for IPv4 and IPv6 SRTE address families. This has to be set when RoutePrefixAf is of type IPv4 and IPv6 SRTE address family. | |
flowspec_data | FlowspecRouteData | Address specific route data for IPv4 and Ipv6 flow-spec address families. This has to be set when RoutePrefixAf is of type IPv4 and IPv6 flow-spec address family. |
FlowspecAddress
FlowspecAdress has match fields that can be used to match fields of a
ip header. If the match is sucessful then the action will be applied to the
ip packet. The actions can be chained if further actions needs to be
applied after previous action is complete. These actions are defined as
protocol specific data.
IP header fields than can be matched are destination ip address, source
ip address, protocol, destination/source port, icmp types/codes dscp
and fragment bit.
At least one of the match condition should be set.
Field | Type | Label | Description |
---|---|---|---|
destination | jnxBase.IpAddress | IP packet destination prefix to match for filtering | |
dest_prefix_len | uint32 | IP packet destination prefix length. This field if not set when destination is set will default to HOST length for the address family. i.e. 32 for ipv4 and 128 for ipv6. This along with destination determines the IP destination field matching range. For e.g. if destination = 10.1.1.0 and dest_prefix_len = 24 then flows-spec filter added will match all IP packets with destination address 10.1.1.1 to 10.1.1.254. | |
source | jnxBase.IpAddress | IP packet source address to match for filtering | |
source_prefix_len | uint32 | IP packet source address prefix length that will determine the source address range matched for filtering. The range matched is similar to dest_prefix_len described above. | |
ip_protocols | jnxBase.NumericRangeList | IP protocols to be matched while filtering. A range of numerical values can be specified to match. The ranges will be merged if they overlap and can be represented by a single range. For e.g. if ranges 1-20 and 15-30 are set they will merged into a single range 1-30. Standard protocol values defined in enum IpProtocols can be used in these numerical ranges. If a single value needs to specified both min and max in NumericRange should be set to the same value. This comment applies to all the following fields defined below: ip_protocols, ports, dest_ports, src_ports, icmp_types, icmp_codes, pkt_lengths and dscp. | |
ports | jnxBase.NumericRangeList | Destination and source ports of IP packet to match for filtering. Standard port values defined by enum IpPorts can be used for this. | |
dest_ports | jnxBase.NumericRangeList | Destination ports of IP packet to match for filtering. Standard port values defined by enum IpPorts can be used for this. | |
src_ports | jnxBase.NumericRangeList | Source ports of IP packet to match for filtering. Standard port values defined by enum IpPorts can be used for this. | |
icmp_types | jnxBase.NumericRangeList | ICMP types to match for filtering. Standard ICMP type values defined by enum IcmpType can be used for this. | |
icmp_codes | jnxBase.NumericRangeList | ICMP codes to match for filtering. Standard ICMP code values defined by enum IcmpCode can be used for this. | |
tcp_flags | jnxBase.TcpFlags | TCP flags to match for filtering. enum TcpFlags values should be used for this. | |
pkt_lengths | jnxBase.NumericRangeList | ICMP types to match for filtering. Standard ICMP type values defined by enum IcmpType can be used for this. | |
dscps | jnxBase.NumericRangeList | ICMP types to match for filtering. Standard ICMP type values defined by enum IcmpType can be used for this. | |
fragment | jnxBase.IpFragementFlags | IP framgment flags to match for filtering. Values defined in emum IpFragementFlags should be used for this. |
FlowspecRouteData
For matched packets the action can be discard, change dscp marking,
rate limit, redirect into a VRF or sample. At least one action must
set. Only one terminating action can be set.
Field | Type | Label | Description |
---|---|---|---|
discard | bool | Action to discard matching packet | |
mark_dscp | uint32 | Action to change the DSCP value to matching packets with this value. | |
rate_limit_val | uint32 | Action to rate limit matching packets to this value. | |
redirect_inst_rt_comm | string | Action to redirect matching packets to the route target specified. | |
sample | bool | Action to sample matching packets. |
L3vpnAddress
L3VPN route destination address prefix composed of a
route distinguisher (RD) and IP address.
Field | Type | Label | Description |
---|---|---|---|
rd | RouteDistinguisher | Route distinguisher. REQUIRED | |
vpn_addr | jnxBase.IpAddress | IPv4 or IPv6 VPN customer address. REQUIRED. |
LabelEntry
A single MPLS Label entry as defined by RFC 3032
Field | Type | Label | Description |
---|---|---|---|
label | uint32 | One of either well_known_labels or else a valid 20-bit unsigned label value that must be less than decimal value 1048576 and not within the reserved label range of 4 through 15 (inclusive). REQUIRED | |
traffic_class | uint32 | A valid 3-bit unsigned traffic class/QoS value less than decimal value 8. Optional (defaults to 0). READ-ONLY | |
ttl | uint32 | A valid 8-bit unsigned TTL value less than decimal value 256. Optional (defaults to 0). READ-ONLY | |
bottom_of_stack | bool | Indicates that this Label stack entry the bottom of the label stack. Bottom-of-Stack will always be set by the library and must never set by the client. READ-ONLY |
LabelStack
A label stack constructed according to the rules of RFC 3032.
Field | Type | Label | Description |
---|---|---|---|
entries | LabelStackEntry | repeated | An ordered list of one or more label stack entries beginning with the bottom of the stack and ending with the top of the stack. REQUIRED (one or more entry) |
LabelStackEntry
A single MPLS Label stack entry with the operation for the label entry
Field | Type | Label | Description |
---|---|---|---|
opcode | LabelOperation | ||
label_entry | LabelEntry |
MplsAddress
Holds the mpls label used to represent label address in route lookups
Field | Type | Label | Description |
---|---|---|---|
label | uint32 | A valid 20-bit unsigned label value that must be less than decimal value 1048576 and not within the reserved label range of 4 through 15 (inclusive). REQUIRED |
NetworkAddress
Network Address defined for each supported address family
Field | Type | Label | Description |
---|---|---|---|
inet | jnxBase.IpAddress | IPv4 destination prefix | |
inet6 | jnxBase.IpAddress | IPv6 destination prefix | |
mpls | MplsAddress | Mpls label. For modifying route table contents, the only valid prefix length is 52 (20 bit label + 32 bit interface index). Interface index is currently implicit and defaults to 0. For route lookups, use a prefix length of 52 for exact lookups and 0 for matching all the routes. |
RdType0
RFC 4364 Route type 0: 2-byte AS and assigned number
Field | Type | Label | Description |
---|---|---|---|
as_number | uint32 | 2 byte AS number | |
assigned_number | uint32 | 4 byte assigned number subfield |
RdType1
RFC 4364 Route type 1: IPv4 address and assigned number
Field | Type | Label | Description |
---|---|---|---|
ip_address | jnxBase.IpAddress | 4 byte IP address | |
assigned_number | uint32 | 2 byte assigned number subfield |
RdType2
RFC 4364 Route type 2: 4-byte AS and assigned number
Field | Type | Label | Description |
---|---|---|---|
as_number | uint32 | 4 byte AS number | |
assigned_number | uint32 | 2 byte assigned number subfield |
RouteDistinguisher
An RFC 4364 route distinguisher to distinguish customer VPN routes
within the BGP NLRIs. Valid RD can be type 0, type 1, or type 2.
Field | Type | Label | Description |
---|---|---|---|
rd0 | RdType0 | Type 0 RD | |
rd1 | RdType1 | Type 1 RD | |
rd2 | RdType2 | Type 2 RD |
RoutePrefix
Route destination prefix defined for each supported address family
Field | Type | Label | Description |
---|---|---|---|
inet | jnxBase.IpAddress | IPv4 destination prefix | |
inet6 | jnxBase.IpAddress | IPv6 destination prefix | |
inetvpn | L3vpnAddress | IPv4 VPN (L3VPN) destination prefix | |
inet6vpn | L3vpnAddress | IPv6 VPN (L3VPN) destination prefix | |
labeled_inet | jnxBase.IpAddress | IPv4 Labeled-Unicast destination prefix. | |
labeled_inet6 | jnxBase.IpAddress | IPv6 Labeled-Unicast destination prefix. | |
inet_srte_policy | SRTEAddress | IPv4 SR-TE policy prefix | |
inet6_srte_policy | SRTEAddress | IPv6 SR-TE policy prefix | |
inet_flowspec | FlowspecAddress | IPv4 BGP flowspec prefix. | |
inet6_flowspec | FlowspecAddress | IPv6 BGP flowspec prefix. |
RouteTable
Routing table (RIB), which may either be specified as a string or
RPD table ID.
Field | Type | Label | Description |
---|---|---|---|
rtt_id | RouteTableId | Table id to which the route belongs | |
rtt_name | RouteTableName | Table name to which the route belongs |
RouteTableId
Routing table identifier as an integer value uniquely identifying a table.
Field | Type | Label | Description |
---|---|---|---|
id | uint32 | Table identifier. REQUIRED |
RouteTableName
Routing table (RIB) name uniquely identifying a route table,
formatted as a string per JUNOS convention.
Field | Type | Label | Description |
---|---|---|---|
name | string | Table name. REQUIRED |
RpcStatus
Standard Rpc return status which contains a string message so more secific
infomation can be returned for troubleshooting.
Field | Type | Label | Description |
---|---|---|---|
code | RpcStatus.RpcStatusCode | Numerical code indicating success or failure of an RPC. | |
message | string | Informational message string to convey reason for RPC failure. |
SRTEAddress
SR-TE Address key fields
Field | Type | Label | Description |
---|---|---|---|
destination | jnxBase.IpAddress | Identifies endpoint of the policy, this is mandatory parameter | |
sr_color | SRTEColor | value used to match destination prefix to the policy. All prefixes of a particular color value is steered into policy that has the same color value. This is a mandatory parameter. | |
sr_distinguisher | SRTEDistinguisher | Value that uniquely identifies the policy in the context of |
SRTEBindingSID
SR-TE Binding SID. This is an optional parameter.
Note IPv6 Binding SID not supported so in SidEntry only MPLS label SID is
defined.
Field | Type | Label | Description |
---|---|---|---|
binding_sr_id | SidEntry | Binding SID |
SRTEColor
SR-TE Color
Field | Type | Label | Description |
---|---|---|---|
color | uint32 | SR policy color. This is a value used to match destination prefix to the policy. All prefixes of a particular color value is steered into policy that has the same color. |
SRTEDistinguisher
SR-TE Distinguisher
Field | Type | Label | Description |
---|---|---|---|
distinguisher | uint32 | SR policy originator. This is a numeric value that the originator can use to make unique when there are mulitple occurances of same SR policy. There is no verification done for the value of this, it has to be set and should be a non zero value. |
SRTERouteData
SR-TE Route information like segments.
Field | Type | Label | Description |
---|---|---|---|
binding_sid | SRTEBindingSID | Specifies the BSID of the path. Optional parameter, there is no default value. | |
preference | uint32 | ||
segment_lists | SRTESegmentList | repeated | List of Explicit paths towards endpoint. REQUIRED parameter. One or more segment lists to program. Segment List entries. Mimimum one segment need to be set. A maximum of 8 segment list are supported. |
SRTESegment
SR-TE Segment. Only SegemntType1 is currently supported.
Other types are for internal use only.
Field | Type | Label | Description |
---|---|---|---|
segment_type1 | SegmentType1 | Segment type1, only supported segment type at present. |
SRTESegmentList
SR-TE Segment List.
Field | Type | Label | Description |
---|---|---|---|
weight | uint32 | Weight specifies the weight associated to a given segment list. The weight is used in order to apply weighted ECMP mechanism when steering traffic into a policy that includes multiple Segment Lists. This parameter is needed to be set only when > 1 segment list is set. | |
segments | SRTESegment | repeated | Segments, one or more segments can be programmed. REQUIRED. A maximum of 5 segements are supported. |
SegmentType1
Segment Type 1: SID only, in the form of MPLS Label
Field | Type | Label | Description |
---|---|---|---|
sid_label_entry | LabelEntry | MPLS label for the SID. REQUIRED |
SidEntry
Segment Identifier (SID). Either 4 octet MPLS SID or a 16 octet IPv6 SID
Currently IPv6 SID is not supported.
Field | Type | Label | Description |
---|---|---|---|
sid_label_entry | LabelEntry | MPLS label for the SID |
LabelEntry.WellKnownLabels
Well-known label values defined by RFC 3032. These must only be
used in label stacks in accordance with the rules of RFC 3032.
Name | Number | Description |
---|---|---|
IPV4_EXPLICIT_NULL_LABEL | 0 | IPv4 Explicit NULL: valid only at bottom of stack |
ROUTER_ALERT_LABEL | 1 | Router Alert: valid anywhere in a label stack except bottom |
IPV6_EXPLICIT_NULL_LABEL | 2 | IPv6 Explict NULL: valid only at bottom of stack |
IMPLICIT_NULL_LABEL | 3 | Implicit NULL: See RFC 3032 |
LabelOperation
Label operations
Name | Number | Description |
---|---|---|
NOOP | 0 | |
POP | 1 | |
PUSH | 2 | |
SWAP | 3 |
ReturnCode
Different types of return codes to be sent back to client based on the
operation was successful or not and if not, possibly more specific reasons
as to why it failed.
Name | Number | Description |
---|---|---|
RET_SUCCESS | 0 | Operation was executed successfully |
RET_FAILURE | 1 | General failure : operation not executed successfully |
RET_NOT_FOUND | 2 | Entry was not found |
RET_INVALID_PARAMS | 3 | Invalid input paramters |
RouteAfType
Routing table destination address families.
Name | Number | Description |
---|---|---|
RT_AF_UNSPEC | 0 | Unspecified |
RT_AF_INET | 1 | IPv4 destination prefix |
RT_AF_INET6 | 2 | IPv6 destination prefix |
RT_AF_INETVPN | 3 | IPv4 VPN (L3VPN) destination prefix |
RT_AF_INET6VPN | 4 | IPv6 VPN (L3VPN) destination prefix |
RT_AF_LABELED_INET | 5 | IPv4 Labeled-Unicast destination prefix. |
RT_AF_LABELED_INET6 | 6 | IPv6 Labeled-Unicast destination prefix. |
RT_AF_INET_SRTE | 7 | IPv4 SRTE destination prefix |
RT_AF_INET6_SRTE | 8 | IPv6 SRTE destination prefix |
RT_AF_INET_FLOWSPEC | 9 | IPv4 Flowspec prefix. |
RT_AF_INET6_FLOWSPEC | 10 | IPv4 Flowspec prefix. |
RouteProtoType
Protocol types that define protocols that added the route.
RTPROTO_OTHER denotes other internal protocols currently not exposed
to API.
Name | Number | Description |
---|---|---|
ANY | 0 | Matches any protocol |
DIRECT | 1 | route is directly connected |
LOCAL | 2 | route to local side of P2P interface |
KERNEL | 3 | route was installed in kernel previously |
REDIRECT | 4 | route was received via a redirect |
OSPF | 5 | OSPF2 AS Internal routes |
OSPF3 | 6 | OSPF3 AS Internal routes |
OSPF_ANY | 7 | OSPF AS Internal routes |
RIP | 8 | Routing Information protocol |
RIPNG | 9 | Routing Information protocol for v6 |
BGP | 10 | Border gateway protocol |
STATIC | 11 | route is static |
ISIS | 12 | IS-IS |
IGMP | 13 | For IGMP stuff |
AGGREGATE | 14 | Aggregate route |
DVMRP | 15 | Distance Vector Multicast Routing Protocol |
PIM | 16 | Protocol Independent Multicast |
MSDP | 17 | Multicast Source Discovery Protocol |
MPLS | 18 | MPLS switching |
RSVP | 19 | RSVP |
CCC | 20 | Circuit Cross-Connect |
LDP | 21 | LDP |
VPN | 22 | VPN protocol, L3 |
MVPN | 23 | MVPN protocol, L3 |
MCAST | 24 | multicast info |
L2VPN | 25 | VPN protocol, L2 |
L2CKT | 26 | l2circuit protocol |
BGP_STATIC | 27 | BGP Static |
RIFT | 28 | RIFT |
OTHER | 29 | Protocols not exposed and internal to Routing backend |
L2_LEARNED_HOST_ROUTING | 30 | Layer-2-learned host routing |
RouteTableFormat
The table format allows the client to request the format that the
server should use to represent tables in replies sent by the server
to the client.
Name | Number | Description |
---|---|---|
TABLE_STRING | 0 | The server will represent tables by name as strings |
TABLE_ID | 1 | The server will represent tables by RPD table ID |
RpcStatus.RpcStatusCode
Name | Number | Description |
---|---|---|
SUCCESS | 0 | |
FAILURE | 1 |