peer ebgp-max-hop

Function

The peer ebgp-max-hop command configures BGP to set up the EBGP connection with the peer on an indirect network.

The undo peer ebgp-max-hop command cancels the existing configuration.

By default, the EBGP connection is set up only on the direct physical links.

Format

peer { group-name | ipv4-address | ipv6-address | ipv6-address } ebgp-max-hop [ hop-count ]

undo peer { group-name | ipv4-address | ipv6-address } ebgp-max-hop

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. -
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.
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

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.

Prerequisites

The peer as-number command has been used to create a peer or peer group.

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.

Example

# configure BGP to set up the connection with the EBGP peer 1.1.1.2 on the indirect network.

<sysname> system-view
[sysname] bgp 100 
[sysname-bgp] peer 1.1.1.2 as-number 200
[sysname-bgp] peer 1.1.1.2 ebgp-max-hop

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