Configuring BGP Sessions with a Configuration Editor

To configure the device as a node in a BGP network, you must perform the following tasks marked (Required).

For information about using the J-Web and CLI configuration editors, see the J-Web Interface User Guide and the JUNOS CLI User Guide.

Configuring Point-to-Point Peering Sessions (Required)

To enable BGP traffic across one or more links, you must configure a BGP peering session with the adjacent host. Generally, such sessions are made at network exit points with neighboring hosts outside the autonomous system. Figure 80 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 called external-peers. Peers A, B, and C reside in AS 22 and have IP addresses 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 80: Typical Network with BGP Peering Sessions

Image g015032.gif

To configure the BGP peering sessions shown in Figure 80:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
  2. Perform the configuration tasks described in Table 173.
  3. If you are finished configuring the router, commit the configuration.
  4. Go on to one of the following procedures:

Table 173: Configuring BGP Peering Sessions

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the Routing options level in the configuration hierarchy.

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Routing options, click Configure or Edit.

From the [edit] hierarchy level, enter

edit routing-options

Set the network's AS number to 17.

  1. In the AS Number box, enter 17.
  2. Click OK.

Set the AS number to 17:

set autonomous-system 17

Navigate to the Bgp level in the configuration hierarchy.

  1. On the main Configuration page next to Protocols, click Configure or Edit.
  2. Next to Bgp, click Configure or Edit.

From the [edit] hierarchy level, enter

edit protocols bgp

Create the BGP group external-peers, and add the external neighbor addresses to the group.

  1. In the Group box, click Add new entry.
  2. In the Group name box, type the name of the group of external BGP peers—external-peers in this case.
  3. In the Neighbor box, click Add new entry.
  4. In the Address box, type the IP address of an external BGP peer, in dotted decimal notation, and click OK.
  5. Repeat Step 3 and Step 4 for each BGP neighbor within the external group that you are configuring.
  1. Create the group external-peers, and add the address of an external neighbor:

    set group external-peers neighbor 10.10.10.10

  2. Repeat Step 1 for each BGP neighbor within the external peer group that you are configuring.

At the group level, set the AS number for the group external-peers to 22.

Because three of the peers in this group (peers A, B, and C) reside in one AS, you can set their AS number as a group.

  1. In the Peer as box, type the number of the AS in which most peers in the external-peers group reside.
  2. Click OK.

From the [edit protocols bgp] hierarchy level:

set group external-peers peer-as 22

At the individual neighbor level, set the AS number for peer D to 79.

Because peer D is a member of the group external-peers, it inherits the peer AS number configured at the group level. You must override this value at the individual neighbor level.

  1. Under Neighbor, in the Address column, click the IP address of peer D—10.21.7.2 in this case.
  2. In the Peer as box, type the AS number of the peer.
  3. Click OK.

From the [edit protocols bgp group external-peers] hierarchy level:

set neighbor 10.21.7.2 peer-as 79

Set the group type to external.

  1. From the Type list, select external.
  2. Click OK.

From the [edit protocols bgp group external-peers] hierarchy level:

set type external

Configuring BGP Within a Network (Required)

To configure BGP sessions between peering networks, you must configure point-to-point sessions between the external peers of the networks. Additionally, you must configure BGP internally to provide a means by which BGP route advertisements can be forwarded throughout the network. Because of the full mesh requirement of IBGP, you must configure individual peering sessions between all internal nodes of the network—unless you use route reflectors or confederations.

Figure 81 shows a typical network with external and internal peer sessions. 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 starting at 192.168.6.4.

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

Image g015033.gif

To configure IBGP in the network shown in Figure 81:

  1. Configure all external peering sessions as described in Configuring Point-to-Point Peering Sessions (Required).
  2. Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
  3. Perform the configuration tasks described in Table 174.
  4. If you are finished configuring the router, commit the configuration.
  5. Go on to one of the following procedures:

Table 174: Configuring IBGP Peering Sessions

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the Bgp level in the configuration hierarchy.

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Protocols, click Edit.
  3. Next to Bgp, click Edit.

From the [edit] hierarchy level, enter

edit protocols bgp

Create the BGP group internal-peers, and add the internal neighbor addresses to the group.

You must configure a full IBGP mesh, which requires that each peer be configured with every other internal peer as a BGP neighbor.

  1. In the Group box, click Add new entry.
  2. In the Group name box, type the name of the group of internal BGP peers—internal-peers in this case.
  3. In the Neighbor box, click Add new entry.
  4. In the Address box, type the IP address of an internal BGP peer, in dotted decimal notation.
  5. Click OK.
  6. Repeat Step 3 and Step 4 for each internal BGP peer within the network.
  1. Create the group internal-peers, and add the address of an internal neighbor:

    set group internal-peers neighbor 192.168.6.4

  2. Repeat Step 1 for each internal BGP neighbor within the network.

Set the group type to internal.

  1. From the Type list, select internal.
  2. Click OK.

From the [edit protocols bgp group internal-peers] hierarchy level:

set type internal

Configure a routing policy to advertise BGP routes.

See Injecting OSPF Routes into the BGP Routing Table (Optional).

Configuring a Route Reflector (Optional)

Because of the IBGP full-mesh requirement, most networks use route reflectors to simplify configuration. Using a route reflector, you group routers into clusters, which are identified by numeric identifiers unique to the AS. Within the cluster, you must configure a BGP session from a single router (the route reflector) to each internal peer. With this configuration, the IBGP full-mesh requirement is met.

Note: You must have an Advanced BGP Feature license installed on each device that uses a route reflector. For license details, see the JUNOS Software Administration Guide

