Usage Scenario
Running the peer connect-interface command to establish multiple peer relationships between two devices by using multiple links is recommended.
If the physical interface has multiple IP addresses, the parameter ipv6-source-address is must in the command peer connect-interface.
Prerequisites
Peer relationships have been established using the peer as-number command.
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:
If the specified interface borrows the IP address of another interface and then the IP address of the specified interface is changed, BGP still uses the borrowed IP address to keep the connection if no connection reestablishment is triggered, and data receiving and sending is not affected; if connection reestablishment is triggered, BGP uses the new IP address to reestablish the connection.