No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

Configuration Guide - IP Routing 01

NE05E and NE08E V300R003C10SPC500

This is NE05E and NE08E V300R003C10SPC500 Configuration Guide - IP Routing
Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Configuring BGP Community Attributes

Configuring BGP Community Attributes

Community attributes simplify routing policy management.

Usage Scenario

Community attributes are used to simplify routing policy application and facilitate network maintenance. They allow a group of BGP devices in different ASs to share the same routing policies. Before advertising a route with the community attribute to peers, a BGP device can change the original community attribute of this route. Community attributes are route attributes, which are transmitted between BGP peers, and the transmission is not restricted within an AS.

Pre-configuration Tasks

Before configuring BGP community attributes, configure basic BGP functions.

Configuration Procedures

Figure 10-7 Configuring BGP community attributes

Configuring a Community Attribute-Related Routing Policy

A routing policy that references a community attribute needs to be configured before the community attribute is advertised.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run route-policy route-policy-name { permit | deny } node node

    A node is configured for a routing policy, and the view of the routing policy is displayed.

  3. (Optional) Configure filtering conditions (if-match clauses) for a routing policy.

    Community attributes can be added only to the routes that match the policy, and the community attributes of only the routes that match the policy can be modified.

    For configuration details, see (Optional) Configuring if-match Clauses.

  4. Configure community or extended community attributes for BGP routes.

    • Run apply community { { community-number | aa:nn } &<1-32> | internet | no-advertise | no-export | no-export-subconfed }* [ additive ]

      Community attributes are configured for BGP routes.

    • Run apply extcommunity { rt { as-number:nn | ipv4-address:nn } } &<1-16> [ additive ]

      VPN-Target extended community attributes are configured for BGP routes.

    • Run apply extcommunity soo { site-of-origin } &<1-16> additive

      Site-of-Origin (SoO) extended community attributes are configured for BGP routes.

  5. Run commit

    The configuration is committed.

Configuring Community Attribute Advertisement

A community attribute referenced by a routing policy takes effect only after the community is advertised.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run bgp as-number

    The BGP view is displayed.

  3. Run ipv4-family unicast

    The IPv4 unicast address family view is displayed.

  4. Run peer { ipv4-address | group-name } route-policy route-policy-name export

    An export routing policy is configured.

    NOTE:

    When configuring a BGP community, use a routing policy to define the community attribute, and advertise routes based on the routing policy.

    For details about routing policy configurations, see the chapter "Routing Policy Configuration."

  5. Run one of the following commands as required to advertise community attributes to a specified peer or peer group.

    • To advertise a standard community attribute to a specified peer or peer group, run peer { ipv4-address | group-name } advertise-community

      By default, a device does not advertise community attributes to its peers or peer groups.

    • To advertise an extended community attribute to a specified peer or peer group, run peer { ipv4-address | group-name } advertise-ext-community

      By default, a device does not advertise extended community attributes to its peers or peer groups.
      NOTE:

      After the peer advertise-ext-community command is enabled, BGP sends the routes with extended community attributes to its peer or peer group. If the peer or peer group does not want to receive the extended community attributes, you can configure the peer discard-ext-community command on the peer or peer group to discard the extended community attribute from the received routing information.

  6. Run commit

    The configuration is committed.

Verifying the BGP Community Attribute Configuration

After configuring BGP community attributes, verify the configured BGP community attributes.

Prerequisites

A BGP community attribute has been configured.

Procedure

  • Run the display bgp routing-table network [ mask | mask-length ] command to check information about BGP routes.
  • Run the display bgp routing-table community [ community-number | aa:nn ] &<1-29> [ internet | no-advertise | no-export | no-export-subconfed ] * [ whole-match ] command to check information about the routes carrying specified BGP community attributes.

Example

# Run the display bgp routing-table community command to view the routes carrying specified BGP community attributes.

<HUAWEI> display bgp routing-table community
 BGP Local router ID is 1.1.1.2
 Status codes: * - valid, > - best, d - damped, x - best external, a - add path,
               h - history,  i - internal, s - suppressed, S - Stale
               Origin : i - IGP, e - EGP, ? - incomplete
 RPKI validation codes: V - valid, I - invalid, N - not-found
      Network            NextHop        MED        LocPrf    PrefVal Community
 *    1.1.1.0/24         1.1.1.1         0                     0      no-export
 *    1.1.1.2/32         1.1.1.1         0                     0      no-export
*>   192.168.10.0       10.2.1.2         0                     0      no-export-subconfed
*>   192.168.15.0       10.2.1.2         0                     0      internet
*>   192.168.18.0       10.2.1.2         0                     0      no-advertise
Translation
Download
Updated: 2019-01-14

Document ID: EDOC1100058916

Views: 35555

Downloads: 53

Average rating:
This Document Applies to these Products
Related Version
Related Documents
Share
Previous Next