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?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (3 ratings)
Loading.
Harold Ritter Wed, 09/24/2008 - 05:28
User Badges:
  • Cisco Employee,

Akin,


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).


Regards

Calin Chiorean Wed, 09/24/2008 - 05:31
User Badges:
  • Silver, 250 points or more

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

Calin Chiorean Wed, 09/24/2008 - 06:08
User Badges:
  • Silver, 250 points or more

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 xxx.xxx.xxx.xxx mask yyy.yyy.yyy.yyy" and you want xxx.xxx.xxx.xxx to be advertise to eBGP peer. Right? But if xxx.xxx.xxx.xxx 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.


Understood?


Calin

Giuseppe Larosa Wed, 09/24/2008 - 07:03
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

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


Many thanks Giuseppe.

i am originating the routes so i am the next hop.

what i will really want to know is this. if synchronization is turned off and a prefix is not in the routing table. will BGP advertise the route if you advertise it using a network statement?

will be glad to clarify this once and for all.

Giuseppe Larosa Thu, 09/25/2008 - 05:45
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

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

Giuseppe



Calin Chiorean Thu, 09/25/2008 - 06:04
User Badges:
  • Silver, 250 points or more

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!


Cheers,

Calin


Actions

This Discussion