We learn in this post how to configure route redistribution between OSPF, EIGRP, BGP and static routes. The first section depicts OSPF route redistribution into EIGRP. The second section gives an example of redistributing static routes into EIGRP. And lastly we see an example of redistributing BGP into OSPF.
Injecting OSPF prefixes into EIGRP
– On the ASBR, and after redistribution, there’s a change in EIGRP topology table. But no changes happen in the routing table:
The change happens on the other routers, i.e. DSW1 and DSW2.
Redistribute ospf match internal
Before this command, here’s DSW1 RIB:
The 10.1.1.8 prefix is a subnet that’s internal to OSPF, i.e. it was not redistributed into OSPF before arriving to R4. The 0.0.0.0/0 is also an OSPF Internal route (the default route that’s injected by R3 into the totally stub NSSA) . So it is redistributed into EIGRP too.
“redistribute ospf ..”, without specifying which route type we want, is equivalent to “redistribute ospf match internal”.
What if we redistribute a connected interface on R2 into OSPF?
R4 is not aware of it, since it is a totally stub NSSA router.
If we add the commands “redistribute ospf match external 1” and “redistribute ospf match external2”, IOS displays them in a single line in the config:
Let’s say we only want to see the default route on DSW1 (and DSW2) that has been redistributed into EIGRP and not let 10.1.1.8 be redistributed. With Route-map technology, it is possible. We create an ACL that matches the default route. We create the route-map that uses ACL for traffic matching. We call the route-map during redistribution of OSPF into EIGRP:
and here’s the new RIB on the distribution switch:
Inject connected subnets into OSPF
In a past exercise, we created a loopback on R2 and redistributed it into OSPF. Let’s check that the 184.108.40.206 prefix has a cost of 20 and an O E2 type on another router:
What if we omit the “subnets” keyword?
R2 now advertises only classful networks that show in its RIB. Otherwise, they are not redistributed:
We’ll create a loopback on R4. We’ll redistribute it as a connected interface into OSPF. Normally, this will create a LSA7 in area 34 that will be converted by R3 in LSA5:
We see the LSIDs of 3 LSA7 in OSPF database of R4. They correspond to the connected subnets that have been redistributed.
R3 OSPF database(partial):
LSA7 shows too in its database. The new comer here is LSA5.
We can also see the 220.127.116.11 subnet, that corresponds to the loopback of R2 that has been redistributed into OSPF, at R2. This shows only on R3 database, because R4 gets only a default route to subnets that are outside area 34.
Let’s see OSPF database on R2 (partial):
Obviously, we see subnet 18.104.22.168 as LSA5 because it is redistributed here on R2. 22.214.171.124 shows too. It has been learned from R3 (an ABR) as LSA5. Everything works correctly.
Inject BGP prefixes into OSPF
Always following the same lab topology, we’ll redistribute BGP into OSPF domain on R1 because it is an ASBR:
On R2, we see no redistributed routes. That’s because R1 redistributes only classful networks. Let’s look at R1 RIB:
Since R1 has, in its RIB, subnets of 126.96.36.199 and not the classful network, then nothing is redistributed.
We add the “subnet” keyword during redistribution of BGP into OSPF:
And we can see the subnets being redistributed correctly, with a metric of 1 by default. Whenever you need a refresher on your CCNA skills and at the same time review at your own pace, then I would recommend you check my CCNA study material page.
To deepen your knowledge on route redistribution, check also this link.