< Home

peer listen-only

Function

The peer listen-only command configures a peer or peer group only to listen to the connection request but not send connection requests initiatively any more.

The undo peer listen-only command cancels the function.

By default, a peer or peer group sends and listens to the connection requests.

Format

peer { group-name | ipv4-address | ipv6-address } listen-only

undo peer { group-name | ipv4-address | ipv6-address } listen-only

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. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of the peer. The address is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
  • 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

The peer listen-only command is used to configure a peer or peer group to only listen to connection requests and not to initiatively send connection requests.

Prerequisites

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

Configuration Impact

After being configured with the peer listen-only command, a peer does not initiate any connection request.

Precautions

After the peer listen-only command is run on a device, the session between the device and its peer is torn down. After the device's peer sends a connection request, the device re-establishes the connection. This configuration can prevent conflicts of connection requests.

The peer listen-only command can be run at only one end of a peer relationship. If this command is run at both ends of a peer relationship, the ends fail to establish a connection.

Example

# Configure the peer with the IP address as 1.1.1.1 to listen to the connection request instead of sending connection requests.

<sysname> system-view
[sysname] bgp 100
[sysname-bgp] peer 1.1.1.1 as-number 100
[sysname-bgp] peer 1.1.1.1 listen-only
Warning: Changing the parameter in this command resets the peer session. Continue?(Y/N):y
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >