Home / Network / Routing / I-BGP synchronization with IGP

I-BGP synchronization with IGP

By definition, the BGP synchronization rule requires that when a BGP router receives information about a network from an I-BGP neighbor, it does not use this information until a matching route : static or dynamic : learned via an IGP (Interior Routing Protocol like OSPF, that uses the default routing table (vrf0 or GRT, Global routing table), exists in the default routing table.

Why is this helpful? to get control of the effective forwarding of packets based on the routing information received by BGP, for example, to prevent loops or blackholes: we make sure that routing information received by BGP is resolvable using the routing information in the local (default) routing and forwarding router tables to the next destination that is directly connected or multihop from the source…

Deep in… and network setup

Let’s deep into it and ask ourselves, what does it mean a “matching route” in this statement? Same prefix? Next-hop? Etc. What do you mean exactly by “does not use that information”? In global routing table? Advertising the route (information) to peers?

Let’s work on the setup, shown in fig. 1. We run this IOS version: 7200 Software (C7200-ADVENTERPRISEK9-M), Version 15.3(3)XB12, RELEASE SOFTWARE (fc2). Our test network is a 3 domains BGP network (100, 200 and 500) : R2 belongs to AS 200; R5 to AS 500; R1 and R4 to AS 100. R1 and R2 are E-BGP neighbors (belonging to different (by IDes) ASes or autonomous systems), same for R4 and R5. R1 and R4 have established two I-BGP sessions over two logical links: one passing by tunnel0, and the other on the directly connected interface.

In this network, we check that:

Route Rt1 (owned and advertised by R1) is learned in BGP Loc-RIB in R4 BGP routing table;

Route Rt1 is installed in RIB router default routing table in R4;

BGP synchronization is disabled on R4;

Route Rt1 is advertised by R4 to R5;

Route Rt5 is installed in R4.

We enable synchronization (causes an automatic reset of peerings) and check that route Rt1 is marked as “not synchronized” in Loc-RIB, not installed in RIB and consequently, not advertised to R5.

Route Rt5 that is learnt on E-BGP peering to R5, is not impacted by the change… we confirm that this synchronisation rule does apply only to I-BGP neighborships with big I.

First case using static routes…

In this section, we try to fix this synchronisation issue by configuring a static route.

We get route Rt1 synchronized by configuring a static route with an exact match of the destination (same subnet mask) and any valid nexthop or resolvable intermediate address to a valid nexthop.

Changing the number of intermediate addresses does not affect the result.

We get a “RIB-failure(17) – next-hop mismatch” information.

Using a different subnet mask is not working…

Static routes by default have an administrative distance of 1. By changing the administrative distance to any greater value than 200 (iBGP admin distance), we get:

BUT, two BGP routes are still installed in the routing table!

Rt1 paths marked as “not synchronized” in Loc-RIB;

Rt1 is not advertised to R5 from R4;

As a conclusion, onfiguring synchronization allows BGP to track the presence of a matching IGP route in RIB. If it is not the case, the route is marked as not synchronized. Because it is not synchronized, any valid route could not be installed in RIB nor advertised to any neighbor.

In the opposite direction, we would expect that any synchronized route is deleted from RIB as soon as it is marked as “not synchronized” in Loc-RIB. In our example, we tried to change the static route administrative distance. Rt1 paths are marked as “not synchronized” in Loc-RIB and best path is not advertised to R5. But why BGP routes are still present in RIB? the global routing table? Please note that the age timer is frozen to 00:00:00!

RIPv2…

Instead of using static routes, we advertise route Rt1 in RIP.

Changing the administrative distance of RIP routes in R4 is more coherent (makes sense) than the precedent case (using static route), in fact:

  • Router R4 would prefer RIP-synchronized BGP routes if they have a better administrative distance;
  • but deleting RIP route would cause BGP routes to get non synchronized in Loc-RIB;
  • what is beautiful is that the corresponding paths get deleted also from RIB… forever!

let’s check with an OSPF route

In a normal situation, how a routing information bloc, included in the description of an OSPF route installed in RIB, would differ from the corresponding route information in Loc-RIB? a part from the prefix, subnet, mask, via interface, information, the router-id is shared between both RIB and Loc-RIB route descriptions but in the first case it corresponds the the advertising peer (R1) OSPF router-id and in the second case to the BGP router-id of the same router (R1)…

We’ve got a chance to have both router-id the same. The next figure shows that Rt1 is synchronized

In case R1 BGP router-id is different from R1 OSPF router-id, Rt1 gets not synchronized in R4.

Let’s test the administrative distance…

We check that:

  • similiarily to static route case, the BGP routes are not deleted from the routing table!
  • the routes are not synchronized in Loc-RIB nor advertised to peers (R5).
  • Using a different subnet mask prevents the route from getting synchronized, installed in RIB and advertised to peers.

what about EIGRP?

Testing administrative distance and subnet match results are the same as RIP but we observe in EIGRP topolgy that the corresponding route is marked as Active and the router is actively querying the neighbors for an alternative successor.

A debug on ip routing shows that:

  • the process add the EIGRP route first,
  • the route in the Loc-RIB get marked as synchronized,
  • having a better administrative distance, BGP route is installed in RIB,
  • the process deletes the EIGRP route and EIGRP put the corresponding route in topology into active state,
  • but BGP detects that EIGRP route has disappeared and put Rt1 into a non synchronized state,
  • BGP paths get deleted from the RIB,
  • the loop starts again from the beginning…

This is not resource efficient…

Conclusion

BGP IGP synchronization concerns only I-BGP peerings.

A matching route from an IGP or static sources should have the same prefix and subnet as the BGP route. The nexthop does not match necessarily and might be any resolvable address (direct or intermediate address).

In the specific case of OSPF, the peer OSPF and BGP router-ids must match. Both router-ids are including in the routing information the peer sends.

In the description of the synchronization feature, the “…does not use that information…” refers to installing the BGP route in the default routing table and advertising it or not to the neighboring peers.

This statement is not consistent especially in the case of OSPF and static routing with higher than BGP administrative distances: the routes are not deleted from the routing table evenif they’re marked as “not synchronized” in Loc-RIB…

In EIGRP the statement is effective but not efficient due to the process loop it creates by adding and deleting the corresponding routes infinitely…

Leave a Reply

adsense (1) application (2) architecture (4) asm (4) automatisation (2) backbone (1) cef (1) chd (2) cisco (6) cloud (1) command (5) controller (1) cost (6) coverage (2) debug (9) distance (6) fiber (1) gns3 (1) google (1) hpe (1) http (1) igmp (5) igp (8) internet (2) ip (2) label (1) ldp (1) logique (2) loop (5) lsp (1) mac (3) meraki (1) model (2) mpls (3) mroute (4) multicast (5) nat (1) ndp (2) network (3) next-hop (5) osi (5) pat (1) pim (4) poisoning (6) projet (2) qos (1) radio (3) rib (5) rip (5) route (6) router (6) routing (14) rpf (4) rrm (3) security (3) show (5) simulation (2) solution (2) split-horizon (5) sql (1) ssm (4) static (6) stp (2) summarization (5) switching (1) tcp/ip (1) telecom (1) template (1) traffic engineering (1) translation (1) travail (2) vpn (2) vrf (3) wifi (4) wlan (2)

  • What is the best way of subnetting?
    In this post, let’s recall what is subnetting (for routing and switching purposes) and how it is done. introduction and motivation Network subnetting is very important subject that maybe referred to as VLSM for variable length subnetting. The basic idea is about managing a space of IP addresses (IPv4). Historically, a network length or space
  • SSL VPN to my home network
    In this blog let’s try to connect to a home network from outside (internet) in a secure manner using SSL. NAT and PAT NAT and PAT is what allowed local IP addresses translation or mapping to some routable public IP address (over the internet). This mapping can be one to one (NAT) or many to
  • Routing from scratch… Part 1
    In this serie of posts we’ll explore routing operation. Let’s start from the general idea of how could we manage trafic, a move from one location to another… In the example of the figure presented next, the person in A wants to join its colleagues in location B through the network topology described in the
  • When a gateway says: “I’am not a good gateway… set redirection!”
    In this blog we explore how a gateway (a router) present in a LAN handles routing to the outside of this network and use redirection to enhance this operation. lab setup Our lab setup is 3 routers: R1, R2 and R3, in addition to 2 PC: PC1 and PC2. In this lab, PC1 tries to
  • Multicast: rather than dense, sparse it and let’s meet at rendez-vous point… Part 5
    in this post let’s detail the operation of PIM (Protocol Independent Multicast) in sparse mode. Previous posts tackled the operation of PIM dense mode. Let’s recall that PIM is the multicast routing protocol that allows PIM routers exchange information needed distribute multicast traffic to receivers. lab setup In our setup, Client1 is configured to join
September 2025
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
2930  
Table of Contents
Copied!