Figure 82 shows an IBGP network with a Juniper Networks device at IP address 192.168.40.4 acting as a route reflector. In the sample network, each device in Cluster 2.3.4.5 has an internal client relationship to the route reflector. To configure the cluster:

Figure 82: Typical IBGP Network Using a Route Reflector

Image g015034.gif

To configure IBGP in the network using the Juniper Networks device as a route reflector:

  1. Configure all external peering sessions as described in Configuring Point-to-Point Peering Sessions (Required).
  2. Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
  3. Perform the configuration tasks described in Table 175.
  4. If you are finished configuring the router, commit the configuration.
  5. Go on to one of the following procedures:

Table 175: Configuring a Route Reflector

Task

J-Web Configuration Editor

CLI Configuration Editor

On the device that you are using as a route reflector, navigate to the Bgp level in the configuration hierarchy.

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Protocols, click Edit.
  3. Next to Bgp, click Edit.

From the [edit] hierarchy level, enter

edit protocols bgp

On the device that you are using as a route reflector, create the BGP group cluster-peers, and add to the group the IP addresses of the internal neighbors that you want in the cluster.

  1. In the Group box, click Add new entry.
  2. In the Group name box, type the name of the group in which the BGP peer is configured—cluster-peers in this case.
  3. In the Neighbor box, click Add new entry.
  4. In the Address box, type the IP address of a BGP peer, in dotted decimal notation.
  5. Click OK.
  6. Repeat Step 3 and Step 4 for each BGP neighbor within the cluster that you are configuring.
  1. Create the group cluster-peers, and add the address of an internal neighbor:

    set group cluster-peers neighbor 192.168.6.4

  2. Repeat Step 1 for each BGP neighbor within the cluster that you are configuring.

On the device that you are using as a route reflector, set the group type to internal.

From the Type list, select internal.

From the [edit protocols bgp group internal-peers] hierarchy level:

set type internal

On the device that you are using as a route reflector, configure the cluster identifier for the route reflector.

  1. In the Cluster box, enter the unique numeric cluster identifier.
  2. Click OK.

Set the cluster identifier:

set cluster 2.3.4.5

On the other routers in the cluster, create the BGP group cluster-peers, and add the internal IP address of the route reflector.

You do not need to include the neighbor addresses of the other internal peers, or configure the cluster identifier on these route reflector clients. They need only be configured as internal neighbors.

Note: If the other routers in the network are Juniper Networks devices, follow the steps in this row. Otherwise, consult the router documentation for instructions.

On a client device in the cluster:

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Protocols, click Edit.
  3. Next to Bgp, click Edit.
  4. In the Group box, click Add new entry.
  5. In the Group name box, type the name of the group in which the BGP peer is configured—cluster-peers in this case.
  6. In the Neighbor box, click Add new entry.
  7. In the Address box, type the IP address of the route reflector, in dotted decimal notation—in this case, 192.168.40.4.
  8. Click OK.

On a client device in the cluster:

  1. From the [edit] hierarchy level, enter

    edit protocols bgp

  2. Create the group cluster-peers, and add only the route reflector address to the group:

    set group cluster-peers neighbor 192.168.40.4

Configure a routing policy to advertise BGP routes.

See Injecting OSPF Routes into the BGP Routing Table (Optional).

Configuring BGP Confederations (Optional)

To help solve BGP scaling problems caused by the IBGP full-mesh requirement, you can divide your AS into sub-ASs called confederations. As Figure 83 shows, the connections between the sub-ASs are made through EBGP sessions, and the internal connections are made through standard IBGP sessions.

In the sample network, AS 17 has two separate confederations (sub-AS 64512 and sub-AS 64513), each of which has multiple routers. Within a sub-AS, an IGP (OSPF, for example) is used to establish network connectivity with internal peers. Between sub-ASs, an external BGP peering session is established.

Figure 83: Typical Network Using BGP Confederations

Image g015035.gif

To configure the BGP confederations shown in Figure 83:

  1. Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
  2. Perform the configuration tasks described in Table 176.
  3. If you are finished configuring the router, commit the configuration.
  4. To check the configuration, see Verifying a BGP Configuration.

Table 176: Configuring BGP Confederations

Task

J-Web Configuration Editor

CLI Configuration Editor

Navigate to the Routing options level in the configuration hierarchy.

  1. In the J-Web interface, select Configure>CLI Tools>Point and Click CLI.
  2. Next to Routing options, click Edit.

From the [edit] hierarchy level, enter

edit routing-options

Set the AS number to the sub-AS number 64512.

The sub-AS number is a unique AS number that is usually taken from the pool of private AS numbers—64512 through 65535.

  1. In the AS Number box, enter the sub-AS number.
  2. Click OK.

Set the sub-AS number:

set autonomous-system 64512

Navigate to the Confederation level in the configuration hierarchy.

  1. On the main Configuration page next to Routing options, click Edit.
  2. Next to Confederation, click Configure.

From the [edit] hierarchy level, enter

edit routing-options confederation

Set the confederation number to the AS number 17.

In the Confederation as box, enter 17.

Set the confederation AS number:

set 17

Add the sub-ASs as members of the confederation. Every sub-AS within the AS must be added as a confederation member.

  1. Next to Members, click Add new entry.
  2. In the Value box, enter the sub-ASs that are members of this confederation. Separate multiple sub-ASs with a space.

Add members to the confederation:

set 17 members 64512 64513

Using EBGP, configure the peering session between the confederations (from Router A to Router B in this example).

When setting the peer AS number for these sessions, use the sub-AS number rather than the AS number.

See Configuring Point-to-Point Peering Sessions (Required).

Using IBGP, configure internal sessions within a sub-AS. You can configure an IBGP full mesh, or you can configure a route reflector.