< Home

(Optional) Configuring a BGP Peer Group

Context

A large BGP network has a large number of peers. It is difficult to configure and maintain these peers. You can add the BGP peers with the same configurations to a BGP peer group and then configure the BGP peers in batches. This simplifies peer management and improves route advertisement efficiency.

  • 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.
  • When loopback interface addresses are used to establish a BGP connection, you are advised to perform step 6 on the both ends of the BGP connection simultaneously to ensure the correct establishment of the connection. If step 6 is performed on only one end, the BGP connection may fail to be established.

  • When loopback interfaces are used to establish an EBGP connection, step 7 is required and hop-count in the peer ebgp-max-hop command must be greater than or equal to 2. Otherwise, the EBGP connection cannot be established.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run bgp { as-number-plain | as-number-dot }

    The BGP view is displayed.

  3. Run group group-name [ external | internal ]

    A BGP peer group is created.

    The AS number of an IBGP peer group is the local AS number. Therefore, step 4 is not required.

  4. Run peer group-name as-number { as-number-plain | as-number-dot }

    An AS number is configured for the EBGP peer group.

    To add an EBGP peer to a peer group, configure the EBGP peer according to Configuring BGP Peers and then perform step 5.

    To add an IBGP peer to a peer group, perform step 5. The system creates an IBGP peer in the BGP view and sets its AS number as the AS number of the peer group.

  5. Run peer { ipv4-address | ipv6-address } group group-name

    A peer is added to the peer group.

    You can repeat step 5 to add multiple peers to a peer group.

  6. (Optional) Run peer group-name connect-interface interface-type interface-number [ ipv4-source-address ] or peer group-name connect-interface interface-type interface-number [ ipv6-source-address ]

    A source interface and a source IP address are specified for the peer to establish a TCP connection.

    By default, the outbound interface of a BGP packet serves as the source interface of a BGP packet.

    The configurations of GTSM and EBGP-MAX-HOP affect the TTL values of BGP packets, which may cause a conflict between TTL values. Therefore, you can configure only one of the two functions for a peer or peer group.

  7. (Optional) Run peer group-name ebgp-max-hop [ hop-count ]

    The maximum number of hops allowed for the establishment of an EBGP connection is set.

    By default, the maximum number of hops allowed for an EBGP connection is 1. That is, an EBGP connection must be established on a directly connected physical link.

    If a one-hop EBGP peer relationship is established using loopback interface addresses, you can also run the peer connected-check-ignore command to establish an EBGP peer relationship.

  8. (Optional) Run peer group-name description description-text

    The description is configured for the peer group.

    If you want to configure an IPv4 peer group in the BGP-IPv4 unicast address family view, skip steps 9, 10, and 11. To configure a BGP peer group in another address family view, perform steps 9, 10, and 11.

  9. Enter the required address family view based on the actual network. The following example uses the BGP-IPv6 unicast address family view.

    Run ipv6-family [ unicast ]

    The BGP-IPv6 unicast address family view is displayed.

  10. Run peer group-name enable

    The switch is enabled to exchange routing information with the specified peer or peer group in the address family view.

  11. Run peer { ipv4-address | ipv6-address } group group-name

    The specified peer is added to the peer group.

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