Tutorial: Setting the Community attribute

"Community" is an optional BGP attribute that can be used to identify prefixes and collect them into logical groups. Inbound and outbound policies can be applied to these groups. It is possible to specify multiple communities for a single prefix.

In addition to the well-known communities NO-ADVERTISE, GRACEFUL-SHUTDOWN or NO-EXPORT, the meaning of a community can be freely defined by the provider. So for example, the provider of AS "64500" specifies that customer routes with the community "64500:200" are to be treated with preference "200", and routes with the community "64500:90" are to be treated with the preference "90".

The following example shows how the community "64500:200" is added to all outbound routes.

  1. Add a new community under Routing protocols > BGP > BGP policy > Communities (overrides).




    Give the community a descriptive name.

    Under Add enter the value "64500:200" for the community attribute. This value adds the device to the community attribute of the outbound NLRI.

  2. Under Routing protocols > BGP > Actions add a new action.




    Give the action a descriptive name.

    Under Communities you select the community you created previously.

  3. Add a new filter under Routing protocols > BGP > BGP policy > Filters.




    Give the filter a descriptive name.

    Under Address family you select the protocol used for connections to the BGP neighbors. With the setting "Permit" in the field Policy you specify that the device should modify the outbound NLRI. Under Action you select the action you created previously.

  4. Under Routing protocols > BGP > Neighbors you add a new entry for a BGP neighbor.




    Give the neighbor a descriptive name and configure its IP address along with the number of the remote AS where it is located.

    If you have not created a dedicated neighbor profile for this BGP neighbor, use the "Default" profile.

    Under Outbound policy you select the filter you created previously.

  5. To check the configuration, open a terminal connection to the device.

    The command show bgp-policy Filter_2 displays the current setting for the policy "Filter_2".

    > show bgp-policy Filter_2
    Traverse chain "Filter_2"
       Inspect filter of priority 0
          Match IPv4 routes
          Execute action "Action_2"
             No AS-path override configured
             No basic override configured
             Apply community override "Community_set"
                Add community 64500:200
          Permit route
    > _

www.lancom-systems.com

LANCOM Systems GmbH | A Rohde & Schwarz Company | Adenauerstr. 20/B2 | 52146 Wuerselen | Germany | E‑Mail info@lancom.de

LANCOM Logo