I was doing couple of tests on BGP protocol today between two EBGP peers and monitoring the BGP trace file I enabled on my Junos box during which I have seen the following NOTIFICATION being sent by one of the peers.
GW2 rpd: bgp_pp_recv:3217: NOTIFICATION sent to 18.104.22.168+59825 (proto):
code 6 (Cease) subcode 7 (Connection collision resolution),
Reason: dropping 22.214.171.124+59825 (proto), connection collision prefers 126.96.36.199
(External AS 8600)
I don’t recall of having seen this BGP NOTIFICATION before actually. Looking at RC4271 reveals why this occurs.
6.8. BGP Connection Collision Detection
If a pair of BGP speakers try to establish a BGP connection with each
other simultaneously, then two parallel connections well be formed.
If the source IP address used by one of these connections is the same
as the destination IP address used by the other, and the destination
IP address used by the first connection is the same as the source IP
address used by the other, connection collision has occurred. In the
event of connection collision, one of the connections MUST be closed.
Based on the value of the BGP Identifier, a convention is established
for detecting which BGP connection is to be preserved when a
collision occurs. The convention is to compare the BGP Identifiers
of the peers involved in the collision and to retain only the
connection initiated by the BGP speaker with the higher-valued BGP
To prevent further race conditions like this from happening in the future, apparently setting the option “passive” for one of the peer allows us not to initiate BGP connection from both peers but only from active side.