Internet-Draft | Route Policy-Attribute Trace | March 2022 |
Xu, et al. | Expires 9 September 2022 | [Page] |
The generation of BGP adj-rib-in, local-rib or adj-rib-out comes from BGP route exchange and route policy processing. BGP Monitoring Protocol (BMP) provides the monitoring of BGP adj-rib-in [RFC7854], BGP local-rib [RFC9069] and BGP adj-rib-out [RFC8671]. By monitoring these BGP RIB's the full state of the network is visible, but how route-policies affect the route propagation or changes BGP attributes is still not. This document describes a method of using BMP to record the trace data on how BGP routes are (not) changed under the process of route policies.¶
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119 [RFC2119].¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 9 September 2022.¶
Copyright (c) 2022 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
The typical processing procedure after receiving a BGP Update Message at a routing device is as follows: 1. Adding the pre-policy routes into the pre-policy adj-rib-in (if any); 2. Filtering the pre-policy routes through inbound route policies; 3. Selecting the BGP best routes from the post-policy routes; 4. Adding the selected routes into the BGP local-rib; 5-a. Adding the BGP best routes from local-rib to the core routing table manager for selection; 5-b. Filtering the routes from BGP local-rib through outbound route policies w.r.t. per peer or peer groups; 6. Sending the BGP adj-rib-out to the target peer or peer groups. Details may vary by vendors. The BGP Monitoring Protocol (BMP) can be utilized to monitor BGP routes in forms of adj-rib-in, local-rib and adj-rib-out. However, the complete procedure from inbound to outbound policy processing, including other policies, e.g., route redistribution, route selection and so on, is currently unobserved. For example, there are 10 policy items (or nodes) configured under one outbound route policy per a specific peer. By collecting the local-rib and adj-rib-out through BMP, the operator finds that the outbound policy didn't work as expected. However, it's hard to distinguish which one of the 10 policy items/nodes is responsible for the failure.¶
This document describes a method that records and reports how each policy item/node processes the routes (e.g., changes the route attribute). Each policy item/node processing is called an event thereafter in this document. Compared with conventional BGP rib entry, which consists of prefix/mask, route attributes, e.g., next hop, MED, local preference, AS path, and so on, the event record discussed in this document includes extra information, such as event index, timestamp, policy information, and so on. For example, if a route is processed by 5 policy items/nodes, there can be 5 event records for the same prefix/mask. Each event is numbered in order of time (e.g., the time of policy execution). The policy information includes the policy name and item/node ID/name so that the server/controller can map to the exact policy either directly from the device or from the configurations collected at the server side.¶
This document defines a new BMP message type to carry the recorded policy and route data. More detailed message format is defined in Section 2. The message is called the BMP Route Policy and Attribute Trace Message thereafter in this document.¶
There are cases that a new policy is configured incorrectly, e.g., setting an incorrect community value, or policy placed in incorrect order among other policies. These may result in incorrect route attribute modification, best route selection mistake, or route distribution mistake. With the correlated record of policy and route, the server/controller is able to identify the unexpected route change and its responsible policy. Considering the fact that the BGP route policy impacts not only the route processing within the individual device but also the route distribution to its peers, the route trace data of a single device is always analyzed in correlation with such data collected from its peer devices.¶
Apart from the policy validation application, the route trace data can also be analyzed to discover the route propagation path within the network. With the route's inbound and outbound event records collect from each related device, the server is able to find the propagation path hop by hop. The identified path is helpful for operators to better understand its network, and thus benefiting both network troubleshooting and network planning.¶
This document defines a new BMP message type to carry the Route Policy and Attribute Trace data.¶
The new defined message type is indicated in the Message Type field of the BMP common header.¶
The Route Policy and Attribute Trace Message is not per peer based, thus it does not require the Per Peer Header.¶
The Route Policy and Attribute Trace Message format is defined as follows:¶
+---------------------------------------------------------------+ |V| Reserved | +---------------------------------------------------------------+ | Route Distinguisher | +---------------------------------------------------------------+ | Prefix length | +---------------------------------------------------------------+ | Prefix | +---------------------------------------------------------------+ | Route Origin | +---------------------------------------------------------------+ | Event count | +---------------------------------------------------------------+ | Total event length | +---------------------------------------------------------------+ | 1st Event | +---------------------------------------------------------------+ | 2nd Event | +---------------------------------------------------------------+ ~ ~ + ...... + ~ ~ +---------------------------------------------------------------+ | Last Event | +---------------------------------------------------------------+ Figure 1: Route Policy and Attribute Trace Message format¶
+---------------------------------------------------------------+ | Single event length | +---------------------------------------------------------------+ | Event index | +---------------------------------------------------------------+ | Timestamp(seconds) | +---------------------------------------------------------------+ | Timestamp(microseconds) | +---------------------------------------------------------------+ | Path Identifier | +---------------------------------------------------------------+ | AFI | +---------------------------------------------------------------+ | SAFI | +---------------------------------------------------------------+ | VRF/Table TLV | +---------------------------------------------------------------+ | Policy TLV | +---------------------------------------------------------------+ | Pre Policy Attribute TLV | +---------------------------------------------------------------+ | Post Policy Attribute TLV | +---------------------------------------------------------------+ | String TLV | +---------------------------------------------------------------+ Figure 2: Event format¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-------------------------------+-------------------------------+ | Type = TBD1 | Length | +-------------------------------+-------------------------------+ | VRF/Table ID | +---------------------------------------------------------------+ ~ VRF/Table Name ~ | | +---------------------------------------------------------------+ Figure 3: VRF/Table TLV¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-------------------------------+-------------------------------+ | Type = TBD2 | Length | +---------------+-------------------------------+---------------+ |M|P|D| Res. | Policy Count | Policy Class. | +---------------+---------------+---------------+---------------+ ~ Peer Address ~ + + +---------------------------------------------------------------+ | Peer Router ID | +---------------------------------------------------------------+ | Peer AS | +---------------------------------------------------------------+ ~ ~ + 1st Policy +---------------+ | |C|R| Res. | +---------------------------------------------------------------+ ~ . ~ + . + ~ . ~ +---------------------------------------------------------------+ ~ ~ + Last Policy +---------------+ | |C|R| Res. | +---------------------------------------------------------------+ Figure 4: Policy TLV¶
+---------------------------------------+ | Value |Policy Classification | +---------------------------------------+ | 00000000 | Inbound policy | | 00000001 | Outbound policy | | 00000010 | Multi-protocol Redistribute| | 00000011 | Cross-VRF Redistribute | | 00000100 | VRF import | 00000101 | VRF export | | 00000110 | Network | | 00000111 | Aggregation | | 00001000 | Route Withdraw | +----------+----------------------------+ Table 1: Policy Classification¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-------------------------------+-------------------------------+ | Policy Name Length | Policy Item ID Length | +-------------------------------+-------------------------------+ ~ Policy Name ~ + + +---------------------------------------------------------------+ ~ Policy Item ID ~ + + +---------------------------------------------------------------+ Figure 5: Policy field format¶
The Policy field consists of the Policy Name (Variable) and the Policy Item ID (Variable). The Policy Name and Policy Item ID fields are in the format of ASCII string. The length of Policy Name is indicated by the Policy Name Length (2 Bytes) field. The length of Policy Item ID is indicated by the Policy Item ID Length (2 Bytes) field.¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-------------------------------+-------------------------------+ | Type = TBD3 | Length | +-------------------------------+-------------------------------+ ~ Pre Policy Attribute sub TLVs ~ + + +---------------------------------------------------------------+ Figure 6: Pre Policy Attribute TLV¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-------------------------------+-------------------------------+ | Type = TBD4 | Length | +-------------------------------+-------------------------------+ ~ Post Policy Attribute sub TLVs ~ + + +---------------------------------------------------------------+ Figure 7: Post Policy Attribute TLV¶
0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 +-------------------------------+-------------------------------+ | Type = TBD5 | Length | +-------------------------------+-------------------------------+ ~ Value ~ + + +---------------------------------------------------------------+ Figure 8: String TLV¶
An example of using the String TLV is expressing the route policy xpath information instead of using the Policy TLV.¶
Considering the data amount of monitoring the route and policy trace of all routes from all BMP clients, users MAY trigger the monitoring at any user-specific time. Users MAY configure locally at the BMP client to monitor only user-specific routes or all the routes. In addition, users MAY configure locally at the BMP client whether to report the TLVs that are optional according to their own requirements, i.e., the Pre Policy Attribute TLV, Post Policy Attribute TLV, Policy ID TLV, and String TLV.¶
Successive recored events from one device MAY be encapsulated in one Route Policy and Attribute Trace Message or multiple Route Policy and Attribute Trace Messages per the user configuration.¶
TBD.¶
This document defines the following new BMP Message type (Section 2.1).¶
This document defines the following new TLV types for the Route Policy and Attribute Trace Message (Section 2.3).¶