While I was doing this lab, I came across some strange behavior. If you redistribute from OSPF to EIGRP through a route-map, and that map specifies the route-type, (local, internal, external, etc.) then there seems to be no way to include the connected interfaces.
For example, using NMC Lab 12 as a test-bed, I removed the redistribution on R2 and concentrated on R3. R3 is connected to 151.10.43.0/24, which is in OSPF. We are redistributing OSPF into EIGRP, and watching the routes turn up through EIGRP on R5:
R3#
:
router eigrp 100
redistribute ospf 12 metric 1500 100 255 1 1500
:
On R5, we can see a route to 151.10.43.0/24:
R5#show ip route 151.10.43.0
Routing entry for 151.10.43.0/24
Known via "eigrp 100", distance 170, metric 123225600, type external
Redistributing via eigrp 100
Last update from 151.10.35.3 on Serial1/1, 00:00:45 ago
Routing Descriptor Blocks:
* 151.10.35.3, from 151.10.35.3, 00:00:45 ago, via Serial1/1
Route metric is 123225600, traffic share count is 1
Total delay is 4032250 microseconds, minimum bandwidth is 128 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 1
I have prepared a route-map on R3 to distribute through. Let us include locally generated routes and internal routes:
R3#show run
:
route-map OSPF-->EIGRP permit 10
match route-type local
!
route-map OSPF-->EIGRP permit 20
match route-type internal
!
Now let us apply the route map:
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#router eigrp 100
R3(config-router)#redistribute ospf 12 metric 1500 100 255 1 1500 route-map OSPF-->EIGRP
R3(config-router)#^Z
R3#
Look what happens on R5. We lose the route to 151.10.43.0/24. It does not seem to be getting past the route-map.
R5#
*Mar 1 19:29:31.788: RT: delete route to 151.10.43.0 via 151.10.35.3, eigrp metric [170/123225600]
*Mar 1 19:29:31.792: RT: SET_LAST_RDB for 151.10.43.0/24
OLD rdb: via 151.10.35.3, Serial1/1 *Mar 1 19:29:31.792: RT: no routes to 151.10.43.0
*Mar 1 19:29:31.792: RT: NET-RED 151.10.43.0/24
*Mar 1 19:29:31.792: RT: delete subnet route to 151.10.43.0/24
*Mar 1 19:29:31.796: RT: NET-RED 151.10.43.0/24
R5#
I would have thought the connected interface would at least be counted as a locally generated route. How do I write a route-map to include the connected interfaces? (Assuming that, as in this case, the scenario forbids you to redistribute the connecteds directly.) Well, the only way I can think of is to make an access-list listing the connected prefixes of the source protocol, and add a clause to the route-map that matches the access list. Normally I am reluctant to use access lists to filter redistributions because it is not scaleable. However, in this case it is not so bad because it is only the locally connected prefixes you are listing. It is still scaleable.
Key Point: If you redistribute from OSPF through a route-map, and that route-map filters by route-type, the connected networks are no longer included.
If anyone else has observed this, or can repeat the experiment, could you please leave a comment? Thanks.