# bgp enforce-first-as

#### Syntax

[ no ] bgp enforce-first-as

#### Release Information

Command introduced before JunosE Release 7.1.0.

#### Description

Forces BGP to compare the configured remote AS number of an external peer with the first AS in the AS path of routes received from the peer. If the AS numbers do not match, BGP sends the peer an error message. The no version restores the default condition, which does not perform the AS comparison.

#### Mode

Router Configuration