Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
This tutorial explains the BGP synchronization rule. To understand what this is
all about, make sure you understand why we need IBGP first. If you are a
little fuzzy about IBGP, BGP split horizon and why we need IBGP full mesh
adjacencies then please read my IBGP tutorial first. Having said that, lets
look at the synchronization rule.
BGP synchronization is an old rule from the days where we didnt run IBGP
on all routers within a transit AS. In short, BGP will not advertise
something that it learns from an IBGP neighbor to an EBGP neighbor if the
prefix cant be validated in its IGP.
Its best explained with an example, take a look below:
OSPF Configuration
The OSPF configuration is really straight-forward. R2 and R4 have a loopback
interface that is used for the IBGP peering which is advertised in OSPF:
R2#
router ospf 1
network 2.2.2.0 0.0.0.255 area 0
network 192.168.23.0 0.0.0.255 area
R3#
router ospf 1
network 3.3.3.0 0.0.0.255 area 0
network 192.168.23.0 0.0.0.255 area
network 192.168.34.0 0.0.0.255 area
R4#
router ospf 1
network 4.4.4.0 0.0.0.255 area 0
network 192.168.34.0 0.0.0.255 area
0
0
BGP Configuration
The configuration of R1 is simple, its configured to run EBGP with R2 and it
advertises network 1.1.1.0 /24 into BGP:
R1#
router bgp 1
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
neighbor 192.168.12.2 remote-as 2
no auto-summary
R4 is similar to R2:
R4#
router bgp 2
no synchronization
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 2
neighbor 2.2.2.2 update-source Loopback0
neighbor 2.2.2.2 next-hop-self
neighbor 192.168.45.5 remote-as 3
no auto-summary
Next Hop
2.2.2.2
Next Hop
192.168.45.4
Great, R5 also knows about this network. The problem in this scenario
however is that we will never get any IP packets from AS3 to AS1 since R3
doesnt run BGPit will never learn about network 1.1.1.0 /24 so whenever
R4 forwards something, it will be dropped. Take a look at R3 here:
R3#show ip route 1.1.1.0
% Network not in table
To synchronization rule was created to prevent this problem. Lets find out
how it works
R2(config)#router bgp 2
R2(config-router)#synchronization
R4(config)#router bgp 2
R4(config-router)#synchronization
Next Hop
2.2.2.2
R4 sees the network in its BGP table but refuses to install it.