Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Configure BGP Neighbor Connections

 

Purpose

You must configure at least one group that includes at least one peer for BGP to run in your network. First determine which neighbors are internal or external to your local AS boundary. Internal neighbors are inside your local AS boundary. In the example network shown in BGP Network Topology, all the routers are in one AS and are therefore internal. In this example, all IBGP sessions peer between loopback addresses because significant stability advantages are gained. For more information about configuring BGP neighbor connections, see the Junos Routing Protocols Configuration Guide.

Action

To configure BGP neighbor connections, follow these steps:

  1. In configuration mode, go to the following hierarchy level:

  2. Configure the group and peer’s IP address:

    Note

    For external neighbors, use the following form of the command that includes the peer’s AS number:

  3. Configure the local address:

  4. Verify and commit the configuration:

Sample Output

Meaning

The sample output shows that router R1 is in an internal group with five BGP neighbors. The local-address statement is included in this example configuration because IBGP is used. It is considered best practice to configure a local address when you use an IBGP. BGP messages are sourced from the loopback address because the local-address statement is included in the configuration. Generally, you would not configure a local address when external BGP is configured.