peer connect-interface (BGP)

Function

The peer connect-interface command specifies the source interface through which the BGP packets are sent, and the source address with which the BGP connection is established.

The undo peer connect-interface command restores the default setting.

By default, the outbound interface of packets is used as the source interface of BGP packets by BGP.

Format

peer { group-name | ipv4-address | ipv6-address } connect-interface interface-type interface-number [ ipv4-source-address | ipv6-source-address ]

undo peer { group-name | ipv4-address | ipv6-address } connect-interface

Parameters

Parameter Description Value
group-name Specifies the name of the peer group. The name is a string of 1 to 47 characters without any space. It is case-sensitive.
ipv4-address Specifies the IPv4 address of the peer. -
ipv6-address Specifies the IPv6 address of the peer. -
interface-type interface-number Specifies the type and the number of the interface. -
ipv4-source-address Specifies source IPv4 address used in the establishment of a connection. -
ipv6-source-address Specifies source IPv6 address used in the establishment of a connection. -
NOTE:
  • ipv4-address is valid only in the BGP view and BGP-VPN instance IPv4 address family view.

  • ipv6-address is valid only in the BGP view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

It is recommended to use the peer connect-interface command to set up peers between two routers through multiple links.

Configuration Impact

Running the peer connect-interface command causes the teardown and re-establishment of peer relationships.

NOTE:

Because the BGP peer relationships in various address families on the same device share one TCP connection, connect-interface configured in the BGP view can be inherited in either the IPv4 unicast address family or the VPNv4 address family.

Precautions

To enable a device to send BGP packets even if its physical interface fails, you can configure the device to use a loopback interface as the source interface of the BGP packets. When configure a device to use a loopback interface as the source interface of BGP packets, note the following points:

  • The loopback interface of the device's BGP peer must be reachable.

  • In the case of an EBGP connection, the peer ebgp-max-hop command needs to be run to enable the two devices to establish an indirect peer relationship.

NOTE:

When loopback interfaces are used to establish a BGP connection, you are recommended to run the peer connect-interface command at both ends of the connection to ensure that the connection is correctly established. If this command is run on only one end, the BGP connection may fail to be established.

Example

# Specify the source interface and source address of the BGP packets.

<sysname> system-view
[sysname] bgp 100 
[sysname-bgp] peer 10.16.2.3 as-number 1100 
[sysname-bgp] peer 10.16.2.3 connect-interface loopback0
Related Topics
peer ebgp-max-hop

Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.