The peer ebgp-max-hop command configures a BGP device to establish an EBGP peer relationship with a peer on an indirectly-connected network and set the maximum number of hops between the two devices.
The undo peer ebgp-max-hop command cancels the existing configuration.
By default, an EBGP connection can be set up only on a directly-connected physical link.
Parameter | Description | Value |
---|---|---|
ipv4-address |
Specifies the IPv4 address of a peer. |
The value is in dotted decimal notation. |
hop-count |
Specifies the maximum number of hops. |
The value is an integer ranging from 1 to 255. By default, the maximum number of hops in an EBGP connection is 1. If the specified maximum number of hops is 1, EBGP connection cannot be established between non-directly connected devices. If hop-count is not specified in the peer ebgp-max-hop command, 255 is used as the maximum number of hops in EBGP connections. |
Usage Scenario
A directly-connected physical link must be available between EBGP peers. Otherwise, the peer ebgp-max-hop command must be used to allow EBGP peers to establish a TCP connection over multiple hops.
If loopback interfaces are used to establish an EBGP peer relationship, the peer ebgp-max-hop command (hop-count ≥ 2) must be run; otherwise, the peer relationship cannot be established.Precautions
If the peer ebgp-max-hop command is used on one end of an EBGP connection, it must also be used on the other end.
The configurations of GTSM and EBGP-MAX-HOP affect the TTL values of sent BGP packets, and the configurations of the two functions are mutually exclusive.<HUAWEI> system-view [~HUAWEI] ip vpn-instance vpn1 [*HUAWEI-vpn-instance-vpn1] ipv4-family [*HUAWEI-vpn-instance-vpn1-af-ipv4] route-distinguisher 100:1 [*HUAWEI-vpn-instance-vpn1-af-ipv4] quit [*HUAWEI-vpn-instance-vpn1] quit [*HUAWEI] bgp 100 [*HUAWEI-bgp] ipv4-family vpn-instance vpn1 [*HUAWEI-bgp-vpn1] peer 10.1.1.1 as-number 200 [*HUAWEI-bgp-vpn1] peer 10.1.1.1 ebgp-max-hop