OSPF-BGP Association
Definition
When a new device is deployed in a network or a device is restarted, network traffic may be lost during BGP convergence. This is because IGP convergence is faster than BGP convergence.
This problem can be solved through the synchronization between OSPF and BGP.
Purpose
If a backup link exists, during traffic switchback, BGP traffic is lost because BGP route convergence is slower than OSPF route convergence.
As shown in Figure 5-20, Router A, Router B, Router C, and Router D run OSPF and establish IBGP connections. Router C functions as the backup of Router B. When the network is stable, BGP and OSPF routes converge completely on the device.
Normally, traffic from Router A to 10.3.1.0/30 passes through Router B. When Router B becomes faulty, traffic is switched to Router C. After Router B recovers, traffic is switched back to Router B. During this process, packet loss occurs.
This is because when traffic is switched back to Router B, IGP (OSPF) route convergence is faster than BGP route convergence. Consequently, convergence of OSPF routes is already complete when BGP route convergence is still going on. As a result, Router B does not know the route to 10.3.1.0/30.
Therefore, when packets from Router A to 10.3.1.0/30 arrive at Router B, they are discarded because Router B does not have the route to 10.3.1.0/30.
Implementation
A device enabled with OSPF-BGP association remains as a stub router within the configured synchronization period. That is, the link cost in the LSA advertised by the device is set to the maximum value of 65535. Therefore, the device instructs other OSPF devices not to use it for data forwarding.
As shown in Figure 5-20, OSPF-BGP association is enabled on Router B. In this situation, before BGP route convergence is complete, Router A continues to use the backup link passing through Router C instead of forwarding traffic to Router B until BGP route convergence on Router B is complete.