We have two routers (A and B) doing BGP with an ISP. We had a scheduled outage to bring down side A. We did not have a static BGP router-id setup or a loopback interface configured on A or B. We bring down side A, go through the scheduled outage, and then bring up side A. Somehow, B changed it's router-id to the IP address on A and they both had the same BGP router-id. Can somebody please explain this phenomenon? Is this a bug?
I assume once A came back up that it was unable to establish a peering session with your ISP if B is established and using the same router-ID, correct?
I believe BGP will use the IP configured with the command bgp router-id. If not that, then by the 'update-source' as described below. Or, by the highest IP on a loopback.
In your BGP config you can specify your update source interface. For example:
neighbor x.x.x.x update-source (loopback0; intx/x; etc.)
I recommend manually configuring your router-id to avoid BGP flaps & any other potential issues in the future. Hope this helps.
Cisco IOS XE Software, Version 03.16.05.S - Extended Support Release
Cisco IOS Software, ISR Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 15.5(3)S5, RELEASE SOFTWARE (fc2)