BGP synchronization confusion

Unanswered Question

Hi Guys,

I am seen funny behaviour with synchronization in bgp. sometimes when i turn synchronisation off and advertise prefixes through network statement and my IGP (OSPF) doesn't have those routes, BGP refuses to advertise the prefixes. sometimes, it does (regardless of the prefix being in IGP or not.

I know no synchronization is meant to disable the prefix check in the routing table and should allow BGP advetise prefixes.

I am advertising to an ebgp neighbour.

pls enlighten me on what is happening. could it be the IOS version?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (3 ratings)
Harold Ritter Wed, 09/24/2008 - 05:28


The best way to find out the reason for the prefix not being advertised is to do a "show ip bgp x.x.x.x" for the specific prefix when this condition happens. This should tell you if synchronization has anything to do with it (it should not in principle since it it is disable).


Calin Chiorean Wed, 09/24/2008 - 05:31

Hi there!

My first statement is that BGP is having some very strange behavior sometimes (stuck and not recover until you do a hard clear, routes not to be advertise until you hard clear the peering to the neighboor and so on...).

In your case what I can ask to check:

- with synchronization off, check that the prefixes that you advertise in BGP are in the routing table; if they are not there, BGP will never advertise them;

- try to put a route to null0 for a network that you want to advertise in BGP and see if in that case the prefix is advertised

- try a hard clear after switching off the synchronization (if you are allowed to do that)

Please tell me if any of this advices above helped you!

Good luck!


Calin Chiorean Wed, 09/24/2008 - 06:08

Hello again!

You said: "sometimes when i turn synchronisation off and advertise prefixes through network statement and my IGP (OSPF) doesn't have those routes, BGP refuses to advertise the prefixes"

So I understand that you have "no synchronization" under BGP config, and you do a "network mask yyy.yyy.yyy.yyy" and you want to be advertise to eBGP peer. Right? But if is not in the routing table BGP will not advertise it.

See the sychronization explained below:

A BGP router with synchronization enabled will not advertise iBGP-learned routes to other eBGP peers if it is not able to validate those routes in its IGP.Assuming that IGP has a route to iBGP-learned routes, the router will announce the iBGP routes to eBGP peers. Otherwise the router treats the route as not being synchronized with IGP and does not advertise it. Disabling synchronization using the no synchronization command under router BGP prevents BGP from validating iBGP routes in IGP. By default, synchronization is enabled on all BGP routers.



Giuseppe Larosa Wed, 09/24/2008 - 07:03

Hello Akin,

a BGP advertisement is accepted if the BGP next hop is known

so disabling synchronization is necessary but can be not enough to advertise successfully

try to add:

neigh next-hop-self

as suggested by Harold check with sh ip bgp x.x.x.x

If you can collect info about a case and post here you can find better help

Hope to help


Giuseppe Larosa Thu, 09/25/2008 - 05:45

Hello Akin,

if an IP prefix is not already present in the IP routing table the BGP router will not advertise it.

Conversly if the prefix is present by any means (connected, static route, another routing protocol, BGP itself) BGP will advertise it.

A BGP router is not allowed to lie: it can advertise a prefix only if present in the routing table and use its own best choice (if multiple BGP advertisements are present)

it cannot advertise to somebody else a path that is not used by itself.

the old method to advertise prefixes / aggregates is to use static routes using the null0 interface.

ip route x.x.x.0 y.y.y.0 null0 200

router bgp yourASN

network x.x.x.0

this allows to advertise net x.x.x.0

Hope to help


Calin Chiorean Thu, 09/25/2008 - 06:04

Hello Akin,

Giuseppe (you have my credits for this) explain maybe better than me in the first post. Akin, you are confusing the functionality of synchronization with the mechanism which BGP is using to advertise prefixes.

I hope you understood now :)

Good luck!




This Discussion