draft-ietf-idr-error-handling-09.txt   draft-ietf-idr-error-handling-10.txt 
Internet Engineering Task Force E. Chen, Ed. Internet Engineering Task Force E. Chen, Ed.
Internet-Draft Cisco Systems, Inc. Internet-Draft Cisco Systems, Inc.
Updates: 1997, 4271, 4360, 4456, 4760, 5701 (if approved)J. Scudder, Ed. Updates: 1997, 4271, 4360, 4456, 4760, J. Scudder, Ed.
Intended status: Standards Track Juniper Networks 5701 (if approved) Juniper Networks
Expires: November 20, 2014 P. Mohapatra Intended status: Standards Track P. Mohapatra
Sproute Networks Expires: November 30, 2014 Sproute Networks
K. Patel K. Patel
Cisco Systems, Inc. Cisco Systems, Inc.
May 19, 2014 May 29, 2014
Revised Error Handling for BGP UPDATE Messages Revised Error Handling for BGP UPDATE Messages
draft-ietf-idr-error-handling-09 draft-ietf-idr-error-handling-10
Abstract Abstract
According to the base BGP specification, a BGP speaker that receives According to the base BGP specification, a BGP speaker that receives
an UPDATE message containing a malformed attribute is required to an UPDATE message containing a malformed attribute is required to
reset the session over which the offending attribute was received. reset the session over which the offending attribute was received.
This behavior is undesirable as a session reset would impact not only This behavior is undesirable as a session reset would impact not only
routes with the offending attribute, but also other valid routes routes with the offending attribute, but also other valid routes
exchanged over the session. This document partially revises the exchanged over the session. This document partially revises the
error handling for UPDATE messages, and provides guidelines for the error handling for UPDATE messages, and provides guidelines for the
skipping to change at page 1, line 46 skipping to change at page 1, line 46
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on November 20, 2014. This Internet-Draft will expire on November 30, 2014.
Copyright Notice Copyright Notice
Copyright (c) 2014 IETF Trust and the persons identified as the Copyright (c) 2014 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 2, line 38 skipping to change at page 2, line 38
not be created outside the IETF Standards Process, except to format not be created outside the IETF Standards Process, except to format
it for publication as an RFC or to translate it into languages other it for publication as an RFC or to translate it into languages other
than English. than English.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4 1.1. Requirements Language . . . . . . . . . . . . . . . . . . 4
2. Error-Handling Approaches . . . . . . . . . . . . . . . . . . 4 2. Error-Handling Approaches . . . . . . . . . . . . . . . . . . 4
3. Revision to BGP UPDATE Message Error Handling . . . . . . . . 4 3. Revision to BGP UPDATE Message Error Handling . . . . . . . . 4
4. Parsing of NLRI Fields . . . . . . . . . . . . . . . . . . . 6 4. Attribute Length Fields . . . . . . . . . . . . . . . . . . . 6
4.1. Attribute Length Fields . . . . . . . . . . . . . . . . . 7 5. Parsing of NLRI Fields . . . . . . . . . . . . . . . . . . . 7
4.2. Syntactic Correctness of NLRI Fields . . . . . . . . . . 7 5.1. Encoding NLRI . . . . . . . . . . . . . . . . . . . . . . 7
4.3. Typed NLRI . . . . . . . . . . . . . . . . . . . . . . . 8 5.2. Missing NLRI . . . . . . . . . . . . . . . . . . . . . . 7
5. Operational Considerations . . . . . . . . . . . . . . . . . 8 5.3. Syntactic Correctness of NLRI Fields . . . . . . . . . . 8
6. Error Handling Procedures for Existing Attributes . . . . . . 9 5.4. Typed NLRI . . . . . . . . . . . . . . . . . . . . . . . 8
6.1. ORIGIN . . . . . . . . . . . . . . . . . . . . . . . . . 9 6. Operational Considerations . . . . . . . . . . . . . . . . . 9
6.2. AS_PATH . . . . . . . . . . . . . . . . . . . . . . . . . 9 7. Error Handling Procedures for Existing Attributes . . . . . . 9
6.3. NEXT_HOP . . . . . . . . . . . . . . . . . . . . . . . . 10 7.1. ORIGIN . . . . . . . . . . . . . . . . . . . . . . . . . 10
6.4. MULTI_EXIT_DISC . . . . . . . . . . . . . . . . . . . . . 10 7.2. AS_PATH . . . . . . . . . . . . . . . . . . . . . . . . . 10
6.5. LOCAL_PREF . . . . . . . . . . . . . . . . . . . . . . . 10 7.3. NEXT_HOP . . . . . . . . . . . . . . . . . . . . . . . . 10
6.6. ATOMIC_AGGREGATE . . . . . . . . . . . . . . . . . . . . 10 7.4. MULTI_EXIT_DISC . . . . . . . . . . . . . . . . . . . . . 11
6.7. AGGREGATOR . . . . . . . . . . . . . . . . . . . . . . . 10 7.5. LOCAL_PREF . . . . . . . . . . . . . . . . . . . . . . . 11
6.8. Community . . . . . . . . . . . . . . . . . . . . . . . . 11 7.6. ATOMIC_AGGREGATE . . . . . . . . . . . . . . . . . . . . 11
6.9. Extended Community . . . . . . . . . . . . . . . . . . . 11 7.7. AGGREGATOR . . . . . . . . . . . . . . . . . . . . . . . 11
6.10. IPv6 Address Specific BGP Extended Community Attribute . 11 7.8. Community . . . . . . . . . . . . . . . . . . . . . . . . 12
6.11. ORIGINATOR_ID . . . . . . . . . . . . . . . . . . . . . . 12 7.9. Extended Community . . . . . . . . . . . . . . . . . . . 12
6.12. CLUSTER_LIST . . . . . . . . . . . . . . . . . . . . . . 12 7.10. IPv6 Address Specific BGP Extended Community Attribute . 12
6.13. MP_REACH_NLRI and MP_UNREACH_NLRI . . . . . . . . . . . . 12 7.11. ORIGINATOR_ID . . . . . . . . . . . . . . . . . . . . . . 12
7. Guidance for Authors of BGP Specifications . . . . . . . . . 12 7.12. CLUSTER_LIST . . . . . . . . . . . . . . . . . . . . . . 13
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13 7.13. MP_REACH_NLRI and MP_UNREACH_NLRI . . . . . . . . . . . . 13
9. Security Considerations . . . . . . . . . . . . . . . . . . . 13 8. Guidance for Authors of BGP Specifications . . . . . . . . . 13
10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 13 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 13
11. References . . . . . . . . . . . . . . . . . . . . . . . . . 13 10. Security Considerations . . . . . . . . . . . . . . . . . . . 13
11.1. Normative References . . . . . . . . . . . . . . . . . . 13 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 14
11.2. Informative References . . . . . . . . . . . . . . . . . 14 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 14
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 14 12.1. Normative References . . . . . . . . . . . . . . . . . . 14
12.2. Informative References . . . . . . . . . . . . . . . . . 15
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 15
1. Introduction 1. Introduction
According to the base BGP specification [RFC4271], a BGP speaker that According to the base BGP specification [RFC4271], a BGP speaker that
receives an UPDATE message containing a malformed attribute is receives an UPDATE message containing a malformed attribute is
required to reset the session over which the offending attribute was required to reset the session over which the offending attribute was
received. This behavior is undesirable as a session reset would received. This behavior is undesirable as a session reset would
impact not only routes with the offending attribute, but also other impact not only routes with the offending attribute, but also other
valid routes exchanged over the session. In the case of optional valid routes exchanged over the session. In the case of optional
transitive attributes, the behavior is especially troublesome and may transitive attributes, the behavior is especially troublesome and may
skipping to change at page 4, line 13 skipping to change at page 4, line 15
[RFC4456], [RFC4760] and [RFC5701] are revised. [RFC4456], [RFC4760] and [RFC5701] are revised.
1.1. Requirements Language 1.1. Requirements Language
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
2. Error-Handling Approaches 2. Error-Handling Approaches
In this document we refer to three different approaches to handling In this document we refer to four different approaches to handling
errors found in BGP path attributes. They are as follows (listed in errors found in BGP path attributes. They are as follows (listed in
order, from the one with the "strongest" action to the one with the order, from the one with the "strongest" action to the one with the
"weakest" action): "weakest" action):
o Session reset: This is the approach used throughout the base BGP o Session reset: This is the approach used throughout the base BGP
specification [RFC4271], where a NOTIFICATION is sent and the specification [RFC4271], where a NOTIFICATION is sent and the
session terminated. session terminated.
o AFI/SAFI disable: [RFC4760] specifies a procedure for disabling a
particular AFI/SAFI.
o Treat-as-withdraw: In this approach, the UPDATE message containing o Treat-as-withdraw: In this approach, the UPDATE message containing
the path attribute in question MUST be treated as though all the path attribute in question MUST be treated as though all
contained routes had been withdrawn just as if they had been contained routes had been withdrawn just as if they had been
listed in the WITHDRAWN ROUTES field (or in the MP_UNREACH_NLRI listed in the WITHDRAWN ROUTES field (or in the MP_UNREACH_NLRI
attribute if appropriate) of the UPDATE message, thus causing them attribute if appropriate) of the UPDATE message, thus causing them
to be removed from the Adj-RIB-In according to the procedures of to be removed from the Adj-RIB-In according to the procedures of
[RFC4271]. [RFC4271].
o Attribute discard: In this approach the malformed attribute MUST o Attribute discard: In this approach the malformed attribute MUST
be discarded and the UPDATE message continues to be processed. be discarded and the UPDATE message continues to be processed.
This approach MUST NOT be used except in the case of an attribute This approach MUST NOT be used except in the case of an attribute
that has no effect on route selection or installation. that has no effect on route selection or installation.
3. Revision to BGP UPDATE Message Error Handling 3. Revision to BGP UPDATE Message Error Handling
This specification amends [RFC4271] Section 6.3 in a number of ways. This specification amends [RFC4271] Section 6.3 in a number of ways.
See also Section 6 for treatment of specific path attributes. See also Section 7 for treatment of specific path attributes.
a. The first paragraph is revised as follows: a. The first paragraph is revised as follows:
Old Text: Old Text:
All errors detected while processing the UPDATE message All errors detected while processing the UPDATE message
MUST be indicated by sending the NOTIFICATION message with MUST be indicated by sending the NOTIFICATION message with
the Error Code UPDATE Message Error. The error subcode the Error Code UPDATE Message Error. The error subcode
elaborates on the specific nature of the error. elaborates on the specific nature of the error.
skipping to change at page 5, line 27 skipping to change at page 5, line 34
Old Text: Old Text:
If any recognized attribute has Attribute Flags that If any recognized attribute has Attribute Flags that
conflict with the Attribute Type Code, then the Error conflict with the Attribute Type Code, then the Error
Subcode MUST be set to Attribute Flags Error. The Data Subcode MUST be set to Attribute Flags Error. The Data
field MUST contain the erroneous attribute (type, length, field MUST contain the erroneous attribute (type, length,
and value). and value).
New Text: New Text:
If any recognized attribute has Attribute Flags that If the value of either the Optional or Transitive bits in
conflict with the Attribute Type Code, then the attribute the Attribute Flags is in conflict with their specified
MUST be treated as malformed and the treat-as-withdraw values, then the attribute MUST be treated as malformed and
approach used, unless the specification for the attribute the treat-as-withdraw approach used, unless the
mandates different handling for incorrect Attribute Flags. specification for the attribute mandates different handling
for incorrect Attribute Flags.
d. If any of the well-known mandatory attributes are not present in d. If any of the well-known mandatory attributes are not present in
an UPDATE message, then "treat-as-withdraw" MUST be used. (Note an UPDATE message, then "treat-as-withdraw" MUST be used. (Note
that [RFC4760] reclassifies NEXT_HOP as what is effectively that [RFC4760] reclassifies NEXT_HOP as what is effectively
discretionary.) discretionary.)
e. "Treat-as-withdraw" MUST be used for the cases that specify a e. "Treat-as-withdraw" MUST be used for the cases that specify a
session reset and involve any of the attributes ORIGIN, AS_PATH, session reset and involve any of the attributes ORIGIN, AS_PATH,
NEXT_HOP, MULTI_EXIT_DISC, or LOCAL_PREF. NEXT_HOP, MULTI_EXIT_DISC, or LOCAL_PREF.
f. "Attribute discard" MUST be used for any of the cases that f. "Attribute discard" MUST be used for any of the cases that
specify a session reset and involve ATOMIC_AGGREGATE or specify a session reset and involve ATOMIC_AGGREGATE or
AGGREGATOR. AGGREGATOR.
g. If the MP_REACH_NLRI attribute or the MP_UNREACH_NLRI [RFC4760] g. If the MP_REACH_NLRI attribute or the MP_UNREACH_NLRI [RFC4760]
attribute appears more than once in the UPDATE message, then a attribute appears more than once in the UPDATE message, then a
NOTIFICATION message MUST be sent with the Error Subcode NOTIFICATION message MUST be sent with the Error Subcode
"Malformed Attribute List". If any other attribute appears more "Malformed Attribute List". If any other attribute (whether
than once in an UPDATE message, then all the occurrences of the recognized or unrecognized) appears more than once in an UPDATE
attribute other than the first one SHALL be discarded and the message, then all the occurrences of the attribute other than the
UPDATE message continue to be processed. first one SHALL be discarded and the UPDATE message continue to
be processed.
h. When multiple attribute errors exist in an UPDATE message, if the h. When multiple attribute errors exist in an UPDATE message, if the
same approach (either "session reset", "treat-as-withdraw" or same approach (either "session reset", "treat-as-withdraw" or
"attribute discard") is specified for the handling of these "attribute discard") is specified for the handling of these
malformed attributes, then the specified approach MUST be used. malformed attributes, then the specified approach MUST be used.
Otherwise the approach with the strongest action MUST be used. Otherwise the approach with the strongest action MUST be used.
i. The Withdrawn Routes field MUST be checked for syntactic i. The Withdrawn Routes field MUST be checked for syntactic
correctness in the same manner as the NLRI field. This is correctness in the same manner as the NLRI field. This is
discussed further below, and in Section 4.2. discussed further below, and in Section 5.3.
j. Finally, we observe that in order to use the approach of "treat- j. Finally, we observe that in order to use the approach of "treat-
as-withdraw", the entire NLRI field and/or the MP_REACH_NLRI and as-withdraw", the entire NLRI field and/or the MP_REACH_NLRI and
MP_UNREACH_NLRI attributes need to be successfully parsed. If MP_UNREACH_NLRI attributes need to be successfully parsed -- what
this is not possible, the procedures of [RFC4271] continue to this entails is discussed in more detail in Section 5. If this
apply, meaning that the "session reset" approach SHOULD be is not possible, the procedures of [RFC4271] and/or [RFC4760]
followed. Alternatively the error handling procedures specified continue to apply, meaning that the "session reset" approach (or
in [RFC4760] for disabling a particular AFI/SAFI MAY be followed. the "AFI/SAFI disable" approach) MUST be followed.
One notable case where it would be not possible to successfully
parse the NLRI is if the NLRI field is found to be "syntactically
incorrect" (see Section 4.2). It can be seen that therefore,
this part of [RFC4271] Section 6.3 necessarily continues to
apply:
The NLRI field in the UPDATE message is checked for syntactic
validity. If the field is syntactically incorrect, then the
Error Subcode MUST be set to Invalid Network Field.
4. Parsing of NLRI Fields
To facilitate the determination of the NLRI field in an UPDATE with a
malformed attribute, an UPDATE message MUST NOT contain more than one
of the following: non-empty Withdrawn Routes field, non-empty Network
Layer Reachability Information field, MP_REACH_NLRI attribute, and
MP_UNREACH_NLRI attribute. Since older BGP speakers may not
implement these restrictions, an implementation MUST still be
prepared to receive these fields in any position or combination.
If the encoding of [RFC4271] is used, the NLRI field for the IPv4
unicast address family is carried immediately following all the
attributes in an UPDATE. When such an UPDATE is received, we observe
that the NLRI field can be determined using the "Message Length",
"Withdrawn Route Length" and "Total Attribute Length" (when they are
consistent) carried in the message instead of relying on the length
of individual attributes in the message.
4.1. Attribute Length Fields 4. Attribute Length Fields
There are two error cases in which the Total Attribute Length value There are two error cases in which the Total Attribute Length value
can be in conflict with the enclosed path attributes, which can be in conflict with the enclosed path attributes, which
themselves carry length values. In the "overrun" case, as the themselves carry length values. In the "overrun" case, as the
enclosed path attributes are parsed, the length of the last enclosed path attributes are parsed, the length of the last
encountered path attribute would cause the Total Attribute Length to encountered path attribute would cause the Total Attribute Length to
be exceeded. In the "underrun" case, as the enclosed path attributes be exceeded. In the "underrun" case, as the enclosed path attributes
are parsed, after the last successfully-parsed attribute, fewer than are parsed, after the last successfully-parsed attribute, fewer than
three octets remain, or fewer than four octets, if the Attribute three octets remain, or fewer than four octets, if the Attribute
Flags field has the Extended Length bit set -- that is, there remains Flags field has the Extended Length bit set -- that is, there remains
skipping to change at page 7, line 30 skipping to change at page 7, line 13
dictating a stronger approach), and the Total Attribute Length MUST dictating a stronger approach), and the Total Attribute Length MUST
be relied upon to enable the beginning of the NLRI field to be be relied upon to enable the beginning of the NLRI field to be
located. located.
For all path attributes other than those specified as having an For all path attributes other than those specified as having an
attribute length that may be zero it SHALL be considered a syntax attribute length that may be zero it SHALL be considered a syntax
error for the attribute to have a length of zero. (Of the path error for the attribute to have a length of zero. (Of the path
attributes considered in this specification, only AS_PATH and attributes considered in this specification, only AS_PATH and
ATOMIC_AGGREGATE may validly have an attribute length of zero.) ATOMIC_AGGREGATE may validly have an attribute length of zero.)
4.2. Syntactic Correctness of NLRI Fields 5. Parsing of NLRI Fields
5.1. Encoding NLRI
To facilitate the determination of the NLRI field in an UPDATE with a
malformed attribute:
o The MP_REACH_NLRI or MP_UNREACH_NLRI attribute (if present) SHALL
be encoded as the very first path attribute in an UPDATE.
o An UPDATE message MUST NOT contain more than one of the following:
non-empty Withdrawn Routes field, non-empty Network Layer
Reachability Information field, MP_REACH_NLRI attribute, and
MP_UNREACH_NLRI attribute.
Since older BGP speakers may not implement these restrictions, an
implementation MUST still be prepared to receive these fields in any
position or combination.
If the encoding of [RFC4271] is used, the NLRI field for the IPv4
unicast address family is carried immediately following all the
attributes in an UPDATE. When such an UPDATE is received, we observe
that the NLRI field can be determined using the "Message Length",
"Withdrawn Route Length" and "Total Attribute Length" (when they are
consistent) carried in the message instead of relying on the length
of individual attributes in the message.
5.2. Missing NLRI
[RFC4724] specifies an End-of-RIB message ("EoR") that can be encoded
as an UPDATE message that contains only a MP_UNREACH_NLRI attribute
that encodes no NLRI (it can also be a completely empty UPDATE
message in the case of the "legacy" encoding). In all other well-
specified cases, an UPDATE either carries only withdrawn routes
(either in the Withdrawn Routes field, or the MP_UNREACH_NLRI
attribute), or it advertises reachable routes (either in the Network
Layer Reachability Information field, or the MP_REACH_NLRI
attribute).
Thus, if an UPDATE message is encountered that does contain path
attributes other than MP_UNREACH_NLRI and doesn't encode any
reachable NLRI, we cannot be confident that the NLRI have been
successfully parsed as Section 3 (j) requires. For this reason, if
any path attribute errors are encountered in such an UPDATE message,
and if any encountered error specifies an error-handling approach
other than "attribute discard", then the "session reset" approach
MUST be used.
5.3. Syntactic Correctness of NLRI Fields
The NLRI field or Withdrawn Routes field SHALL be considered The NLRI field or Withdrawn Routes field SHALL be considered
"syntactically incorrect" if either of the following are true: "syntactically incorrect" if either of the following are true:
o The length of any of the included NLRI is greater than 32, o The length of any of the included NLRI is greater than 32,
o When parsing NLRI contained in the field, the length of the last o When parsing NLRI contained in the field, the length of the last
NLRI found exceeds the amount of unconsumed data remaining in the NLRI found exceeds the amount of unconsumed data remaining in the
field. field.
skipping to change at page 8, line 11 skipping to change at page 8, line 43
o When parsing NLRI contained in the attribute, the length of the o When parsing NLRI contained in the attribute, the length of the
last NLRI found exceeds the amount of unconsumed data remaining in last NLRI found exceeds the amount of unconsumed data remaining in
the attribute. the attribute.
o The attribute flags of the attribute are inconsistent with those o The attribute flags of the attribute are inconsistent with those
specified in [RFC4760]. specified in [RFC4760].
o The length of the MP_UNREACH_NLRI attribute is less than 3, or the o The length of the MP_UNREACH_NLRI attribute is less than 3, or the
length of the MP_REACH_NLRI attribute is less than 5. length of the MP_REACH_NLRI attribute is less than 5.
4.3. Typed NLRI 5.4. Typed NLRI
Certain address families, for example MVPN [RFC7117] and EVPN Certain address families, for example MVPN [RFC7117] and EVPN
[I-D.ietf-l2vpn-evpn] have NLRI that are typed. Since supported type [I-D.ietf-l2vpn-evpn] have NLRI that are typed. Since supported type
values within the address family are not expressed in the MP-BGP values within the address family are not expressed in the MP-BGP
capability [RFC4760], it is possible for a BGP speaker to advertise capability [RFC4760], it is possible for a BGP speaker to advertise
support for the given address family and sub-address family while support for the given address family and sub-address family while
still not supporting a particular type of NLRI within that AFI/SAFI. still not supporting a particular type of NLRI within that AFI/SAFI.
A BGP speaker advertising support for such a typed address family A BGP speaker advertising support for such a typed address family
MUST handle routes with unrecognized NLRI types within that address MUST handle routes with unrecognized NLRI types within that address
family by discarding them, unless the relevant specification for that family by discarding them, unless the relevant specification for that
address family specifies otherwise. address family specifies otherwise.
5. Operational Considerations 6. Operational Considerations
Although the "treat-as-withdraw" error-handling behavior defined in Although the "treat-as-withdraw" error-handling behavior defined in
Section 2 makes every effort to preserve BGP's correctness, we note Section 2 makes every effort to preserve BGP's correctness, we note
that if an UPDATE received on an IBGP session is subjected to this that if an UPDATE received on an IBGP session is subjected to this
treatment, inconsistent routing within the affected Autonomous System treatment, inconsistent routing within the affected Autonomous System
may result. The consequences of inconsistent routing can include may result. The consequences of inconsistent routing can include
long-lived forwarding loops and black holes. While lamentable, this long-lived forwarding loops and black holes. While lamentable, this
issue is expected to be rare in practice, and more importantly is issue is expected to be rare in practice, and more importantly is
seen as less problematic than the session-reset behavior it replaces. seen as less problematic than the session-reset behavior it replaces.
skipping to change at page 9, line 13 skipping to change at page 9, line 46
update, and could cause invalid routes to be kept. update, and could cause invalid routes to be kept.
Because of these potential issues, a BGP speaker MUST provide Because of these potential issues, a BGP speaker MUST provide
debugging facilities to permit issues caused by a malformed attribute debugging facilities to permit issues caused by a malformed attribute
to be diagnosed. At a minimum, such facilities MUST include logging to be diagnosed. At a minimum, such facilities MUST include logging
an error listing the NLRI involved, and containing the entire an error listing the NLRI involved, and containing the entire
malformed UPDATE message when such an attribute is detected. The malformed UPDATE message when such an attribute is detected. The
malformed UPDATE message SHOULD be analyzed, and the root cause malformed UPDATE message SHOULD be analyzed, and the root cause
SHOULD be investigated. SHOULD be investigated.
6. Error Handling Procedures for Existing Attributes 7. Error Handling Procedures for Existing Attributes
In the following subsections, we elaborate on the conditions for In the following subsections, we elaborate on the conditions for
error-checking various path attributes, and specify what approach(es) error-checking various path attributes, and specify what approach(es)
should be used to handle malformations. It is possible that should be used to handle malformations. It is possible that
implementations may apply other error checks not contemplated here. implementations may apply other error checks not contemplated here.
If so, the error handling approach given here should generally be If so, the error handling approach given here should generally be
applied. applied.
6.1. ORIGIN 7.1. ORIGIN
The attribute is considered malformed if its length is not 1, or it The attribute is considered malformed if its length is not 1, or it
has an undefined value [RFC4271]. has an undefined value [RFC4271].
An UPDATE message with a malformed ORIGIN attribute SHALL be handled An UPDATE message with a malformed ORIGIN attribute SHALL be handled
using the approach of "treat-as-withdraw". using the approach of "treat-as-withdraw".
6.2. AS_PATH 7.2. AS_PATH
An AS_PATH is considered malformed if an unrecognized segment type is An AS_PATH is considered malformed if an unrecognized segment type is
encountered, or if it contains a malformed segment. A segment is encountered, or if it contains a malformed segment. A segment is
considered malformed if any of the following obtains: considered malformed if any of the following obtains:
o There is an overrun, where the path segment length field of the o There is an overrun, where the path segment length field of the
last segment encountered would cause the Attribute Length to be last segment encountered would cause the Attribute Length to be
exceeded. exceeded.
o There is an underrun, where after the last successfully-parsed o There is an underrun, where after the last successfully-parsed
skipping to change at page 10, line 8 skipping to change at page 10, line 43
An UPDATE message with a malformed AS_PATH attribute SHALL be handled An UPDATE message with a malformed AS_PATH attribute SHALL be handled
using the approach of "treat-as-withdraw". using the approach of "treat-as-withdraw".
[RFC4271] also says that an implementation optionally "MAY check [RFC4271] also says that an implementation optionally "MAY check
whether the leftmost ... AS in the AS_PATH attribute is equal to the whether the leftmost ... AS in the AS_PATH attribute is equal to the
autonomous system number of the peer that sent the message". A BGP autonomous system number of the peer that sent the message". A BGP
implementation SHOULD also handle routes that violate this check implementation SHOULD also handle routes that violate this check
using "treat-as-withdraw", but MAY follow the session reset behavior using "treat-as-withdraw", but MAY follow the session reset behavior
if configured to do so. if configured to do so.
6.3. NEXT_HOP 7.3. NEXT_HOP
The attribute is considered malformed if it is syntactically The attribute is considered malformed if it is syntactically
incorrect according to [RFC4271]. incorrect according to [RFC4271].
An UPDATE message with a malformed NEXT_HOP attribute SHALL be An UPDATE message with a malformed NEXT_HOP attribute SHALL be
handled using the approach of "treat-as-withdraw". handled using the approach of "treat-as-withdraw".
6.4. MULTI_EXIT_DISC 7.4. MULTI_EXIT_DISC
The attribute is considered malformed if its length is not 4 The attribute is considered malformed if its length is not 4
[RFC4271]. [RFC4271].
An UPDATE message with a malformed MULTI_EXIT_DISC attribute SHALL be An UPDATE message with a malformed MULTI_EXIT_DISC attribute SHALL be
handled using the approach of "treat-as-withdraw". handled using the approach of "treat-as-withdraw".
6.5. LOCAL_PREF 7.5. LOCAL_PREF
The error handling of [RFC4271] is revised as follows. The error handling of [RFC4271] is revised as follows.
o If the LOCAL_PREF attribute is received from an external neighbor, o If the LOCAL_PREF attribute is received from an external neighbor,
it SHALL be discarded using the approach of "attribute discard", it SHALL be discarded using the approach of "attribute discard",
or or
o if received from an internal neighbor, it SHALL be considered o if received from an internal neighbor, it SHALL be considered
malformed if its length is not equal to 4. If malformed, the malformed if its length is not equal to 4. If malformed, the
UPDATE SHALL be handled using the approach of "treat-as-withdraw". UPDATE SHALL be handled using the approach of "treat-as-withdraw".
6.6. ATOMIC_AGGREGATE 7.6. ATOMIC_AGGREGATE
The attribute SHALL be considered malformed if its length is not 0 The attribute SHALL be considered malformed if its length is not 0
[RFC4271]. [RFC4271].
An UPDATE message with a malformed ATOMIC_AGGREGATE attribute SHALL An UPDATE message with a malformed ATOMIC_AGGREGATE attribute SHALL
be handled using the approach of "attribute discard". be handled using the approach of "attribute discard".
6.7. AGGREGATOR 7.7. AGGREGATOR
The error conditions specified in [RFC4271] for the attribute are The error conditions specified in [RFC4271] for the attribute are
revised as follows: revised as follows:
The AGGREGATOR attribute SHALL be considered malformed if any of the The AGGREGATOR attribute SHALL be considered malformed if any of the
following applies: following applies:
o Its length is not 6 (when the "4-octet AS number capability" is o Its length is not 6 (when the "4-octet AS number capability" is
not advertised to, or not received from the peer [RFC6793]). not advertised to, or not received from the peer [RFC6793]).
o Its length is not 8 (when the "4-octet AS number capability" is o Its length is not 8 (when the "4-octet AS number capability" is
both advertised to, and received from the peer). both advertised to, and received from the peer).
An UPDATE message with a malformed AGGREGATOR attribute SHALL be An UPDATE message with a malformed AGGREGATOR attribute SHALL be
handled using the approach of "attribute discard". handled using the approach of "attribute discard".
6.8. Community 7.8. Community
The error handling of [RFC1997] is revised as follows: The error handling of [RFC1997] is revised as follows:
The Community attribute SHALL be considered malformed if its length The Community attribute SHALL be considered malformed if its length
is not a nonzero multiple of 4. is not a nonzero multiple of 4.
An UPDATE message with a malformed Community attribute SHALL be An UPDATE message with a malformed Community attribute SHALL be
handled using the approach of "treat-as-withdraw". handled using the approach of "treat-as-withdraw".
6.9. Extended Community 7.9. Extended Community
The error handling of [RFC4360] is revised as follows: The error handling of [RFC4360] is revised as follows:
The Extended Community attribute SHALL be considered malformed if its The Extended Community attribute SHALL be considered malformed if its
length is not a nonzero multiple of 8. length is not a nonzero multiple of 8.
An UPDATE message with a malformed Extended Community attribute SHALL An UPDATE message with a malformed Extended Community attribute SHALL
be handled using the approach of "treat-as-withdraw". be handled using the approach of "treat-as-withdraw".
Note that a BGP speaker MUST NOT treat an unrecognized Extended Note that a BGP speaker MUST NOT treat an unrecognized Extended
Community Type or Sub-Type as an error. Community Type or Sub-Type as an error.
6.10. IPv6 Address Specific BGP Extended Community Attribute 7.10. IPv6 Address Specific BGP Extended Community Attribute
The error handling of [RFC5701] is revised as follows: The error handling of [RFC5701] is revised as follows:
The IPv6 Address Specific Extended Community attribute SHALL be The IPv6 Address Specific Extended Community attribute SHALL be
considered malformed if its length is not a nonzero multiple of 20. considered malformed if its length is not a nonzero multiple of 20.
An UPDATE message with a malformed IPv6 Address Specific Extended An UPDATE message with a malformed IPv6 Address Specific Extended
Community attribute SHALL be handled using the approach of "treat-as- Community attribute SHALL be handled using the approach of "treat-as-
withdraw". withdraw".
Note that a BGP speaker MUST NOT treat an unrecognized IPv6 Address Note that a BGP speaker MUST NOT treat an unrecognized IPv6 Address
Specific Extended Community Type or Sub-Type as an error. Specific Extended Community Type or Sub-Type as an error.
6.11. ORIGINATOR_ID 7.11. ORIGINATOR_ID
The error handling of [RFC4456] is revised as follows. The error handling of [RFC4456] is revised as follows.
o If the ORIGINATOR_ID attribute is received from an external o If the ORIGINATOR_ID attribute is received from an external
neighbor, it SHALL be discarded using the approach of "attribute neighbor, it SHALL be discarded using the approach of "attribute
discard", or discard", or
o if received from an internal neighbor, it SHALL be considered o if received from an internal neighbor, it SHALL be considered
malformed if its length is not equal to 4. If malformed, the malformed if its length is not equal to 4. If malformed, the
UPDATE SHALL be handled using the approach of "treat-as-withdraw". UPDATE SHALL be handled using the approach of "treat-as-withdraw".
6.12. CLUSTER_LIST 7.12. CLUSTER_LIST
The error handling of [RFC4456] is revised as follows. The error handling of [RFC4456] is revised as follows.
o If the CLUSTER_LIST attribute is received from an external o If the CLUSTER_LIST attribute is received from an external
neighbor, it SHALL be discarded using the approach of "attribute neighbor, it SHALL be discarded using the approach of "attribute
discard", or discard", or
o if received from an internal neighbor, it SHALL be considered o if received from an internal neighbor, it SHALL be considered
malformed if its length is not a nonzero multiple of 4. If malformed if its length is not a nonzero multiple of 4. If
malformed, the UPDATE SHALL be handled using the approach of malformed, the UPDATE SHALL be handled using the approach of
"treat-as-withdraw". "treat-as-withdraw".
6.13. MP_REACH_NLRI and MP_UNREACH_NLRI 7.13. MP_REACH_NLRI and MP_UNREACH_NLRI
The handling of these attributes is discussed in Section 3 and The handling of these attributes is discussed in Section 3 and
Section 4. Section 5.
7. Guidance for Authors of BGP Specifications 8. Guidance for Authors of BGP Specifications
A document that specifies a new BGP attribute MUST provide specifics A document that specifies a new BGP attribute MUST provide specifics
regarding what constitutes an error for that attribute and how that regarding what constitutes an error for that attribute and how that
error is to be handled. Allowable error-handling approaches are error is to be handled. Allowable error-handling approaches are
detailed in Section 2. The treat-as-withdraw approach is generally detailed in Section 2. The treat-as-withdraw approach is generally
preferred. The document SHOULD also provide consideration of what preferred. The document SHOULD also provide consideration of what
debugging facilities may be required to permit issues caused by a debugging facilities may be required to permit issues caused by a
malformed attribute to be diagnosed. malformed attribute to be diagnosed.
For any malformed attribute that is handled by the "attribute For any malformed attribute that is handled by the "attribute
discard" instead of the "treat-as-withdraw" approach, it is critical discard" instead of the "treat-as-withdraw" approach, it is critical
to consider the potential impact of doing so. In particular, if the to consider the potential impact of doing so. In particular, if the
attribute in question has or may have an effect on route selection or attribute in question has or may have an effect on route selection or
installation, the presumption is that discarding it is unsafe, unless installation, the presumption is that discarding it is unsafe, unless
careful analysis proves otherwise. The analysis should take into careful analysis proves otherwise. The analysis should take into
account the tradeoff between preserving connectivity and potential account the tradeoff between preserving connectivity and potential
side effects. side effects.
8. IANA Considerations 9. IANA Considerations
This document makes no request of IANA. This document makes no request of IANA.
9. Security Considerations 10. Security Considerations
This specification addresses the vulnerability of a BGP speaker to a This specification addresses the vulnerability of a BGP speaker to a
potential attack whereby a distant attacker can generate a malformed potential attack whereby a distant attacker can generate a malformed
optional transitive attribute that is not recognized by intervening optional transitive attribute that is not recognized by intervening
routers (which thus propagate the attribute unchecked) but that routers (which thus propagate the attribute unchecked) but that
causes session resets when it reaches routers that do recognize the causes session resets when it reaches routers that do recognize the
given attribute type. given attribute type.
In other respects, this specification does not change BGP's security In other respects, this specification does not change BGP's security
characteristics. characteristics.
10. Acknowledgements 11. Acknowledgements
The authors wish to thank Juan Alcaide, Deniz Bahadir, Ron Bonica, The authors wish to thank Juan Alcaide, Deniz Bahadir, Ron Bonica,
Mach Chen, Andy Davidson, Bruno Decraene, Rex Fernando, Jeff Haas, Mach Chen, Andy Davidson, Bruno Decraene, Rex Fernando, Jeff Haas,
Chris Hall, Joel Halpern, Dong Jie, Akira Kato, Miya Kohno, Tony Li, Chris Hall, Joel Halpern, Dong Jie, Akira Kato, Miya Kohno, Tony Li,
Alton Lo, Shin Miyakawa, Tamas Mondal, Jonathan Oddy, Tony Alton Lo, Shin Miyakawa, Tamas Mondal, Jonathan Oddy, Tony
Przygienda, Robert Raszuk, Yakov Rekhter, Eric Rosen, Shyam Sethuram, Przygienda, Robert Raszuk, Yakov Rekhter, Eric Rosen, Shyam Sethuram,
Rob Shakir, Naiming Shen, Adam Simpson, Ananth Suryanarayana, Kaliraj Rob Shakir, Naiming Shen, Adam Simpson, Ananth Suryanarayana, Kaliraj
Vairavakkalai, Lili Wang and Ondrej Zajicek for their observations Vairavakkalai, Lili Wang and Ondrej Zajicek for their observations
and discussion of this topic, and review of this document. and discussion of this topic, and review of this document.
11. References 12. References
11.1. Normative References 12.1. Normative References
[RFC1997] Chandrasekeran, R., Traina, P., and T. Li, "BGP [RFC1997] Chandrasekeran, R., Traina, P., and T. Li, "BGP
Communities Attribute", RFC 1997, August 1996. Communities Attribute", RFC 1997, August 1996.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC4271] Rekhter, Y., Li, T., and S. Hares, "A Border Gateway [RFC4271] Rekhter, Y., Li, T., and S. Hares, "A Border Gateway
Protocol 4 (BGP-4)", RFC 4271, January 2006. Protocol 4 (BGP-4)", RFC 4271, January 2006.
[RFC4360] Sangli, S., Tappan, D., and Y. Rekhter, "BGP Extended [RFC4360] Sangli, S., Tappan, D., and Y. Rekhter, "BGP Extended
Communities Attribute", RFC 4360, February 2006. Communities Attribute", RFC 4360, February 2006.
[RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route [RFC4456] Bates, T., Chen, E., and R. Chandra, "BGP Route
Reflection: An Alternative to Full Mesh Internal BGP Reflection: An Alternative to Full Mesh Internal BGP
(IBGP)", RFC 4456, April 2006. (IBGP)", RFC 4456, April 2006.
[RFC4724] Sangli, S., Chen, E., Fernando, R., Scudder, J., and Y.
Rekhter, "Graceful Restart Mechanism for BGP", RFC 4724,
January 2007.
[RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter, [RFC4760] Bates, T., Chandra, R., Katz, D., and Y. Rekhter,
"Multiprotocol Extensions for BGP-4", RFC 4760, January "Multiprotocol Extensions for BGP-4", RFC 4760, January
2007. 2007.
[RFC5701] Rekhter, Y., "IPv6 Address Specific BGP Extended Community [RFC5701] Rekhter, Y., "IPv6 Address Specific BGP Extended Community
Attribute", RFC 5701, November 2009. Attribute", RFC 5701, November 2009.
[RFC6793] Vohra, Q. and E. Chen, "BGP Support for Four-Octet [RFC6793] Vohra, Q. and E. Chen, "BGP Support for Four-Octet
Autonomous System (AS) Number Space", RFC 6793, December Autonomous System (AS) Number Space", RFC 6793, December
2012. 2012.
11.2. Informative References 12.2. Informative References
[I-D.ietf-l2vpn-evpn] [I-D.ietf-l2vpn-evpn]
Sajassi, A., Aggarwal, R., Bitar, N., Isaac, A., and J. Sajassi, A., Aggarwal, R., Bitar, N., Isaac, A., and J.
Uttaro, "BGP MPLS Based Ethernet VPN", draft-ietf-l2vpn- Uttaro, "BGP MPLS Based Ethernet VPN", draft-ietf-l2vpn-
evpn-07 (work in progress), May 2014. evpn-07 (work in progress), May 2014.
[RFC7117] Aggarwal, R., Kamite, Y., Fang, L., Rekhter, Y., and C. [RFC7117] Aggarwal, R., Kamite, Y., Fang, L., Rekhter, Y., and C.
Kodeboniya, "Multicast in Virtual Private LAN Service Kodeboniya, "Multicast in Virtual Private LAN Service
(VPLS)", RFC 7117, February 2014. (VPLS)", RFC 7117, February 2014.
 End of changes. 40 change blocks. 
105 lines changed or deleted 137 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/