Example: Configuring BGP Point-to-Point Peer Sessions

This example shows how to configure BGP Point-to-Point peer sessions.

Requirements

Before you begin:

  1. Configure network interfaces. See the Junos OS Interfaces Configuration Guide for Security Devices.
  2. Configure security filters. See the Junos OS Security Configuration Guide.
  3. Configure a routing policy to advertise the BGP routes.

Overview

Figure 1 shows a network with BGP peering sessions. In the sample network, a device in AS 17 has BGP peering sessions to a group of peers as external-peers. Peers A, B, and C reside in AS 22 and have IP addresses as 10.10.10.10, 10.10.10.11, and 10.10.10.12. Peer D resides in AS 79, at IP address 10.21.7.2.

Figure 27: Typical Network with BGP Peering Sessions

Image g015032.gif

Configuration

CLI Quick Configuration

To quickly configure the BGP Point-to-Point Peering Sessions, copy the following commands and paste them into the CLI:

[edit]set routing-options autonomous-system 17set protocols bgp group external-peers neighbor 10.10.10.10 set protocols bgp group external-peers neighbor 10.10.10.11set protocols bgp group external-peers neighbor 10.10.10.12set protocols bgp group external-peers peer-as 22 set protocols bgp group external-peers neighbor 10.21.7.2 peer-as 79 set protocols bgp group external-peers type external

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode.

To configure the BGP peering sessions:

  1. Create a routing options.
    [edit]user@host# edit routing-options
  2. Set the AS number.
    [edit routing-options]user@host# set autonomous-system 17
  3. Configure BGP.
    [edit]user@host# edit protocols bgp
  4. Create the BGP group and add the external neighbor address.
    [edit protocols bgp]user@host# set group external-peers neighbor 10.10.10.10

    Note: Repeat Step 4 for each BGP neighbor (10.10.10.11 and 10.10.10.12) within the external peer group that you are configuring.

  5. Set the AS number at the group level.
    [edit protocols bgp]user@host# set group external-peers peer-as 22
  6. Set the AS number at the individual neighbor level.
    [edit protocols bgp group external-peers]user@host# set neighbor 10.21.7.2 peer-as 79
  7. Set the group type.
    [edit protocols bgp group external-peers]user@host# set type external

Results

From configuration mode, confirm your configuration by entering the show protocols bgp command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

[edit]user@host# show protocols bgpgroup external-peers {peer-as 22;neighbor 10.10.10.10;neighbor 10.10.10.11;neighbor 10.10.10.12;neighbor 10.27.7.2 {peer-as 79; }}

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

Verifying a BGP Configuration

To confirm that the configuration is working properly, perform these tasks:

Verifying BGP Neighbors

Purpose

Verify that BGP is running on configured interfaces and that the BGP session is active for each neighbor address.

Action

From operational mode, enter the show bgp neighbor command.

Verifying BGP Groups

Purpose

Verify that the BGP groups are configured correctly.

Action

From operational mode, enter the show bgp group command.

Verifying BGP Summary Information

Purpose

Verify that the BGP configuration is correct.

Action

From operational mode, enter the show bgp summary command.

Related Topics