The routing-table limit command sets the maximum number of routes that the current VPN instance address family supports.
The undo routing-table limit command restores the maximum number of routes that the current VPN instance address family can support to the default setting.
By default, there is no limit on the maximum number of routes that the current VPN instance address family can support, but the total number of private network and public network routes on a device cannot exceed the allowed maximum number of unicast routes.
Parameter | Description | Value |
---|---|---|
number | Specifies the maximum number of routes supported by a VPN instance. | The value is an integer, and the minimum value is 1. The maximum number is determined by the license file. |
alert-percent | Specifies the percentage of the maximum number of routes. When the maximum number of routes that join the VPN instance is up to the value (number*alert-percent)/100, the system prompts alarms. The VPN routes can be still added to the routing table, but after the number of routes reaches number, the subsequent routes are dropped. | An integer ranging from 1 to 100. |
simply-alert | Indicates that when VPN routes exceed number, routes can still be added into the routing table, but the system prompts alarms. However, after the total number of VPN routes and network public routes reaches the unicast route limit specified in the License, the subsequent VPN routes are dropped. | - |
VPN instance view, VPN instance IPv4 address family view or VPN instance IPv6 address family view
Usage Scenario
If many useless routes imported into a VPN instance constitute a large proportion of the routes on a device, run the routing-table limit command to set a limit on the maximum number of routes supported by the VPN instance. After the routing-table limit command is run in the current VPN instance address family, if the number of routes of the VPN instance reaches the set limit, the system will generate an alarm to instruct the user to check the validity of routes of the VPN instance.
The routing-table limit command enables the system to display a message when the number of routes added to the routing table of the VPN instance IPv6 address family exceeds the limit. If you run the routing-table limit command to increase the maximum number of routes in the VPN instance IPv6 address family or run the undo routing-table limit command to cancel the limit, the system adds the excess routes to the VPN IP routing table.
Prerequisites
Precautions
Using the routing-table limit command prevents the routing table of the current VPN instance address family on a PE from importing too many routes, but cannot prevent the PE from importing excessive routes from other PEs. Therefore, configuring both the routing-table limit and peer route-limit commands is recommended.
Do not run both the routing-table limit (the command restricts the number of routes) and prefix limit (the command restricts the number of route prefixes) commands in the current VPN instance address family. Configure either one of them based on your need.
If the remote cross routes learned using MP-IBGP and the BGP routes learned from CEs failed to be added to the routing table, the system automatically refreshes the routing table to add these routes.
# Configure the maximum number of routes for the IPv4 address family of the VPN instance named vpn1 to 1000, and when VPN routes exceed 1000, routes can still be added into the routing table, but the system prompts alarms.
<HUAWEI> system-view [HUAWEI] ip vpn-instance vpn1 [HUAWEI-vpn-instance-vpn1] ipv4-family [HUAWEI-vpn-instance-vpn1-af-ipv4] route-distinguisher 100:1 [HUAWEI-vpn-instance-vpn1-af-ipv4] routing-table limit 1000 simply-alert