cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
894
Views
15
Helpful
9
Replies

BGP synchronization confusion

akin_lopez
Level 1
Level 1

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?

9 Replies 9

Harold Ritter
Cisco Employee
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

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Calin C.
Level 5
Level 5

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

Hi Calin,

Many thanks. But that it the whole reason for synchronization. to enable BGP advertise prefixes even though it is not in the routing table.

am I wrong guys?

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
Hall of Fame
Hall of Fame

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.

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

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

many thanks Guys

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco