Redistribute OSPF Route into BGP in Cisco IOS Router

CCNA 200-301

CCNA 200-301

CCNP Enterprise

CCNP Enterprise

CCNP Security

CCNP Security

CCIE Enterprise Lab

CCIE Enterprise Lab

CCIE Security Lab

CCIE Security Lab

CCNP Service Provider

CCNP Service Provider

CCNP Data Center

CCNP Data Center

CCNP Collaboration

CCNP Collaboration

CCIE DC Lab

CCIE DC Lab

ic_r
ic_l
Redistribute OSPF Route into BGP in Cisco IOS Router
images

Typically, it is usually not the best practice to perform redistribution in BGP. However, some specific network deployment schemes require us to reassign IGP routes such as OSPF or EIGRP to BGP instead of notifying subnets with network commands in BGP. This article illustrates the command to reassign OSPF routing to BGP in a Cisco IOS router through the following example scenario:

In this case, a company called MustBegeek Enterprise (or "The MBG") has just acquired a company called X-Corp. As part of the acquisition, they have to complete their network. The MBG has placed its Cisco IOS router named "RouterX" in the data center of X-Corp and is configured to perform eBGP peering with the MBG data center's border router, called MBG-HO-BDR. The MBG administrator wants to keep the BGP configuration as simple as possible and to avoid adding new configuration lines one by one to advertise all the subnets created in the X-Corp network.

Note: want to study further the ways to Redistribute OSPF Route into BGP in Cisco IOS Router?  You can contact SPOTO. What’s more, we have 100% real certification exam practice for you to take the certification exam.

How to Redistribute OSPF Route into BGP in Cisco IOS Router

The command to reassign OSPF routes to BGP in Cisco IOS routers is "reassign OSPF [process-id]" and can be executed in the BGP configuration section. Because the OSPF configuration in RouterX uses process identity 1, the configuration for reassigning OSPF routes to BGP in RouterX is as follows:

With this command, the MBG-HO-BDR router can now consider all OSPF routers in the X-Corp network as a BGP route:

In addition, each time a new subnet is added to an OSPF in an X-Corp network, the MBG network automatically learns this route in BGP. To simulate this, we can simply add a new subnet to any router in the X-Corp network and add it to OSPF:

And see that the newly created subnet is also installed in the routing table of the MBG-HO-BDR without adding any new configuration to the BGP part of RouterX.

Specifying OSPF Routes to be Redistributed in Cisco IOS Router

You may want to know why the 10.2.1.0. 0. 0 network is still not installed in the BGP routing table. This is because, by default, the OSPF reallocation in the Cisco IOS router only redistributes the inter-area (O) and the intra-area routing (O IA).

10.2. 1.0/24 is the external OSPF route (O 2) in RouterX, as shown below, in the topology diagram above, you can see that this route in OSPF is actually learned from other routing protocols (EIGRP). Therefore, this E2 route is not reassigned to BGP by default.

To allow the redistribution of external routes and all internal routes, you can add the keyword "match internal and external" to the OSPF redistribution command to complete the command "redistribute OSPF [process-id] match internal-external". The implementation in RouterX is as follows:

See now that 10.2.1.0/24 routes have been added to the BGP routing table of

MBGHOBDR: 

This is how you reassign the OSPF route to BGP in the Cisco IOS router. Please note that before notifying any routing to the BGP in the real network, be sure to consider everything carefully.

About SPOTO

SPOTO offers Cisco CCIE certification practice tests and training to help all candidates to pursue their ideal careers. You can also find more useful tips and suggestions to help you study and master networking knowledge.