Introduction

OSPF External Routes (E2) are advertised into OSPF Autonomous System with a particular cost and the cost is not changed throughout the AS. The routes are learned via redistribution of other routing protocol or static route or a connected subnet. The router performing redistribution is the Autonomous System Border Router (ASBR). By default, all OSPF routes learned via redistribution are of E2 type.

Redisribution of OSPF Routes (E1 or E2) into BGP can be performed via two ways, this document focus on E2 routes.

Using Route Maps gives more felxibility to the user, as one can match the routes based on different criteria (access-list, tag).

Prerequisite

Understanding of OSPF Routing Protocol

Understanding of Border Gateway Protocol (BGP)

Background Summary

In this document the focus is on route-map to match the E2 types routes and then redistributing them into other routing system. Three Routers, R1, R2 and R3 are connected via Serial Interface. Router R1 and R2 are participating in OSPF Area 0 while Router R2 and R3 are forming IBGP peering under AS 100.

On R1, Loopback Interfaces (Lo 2 and Lo 3), are redsitributed in OSPF. A route-map "connected is configured" to match the specified interfaces and then redistributed via command "redictribute connected route-map connected". On router R2 these loopback prefixes are learned of type E2. On R2, a route-map (route-map E2OSPF in this document, see configuration on Router R2) is configured to match only the E2 type prefixes and redistribiuted into BGP system.

Note: All configurations are tested on C3745 router operating on IOS verison 12.4(15)T14.