draft-ietf-idr-optional-transitive-01.txt   draft-ietf-idr-optional-transitive-02.txt 
Internet Engineering Task Force J. Scudder Internet Engineering Task Force J. Scudder
Internet-Draft Juniper Networks Internet-Draft Juniper Networks
Intended status: Standards Track E. Chen Intended status: Standards Track E. Chen
Expires: April 29, 2010 Cisco Systems Expires: September 27, 2010 Cisco Systems
October 26, 2009 March 26, 2010
Error Handling for Optional Transitive BGP Attributes Error Handling for Optional Transitive BGP Attributes
draft-ietf-idr-optional-transitive-01.txt draft-ietf-idr-optional-transitive-02.txt
Abstract
According to the base BGP specification, a BGP speaker that receives
an UPDATE message containing a malformed attribute is required to
reset the session over which the offending attribute was received.
This behavior is undesirable in the case of optional transitive
attributes. This document revises BGP's error-handling rules for
optional transitive attributes, and provides guidelines for the
authors of documents defining new optional transitive attributes. It
also introduces a new Path Attribute flag, Neighbor-Complete, to
allow more accurate fault-finding. Finally, it revises the error
handling procedures for several existing optional transitive
attributes.
Status of this Memo Status of this Memo
This Internet-Draft is submitted to IETF in full conformance with the This Internet-Draft is submitted to IETF in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet- other groups may also distribute working documents as Internet-
Drafts. Drafts.
skipping to change at page 1, line 33 skipping to change at page 1, line 47
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."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on April 29, 2010. This Internet-Draft will expire on September 27, 2010.
Copyright Notice Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the
Copyright (c) 2009 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 in effect on the date of Provisions Relating to IETF Documents
publication of this document (http://trustee.ietf.org/license-info). (http://trustee.ietf.org/license-info) in effect on the date of
Please review these documents carefully, as they describe your rights publication of this document. Please review these documents
and restrictions with respect to this document. carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must
Abstract include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as
According to the base BGP specification, a BGP speaker that receives described in the BSD License.
an UPDATE message containing a malformed attribute is required to
reset the session over which the offending attribute was received.
This behavior is undesirable in the case of optional transitive
attributes. This document revises BGP's error-handling rules for
optional transitive attributes, and provides guidelines for the
authors of documents defining new optional transitive attributes. It
also revises the error handling procedures for several existing
optional transitive attributes.
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 in the case of optional received. This behavior is undesirable in the case of optional
transitive attributes whose Partial bit is set; the reason is that transitive attributes whose Partial flag is set; the reason is that
such attributes may have been propagated without being checked by such attributes may have been propagated without being checked by
intermediate routers that do not recognize the attribute -- in effect intermediate routers that do not recognize the attribute -- in effect
the attributes may have been tunneled, and when they do reach a the attributes may have been tunneled, and when they do reach a
router that recognizes and checks them, the session that is reset may router that recognizes and checks them, the session that is reset may
not be associated with the router that is at fault. This document not be associated with the router that is at fault. This document
revises BGP's error-handling rules for optional transitive revises BGP's error-handling rules for optional transitive
attributes, and provides guidelines for the authors of documents attributes, and provides guidelines for the authors of documents
defining new optional transitive attributes. It also revises the defining new optional transitive attributes. It also revises the
error handling procedures for several existing optional transitive error handling procedures for several existing optional transitive
attributes. Specifically, the error handling procedures of attributes. Specifically, the error handling procedures of
[RFC4271], [RFC1997], and [RFC4360] are revised. [RFC4271], [RFC1997], and [RFC4360] are revised.
Error handling procedures are not revised if the error can be imputed Error handling procedures are not revised if the error can be imputed
to the direct neighbor. In practice, this is achieved by checking to the direct neighbor. A new flag, Neighbor-Complete, is introduced
whether the Partial bit is set -- if it is not, the original error which, when used, allows the direct neighbor's involvement to be
handling procedures remain in force. determined unequivocally. Imputation of "blame" to the direct
neighbor is achieved by checking the Partial flag and the Neighbor-
Complete flag. If the Partial flag is clear, or the Neighbor-
Complete flag is set, the original error handling procedures remain
in force.
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. Revision to Base Specification 2. Neighbor-Complete Flag Bit
It is desirable to know whether a neighbor recognizes, or does not
recognize, a given optional transitive attribute. The Partial Path
Attribute flag does not provide exactly this information -- it only
enables the determination that a given neighbor did understand such
an attribute, if the flag is set to zero. However, if the flag is
set to one all that can be concluded is that some BGP speaker in the
path did not understand the attribute, it cannot be determined
whether the speaker in question was the neighbor or some other
speaker.
To remedy this, we introduce a new Path Attribute Flag to those
defined in [RFC4271] Section 4.3. The fifth high-order bit (bit 4)
of the Attribute Flags octet is the Neighbor-Complete bit. It
indicates whether the neighbor that sent the message recognizes the
attribute (if set to one) or does not recognize it (if set to zero).
The Neighbor-Complete flag only applies to optional transitive
attributes. For other types of attributes the flag MUST be sent as
zero and ignored when received.
A BGP speaker MUST set the Neighbor-Complete flag to one when sending
a recognized, or zero when sending an unrecognized, optional
transitive path attribute to its neighbor.
The Neighbor-Complete flag is the equivalent of the Partial flag,
with two differences. First, it is reset on a hop-by-hop basis.
Second, its "polarity" is reversed, with one instead of zero
indicating that a neighbor does recognize the attribute. The reason
for this difference is that during the period while this
specification is being adopted, some BGP speakers will recognize the
Neighbor-Complete flag and some will not. Since the previous
definition [RFC4271] of bit 4 required it to be sent as zero, the use
of one to mean "attribute recognized" allows the recipient of such a
flag to unequivocally determine that a neighbor does recognize the
given attribute.
Use of the flag on receipt is discussed in Section 3.
3. Revision to Base Specification
Section 6.3 of [RFC4271] is revised as follows. The paragraphs Section 6.3 of [RFC4271] is revised as follows. The paragraphs
related to "any recognized attribute" and "an optional attribute" do related to "any recognized attribute" and "an optional attribute" do
not apply to optional transitive attributes received with their not apply to optional transitive attributes received with their
Partial bit set -- an error limited to such an attribute SHALL NOT be Partial flag set and Neighbor-Complete flag clear -- an error limited
responded to by sending a NOTIFICATION message or resetting the BGP to such an attribute SHALL NOT be responded to by sending a
session. Instead, when such an attribute is determined to be NOTIFICATION message or resetting the BGP session. Instead, when
malformed, the UPDATE message containing that attribute SHOULD be such an attribute is determined to be malformed, the UPDATE message
treated as though all contained routes had been withdrawn just as if containing that attribute SHOULD be treated as though all contained
they had been listed in the WITHDRAWN ROUTES field of the UPDATE routes had been withdrawn just as if they had been listed in the
message, thus causing them to be removed from the Adj-RIB-In WITHDRAWN ROUTES field of the UPDATE message, thus causing them to be
according to the procedures of [RFC4271]. In the case of an optional removed from the Adj-RIB-In according to the procedures of [RFC4271].
transitive attribute which has no effect on route selection or In the case of an optional transitive attribute which has no effect
installation, the malformed attribute MAY instead be discarded and on route selection or installation, the malformed attribute MAY
the UPDATE message continue to be processed. instead be discarded and the UPDATE message continue to be processed.
An example of an attribute which has no effect on route selection or An example of an attribute which has no effect on route selection or
installation is the AGGREGATOR attribute. installation is the AGGREGATOR attribute.
A document which specifies an optional transitive attribute MUST A document which specifies an optional transitive attribute MUST
provide specifics regarding what constitutes an error for that provide specifics regarding what constitutes an error for that
attribute and how that error is to be handled. attribute and how that error is to be handled.
Note that the revised error handling only applies when an individual Note that the revised error handling only applies when an individual
optional transitive attribute is received with its Partial bit set optional transitive attribute is received with its Partial flag set
and deemed to be erroneous. In the event that an UPDATE message is and Neighbor-Complete flag clear and deemed to be erroneous. In the
deemed to be malformed in any other way then the procedures of event that an UPDATE message is deemed to be malformed in any other
[RFC4271] MUST be applied. This is likewise the case if an optional way then the procedures of [RFC4271] MUST be applied. This is
transitive attribute is received whose Partial bit is not set -- this likewise the case if an optional transitive attribute is received
is because the detected error can be imputed to the direct peer. whose Partial flag is not set or whose Neighbor-Complete flag is set
-- this is because the detected error can be imputed to the direct
peer.
Examples of errors which would continue to be treated according to Examples of errors which would continue to be treated according to
the procedures of [RFC4271] include the cases where the Total the procedures of [RFC4271] include the cases where the Total
Attribute Length is inconsistent with the message length, or where Attribute Length is inconsistent with the message length, or where
there is more than one attribute with a given type code. Also, there is more than one attribute with a given type code. Also,
implicit in the foregoing paragraph is the fact that if due to an implicit in the foregoing paragraph is the fact that if due to an
error, including those in an optional transitive attribute, the other error, including those in an optional transitive attribute, the other
attributes of the UPDATE message cannot be correctly parsed, then the attributes of the UPDATE message cannot be correctly parsed, then the
procedures of [RFC4271] continue to apply. procedures of [RFC4271] continue to apply.
In the specific case of incorrect path attribute flag bits -- i.e., a In the specific case of incorrect path attribute flags -- i.e., a
path attribute that is known by its type code to be Optional and path attribute that is known by its type code to be Optional and
Transitive but whose flag bits are not set accordingly -- the Transitive but whose flags are not set accordingly -- the behavior
behavior specified by [RFC4271] SHALL be followed. (Consider that in specified by [RFC4271] SHALL be followed. (Consider that in the case
the case of such an error, the "tunneling" argument given above does of such an error, the "tunneling" argument given above does not
not apply, by definition.) apply, by definition.)
Finally, we observe that in order to treat an UPDATE as though all Finally, we observe that in order to treat an UPDATE as though all
contained routes had been withdrawn as discussed above, the NLRI contained routes had been withdrawn as discussed above, the NLRI
field and/or MP_REACH and MP_UNREACH [RFC4760] attributes need to be field and/or MP_REACH and MP_UNREACH [RFC4760] attributes need to be
successfully parsed. If this were not possible, the UPDATE would successfully parsed. If this were not possible, the UPDATE would
necessarily be malformed in some way beyond the scope of this necessarily be malformed in some way beyond the scope of this
document and therefore, the procedures of [RFC4271] would continue to document and therefore, the procedures of [RFC4271] would continue to
apply. apply.
3. Operational Considerations 4. 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 3 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.
Even if inconsistent routing does not arise, the "treat as withdraw" Even if inconsistent routing does not arise, the "treat as withdraw"
behavior can cause either complete unreachability or sub-optimal behavior can cause either complete unreachability or sub-optimal
routing for the destinations whose routes are carried in the affected routing for the destinations whose routes are carried in the affected
UPDATE message. UPDATE message.
Note that "treat as withdraw" is different from discarding an UPDATE Note that "treat as withdraw" is different from discarding an UPDATE
message. The latter violates the basic BGP principle of incremental message. The latter violates the basic BGP principle of incremental
update, and could cause invalid routes to be kept. (See also update, and could cause invalid routes to be kept. (See also
Appendix A.) Appendix A.)
For any malformed attribute which is discarded instead of the For any malformed attribute which is discarded instead of the
containing UPDATE being treated as a withdraw as discussed in containing UPDATE being treated as a withdraw as discussed in
Section 2, it is critical to consider the potential impact of doing Section 3, it is critical to consider the potential impact of doing
so. In particular, if the attribute in question has or may have an so. In particular, if the attribute in question has or may have an
effect on route selection or installation, the presumption is that effect on route selection or installation, the presumption is that
discarding it is unsafe, unless careful analysis proves otherwise. discarding it is unsafe, unless careful analysis proves otherwise.
The analysis should take into account the tradeoff between preserving The analysis should take into account the tradeoff between preserving
connectivity and potential side effects. connectivity and potential side effects.
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 malformed optional debugging facilities to permit issues caused by malformed optional
transitive attributes to be diagnosed. At a minimum, such facilities transitive attributes to be diagnosed. At a minimum, such facilities
SHOULD include logging an error when such an attribute is detected. SHOULD include logging an error when such an attribute is detected.
4. Error Handling Procedures for Existing Optional Transitive 5. Error Handling Procedures for Existing Optional Transitive
Attributes Attributes
4.1. AGGREGATOR 5.1. AGGREGATOR
The error handling of [RFC4271] is revised as follows: The error handling of [RFC4271] is 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 [RFC4893]). not advertised to, or not received from the peer [RFC4893]).
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).
If the attribute is malformed and its Partial bit is set, either the An UPDATE message with a malformed AGGREGATOR attribute SHALL be
attribute MUST be discarded or the UPDATE containing it treated as a handled as follows. If its Partial flag is set and its Neighbor-
withdraw as discussed in Section 2. If the attribute is malformed Complete flag is clear, either the attribute MUST be discarded or the
and its Partial bit is clear, the procedures of [RFC4271] MUST be UPDATE containing it treated as a withdraw as discussed in Section 3.
followed with respect to an Optional Attribute Error. Otherwise (i.e. if its Partial flag is clear or its Neighbor-Complete
flag is set), the procedures of [RFC4271] MUST be followed with
respect to an Optional Attribute Error.
4.2. Community 5.2. 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.
If the attribute is malformed and its Partial bit is set, the update An UPDATE message with a malformed Community attribute SHALL be
containing it MUST be treated as a withdraw as discussed in handled as follows. If its Partial flag is set and its Neighbor-
Section 2. If the attribute is malformed and its Partial bit is Complete flag is clear, the update containing it MUST be treated as a
clear, the procedures of [RFC4271] MUST be followed with respect to withdraw as discussed in Section 3. Otherwise (i.e. if its Partial
an Optional Attribute Error. flag is clear or its Neighbor-Complete flag is set), the procedures
of [RFC4271] MUST be followed with respect to an Optional Attribute
Error.
4.3. Extended Community 5.3. 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.
If the attribute is malformed and its Partial bit is set, the update An UPDATE message with a malformed Extended Community attribute SHALL
containing it MUST be treated as a withdraw as discussed in be handled as follows. If its Partial flag is set and its Neighbor-
Section 2. If the attribute is malformed and its Partial bit is Complete flag is clear, the update containing it MUST be treated as a
clear, the procedures of [RFC4271] MUST be followed with respect to withdraw as discussed in Section 3. Otherwise (i.e. if its Partial
an Optional Attribute Error. flag is clear or its Neighbor-Complete flag is set), the procedures
of [RFC4271] MUST be followed with respect to an Optional Attribute
Error.
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.
5. Security Considerations 6. 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.
6. Acknowledgements 7. Acknowledgements
The authors wish to thank Ron Bonica, Andy Davidson, Dong Jie, Rex The authors wish to thank Ron Bonica, Andy Davidson, Dong Jie, Rex
Fernando, Joel Halpern, Akira Kato, Miya Kohno, Alton Lo, Shin Fernando, Joel Halpern, Akira Kato, Miya Kohno, Alton Lo, Shin
Miyakawa, Jonathan Oddy, Robert Raszuk, Yakov Rekhter, Rob Shakir, Miyakawa, Jonathan Oddy, Robert Raszuk, Yakov Rekhter, Rob Shakir,
Ananth Suryanarayana, and Kaliraj Vairavakkalai for their Ananth Suryanarayana, and Kaliraj Vairavakkalai for their
observations and discussion of this topic. observations and discussion of this topic. The Neighbor-Complete
flag was introduced as the result of helpful discussion with Jie Dong
and Mach Chen.
7. IANA Considerations 8. IANA Considerations
This memo makes no request of IANA. IANA is requested to establish and maintain a registry of BGP Path
Attribute Flags. Flags one through four are defined in [RFC4271].
Flag five is defined in Section 2 of this document. Future
allocations are to be made according to the IETF Standards Action
policy [RFC5226].
8. References 9. References
8.1. Normative References 9.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.
[RFC4893] Vohra, Q. and E. Chen, "BGP Support for Four-octet AS [RFC4893] Vohra, Q. and E. Chen, "BGP Support for Four-octet AS
Number Space", RFC 4893, May 2007. Number Space", RFC 4893, May 2007.
8.2. Informative References [RFC5226] Narten, T. and H. Alvestrand, "Guidelines for Writing an
IANA Considerations Section in RFCs", BCP 26, RFC 5226,
May 2008.
9.2. Informative References
[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, "Multiprotocol Extensions for BGP-4", RFC 4760,
January 2007. January 2007.
Appendix A. Why not discard UPDATES? Appendix A. Why not discard UPDATES?
A commonly asked question is "why not simply discard the UPDATE A commonly asked question is "why not simply discard the UPDATE
message instead of treating it like a withdraw? Isn't that safer and message instead of treating it like a withdraw? Isn't that safer and
easier?" The answer is that it might be easier, but it would easier?" The answer is that it might be easier, but it would
 End of changes. 30 change blocks. 
79 lines changed or deleted 145 lines changed or added

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