home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / rfc / 1900s / rfc1998.txt < prev    next >
Text File  |  1996-08-26  |  17KB  |  508 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                            E. Chen
  8. Request for Comments: 1998                                           MCI
  9. Category: Informational                                         T. Bates
  10.                                                            cisco Systems
  11.                                                              August 1996
  12.  
  13.  
  14.              An Application of the BGP Community Attribute
  15.                          in Multi-home Routing
  16.  
  17.  
  18. Status of This Memo
  19.  
  20.    This memo provides information for the Internet community.  This memo
  21.    does not specify an Internet standard of any kind.  Distribution of
  22.    this memo is unlimited.
  23.  
  24. Abstract
  25.  
  26.    This document presents an application of the BGP community attribute
  27.    [2] in simplifying the implementation and configuration of routing
  28.    policies in the multi-provider Internet. It shows how the community
  29.    based configuration can be used to replace the AS-based customization
  30.    of the BGP "LOCAL_PREF" attribute, a common method used today.  Not
  31.    only does the technique presented simplifies configuration and
  32.    management at the provider level, it also represents a paradigm shift
  33.    in that it gives the potential for the customer to control its own
  34.    routing policy with respect to its service provider, as well as
  35.    providing the ability for policy configuration to be done at a prefix
  36.    based granularity rather than the more common AS based granularity.
  37.  
  38. 1. Introduction
  39.  
  40.    In the multi-provider Internet, it is common for a service subscriber
  41.    (i.e., customer) to have more than one service provider, or to have
  42.    arrangements for redundant connectivity to the global connected
  43.    Internet. As discussed in [3], routing strategies in these cases
  44.    usually require coordination between the service subscriber and its
  45.    providers, which typically leads to customization of router
  46.    configurations (e.g., BGP "LOCAL_PREF") not only by the subscriber,
  47.    but also by its providers.  Due to the large number of customers a
  48.    provider serves, customization of router configurations at the
  49.    provider level may present management and scalability problems.
  50.  
  51.    This document presents an application of the BGP community attribute
  52.    in simplifying the implementation of routing strategies in the
  53.    multi-provider Internet.  More specifically, the technique presented
  54.    uses a community-based, rather than the common AS-based,
  55.  
  56.  
  57.  
  58. Chen & Bates                 Informational                      [Page 1]
  59.  
  60. RFC 1998                    Use of Community                 August 1996
  61.  
  62.  
  63.    configuration of the BGP "LOCAL_PREF". It essentially removes the
  64.    need for customized configuration of the BGP "LOCAL_PREF" attribute
  65.    at the provider level while maintaining the same level of routing
  66.    functionality and flexibility.
  67.  
  68.    It also represents a paradigm shift in that it gives the potential
  69.    for the customer to control its own routing policy with respect to
  70.    its service provider, as well as providing the ability for policy
  71.    configuration to be done at a prefix based granularity rather than
  72.    the more common AS based granularity in use today.
  73.  
  74. 2. AS-based Configuration and its Drawbacks
  75.  
  76.    As discussed in [3], in today's multi-provider Internet, customized
  77.    configuration of the BGP "LOCAL_PREF" attribute is often required to
  78.    implement common routing strategies such as load-sharing or backup.
  79.    There are two main reasons:
  80.  
  81.      o Lack of available implementations and deployment of routing
  82.        software that supports the "Destination Preference Attribute"
  83.        (DPA) as specified in [4].
  84.  
  85.        DPA allows one to specify a globally transitive preference so
  86.        that return traffic favors certain path. As discussed in [3],
  87.        the attribute will be very useful in influencing route selection
  88.        for routes with identical "LOCAL_PREF" and equal AS-path length.
  89.  
  90.      o In the multi-provider Internet, it is common for a provider
  91.        to assign higher BGP "LOCAL_PREF" values for routes from its
  92.        customers than from other service providers. This practice
  93.        provides some degree of protection for its customer routes,
  94.        and it facilitates implementation of certain routing
  95.        strategies.  It, however, also complicates other routing
  96.        implementations such as backup arrangement, thus, requiring
  97.        customized "LOCAL_PREF" configuration.
  98.  
  99.    Figure 1 shows a typical case of a backup arrangement in the multi-
  100.    provider Internet. In Figure 1, AS1 and AS2 are both providers, and
  101.    AS3 and AS4 are customers of AS1 and AS2, respectively. AS3 has
  102.    entered a bilateral agreement with AS4 to provide backup to each
  103.    other.  That is, AS3 would use its direct link to AS4 to reach only
  104.    AS4 in the normal circumstance, and for transit in the case of a
  105.    failure between AS3 and AS1.  To realize this routing agreement, AS3
  106.    requests that its provider AS1 adjust its BGP "LOCAL_PREF"
  107.    configuration so that AS1 reaches AS4 via AS2.
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Chen & Bates                 Informational                      [Page 2]
  115.  
  116. RFC 1998                    Use of Community                 August 1996
  117.  
  118.  
  119.                           +------+      +------+
  120.                           | AS1  |------| AS2  |
  121.                           +------+      +------+
  122.                              |             |
  123.                           +------+      +------+
  124.                           | AS3  |------|  AS4 |
  125.                           +------+      +------+
  126.  
  127.                      Figure 1: Typical Backup Scenario
  128.  
  129.  
  130.    Primarily due to scalability and management concerns, most providers
  131.    only perform "LOCAL_PREF" customization based on ASs, not on IP
  132.    prefixes.  If IP prefix-based "LOCAL_PREF" configuration is needed, a
  133.    technique known as as the BGP AS-path manipulation can be used.
  134.    However, it is currently only available in certain vendor's products.
  135.  
  136.    There are several drawbacks with the the practice of AS-based BGP
  137.    "LOCAL_PREF" configuration at the provider level:
  138.  
  139.       o The implementation tends to less efficient due to the process
  140.         of coordination and configuration.  More importantly, the
  141.         process needs to be repeated each time a change (e.g., adding
  142.         a new AS) occurs.
  143.  
  144.       o The AS-based customization complicates router configuration
  145.         and increases complexity of network operation. It has become
  146.         a serious scalability issue for providers.
  147.  
  148.       o It can not implement prefix-based configuration without the
  149.         AS-path manipulation (i.e., using fake AS).
  150.  
  151.       o Keeping configuration up-to-date is some times problematic.
  152.  
  153. 3. How the BGP Community Attribute Can Help
  154.  
  155. 3.1 Overview of the Community Attribute
  156.  
  157.    The BGP community path attribute is an optional transitive attribute
  158.    of variable length [1,2]. The attribute consists of a set of four
  159.    octet values, each of which specify a community.  The community
  160.    attribute values are encoded using an AS number in the first two
  161.    octets, with the remaining two octets defined by the AS. As defined
  162.    in [2], a community is a group of destinations (i.e. prefixes) that
  163.    share some common attribute.  Each destination can belong to multiple
  164.    communities.  All prefixes with the community attribute belong to the
  165.    communities listed in the attribute.
  166.  
  167.  
  168.  
  169.  
  170. Chen & Bates                 Informational                      [Page 3]
  171.  
  172. RFC 1998                    Use of Community                 August 1996
  173.  
  174.  
  175.    The BGP community  allows one to group a set of prefixes and perform
  176.    routing decisions based on the identity of the group.
  177.  
  178.    The well-known communities NO_EXPORT (0xFFFFFF01) and NO_ADVERTISE
  179.    (0xFFFFFF02) are intuitive,  and can be used for optimizing routing
  180.    and for improving route aggregation.
  181.  
  182. 3.2 Community-based Configuration
  183.  
  184.    With the BGP community attribute [2], a provider can now use
  185.    community-based, rather than AS-based, configuration of BGP
  186.    "LOCAL_PREF".  The provider first needs to coordinate with its
  187.    customers a set of communities to be mapped to certain BGP
  188.    "LOCAL_PREF" values.  The provider can then apply a uniform BGP
  189.    configuration to all its customers that would capture routes with the
  190.    community values, and set up the appropriate BGP "LOCAL_PREF" values
  191.    accordingly.  A customer that requires customization in its provider
  192.    BGP "LOCAL_PREF" configuration can simply send the appropriate
  193.    community values in its routing announcements.
  194.  
  195.    The major advantages of using this technique include:
  196.  
  197.       o The customer has full control in the process, which makes a
  198.         lot of sense as the customer is in a position to have better
  199.         understanding about its own topology and routing policy
  200.         requirement.
  201.  
  202.       o The effect of route-based customization in BGP "LOCAL_PREF"
  203.         configuration by providers can now be achieved, thus, removing
  204.         the need of AS-Path manipulation in certain cases.
  205.  
  206.       o It addresses the scalability issue facing providers as it
  207.         distributes the configuration work to the customer that
  208.         requires customization.
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Chen & Bates                 Informational                      [Page 4]
  227.  
  228. RFC 1998                    Use of Community                 August 1996
  229.  
  230.  
  231. 4. A Real-World Implementation Example
  232.  
  233.    MCI currently makes heavy use of the BGP "LOCAL_PREF" attribute value
  234.    as part of its routing policy configuration process.  Different BGP
  235.    "LOCAL_PREF" values are assigned for routes from different sources.
  236.    Table 1 details these values:
  237.  
  238.  
  239.                   +-------------------------+------------+
  240.                   |        Category         | LOCAL_PREF |
  241.                   +-------------------------+------------+
  242.                   |Customer Routes          |        100 |
  243.                   |Customer backup Routes   |         90 |
  244.                   |Other ISP Routes         |         80 |
  245.                   |Customer-Provided backup |         70 |
  246.                   +-------------------------+------------+
  247.  
  248.                     Table 1: Defined LOCAL_PREF Values
  249.  
  250.  
  251.    Note:
  252.  
  253.        o The value '100' is the default value used within our network
  254.          configuration.
  255.  
  256.        o In most cases, the MED attribute set by a customer is
  257.          sufficient for customer backup routes (e.g., T1 backs up T3).
  258.          However, in certain cases configuration of "LOCAL_PREF" will
  259.          still be necessary until the BGP DPA attribute is available.
  260.  
  261.  
  262.    To make use of the BGP community attribute, several community values
  263.    (MCI's AS number: 3561 = 0x0DE9) have been defined that can be used
  264.    by customers to tag routes so that the appropriate "LOCAL_PREF"
  265.    values are configured. Table 2 lists the appropriate community
  266.    attribute values (and the mappings of community to LOCAL_PREF):
  267.  
  268.                     +---------------------+------------+
  269.                     |     community       | LOCAL_PREF |
  270.                     +---------------------+------------+
  271.                     |3561:70 (0x0DE90046) |         70 |
  272.                     |3561:80 (0x0DE90050) |         80 |
  273.                     |3561:90 (0x0DE9005A) |         90 |
  274.                     +---------------------+------------+
  275.  
  276.                  Table 2: Community to LOCAL_PREF Mapping
  277.  
  278.  
  279.  
  280.  
  281.  
  282. Chen & Bates                 Informational                      [Page 5]
  283.  
  284. RFC 1998                    Use of Community                 August 1996
  285.  
  286.  
  287.    A customer requiring MCI to configure BGP "LOCAL_PREF" values other
  288.    than the default can tag their routes with the defined communities.
  289.    The community values can be configured either based on an AS path
  290.    list or an IP address access list. A cisco systems software specific
  291.    configuration example is given in Appendix A to show how this can be
  292.    achieved.
  293.  
  294.    A uniform BGP configuration (see Appendix B, again cisco systems
  295.    software specific) is applied by MCI to peers with customers that
  296.    configure the appropriate "LOCAL_PREF" values based on the
  297.    communities received.
  298.  
  299.    This technique has been tested and is in use with several customers,
  300.    and the response has been very positive. We are in the process of
  301.    migrating all other customized BGP "LOCAL_PREF" configurations to
  302.    this uniform community based configuration approach.
  303.  
  304. 5. References
  305.  
  306.    [1] Rekhter, Y., and Li, T., "A Border Gateway Protocol 4 (BGP-4)",
  307.        RFC 1771, March 1995.
  308.  
  309.    [2] Chandra, R., Traina, P., and T. Li, "BGP Communities
  310.        Attribute", RFC 1997, August 1996.
  311.  
  312.    [3] Chen, E., and T. Bates, "Current Practice of Implementing
  313.        Symmetric Routing and Load Sharing in the Multi-Provider
  314.        Internet", Work in Progress.
  315.  
  316.    [4] Chen, E., and T. Bates, "Destination Preference Attribute for
  317.        BGP", Work in Progress.
  318.  
  319.    [5] Chen, E., and T. Bates, "Application of the BGP Destination
  320.        Preference Attribute in Implementing Symmetric Routing",
  321.        Work in Progress.
  322.  
  323.    [6] cisco systems, cisco IOS Software Version 10.3 Router Products
  324.        Configuration Guide (Addendum), May 1995.
  325.  
  326. 6. Security Considerations
  327.  
  328.    Security issues are not discussed in this memo.
  329.  
  330. 7. Acknowledgments
  331.  
  332.    The authors would specifically like to thank Ravi Chandra, Tony Li
  333.    and Paul Traina of cisco systems for devising and implementing the
  334.    community attribute.
  335.  
  336.  
  337.  
  338. Chen & Bates                 Informational                      [Page 6]
  339.  
  340. RFC 1998                    Use of Community                 August 1996
  341.  
  342.  
  343. 8. Authors' Addresses
  344.  
  345.    Enke Chen
  346.    MCI
  347.    2100 Reston Parkway
  348.    Reston, VA 22091
  349.  
  350.    Phone: +1 703 715 7087
  351.    EMail: enke@mci.net
  352.  
  353.  
  354.    Tony Bates
  355.    cisco Systems
  356.    170 West Tasman Drive
  357.    San Jose, CA 95134
  358.  
  359.    Phone: +1 408 527 2470
  360.    EMail: tbates@cisco.com
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Chen & Bates                 Informational                      [Page 7]
  395.  
  396. RFC 1998                    Use of Community                 August 1996
  397.  
  398.  
  399. Appendix
  400.  
  401.    These appendices list cisco systems software specific configuration
  402.    examples for configuring communities, and for uniform route-map
  403.    definition that sets up the appropriate "LOCAL_PREF" values based on
  404.    the corresponding community values. These examples are given purely
  405.    to show a working example of how the desired effect discussed in this
  406.    document can be achieved. Please refer to [6] for more specific
  407.    information on cisco configuration and syntax.
  408.  
  409. Appendix A. Community Configuration
  410.  
  411.    The community values can be configured either based upon an AS path
  412.    list or based an IP address access list. Here is an example that
  413.    includes both cases:
  414.  
  415.    !!
  416.    router bgp xxxx
  417.    neighbor x.x.x.x remote-as 3561
  418.    neighbor x.x.x.x filter-list 20 out
  419.    neighbor x.x.x.x route-map config-community out
  420.    neighbor x.x.x.x send-community
  421.    !
  422.    !!# match all
  423.    ip as-path access-list 1 permit .*
  424.    !
  425.    !!# list of customer ASs
  426.    ip as-path access-list 20 permit ^$
  427.    ip as-path access-list 20 permit ^64700_
  428.    ip as-path access-list 20 deny .*
  429.    !
  430.    !!# AS path based matching, backup for another ISPs customer
  431.    ip as-path access-list 40 permit _64710_
  432.    ip as-path access-list 40 permit _64711_
  433.    ip as-path access-list 40 deny .*
  434.    !
  435.    !!# route-map
  436.    route-map config-community permit 10
  437.    match as-path 40
  438.    set community 0x0DE90046
  439.    route-map config-community permit 20
  440.    match as-path 1
  441.    !
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450. Chen & Bates                 Informational                      [Page 8]
  451.  
  452. RFC 1998                    Use of Community                 August 1996
  453.  
  454.  
  455.    Note: The community can also be configured based on IP prefixes
  456.    instead of AS numbers.  For example,
  457.  
  458.    !
  459.    access-list 101 permit ip 192.160.154.0 0.0.0.0 255.255.255.0 0.0.0.0
  460.    !
  461.    route-map config-community permit 10
  462.    match ip address 101
  463.    set community 0x0DE90046
  464.    route-map config-community permit 20
  465.    match as-path 1
  466.    !
  467.  
  468. Appendix B. Uniform Route-map Configuration
  469.  
  470.    Here is the uniform route-map that can be used for all BGP
  471.    customers:
  472.  
  473.    !!# routes primary via another ISP
  474.    ip community-list 70 permit 0x0DE90046
  475.    ip community-list 70 deny
  476.    !
  477.    !!# routes also homed to another ISP, but with DPA or
  478.    !!# AS-path length as the tie-breaker
  479.    ip community-list 80 permit 0x0DE90050
  480.    ip community-list 80 deny
  481.    !
  482.    !!# customer backup routes
  483.    ip community-list 90 permit 0x0DE9005A
  484.    ip community-list 90 deny
  485.    !
  486.    !!# the route-map applied to BGP customers
  487.    route-map set-customer-local-pref permit 10
  488.    match community 70
  489.    set local-preference 70
  490.    route-map set-customer-local-pref permit 20
  491.    match community 80
  492.    set local-preference 80
  493.    route-map set-customer-local-pref permit 30
  494.    match community 90
  495.    set local-preference 90
  496.    route-map set-customer-local-pref permit 40
  497.    match as-path 1
  498.    set local-preference 100
  499.    !
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Chen & Bates                 Informational                      [Page 9]
  507.  
  508.