Cisco Support Community
Showing results for 
Search instead for 
Did you mean: 

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

BGP Vs OSPF mask problem:


I guess at some scenario mask difference between BGP and OSPF creates problem. However, documentations says this could be overcome

with " no synchronization" command at BGP.

I'm not clear of the scenario and what makes sense of using "no synchronization" to overcome mask problem with OSPF and BGP.

To my knowledge "no sync" at BGP helps to reduce overhead in redistributing BGP into IGP, provided all routers run BGP in the AS. I just wonder what role does "no synchronization" command play to get rid of masking problem between OSPF and BGP.

A typical scenario & brief explanation would help.




Re: BGP Vs OSPF mask problem:

BGP requires that a route be learned (already in the route table) by some other protocol (an IGP) before it can use it. The no sync command overrides that so BGP can use a route even if its not already in the route table.

What your doc might be referring to is that both protocols could be learning the same major network with different subnetting and that would not meet the sync requirement. By turning sync off it would not make them agree, BGP just wouldn't care.

On the other hand, they might have meant to say to use "no auto-summary" which would keep BGP from summarizing subnets up to a major network.

New Member

Re: BGP Vs OSPF mask problem:

I am not completely sure about the "mask difference" but will attempt to clarify something which may help.

A common trap when experimenting with ospf/bgp redistribution is using a loopback interface with a /24 in OSPF to simulate a route. Without the "ip ospf network point-to-point" on the loopback, OSPF will insert a /32, even if you configured a shorter mask. Bottom line, is that BGP will not advertize the /24 because in fact the OSPF route is a /32.

Provided the route (meaning prefix and mask) are in the route table exactly as configured under your BGP 'network' statement, BGP will advertize them when sync is on.

Hope that helps