Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Example: Configuring BGP Large Communities

This example shows you to configure optional transitive path attribute - a 12-byte BGP large community that provides the most significant 4-byte value to encode autonomous system number as the global administrator and the remaining two 4-byte assigned numbers to encode the local values as defined in RFC 8092. You can configure BGP large community at [edit policy-options community community-name members] and [edit routing-options static route ip-address community] hierarchy levels. The BGP large community attributes format has four fields: large:global administrator:assigned number:assigned number.

Requirements

This example uses the following hardware and software components:

  • Three MX Series routers

  • Junos OS Release 17.3 or later running on all devices

No special configuration beyond device initialization is required before configuring this example.

Overview

In this example, Device R1 and Device R2 are OSPF neighbors in autonomous system (AS) 64510. Device R3 has an external BGP (EBGP) connection to Device R1. Device R2 has customer networks in the 172.16/16 address space, simulated with addresses on its loopback interface (lo0). Device R1 has static routes to several 172.16.x/24 networks, and attaches regular community values to these routes. Device R1 then uses an export policy to advertise the routes to Device R3. Device R3 receives these routes and uses an import policy to add large community values to the routes.

Topology

Figure 1 shows the sample network.

Configuration

CLI Quick Configuration

To quickly configure this example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, and then copy and paste the commands into the CLI at the [edit] hierarchy level.

Device R1

Device R2

Device R3

Procedure

Step-by-Step Procedure

The following example requires that you navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Use the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.

To configure Device R3:

  1. Configure the interfaces.

  2. Configure the autonomous system (AS) number and router ID.

  3. Configure the EBGP connection to Device R1.

  4. Configure the policy that adds large community values to the routes received from Device R1.

    A large community uses a notation of large:global administrator:assigned number:assigned number. The specific community values can be anything that accomplishes your administrative goals, within certain parameters.

Results

From configuration mode, confirm your configuration by entering the show interfaces, show protocols, show policy-options, and show routing-options commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

If you are done configuring the device, enter commit from configuration mode.

Verification

Confirm that the configuration is working properly.

Verifying R1

Purpose

On Device R1, check the 172.16. routes in the routing table.

Action

Meaning

The output shows that the regular community and large community values are attached to the routes.

Note:

The communities are attached to static routes, thus demonstrating that both regular and large communities can be attached to static routes.

Verifying R3

Purpose

On Device R3, check the 172.16. routes in the routing table.

Action

Meaning

The output shows that the advertised regular and large community values remain attached to the routes, and that the new large community values are added when received by R3.