shwaqar82 used Ask the Experts™
You can see the topology diagram. I have indicated what protocols i m running in the routers.
I want to know that do I need redistribution of OSPF to BGP or BGP to OSPF on any of the routers in my topology? I am a little confused and I need your help guys.

Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Need more detail to give a correct response.  I assume that you are only worried about the central network.  The short answer is that BGP needs ospf to communicate between the routers in the central network.  OSPF needs to be correctly running in central network so that all routers know how to get to each other.  Then Full mesh of iBGP sessions has to be established between all BGP-speaking routers in the AS for prper iBGP route propagation.  Last sentence right from the book.  OSPF will not happen between ASs.  Is this an actual network or a test question?  iBGP will happen between BGP routers in the same AS and eBGP will happen between routers of different AS numbers.  Guess question is how familiar are you with BGP if this a valid network.
- Are these networks from same company
- What are security rulles?
- What addresses are you trying to pass?
- Is there a default gateway?
carlson questions is right if you need to make coorec configuration.
About your question which is ospf - bgp - bgp - ospf structure;
if you want to see all details in all points it needs to redistribute traffic between bgp and ospf as internal and external types.
if just backbone will know all route and others will know default route, it needs to redistribute traffic from bgp to ospf as internal types.
Hi Shawagar,

this is a standard example of an extranet MPLS VPN setup

Let me state it this way;

1. You need to run mpls along with ospf in the core on edge routers J1 & R4 and core routers J2& R3 (AS100).  Routers J1& R4 will run ospf/mpls on interface facing the core;  Routers J3 & R2 will run ospf/mpls on all phyical interfaces.
2. If R3 & J2 will be running just OSPF (no BGP), then you must redistribute OSPF/BGP on J1 & R4. But it is advisabe that you run BGP on R3 & J2 and hence you wont need redistribution on J1 & R4 if you do that and make life simpler.
3. Client routes from R1, R2, R5 & R6 are carried in the BGP VPNv4 so wont be seen by the OSPF protocol if BGP is run on R3 &J2 as i stated in point 2 above

I hope i am clear.

Success in ‘20 With a Profitable Pricing Strategy

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!


Can you please explain your last point i.e point no. 3?
and your link is not working by the way
BGPvpnV4 is the version of BGP running on the edge routers. The link below gives detail config of MPLS vpn. please do let me know if u need any further help.


So is there a different configuration for BGP vpnv4 for cisco and juniper routers?
I thought it was same as normal BGP


Why do I need to run BGP on R3 and J2. I think running just OSPF is enough since they are core routers so i thought they dont need to know the external routes. Only PE routers need to run BGP.
I will be making J1 and R4 IBGP peers so thats why i think i dont need to run BGP on R3 and J2
Please could you clarify the purpose of running BGP on R3 and J2?
dear shwagar;

your question is redistribution between OSPF and BGP. We gave your question answer. If you want that we should analyze your topology you need give much more details which carloson asked some of them.

If you are not ISP, you dont need to force your system to work MPLS VPN structure. MPLS needs to adjust switch and router conf.
If all these points are brunches, why do you need BGP. Backbone OSPF is more than enough. You may talk OSPF with different area in each brunch.
If you are service provider and those are your uplinks, really you need give much more info.


My requirement is to implement MPLS in this topology along with BGP.
Thats my please kindly now answer my previous question.
I will comment as I initially proposed this.  It is just a good idea to prevent future problems...  As an engineer looking at best practices the recommendation is for a full mesh.  If this is the actual network it does not appear that memory will be an issue (BGP routing table small).  This allows for future growth.  But if you do not want to do this then you do not have to, routers J1 and R4 only have to know how to talk to each other.
I just recommend read upside links. MPLS implementation is not easy. There is a lot of parameters as
- your router model
- MPLS applications type
- Data connection types
- Switch types
etc ...

You have to ask what you dont know one by one when you got problem. This question already answered what you asked.


can anyone tell me is it necessary to have a loopback address with 32 bit mask in routers within MPLS network? Will that loopback address become the default router id for OSPF and BGP?
Use command bgp router-id x.x.x.x to set router id otherwise the largest IP address is chosen.
It is one of the attributes used to determine prefered path.  Way down at the bottom.
If the path specifies a next hop that is inaccessible, drop the update.

"Prefer the path with the largest weight.

"If the weights are the same, prefer the path with the largest local preference.

"If the local preferences are the same, prefer the path that was originated by BGP running on this router.

"If no route was originated, prefer the route that has the shortest AS_path.

"If all paths have the same AS_path length, prefer the path with the lowest origin type (where IGP is lower than EGP, and EGP is lower than incomplete).

"If the origin codes are the same, prefer the path with the lowest MED attribute.

"If the paths have the same MED, prefer the external path over the internal path.

"If the paths are still the same, prefer the path through the closest IGP neighbor.

"Prefer the path with the lowest IP address, as specified by the BGP router ID.

Believe orginal question answered can we close out the question?

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial