Wednesday, August 8, 2012

Redistribution with a Route Map

(or, how I forgot to remember to change the loopback network type and will remember to never forget in the future...)

The goal is to redistribute OSPF into EIGRP while preventing routes L1, L2, L4,& L6 in OSPF 50 Area 3 from being redistributed (these routes are configured as loopbacks on R3); All EIGRP routes are to be redistributed into OSPF.
 


































EIGRP and OSPF both work well and mutual redistribution has been configured on R1 with EIGRP using 1500 10 255 1 1500 as default metric settings (bandwidth, delay, load, reliability and MTU) :














Running a Tcl script:

tclsh
foreach address {
172.12.71.1
172.12.71.7
172.12.72.7
172.12.72.2
172.12.21.2
172.12.21.1
172.8.18.1
172.8.18.8
172.8.48.8
172.8.48.4
172.8.14.4
172.8.14.1
172.8.43.3
172.8.43.4
192.168.97.1
192.168.98.1
192.168.99.1
192.168.100.1
192.168.101.1
192.168.102.1
192.168.103.1
} {
ping $address }

This shows all pings successful on all routers (complete network connectivity).

Prevent networks L1, L2, L4 and L6 on R3 from being redistributed into EIGRP

Before we get into using a prefix-list and route-map, looking at the routing table on R1 shows a potential problem with the loopback networks advertised by R3:





















All of the networks in area 3 are advertising their subnet masks as a /32. We need to change the network type on the loopback interfaces on R3 so they advertise their correct subnet masks. If this is not changed, our prefix-list will not work as it will look for the wrong subnet masks.

Loopback interfaces, as a default in ospf, are network type LOOPBACK and are treated as a “stub-host”; but this isn’t clear by just running “show inter loopback 1”, instead run “show ip ospf inter loopback 1”…









You can see the network type for loopback 1 is LOOPBACK and it is treated as a stub host (hence the /32 subnet advertisement).

The solution is to change the loopback interfaces to point-to-point… R1 will then see the correct subnets.









And to verify…

















Now we see the correct subnets on R1…





















Configure prefix-list and route-map on R1 to prevent routes L1, L2, L4 & L6 from being redistributed into EIGRP…

We want to filter these routes from being redistributed into eigrp:
L1: 192.168.97.0/24
L2: 192.168.98.0/25
L4: 192.168.100.0/27
L6: 192.168.102.0/29

Right now these routes ARE currently being redistributed into EIGRP through the “redistribute ospf 1” command…


















To filter these I’ll use a prefix-list on R1 and a route-map. For the L1 & L2 routes, only one prefix-list statement is needed:

R1(config)# ip prefix-list FilterR3 seq 10 permit 192.168.96.0/22 ge 24 le 25

And two lists for L4 and L6:

R1(config)# ip prefix-list FilterR3 seq 20 permit 192.168.100.0/27
R1(config)# ip prefix-list FilterR3 seq 30 permit 192.168.102.0/29










Now for the route map:

R1(config)# route-map NoRouteR3 deny 10
R1(config-route-map)# match ip address prefix-list FilterR3
R1(config-route-map)# exit
R1(config)# route-map NoRouteR3 permit 100








The last route-map statement overrides the implicit deny.

This route-map now needs to be applied to the ospf redistribute command on R1:








The eigrp topology table on R1 shows that R3 routes L1, L3, L4 & L6 are no longer being redistributed…










Looking at the ospf routing table shows they are still there but are not being redistributed into eigrp…




















A verification on R2 concurs:





Summary:
If you find that the correct subnets for loopbacks are not being advertised to other routers within ospf, verify which network type is being used. Salud!









No comments:

Post a Comment