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).
- Configuring Point-to-Point Peering Sessions (Required)
- Configuring BGP Within a Network (Required)
- Configuring a Route Reflector (Optional)
- Configuring BGP Confederations (Optional)
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
To configure the BGP peering sessions shown in Figure 80:
- Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
- Perform the configuration tasks described in Table 173.
- If you are finished configuring the router, commit the configuration.
- Go on to one of the following procedures:
- To configure IBGP sessions between peers, see Configuring BGP Within a Network (Required).
- To configure route reflector clusters, see Configuring a Route Reflector (Optional).
- To subdivide autonomous systems (ASs), see Configuring BGP Confederations (Optional).
- To check the configuration, see Verifying a BGP Configuration.
Table 173: Configuring BGP Peering Sessions
Task | J-Web Configuration Editor | CLI Configuration Editor |
---|---|---|
Navigate to the Routing options level in the configuration hierarchy. |
| From the [edit] hierarchy level, enter edit routing-options |
Set the network's AS number to 17. |
| Set the AS number to 17: set autonomous-system 17 |
Navigate to the Bgp level in the configuration hierarchy. |
| From the [edit] hierarchy level, enter edit protocols bgp |
Create the BGP group external-peers, and add the external neighbor addresses to the group. |
|
|
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. |
| 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. |
| 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. |
| 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
To configure IBGP in the network shown in Figure 81:
- Configure all external peering sessions as described in Configuring Point-to-Point Peering Sessions (Required).
- Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
- Perform the configuration tasks described in Table 174.
- If you are finished configuring the router, commit the configuration.
- Go on to one of the following procedures:
- To configure route reflector clusters, see Configuring a Route Reflector (Optional).
- To subdivide autonomous systems (ASs), see Configuring BGP Confederations (Optional).
- To check the configuration, see Verifying a BGP Configuration.
Table 174: Configuring IBGP Peering Sessions
Task | J-Web Configuration Editor | CLI Configuration Editor |
---|---|---|
Navigate to the Bgp level in the configuration hierarchy. |
| 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. |
|
|
Set the group type to internal. |
| 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:
- Create an internal group on the Juniper Networks device, configure an internal peer (neighbor) relationship to every other device in the cluster, and assign a cluster identifier.
- On the other devices you are assigning to the cluster, create the cluster group and configure a client relationship to the route reflector.
Figure 82: Typical IBGP Network Using a Route Reflector
To configure IBGP in the network using the Juniper Networks device as a route reflector:
- Configure all external peering sessions as described in Configuring Point-to-Point Peering Sessions (Required).
- Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
- Perform the configuration tasks described in Table 175.
- If you are finished configuring the router, commit the configuration.
- Go on to one of the following procedures:
- To subdivide autonomous systems (ASs), see Configuring BGP Confederations (Optional).
- To check the configuration, see Verifying a BGP Configuration.
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. |
| 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. |
|
|
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. |
| 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:
| On a client device in the cluster:
|
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
To configure the BGP confederations shown in Figure 83:
- Navigate to the top of the configuration hierarchy in either the J-Web or CLI configuration editor.
- Perform the configuration tasks described in Table 176.
- If you are finished configuring the router, commit the configuration.
- 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. |
| 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. |
| Set the sub-AS number: set autonomous-system 64512 |
Navigate to the Confederation level in the configuration hierarchy. |
| 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. |
| 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. | ||
Using IBGP, configure internal sessions within a sub-AS. You can configure an IBGP full mesh, or you can configure a route reflector. |
|