When four-byte autonomous system number (ASN) functionality is enabled, a device announces and negotiates "AS4" capability with its neighbors.
The neighbor AS4 capability configuration takes precedence. If AS4 capability is not configured on the neighbor, then the peer group configuration takes effect. The global configuration is used if AS4 capability is not configured at the neighbor level and the peer group level.
Peering is not established when a device with a 4-byte ASN tries to connect to a device that does not have AS4 support.