configure bgp maximum-as-path-length

configure bgp maximum-as-path-length max-as-path


This command adds support for filtering BGP (Border Gateway Protocol) updates based on a specified maximum autonomous system path (AS-path) length. This support is on a per BGP instance basis (not per neighbor).

Syntax Description

maximum-as-path-length Specifies setting the AS path length.
max-as-path Value specifying the AS path length.

A value of 0 indicates no AS-path limit.

Range is 1 to 1,500.



Usage Guidelines

It can be desirable to protect the router against BGP updates with excessively long AS-paths to ensure memory is not exhausted. Any BGP updates that exceed this user-defined limit are dropped. This setting does not affect existing routes.


The following example sets the AS-path to 500.

configure bgp maximum-as-path-length 500


This command was first available in ExtremeXOS 21.1.

Platform Availability

This command is available on the Summit X450-G2, X460-G2, X670-G2, X770, and ExtremeSwitching X440-G2, X620, X690, X870 series switches.