peer ebgp-max-hop (BGP view)

Function

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.

Format

peer ipv4-address ebgp-max-hop [ hop-count ]

undo peer ipv4-address ebgp-max-hop

Parameters

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.

Views

BGP view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
bgp write

Usage Guidelines

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 command is used on one end of an EBGP connection, it must also be used on the other end.

GTSM and EBGP-max-hop are mutually exclusive because they both affect the TTL values in sent BGP messages. Therefore, only one of them can be used for a peer or peer group.

If the peer ebgp-max-hop command is not configured, EBGP routes can recurse only to direct routes. If the peer ebgp-max-hop command is configured, EBGP routes can recurse to other types of routes.

Example

# Allow indirectly connected EBGP peer to establish a connection with the local device.
<HUAWEI> system-view
[~HUAWEI] bgp 100
[*HUAWEI-bgp] peer 10.1.1.1 as-number 200
[*HUAWEI-bgp] peer 10.1.1.1 ebgp-max-hop
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >