A route limit sets an upper limit for the number of paths and prefixes installed in routing tables. You can, for example, use a route limit to limit the number of routes received from the CE router in a VPN. A route limit applies only to dynamic routing protocols, not to static or interface routes.
To configure a route limit on route paths, include the maximum-paths statement:
- maximum-paths path-limit <log-only
| threshold value log-interval seconds>;
To configure a route limit on route prefixes, include the maximum-prefixes statement:
- maximum-prefixes prefix-limit <log-only
| threshold value log-interval seconds>;
For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.
Specify the log-only option to generate warning messages only (an advisory limit). Specify the threshold option to generate warnings before the limit is reached. Specify the log-interval option to configure the minimum time interval between log messages.
There are two modes for route limits: advisory and mandatory. An advisory limit triggers warnings. A mandatory limit rejects additional routes after the limit is reached.
![]() |
Note: Application of a route limit may result in unpredictable dynamic routing protocol behavior. For example, when the limit is reached and routes are rejected, BGP may not reinstall the rejected routes after the number of routes drops back below the limit. BGP sessions may need to be cleared. |
For more information about configuring VPNs, see the JUNOS VPNs Configuration Guide.