One document matched: draft-ietf-grow-ops-reqs-for-bgp-error-handling-06.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE rfc SYSTEM "rfc2629.dtd" [
<!ENTITY RFC2119 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2119.xml">
<!ENTITY RFC2858 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2858.xml">
<!ENTITY RFC2918 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.2918.xml">
<!ENTITY RFC4271 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4271.xml">
<!ENTITY RFC4761 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4761.xml">
<!ENTITY RFC4364 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4364.xml">
<!ENTITY RFC4724 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4724.xml">
<!ENTITY RFC5880 PUBLIC "" "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5880.xml">
<!ENTITY draft-ietf-idr-operational-message SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-operational-message.xml">
<!ENTITY draft-chen-ebgp-error-handling SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.chen-ebgp-error-handling.xml">
<!ENTITY draft-ietf-idr-bgp-enhanced-route-refresh SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-idr-bgp-enhanced-route-refresh.xml">
<!ENTITY draft-ietf-grow-bgp-gshut SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-grow-bgp-gshut.xml">
<!ENTITY draft-ietf-grow-bmp SYSTEM "http://xml.resource.org/public/rfc/bibxml3/reference.I-D.ietf-grow-bmp.xml">
]>
<?xml-stylesheet type='text/xsl' href='rfc2629.xslt' ?>
<?rfc toc="yes" ?>
<?rfc symrefs="yes" ?>
<?rfc sortrefs="yes"?>
<?rfc iprnotified="no" ?>
<?rfc strict="yes" ?>
<rfc category='info' ipr='trust200902' docName='draft-ietf-grow-ops-reqs-for-bgp-error-handling-06'>
<front>
<title abbrev='Requirements for BGP Error Handling '>
Operational Requirements for Enhanced Error Handling Behaviour in BGP-4
</title>
<author initials = 'R.' surname='Shakir' fullname='Rob Shakir'>
<organization abbrev='BT'>
BT
</organization>
<address>
<postal>
<street>pp C3L, BT Centre</street>
<street>81, Newgate Street</street>
<city>London</city>
<code>EC1A 7AJ</code>
<country>UK</country>
</postal>
<email>rob.shakir@bt.com</email>
<uri>http://www.bt.com/</uri>
</address>
</author>
<date month='December' year='2012' />
<area>General</area>
<workgroup>Internet Engineering Task Force</workgroup>
<keyword>BGP-4</keyword>
<keyword>Errors</keyword>
<abstract>
<t>
BGP is utilised as a key intra- and inter-autonomous system routing protocol in modern IP networks. The failure modes, as defined by the original protocol standards, are based on a number of assumptions around the impact of session failure. Numerous incidents both in the global Internet routing table and within service provider networks have been caused by strict handling of a single invalid UPDATE message causing large-scale failures in one or more autonomous systems.
</t>
<t>
This memo describes the current use of BGP within service provider networks, and outlines a set of requirements for further work to enhance the mechanisms available to a BGP implementation when erroneous data is detected. Whilst this document does not provide specification of any standard, it is intended as an overview of a set of enhancements to BGP to improve the protocol's robustness to suit its current deployment.
</t>
</abstract>
</front>
<middle>
<section title="Requirements Language" anchor='s_requirements_language'>
<t>
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 <xref target="RFC2119">RFC 2119</xref>.
</t>
</section>
<section title='Problem Statement' anchor='s_problem_statement'>
<t>
BGP has become a key intra- and inter-domain routing protocol, deployed within both the Internet and private networks. The increased reliance on the protocol has resulted in increased demand for robustness - with the error handling behaviour defined in <xref target='RFC4271' /> having been shown to have caused numerous incidents within live network deployments. This document provides an overview of the current deployment cases for BGP-4, and define a set of requirements (from the perspective of a network operator) for enhancing error handling within the protocol.
</t>
<section title='Role of BGP-4 in Service Provider Networks' anchor='s_bgp4_role'>
<t>
BGP was designed as an inter-autonomous system (AS) routing protocol. Many of the error handling mechanisms within the protocol are defined in order to be guarantee consistency, and correctness of information between two neighbouring speakers. The assumption is made that each AS operates with many adjacencies, each propagating a relatively small amount of routing information. Through focusing on information consistency, the protocol specification prefers failure of an individual routing adjacency to maintaining reachability to all NLRI received from a particular neighbour, with the expectation that alternate, less direct, paths can be selected where a failure occurs. The assumptions of the nature of BGP deployments resulted in the specification made in <xref target='RFC4271' /> whereby the receipt of an erroneous UPDATE message is reacted to by sending a NOTIFICATION message, and tearing down the adjacency with the remote speaker from whom the error was observed.
</t>
<t>
Historically, a network would deploy an interior gateway protocol (IGP) to carry infrastructure and customer routes, and utilise an external gateway protocol (EGP) such as BGP to propagate routes to other autonomous systems. However, BGP's deployments have evolved with the growth of IP-based services. To ensure route convergence within an AS is within acceptable time bounds the amount of information within the IGP has been minimised (typically to only infrastructure routes). iBGP is then utilised to carry both internal, customer and external routes within an AS. As such, this has resulted in BGP having become an IGP, with traditional IGPs providing only reachability between nodes within the AS for packet forwarding and to establish iBGP sessions. This change in role within the overall architecture of an AS has resulted in an increased robustness requirement for BGP, with the expectation of a similar level of robustness to that of an IGP being set. The loss of an iBGP session can result in significant levels of unreachability internally to an AS, especially since there are typically limited (when compared to the Internet) signalling and forwarding paths available.
</t>
<t>
In parallel with this change of deployment, the volume and nature of the information carried within BGP has also changed. BGP has become the ubiquitous means through which service information can be propagated between devices. For instance, being utilised to carry IP/MPLS service information such as Layer 3 IP VPN routes <xref target='RFC4364' /> , and Layer 2 Virtual Private LAN Service device membership <xref target='RFC4761' />. Since these extensions to the protocol allow signalling of multiple services (represented by address families within BGP), and multiple customer topologies (i.e., subsets of routes within each address family) via the BGP protocol, the impact of session failure is increased. The tear down of a single BGP session can result in a complete outage to all customer services signalled via the session, even where the triggering event is related to only one service or topology being carried - reflecting a disproportional impact to all other services and routing topologies.
</t>
<t>
The convergence of services to IP, and BGP's changing deployment has resulted in a significant growth in the volume of routing information carried in the protocol. In numerous networks, the RIB size of individual BGP speakers can be of the order of millions of paths. Particularly large RIBs are observed at BGP speakers performing aggregation and border roles (such as ASBR, or route reflector hierarchies). This increased volume of routes results not only in a significant number of services being impacted during a protocol failure, but also increases the time to recovery after re-establishing a BGP session. The time taken to learn, compute and distribute new paths increases the impact of failures on services carried by the network - adding further weight to the requirement to avoid failures, or limit the extent of their impact. Furthermore, the impact of individual session failures is increased due to the existence of a relatively small number of highly-critical BGP sessions within Internet and multi-service network deployments. These sessions propagate a high-proportion of the reachability information - for instance, providing an Internet AS with the global routing table from upstream providers, or connecting IP/MPLS Provider Edge devices to route reflector hierarchies from which they are signalled reachability for services connected elsewhere within the routing domain. In both cases, the failure of these sessions can result in a significant outage to customer services.
</t>
<t>
For the current deployments of BGP, the behaviour described in <xref target='RFC4271' /> related to handling errors in UPDATE messages is suboptimal, and results in significant disruption to services in modern network deployments. This document defines a set of requirements for protocol developments, and revisions to <xref target='RFC4271' /> to address these concerns through a set of generalised definitions. It should be noted that the scope of these requirements is limited to the handling of UPDATE messages as, at the time of writing, there is no operational requirement to amend the means by which error handling in session establishment, or liveliness detection are performed.
</t>
</section>
</section>
<section title='Critical and Non-Critical Errors' anchor='s_update_message_classes'>
<t>
As described in <xref target="s_bgp4_role" />, the error handling behaviour described in <xref target="RFC4271" /> is applied at a per-session level, affecting all NLRI signalled via the adjacency on which an erroneous message is observed. In order to reduce the impact of error handling to those NLRI affected by an erroneous UPDATE, a BGP speaker MUST limit the error handling mechanisms implemented to those NLRI contained within an erroneous UPDATE message where it is possible to do so. Clearly, some errors within the formation of BGP UPDATE messages may result in it being impossible to reliably extract NLRI from the received message, and hence the same error handling procedures may not apply. There is therefore a requirement to classify errors based on their impact to the BGP UPDATE message, hence messages whereby the NLRI attribute cannot be extracted or parsed are referred to throughout this document as Critical errors. These Critical errors are limited to:
<list style='symbols'>
<t>
UPDATE Message Length errors - where the specified UPDATE message length is inconsistent with the sum of the Total Path Attribute and Withdrawn Routes length. These errors relate to message packing or framing, and result in cases whereby the NLRI attribute cannot be correctly extracted from the message.
</t>
<t>
Errors parsing the NLRI attribute of an UPDATE message - where the contents of the IPv4 Unicast Advertised or Withdrawn Routes attributes, or multi-protocol BGP NLRI attributes (MP_REACH_NLRI and/or MP_UNREACH_NLRI as defined in <xref target='RFC2858' />), cannot be successfully parsed.
</t>
</list>
In the case of Critical errors is expected that error handling is applied at a session level as per <xref target="s_critical_errors" /> of this document.
</t>
<t>
All errors whereby the contained NLRI can be extracted, are referred to as Non-Critical. It is expected that the following cases fall within this category:
<list style='symbols'>
<t>
Zero or invalid length errors in path attributes, excluding those containing NLRI, or where the length of all path attributes contained within the UPDATE does not correspond to the total path attribute length.
</t>
<t>
Messages where invalid data or flags are contained in a path attribute that does not relate to the NLRI.
</t>
<t>
UPDATE messages missing mandatory attributes, unrecognised non-optional attributes, or those that contain duplicate or invalid attributes (be they unsupported, or unexpected).
</t>
<t>
Those messages where the NEXT_HOP, the MP_REACH_NLRI next-hop values are missing, zero-length, or invalid for the relevant address family.
</t>
</list>
For these Non-Critical errors, the NLRI-targeted error handling requirements described in <xref target="s_noncritical_errors" /> should be followed.
</t>
<t>
In order to maximise the number of cases whereby the NLRI attributes can be reliably extracted from a received message, where a BGP speaker supports multi-protocol extensions, the MP_REACH_NLRI and MP_UNREACH_NLRI attributes SHOULD be utilised for all address families (including IPv4 Unicast) and these attributes should be the first attribute contained within the UPDATE message.
</t>
<t>
Where attributes are introduced by future extensions to the BGP protocol the error handling behaviour applied MUST be assumed that applied to Non-Critical errors, unless otherwise specified within the per-extension memo, or the attribute relates directly to carrying NLRI. Authors of future BGP extensions SHOULD specify the error handling behaviour required for new attributes in terms of the classification into a Critical or Non-Critical error on a per-attribute error basis.
</t>
</section>
<section anchor="s_noncritical_errors" title="Error Handling for Non-Critical Errors">
<section anchor="s_noncritical_nlri_targeted" title="NLRI-level Error Handling Requirements">
<t>
When a Non-Critical error is detected within an UPDATE message a BGP speaker MUST NOT send a NOTIFICATION message to the remote neighbour. Instead, the NLRI contained within the message MUST be considered as no longer viable until they are updated by a subsequent UPDATE message, thus treating the NLRI as withdrawn as per the treat-as-withdraw mechanism described in <xref target='I-D.chen-ebgp-error-handling' />.
</t>
<t>
Network operators SHOULD recognise that where such behaviour is implemented black-holing or looping of traffic may occur in the period between the NLRI being treated as withdrawn, and subsequent updates, dependent upon the routing topology. It SHOULD be noted that such periods of RIB inconsistency (where one speaker has advertised a prefix, which has been treated as withdrawn by the receiving speaker) may be relatively long lived, based on situations such as an erroneous implementation at the receiver, or the error occurring within an optional, transitive attribute not examined by the advertising device. In order to allow operators to select sessions on which this risk of inconsistency is acceptable, an implementation SHOULD provide means by which NLRI-level error handling for Non-Critical errors can be disabled on a per-session basis.
</t>
<t>
Since the Non-Critical error handling required within this section results in no NOTIFICATION message being transmitted, the fact that an error has occurred and hence there may be inconsistency between the local and remote BGP speaker MUST be flagged to the network operator through standard operational interfaces (e.g., SNMP, syslog). The information highlighted MUST include the NLRI identified to be contained within the error message, and SHOULD contain a exact copy of the received message for further analysis.
</t>
<t>
In order that the operator of the BGP speaker from whom an erroneous UPDATE message has been advertised is aware of the fact that some NLRI advertised to the remote speaker have been considered withdrawn due to being contained within an erroneous UPDATE, a BGP speaker SHOULD support mechanisms to report the occurrence of Non-Critical error handling to the remote speaker. The receiving speaker SHOULD transmit the NLRI contained within the erroneous message to the advertising speaker. An exact copy of the received UPDATE message SHOULD also be sent.
</t>
<t>
The exchange of information related to events occurring as a result of BGP messages is not currently supported by any extension to the protocol. Clearly, where the two speakers reside within the same administrative domain, shared logging infrastructure can be utilised to identify the root cause of errors, however, in many cases neighbouring BGP speakers reside within separate administrative domains (e.g., are ASBRs for Internet or private networks). In this case, mechanisms allowing transmission in-band to the BGP session SHOULD be utilised (e.g., the OPERATIONAL message described in <xref target='I-D.ietf-idr-operational-message' />). Such an in-band channel is preferred based on the BGP session representing a pre-established trusted channel which is related to a specific BGP-speaking device within a network. It is expected that the overall system scalability of a BGP speaker is improved through utilising the existing channel, rather than incurring overhead for maintaining many additional logging-specific protocol sessions for relatively infrequent messaging events when errors occur. However, the extensions providing such a channel MUST consider their impact to base BGP protocol functions such as the transmission of UPDATE or KEEPALIVE messages, and SHOULD limit the volume of messaging to direct reactions to Non-Critical errors occurring. These considerations SHOULD be made in order to ensure that no compromise is made to the security, scalability and robustness of BGP. Where additional BGP monitoring information that is not suitable to be carried in-band is required, out-of-band mechanisms such as the BMP protocol described in <xref target='I-D.ietf-grow-bmp' /> could be utilised to provide further information relating to erroneous messages.
</t>
</section>
<section anchor="s_noncritical_recovering_consistency" title="Recovering RIB Consistency following NLRI-level Error Handling">
<t>
Following NLRI being treated as withdrawn due to Non-Critical error handling, inconsistencies exist between the Adj-RIB-Out of the advertising BGP speaker, and the Adj-RIB-In of the receiving device. These inconsistencies may result in forwarding loops or blackholing of traffic in some routing topologies. In order to ensure that such cases can be recovered from a means by which a validation and recovery of consistency can be achieved SHOULD be provided to an operator. This function may be provided through enhancing the ROUTE-REFRESH <xref target="RFC2918" /> mechanism to add means to identify the beginning and end of a replay of the entire Adj-RIB-Out of the advertising speaker (as per the suggestion in <xref target='I-D.ietf-idr-bgp-enhanced-route-refresh' />).
</t>
<t>
As Non-Critical error handling is localised to the NLRI contained within the erroneous UPDATE message, a targeted recovery mechanism MAY be provided allowing a speaker to request re-advertisement of a particular subset of the Adj-RIB-Out. Where such targeted refresh functions are available, they SHOULD be preferred to mechanisms requesting re-advertisement of the whole Adj-RIB-Out based on their more limited use of CPU and network resources.
</t>
<t>
A BGP speaker may automatically trigger recovery mechanisms such as those described in this section following the receipt of an erroneous UPDATE message identified as Non-Critical to expedite recovery. It should be noted that if automatic recovery mechanisms trigger only re-advertisement of an identical erroneous message, they are likely to be ineffective. Additionally, where the best-path to be advertised by remote speaker changes, this will be advertised directly, without a requirement for a request from the receiver. However, in some cases, RIB consistency recovery mechanisms may prompt alternate UPDATE message packing, and hence allow quicker recovery. Where such mechanisms are implemented, mechanisms focused to smaller sets of NLRI SHOULD be preferred over those requesting the entire RIB. In addition, such mechanisms SHOULD have dampening mechanisms to ensure that their impact to computational and network resources is limited.
</t>
</section>
</section>
<section anchor="s_critical_errors" title="Error Handling for Critical Errors">
<t>
Where an UPDATE message containing a Critical error is received, since the NLRI cannot be extracted, error handling mechanisms must be applied at the per-session level. In order to limit the impact to network operation, these session-level mechanisms MUST be applied in a manner which allows the paths NLRI received from the remote speaker to continue to be utilised for forwarding during the session reset and re-establishment. It is envisaged that this requirement may be met through extension of the BGP Graceful Restart mechanism (<xref target='RFC4724' />) to be triggered by NOTIFICATION messages indicating the occurrence of a Critical error. Such an extension allows a restart of the TCP and BGP sessions between two speakers, in a similar manner to the current session restart behaviour triggered by a NOTIFICATION message. In order to maximise the level of re-initialisation which occurs during such a restart triggered by a Critical error, BGP speakers MAY re-initialise memory structures related to the Adj-RIB-In and Adj-RIB-Out associated with the session on which the erroneous UPDATE was observed.
</t>
<t>
Where such a restart event occurs, the continued liveliness of the remote device MAY be verified by BGP KEEPALIVE packets or other OAM functions such as Bidirectional Forwarding Detection (<xref target='RFC5880'/>). In cases where the observed Critical BGP error is indicative of a wider device failure of the remote speaker, it is expected that a BGP sessions will not re-establish correctly. Each BGP speaker SHOULD maintain a limited time window in which session restart is expected in order to mitigate this possibility.
</t>
<t>
When a Critical error occurs, the network operator MUST be made aware of its occurrence through local logging mechanisms (e.g., SNMP traps or syslog). The BGP speaker receiving an UPDATE message identified as a Critical error MUST log its occurrence and a copy of the UPDATE message. Where a inter-device messaging mechanism is implemented (as discussed in Section <xref target="s_noncritical_nlri_targeted" />) a copy of the erroneous UPDATE message SHOULD be transmitted to the remote speaker. Both BGP speakers MUST indicate to an operator the cause of a session restart was a Critical error in an UPDATE message.
</t>
<t>
Since repeated critical errors (and session restarts) may have an impact in overall device scaling if the failure condition is not resolved by session restart, a BGP speaker MAY choose to revert to the session tear down behaviour described in the base BGP specification. This reversion SHOULD only be utilised after a number of attempts which SHOULD be controllable by the network operator. Where a session is shut down, the implementation MAY utilise a back-off from session restart attempts (as per the IdleHoldTimer described in the BGP FSM <xref target="RFC4271" />). Where reversion to tearing down the BGP session is performed, a speaker SHOULD limit the impact of withdrawing prefixes from downstream speakers where possible. It is envisaged that this can be achieved by utilising a mechanism such as the BGP Graceful Shutdown procedure as described in <xref target='I-D.ietf-grow-bgp-gshut' />.
</t>
</section>
<section anchor="IANA" title="IANA Considerations">
<t>
This memo includes no request to IANA.
</t>
</section>
<section anchor="Security" title="Security Considerations">
<t>
The requirements outlined in this document provide mechanisms which limit the overall impact of the response to an error in a BGP UPDATE message. This is of benefit to the security of a BGP speaker. Without these mechanisms, where erroneous UPDATE messages relating to a single NLRI entry can be propagated to a BGP speaker, all other NLRI carried via the same session are affected by the resulting session tear-down. This may result in an AS being isolated from particular routing domains (such as the Internet) should an UPDATE message be propagated via targeted specific paths. It is envisaged by reducing the impact of the reaction of the receiving speaker to these messages, the isolation can be constrained to specific sets of NLRI, or a specific topology.
</t>
<t>
A number of the mechanisms meeting the requirements specified within the document (particularly those relating to operational monitoring) may raise further security concerns. Such concerns will be addressed during the specification of these mechanisms.
</t>
</section>
<section anchor="s_acknowledgements" title="Acknowledgements">
<t>
The author would like to thank the following network operators for their insight, and valuable input into defining the requirements for a variety of deployments of the BGP protocol: Shane Amante, Bruno Decraene, Rob Evans, David Freedman, Wes George, Tom Hodgson, Sven Huster, Jonathan Newton, Neil McRae, Thomas Mangin, Tom Scholl and Ilya Varlashkin.
</t>
<t>
In addition, many thanks are extended to Jeff Haas, Wim Hendrickx, Tony Li, Alton Lo, Keyur Patel, John Scudder, Adam Simpson and Robert Raszuk for their expertise relating to implementations of the BGP protocol.
</t>
</section>
</middle>
<back>
<references title='Normative References'>
&RFC4271;
&RFC4364;
&RFC4724;
&RFC4761;
&RFC5880;
&RFC2119;
&RFC2858;
&RFC2918;
</references>
<references title='Informational References'>
&draft-ietf-idr-operational-message;
&draft-chen-ebgp-error-handling;
&draft-ietf-idr-bgp-enhanced-route-refresh;
&draft-ietf-grow-bgp-gshut;
&draft-ietf-grow-bmp;
</references>
</back>
</rfc>| PAFTECH AB 2003-2026 | 2026-04-24 01:20:23 |