Example: Configuring BGP Confederations

This example shows how to configure BGP confederations.

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 peering sessions. See Example: Configuring BGP Point-to-Point Peer Sessions.
  4. Configure IBGP sessions between peers. See Example: Configuring Internal BGP Peering Sessions.
  5. Configure a routing policy to advertise the BGP routes.

Overview

In this example you configure BGP confederations. BGP confederation is another way to solve the scaling problems created by the BGP full mesh requirement. BGP confederations effectively break up a large autonomous system (AS) into subautonomous systems. Each sub-AS must be uniquely identified within the confederation AS by a sub-AS number. Typically, sub-AS numbers are taken from the private AS numbers between 64,512 and 65,535. Within a sub-AS, the same internal BGP (IBGP) full mesh requirement exists. Connections to other confederations are made with standard external BGP (EBGP), and peers outside the sub-AS are treated as external. To avoid routing loops, a sub-AS uses a confederation sequence, which operates like an AS path but uses only the privately assigned sub-AS numbers.

Figure 1 shows a sample network in which 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 is used to establish network connectivity with internal peers. Between sub-ASs, an external BGP peering session is established.

Figure 34: Typical Network Using BGP Confederations

Image g015035.gif

Configuration

CLI Quick Configuration

To quickly configure BGP confederations, copy the following commands and paste them into the CLI:

[edit]set routing-options autonomous-system 64512set routing-options confederation 17 members 64512 set routing-options confederation 17 members 64513

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 the Using the CLI Editor in Configuration Mode.

To configure BGP confederations:

  1. Configure the routing options.
    [edit]user@host# edit routing-options
  2. Set the AS number.
    [edit routing-options]user@host# set autonomous-system 64512
  3. Define confederation.
    [edit routing-options]user@host# edit confederation
  4. Set the confederation number.
    [edit routing-options confederation]user@host# set 17
  5. Add the sub-ASs as members of the confederation.
    [edit routing-options confederation]user@host# set 17 members 64512user@host# set 17 members 64513

Results

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

[edit]user@host# show routing-options confederation17 members [ 64512 64513 ];

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


user@host> show bgp neighbor
Peer: 10.255.245.12+179 AS 35  Local: 10.255.245.13+2884 AS 35
  Type: Internal    State: Established  (route reflector client)Flags: Sync
  Last State: OpenConfirm   Last Event: RecvKeepAlive
  Last Error: None
  Options: Preference LocalAddress HoldTime Cluster AddressFamily Rib-group Refresh
  Address families configured: inet-vpn-unicast inet-labeled-unicast
  Local Address: 10.255.245.13 Holdtime: 90 Preference: 170
  Flags for NLRI inet-vpn-unicast: AggregateLabel
  Flags for NLRI inet-labeled-unicast: AggregateLabel
  Number of flaps: 0
  Peer ID: 10.255.245.12    Local ID: 10.255.245.13    Active Holdtime: 90
  Keepalive Interval: 30
  NLRI advertised by peer: inet-vpn-unicast inet-labeled-unicast
  NLRI for this session: inet-vpn-unicast inet-labeled-unicast
  Peer supports Refresh capability (2)
Restart time configured on the peer: 300
  Stale routes from peer are kept for: 60
  Restart time requested by this peer: 300
  NLRI that peer supports restart for: inet-unicast inet6-unicast
  NLRI that restart is negotiated for: inet-unicast inet6-unicast
  NLRI of received end-of-rib markers: inet-unicast inet6-unicast
  NLRI of all end-of-rib markers sent: inet-unicast inet6-unicast
  Table inet.0 Bit: 10000
    RIB State: restart is complete
    Send state: in sync
    Active prefixes: 4
    Received prefixes: 6
    Suppressed due to damping: 0
  Table inet6.0 Bit: 20000
    RIB State: restart is complete
    Send state: in sync
    Active prefixes: 0
    Received prefixes: 2
    Suppressed due to damping: 0
  Last traffic (seconds): Received 3    Sent 3    Checked 3
  Input messages:  Total 9      Updates 6       Refreshes 0     Octets 403
  Output messages: Total 7      Updates 3       Refreshes 0     Octets 365
  Output Queue[0]: 0
  Output Queue[1]: 0
  Trace options: detail packets
  Trace file: /var/log/bgpgr size 131072 files 10

Meaning

The output shows a list of the BGP neighbors with detailed session information. Verify the following information:

Related Topics

Verifying BGP Groups

Purpose

Verify that the BGP groups are configured correctly.


user@host>show bgp group
Group Type: Internal    AS: 10045       Local AS: 10045
  Name: pe-to-asbr2                                     Flags: Export Eval
  Export: [ match-all ]
  Total peers: 1        Established: 1
  10.0.0.4+179
  bgp.l3vpn.0: 1/1/0
  vpn-green.inet.0: 1/1/0

Groups: 1   Peers: 1    External: 0    Internal: 1    Down peers: 0   Flaps: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
bgp.l3vpn.0            1          1          0          0          0          0

Action

From operational mode, enter the show bgp group command.

Meaning

The output shows a list of the BGP groups with detailed group information. Verify the following information:

Related Topics

Verifying BGP Summary Information

Purpose

Verify that the BGP configuration is correct.

Action

From operational mode, enter the show bgp summary command.


user@host> show bgp summary
Groups: 1 Peers: 3 Down peers: 0
Table          Tot Paths  Act Paths Suppressed    History Damp State    Pending
inet.0                 6          4          0          0          0          0
Peer               AS      InPkt     OutPkt    OutQ   Flaps Last Up/Dwn State|#Active/Received/Damped...
10.0.0.2        65002      88675      88652       0       2       42:38 2/4/0                0/0/0
10.0.0.3        65002      54528      54532       0       1     2w4d22h 0/0/0                0/0/0
10.0.0.4        65002      51597      51584       0       0     2w3d22h 2/2/0                0/0/0

Meaning

The output shows a summary of BGP session information. Verify the following information:

Related Topics

Verifying Reachability of All Peers in a BGP Network

Purpose

By using the ping tool on each peer address in the network, verify that all peers in the network are reachable from each device.

Action

For each device in the BGP network:

  1. In the J-Web interface, select Troubleshoot>Ping Host.
  2. In the Remote Host box, type the name of a host for which you want to verify reachability from the device.
  3. Click Start. Output appears on a separate page.
PING 10.10.10.10 : 56 data bytes
64 bytes from 10.10.10.10: icmp_seq=0 ttl=255 time=0.382 ms
64 bytes from 10.10.10.10: icmp_seq=1 ttl=255 time=0.266 ms

Meaning

If a host is active, it generates an ICMP response. If this response is received, the round-trip time is listed in the time field.

Related Topics

Related Topics