Network Working Group F. Xu
Internet-Draft Tencent
Intended status: Standards Track T. Graf
Expires: January 28, 2021 Swisscom
Y. Gu
S. Zhuang
Z. Li
Huawei
July 27, 2020

BGP Route Policy and Attribute Trace Using BMP
draft-xu-grow-bmp-route-policy-attr-trace-05

Abstract

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, BGP local-rib and BGP adj-rib-out. 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.

Requirements Language

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.

Status of This Memo

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 January 28, 2021.

Copyright Notice

Copyright (c) 2020 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 Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.


Table of Contents

1. Introduction

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.

1.1. BGP Route Policy and Attribute Trace Overview

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.

1.2. Use cases

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.

2. Extension of BMP for Route Policy and Attribute Trace

2.1. Common Header

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.

2.2. Per Peer Header

The Route Policy and Attribute Trace Message is not per peer based, thus it does not require the Per Peer Header.

2.3. Route Policy and Attribute Trace Message

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

2.3.1. 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 = TBD1          |            Length             |
+-------------------------------+-------------------------------+
|                         VRF/Table ID                          |
+---------------------------------------------------------------+
~                         VRF/Table Name                        ~
|                                                               |
+---------------------------------------------------------------+

                   Figure 3: VRF/Table TLV

2.3.2. Policy 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.

2.3.3. 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 = TBD3          |            Length             |
+-------------------------------+-------------------------------+
~                  Pre Policy Attribute sub TLVs                ~
+                                                               +
+---------------------------------------------------------------+

                Figure 6: Pre Policy Attribute TLV

2.3.4. 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 = TBD4          |            Length             |
+-------------------------------+-------------------------------+
~                 Post Policy Attribute sub TLVs                ~
+                                                               +
+---------------------------------------------------------------+

                Figure 7: Post Policy Attribute TLV

2.3.5. String 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.

3. Implementation Considerations

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.

4. Acknowledgments

TBD.

5. IANA Considerations

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

6. Security Considerations

TBD.

7. Normative References

[I-D.ietf-grow-bmp-adj-rib-out] Evens, T., Bayraktar, S., Lucente, P., Mi, K. and S. Zhuang, "Support for Adj-RIB-Out in BGP Monitoring Protocol (BMP)", Internet-Draft draft-ietf-grow-bmp-adj-rib-out-07, August 2019.
[I-D.ietf-grow-bmp-local-rib] Evens, T., Bayraktar, S., Bhardwaj, M. and P. Lucente, "Support for Local RIB in BGP Monitoring Protocol (BMP)", Internet-Draft draft-ietf-grow-bmp-local-rib-07, May 2020.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, DOI 10.17487/RFC2119, March 1997.
[RFC4271] Rekhter, Y., Li, T. and S. Hares, "A Border Gateway Protocol 4 (BGP-4)", RFC 4271, DOI 10.17487/RFC4271, January 2006.
[RFC5492] Scudder, J. and R. Chandra, "Capabilities Advertisement with BGP-4", RFC 5492, DOI 10.17487/RFC5492, February 2009.
[RFC7854] Scudder, J., Fernando, R. and S. Stuart, "BGP Monitoring Protocol (BMP)", RFC 7854, DOI 10.17487/RFC7854, June 2016.

Authors' Addresses

Feng Xu Tencent Guangzhou, China EMail: oliverxu@tencent.com
Thomas Graf Swisscom Binzring 17 Zürich, 8045 Switzerland EMail: thomas.graf@swisscom.com
Yunan Gu Huawei Huawei Bld., No.156 Beiqing Rd. Beijing, 100095 China EMail: guyunan@huawei.com
Shunwan Zhuang Huawei Huawei Bld., No.156 Beiqing Rd. Beijing, 100095 China EMail: zhuangshunwan@huawei.com
Zhenbin Li Huawei Huawei Bld., No.156 Beiqing Rd. Beijing, 100095 China EMail: lizhenbin@huawei.com