< Home

peer route-limit

Function

The peer route-limit command sets the maximum number of routes that can be received from a peer.

The undo peer route-limit command restores the default setting.

By default, there is no limit on the number of routes that can be received from a peer.

Format

peer { group-name | ipv4-address | ipv6-address } route-limit limit [ percentage ] [ alert-only | idle-forever | idle-timeout minutes ]

undo peer { group-name | ipv4-address | ipv6-address } route-limit

Parameters

Parameter Description Value
group-name Specifies the name of a peer group. The name is a string of 1 to 47 case-sensitive characters, with spaces not supported. When double quotation marks are used around the string, spaces are allowed in the string.
ipv4-address Specifies the IPv4 address of a peer. It is in dotted decimal notation.
ipv6-address Specifies the IPv6 address of a peer. The value is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X.
limit Specifies the maximum number of routes that can be received from a peer. -
percentage Specifies the percentage of received routes when the switch starts to generate alarms. The value is an integer that ranges from 1 to 100. The default value is 75.
alert-only Indicates that if the number of received routes exceeds the limit, an alarm will be generated and no additional routes will be accepted. -
idle-forever Indicates that after the number of routes exceeds the limit, no connection is established automatically until the reset bgp command is run. -
idle-timeout minutes Specifies the value of the timeout timer. The connection, which is closed because the number of routes exceeds the threshold, is automatically reestablished after the timeout timer expires. Before the timer expires, the reset bgp command can be used to re-establish a connection. The value is an integer that ranges from 1 to 1200, in minutes.
  • ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP L2VPN-AD address family, BGP-L2VPN address family view, BGP-VPLS address family view, BGP-IPv6 unicast address family view, and BGP-VPNv6 address family view.

  • ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.

Views

BGP view, BGP-IPv4 unicast address family view, BGP-IPv4 multicast address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view, BGP-IPv6 unicast address family view, BGP-VPN instance IPv6 address family view, BGP-VPNv6 address family view, BGP L2VPN-AD address family view, BGP-L2VPN address family view, BGP-VPLS address family view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The peer route-limit command is used to set the maximum number of routes that a BGP switch is allowed to receive from its peer. This provides a mechanism for controlling the routes received from peers in addition to distribution lists, filtering lists, and route mappings.

If a peer relationship between two devices is in the Established state, the following situations occur:
  • If the number of routes received by the switch exceeds the upper limit and the peer route-limit command is used for the first time, the switch and its peer re-establish the peer relationship, regardless of whether alert-only is set.

  • If the upper limit set on the switch is increased to be greater than the number of received routes, the switch sends Refresh packets to receive routes again. If the switch does not support the route-refresh capability, the switch needs to re-establish the connection with its peer.

  • If the upper limit set on the switch is reduced but is still greater than the number of received routes, only configuration parameters need to be modified.

Prerequisites

Peer relationships have been established using the peer as-number command.

Precautions

If the peer route-limit command is run for a peer group, the peers of the peer group inherit the configuration.

If the peer relationship is in the Idle state because the number of received routes exceeds the upper limit and idle-forever or idle-timeout is set, the reset bgp command can be used to re-establish the peer relationship.

Assume that none of alert-only, idle-forever, and idle-timeout is configured. If the number of routes exceeds the upper limit, an alarm is generated and recorded in the log. Then, the peer relationship is disconnected. The devices try to re-establish the peer relationship after 30 seconds.

Example

# Set the maximum number of routes that can be received from a peer to 5000.
<HUAWEI> system-view
[HUAWEI] bgp 100
[HUAWEI-bgp] peer 10.1.1.2 as-number 200
[HUAWEI-bgp] ipv4-family unicast
[HUAWEI-bgp-af-ipv4] peer 10.1.1.2 route-limit 5000
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >