peer ebgp-max-hop
Use peer ebgp-max-hop to enable BGP to establish an EBGP session to an indirectly connected peer or peer group and specify the maximum hop count.
Use undo peer ebgp-max-hop to disable BGP to establish an EBGP session to an indirectly connected peer or peer group.
Syntax
peer { group-name | ipv6-address [ prefix-length ] } ebgp-max-hop [ hop-count ]
undo peer { group-name | ipv6-address [ prefix-length ] } ebgp-max-hop
Default
BGP does not establish an EBGP session to an indirectly connected peer or peer group.
Views
BGP instance view
BGP-VPN instance view
Predefined user roles
network-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.
mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, BGP establishes EBGP sessions to all indirectly connected dynamic peers in the subnet.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet in this command, BGP establishes EBGP sessions to all indirectly connected dynamic peers in the subnet.
hop-count: Specifies the maximum number of hop counts, in the range of 1 to 255. The default is 64.
Usage guidelines
To become EBGP peers, two routers must be directly connected and use directly connected interfaces to establish an EBGP session. If they are not directly connected, use the peer ebgp-max-hop command to establish an EBGP session over multiple hops between two peers.
This command takes effect only on routes received after you execute this command. To apply this command to existing routes, use the refresh bgp command to soft-reset BGP sessions.
When the BGP GTSM feature is enabled, two peers can establish an EBGP session after passing GTSM check, regardless of whether the maximum number of hops is reached.
Examples
# In BGP instance view, enable BGP to establish EBGP sessions to indirectly connected EBGP peer group test, and set the maximum hop count to 64 (default).
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp-default] peer test ebgp-max-hop
Related commands
peer ttl-security