Example: Configuring Internal BGP Peering Sessions

This example shows how to configure internal BGP 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 point-to-point peer sessions. See Example: Configuring BGP Point-to-Point Peer Sessions.

Overview

In this example you configure internal BGP peer sessions. Connections between peering networks are typically made through an exterior gateway protocol (EGP), most commonly BGP. BGP is an EGP used primarily to establish point-to-point connections and transmit data between peer autonomous systems. Unlike RIP and OSPF links, BGP peering sessions must be explicitly configured at both ends. BGP must explicitly advertise the routes between its peers. The route advertisements determine prefix reachability and the way packets are routed between BGP neighbors. Because BGP uses the packet path to determine route selection, it is considered a path-vector protocol.

In the sample network, the device in AS 17 is fully meshed with its internal peers in the group internal-peers, which have IP addresses as 192.168.6.4, 192.168.6.5, 192.168.6.6, 192.168.6.7 and 192.168.40.4.

Figure 1 shows a typical network with external and internal peer sessions.

Figure 28: Typical Network with EBGP External Sessions and IBGP Internal Sessions

Image g015033.gif

Configuration

CLI Quick Configuration

To quickly configure internal BGP peering sessions, copy the following commands and paste them into the CLI:

[edit]set protocols bgp group internal-peers neighbor 192.168.6.4set protocols bgp group internal-peers neighbor 192.168.6.5 set protocols bgp group internal-peers neighbor 192.168.6.6 set protocols bgp group internal-peers neighbor 192.168.6.7set protocols bgp group internal-peers neighbor 192.168.40.4set protocols bgp group internal-peers type internal

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 internal BGP peer sessions:

  1. Configure BGP.
    [edit]user@host# edit protocols bgp
  2. Create the BGP group.
    [edit protocols bgp]user@host# set group internal-peers
  3. Add the internal neighbor address.
    [edit protocols bgp]user@host# set neighbor 192.168.6.4

    Note: Repeat Step 2 for each internal BGP neighbor (192.168.6.5, 192.168.6.6, 192.168.6.7, and 192.168.40.4) within the network.

  4. Set the group type.
    [edit protocols bgp]user@host# set type internal

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 internal-peers {type internal;neighbor 192.168.6.4;neighbor 192.168.6.5;neighbor 192.168.6.6;neighbor 192.168.6.7;neighbor 192.168.40.4;}

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

Verification

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 the operational mode, enter the show bgp neighbor command.

Verifying BGP Groups

Purpose

Verify that the BGP groups are configured correctly.

Action

From the operational mode, enter the show bgp group command.

Verifying BGP Summary Information

Purpose

Verify that the BGP configuration is correct.

Action

From the operational mode, enter the show bgp summary command.

Related Topics