< Home

(Optional) Configuring BGP Peer Groups

Before configuring BGP peer groups, familiarize yourself with the usage scenario, complete the pre-configuration tasks, and obtain the data required for the configuration.

Context

A BGP peer group consists of BGP peers that have the same update policies and configurations.

A large-scale BGP network has a large number of peers. Configuring and maintaining these peers is difficult. To address this problem, configure a BGP peer group for BGP peers with the same configurations. Configuring BGP peer groups simplifies peer management and improves the route advertisement efficiency.

Based on the ASs where peers reside, peer groups are classified as follows:

  • IBGP peer group: The peers of an IBGP peer group are in the same AS.
  • Pure EBGP peer group: The peers of a pure EBGP peer group are in the same external AS.
  • Mixed EBGP peer group: The peers of a mixed EBGP peer group are in different external ASs.

If a function is configured on a peer and its peer group, the function configured on the peer takes precedence over that configured on the peer group. After a peer group is created, peers can be added to the peer group. If these peers are not configured separately, they will inherit the configurations of the peer group. If a peer in a peer group has a specific configuration requirement, the peer can be configured separately. The configuration of this peer will override the configuration inherited by the peer from the peer group.

Procedure

  • Create IBGP peer groups.
    1. Access the system view.

      system-view

    2. Access the BGP view.

      bgp { as-number-plain | as-number-dot }

    3. Create an IBGP peer group.

      group group-name internal

    4. Add a peer to the peer group.

      peer ipv4-address group group-name

      You can repeat step 4 to add multiple peers to the peer group. If the local device has not established a peer relationship with this peer, the device will attempt to establish a peer relationship with this peer, and set the AS number of this peer to the AS number of the peer group.

      When creating an IBGP peer group, you do not need to specify the AS number.

      After configuring a peer group, you can configure BGP functions for the peer group. By default, all peers in a peer group inherit the entire configuration of the peer group. The inherited configuration can be overridden if you directly configure commands for the peer.

  • Create pure EBGP peer groups.
    1. Access the system view.

      system-view

    2. Access the BGP view.

      bgp { as-number-plain | as-number-dot }

    3. Create a pure EBGP peer group.

      group group-name external

    4. Set an AS number for the EBGP peer group.

      peer group-name as-number { as-number-plain | as-number-dot }

      If peers already exist in a peer group, you can neither change the AS number of the peer group nor delete the AS number of the peer group by using the undo peer as-number command.

    5. Add a peer to the peer group.

      peer ipv4-address group group-name

      You can repeat step 5 to add multiple peers to the peer group. If the local device has not established a peer relationship with this peer, the device will attempt to establish a peer relationship with this peer, and set the AS number of this peer to the AS number of the peer group.

      After configuring a peer group, you can configure BGP functions for the peer group. By default, all peers in a peer group inherit the entire configuration of the peer group. The inherited configuration can be overridden if you directly configure commands for the peer.

  • Create mixed EBGP peer groups.
    1. Access the system view.

      system-view

    2. Access the BGP view.

      bgp { as-number-plain | as-number-dot }

    3. Create a mixed EBGP peer group.

      group group-name external

    4. Create a peer and set an AS number for this peer.

      peer ipv4-address as-number { as-number-plain | as-number-dot }

    5. Add the peer to the peer group.

      peer ipv4-address group group-name

      You can repeat Steps 4 and 5 to add multiple peers to the peer group.

      You need to specify an AS number for each peer in a mixed EBGP peer group.

      After configuring a peer group, you can configure BGP functions for the peer group. By default, all peers in a peer group inherit the entire configuration of the peer group. The inherited configuration can be overridden if you directly configure commands for the peer.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic