I will be using the same lab where I left off before, at least the same logical topology with possibly some loopbacks thrown in there to perform different types of Summarization:
The first thing to address with the above topology, is that the External (O E2) routes brought into the OSPF network via Redistribution on the ASBR router R1, is that their seed or default cost / metric is not from the local router to the destination but rather from the ASBR to the destination with a ‘seed’ or default metric of 20. In the route table the Admin Distance / Cost appears as [110/20].
To change this behavior of Redistribution into OSPF you can issue the follow command on the ASBR to turn the E2 or Type 2 External route in the route table into an E1 / Type 1 External route:
“redistribute connected subnets metric-type [1/2]” in router config mode, I put both 1 and 2 in brackets because you can also change E1’s back to E2’s if needed with that command.
A couple of interesting things to note, starting with R5’s NSSA Total Stub Area, and how it reacts to the change in Metric type as we don’t have E2’s and E1’s because it accepts Type 7 LSA’s which show as N1 and N2 routes in the route table – Not type 5 LSA’s:
R5#show ip route ospf
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, + – replicated route
Gateway of last resort is 172.12.15.1 to network 0.0.0.0
O*IA 0.0.0.0/0 [110/2] via 172.12.15.1, 00:12:35, FastEthernet0/1
100.0.0.0/16 is subnetted, 7 subnets
O N2 100.1.0.0 [110/20] via 172.12.15.1, 00:05:58, FastEthernet0/1
O N2 100.2.0.0 [110/20] via 172.12.15.1, 00:05:58, FastEthernet0/1
O N2 100.3.0.0 [110/20] via 172.12.15.1, 00:05:58, FastEthernet0/1
O N2 100.4.0.0 [110/20] via 172.12.15.1, 00:05:58, FastEthernet0/1
O N2 100.5.0.0 [110/20] via 172.12.15.1, 00:05:58, FastEthernet0/1
O N2 100.6.0.0 [110/20] via 172.12.15.1, 00:05:58, FastEthernet0/1
O N2 100.7.0.0 [110/20] via 172.12.15.1, 00:05:58, FastEthernet0/1
And then I remove the old redistribute statements in router config and entered the new statement including metric-type 1:
R1(config)#router ospf 1
R1(config-router)#no redistribute connected subnets
R1(config-router)#redistribute connected subnets metric-type 1
And then went back to R5 to see how this has impacted the route table:
R5#show ip route ospf
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, + – replicated route
Gateway of last resort is 172.12.15.1 to network 0.0.0.0
O*IA 0.0.0.0/0 [110/2] via 172.12.15.1, 00:13:37, FastEthernet0/1
100.0.0.0/16 is subnetted, 7 subnets
O N1 100.1.0.0 [110/21] via 172.12.15.1, 00:00:14, FastEthernet0/1
O N1 100.2.0.0 [110/21] via 172.12.15.1, 00:00:14, FastEthernet0/1
O N1 100.3.0.0 [110/21] via 172.12.15.1, 00:00:14, FastEthernet0/1
O N1 100.4.0.0 [110/21] via 172.12.15.1, 00:00:14, FastEthernet0/1
O N1 100.5.0.0 [110/21] via 172.12.15.1, 00:00:14, FastEthernet0/1
O N1 100.6.0.0 [110/21] via 172.12.15.1, 00:00:14, FastEthernet0/1
O N1 100.7.0.0 [110/21] via 172.12.15.1, 00:00:14, FastEthernet0/1
It did not change the NSSA Total Stub area much at all, aside from changing the N2 Redistributed routes into N1’s, and changing that seed metric / cost in the route table from 20 to 21. I am not sure if this is because the next hop router R1 (ABR and ASBR) is directly connected via FastEthernet or if it is something to do with the Area type, however it wasn’t a big enough change in cost to really drive the point home so I looked at R2’s previous OSPF route table before and after the metric-type change:
R2#show ip route ospf
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/65] via 172.12.123.1, 00:05:24, Serial0/0
100.0.0.0/16 is subnetted, 7 subnets
O E2 100.4.0.0 [110/20] via 172.12.123.1, 00:00:16, Serial0/0
O E2 100.5.0.0 [110/20] via 172.12.123.1, 00:00:15, Serial0/0
O E2 100.6.0.0 [110/20] via 172.12.123.1, 00:00:15, Serial0/0
O E2 100.7.0.0 [110/20] via 172.12.123.1, 00:00:15, Serial0/0
O E2 100.1.0.0 [110/20] via 172.12.123.1, 00:00:15, Serial0/0
O E2 100.2.0.0 [110/20] via 172.12.123.1, 00:00:15, Serial0/0
O E2 100.3.0.0 [110/20] via 172.12.123.1, 00:00:15, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/65] via 172.12.123.3, 00:05:24, Serial0/0
172.12.0.0/24 is subnetted, 3 subnets
O IA 172.12.34.0 [110/65] via 172.12.123.3, 00:05:24, Serial0/0
O IA 172.12.15.0 [110/65] via 172.12.123.1, 00:05:24, Serial0/0
R2 is not configured with any kind of Stub configurations or anything, so this is pure OSPF cost on the Inter-Area routes, and the E2 routes are showing their Seed metric of 20, until that Metric-Type is changed to an E1:
R2#show ip route ospf
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/65] via 172.12.123.1, 00:26:17, Serial0/0
100.0.0.0/16 is subnetted, 7 subnets
O E1 100.4.0.0 [110/84] via 172.12.123.1, 00:14:24, Serial0/0
O E1 100.5.0.0 [110/84] via 172.12.123.1, 00:14:23, Serial0/0
O E1 100.6.0.0 [110/84] via 172.12.123.1, 00:14:23, Serial0/0
O E1 100.7.0.0 [110/84] via 172.12.123.1, 00:14:23, Serial0/0
O E1 100.1.0.0 [110/84] via 172.12.123.1, 00:14:23, Serial0/0
O E1 100.2.0.0 [110/84] via 172.12.123.1, 00:14:23, Serial0/0
O E1 100.3.0.0 [110/84] via 172.12.123.1, 00:14:23, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/65] via 172.12.123.3, 00:26:17, Serial0/0
172.12.0.0/24 is subnetted, 3 subnets
O IA 172.12.34.0 [110/65] via 172.12.123.3, 00:26:17, Serial0/0
O IA 172.12.15.0 [110/65] via 172.12.123.1, 00:26:17, Serial0/0
And there we have it, we can now see the true path metric / cost from the local router to the destination network being redistributed into OSPF by the ASBR R1. I figured with all these oddities, something had to have happened to the Total Stub Area 34 specifically on R4’s table the I previously summarized down to a single default route, so I looked at the OSPF route table on R4 as well to see how the Metric-Type impacted it:
R4#show ip route ospf
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, H – NHRP, l – LISP
+ – replicated route, % – next hop override
Gateway of last resort is 172.12.34.3 to network 0.0.0.0
O*IA 0.0.0.0/0 [110/2] via 172.12.34.3, 00:27:04, FastEthernet0/1
NOT A THING, R4 COULD HAVE CARED LESS. That is because making an area a Total Stub prevents Type 3, 4, and 5 LSA’s from being flooded into that Area, Type 5 being External / Redistributed route Advertisements and Type 3 being what is next coming up – Summmary Route advertisements!
*** THE ABOVE EXAMPLES OF CHANGING THE METRIC-TYPE FOR REDISTRIBUTED ROUTES AND WHAT TYPE OF LSA’S ARE MAKING IT TO WHICH NETWORKS IS VERY IMPORTANT, DO NOT OVERLOOK THESE EXAMPLES BEFORE TEST TIME***
Now I will get back to regular font, and speak upon Route Summarization in OSPF, as there are two ways to go about doing it: Area Range or Summary-Address. However first you must learn to make a Summary Route and appropriate mask. For this example I found notes from my CCNA studies actually where I summarized network numbers 172.16.8.0 – 172.16.11.0 /24 by breaking them out into Binary, I skipped and just did the third octet because the first two will obviously be the same for all four of the networks:
- 00001000
- 00001001
- 00001010
- 00001011
- ^ This is the last common bit among all binary strings of IP addresses, so this is how we will determine both the route, and mask.
I tend to count octets from left to right, speaking out loud 128 – 64 – 32 – 16 – 8 -4 – 2 – 1, and though this summary route actually ends on the 6th bit the network will be 172.16.8.0 because that is the last “on” bit however the address technically stops matching on a line of 0’s – DO NOT LET THIS TRIP YOU UP IN ASSIGNING THE APPROPRIATE SUMMARY MASK!
The best way to think about it to get a visual idea is to write 1’s over the columns of bits that match in the binary strings, and the first column that doesn’t match the rest will be 0’s for the rest of the octet(s) going right starting at that first mismatch, count all the 1’s up and you have your mask – convert your range of 1’s from binary to dotted decimal for your Summary Address.
So because the first two octets all match into the 6th bit of the third octet (8 + 8 + 6 = 22 bits), the Summary Address will be 172.16.8.0 /22, leaving 10 host bits.
Now to make the first type of OSPF Summary Route using the Area Range command:
“area 11 range 172.16.8.0 255.255.252.0” – A few things to note about this, bullet point style:
- This type of summarization is for Internal or Inter-Area routes, so it is only configured on the ABR, and the routes to be summarized must be entered in router config mode as well via ‘network’ statements in the Area being summarized
- In the Area Range command, ***USE THE AREA THE ROUTES ARE SUMMARIZED IN, NOT THE AREA THE ROUTES ARE BEING SUMMARIZED INTO***
- WILD CARD MASKS ARE ***NOT*** USED FOR EITHER OSPF ADDRESS SUMMARIZATION TYPES, BOTH AREA RANGE AND SUMMARY-ADDRESS USE NORMAL SUBNET MASKS – REALLY MENTALLY NOTE THAT FOR TEST TIME!
I will quickly hop to the different routers to “show ip route ospf” from R5 the NSSA Total Stub, R4 the Total Stub, and R2 with absolutely no Stub configs (Along with R1 for fun):
R1(config-router)#area 11 range 172.16.8.0 255.255.252.0
R1#show ip route ospf
2.0.0.0/32 is subnetted, 1 subnets
O IA 2.2.2.2 [110/65] via 172.12.123.2, 00:10:34, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/65] via 172.12.123.3, 00:10:34, Serial0/0
172.12.0.0/24 is subnetted, 3 subnets
O IA 172.12.34.0 [110/65] via 172.12.123.3, 00:10:34, Serial0/0
172.16.0.0/16 is variably subnetted, 5 subnets, 2 masks
O 172.16.8.0/22 is a summary, 00:10:34, Null0
R5#show ip route ospf
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, + – replicated route
Gateway of last resort is 172.12.15.1 to network 0.0.0.0
O*IA 0.0.0.0/0 [110/2] via 172.12.15.1, 01:39:08, FastEthernet0/1
100.0.0.0/16 is subnetted, 7 subnets
O N1 100.1.0.0 [110/21] via 172.12.15.1, 01:25:45, FastEthernet0/1
O N1 100.2.0.0 [110/21] via 172.12.15.1, 01:25:45, FastEthernet0/1
O N1 100.3.0.0 [110/21] via 172.12.15.1, 01:25:45, FastEthernet0/1
O N1 100.4.0.0 [110/21] via 172.12.15.1, 01:25:45, FastEthernet0/1
O N1 100.5.0.0 [110/21] via 172.12.15.1, 01:25:45, FastEthernet0/1
O N1 100.6.0.0 [110/21] via 172.12.15.1, 01:25:45, FastEthernet0/1
O N1 100.7.0.0 [110/21] via 172.12.15.1, 01:25:45, FastEthernet0/1
NO CHANGES TO THE NSSA TOTAL STUB AREA
R4#show ip route ospf
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, H – NHRP, l – LISP
+ – replicated route, % – next hop override
Gateway of last resort is 172.12.34.3 to network 0.0.0.0
O*IA 0.0.0.0/0 [110/2] via 172.12.34.3, 01:43:12, FastEthernet0/1
NO CHANGES TO THE TOTAL STUB AREA EITHER (NO TYPE 3 LSA’S!)
HERE IS R2’S ROUTE TABLE BEFORE SUMMARIZATION:
R2#show ip route ospf
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/65] via 172.12.123.1, 00:37:32, Serial0/0
100.0.0.0/16 is subnetted, 7 subnets
O E1 100.4.0.0 [110/84] via 172.12.123.1, 00:00:08, Serial0/0
O E1 100.5.0.0 [110/84] via 172.12.123.1, 00:00:08, Serial0/0
O E1 100.6.0.0 [110/84] via 172.12.123.1, 00:00:08, Serial0/0
O E1 100.7.0.0 [110/84] via 172.12.123.1, 00:00:08, Serial0/0
O E1 100.1.0.0 [110/84] via 172.12.123.1, 00:00:08, Serial0/0
O E1 100.2.0.0 [110/84] via 172.12.123.1, 00:00:08, Serial0/0
O E1 100.3.0.0 [110/84] via 172.12.123.1, 00:00:08, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/65] via 172.12.123.3, 01:42:31, Serial0/0
172.12.0.0/24 is subnetted, 3 subnets
O IA 172.12.34.0 [110/65] via 172.12.123.3, 01:42:31, Serial0/0
O IA 172.12.15.0 [110/65] via 172.12.123.1, 01:42:31, Serial0/0
172.16.0.0/32 is subnetted, 4 subnets
O IA 172.16.9.1 [110/65] via 172.12.123.1, 00:00:13, Serial0/0
O IA 172.16.8.1 [110/65] via 172.12.123.1, 00:00:14, Serial0/0
O IA 172.16.11.1 [110/65] via 172.12.123.1, 00:00:14, Serial0/0
O IA 172.16.10.1 [110/65] via 172.12.123.1, 00:00:14, Serial0/0
HERE IS R2’S ROUTE TABLE AFTER SUMMARIZATION:
R2#show ip route ospf
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/65] via 172.12.123.1, 00:36:42, Serial0/0
100.0.0.0/16 is subnetted, 7 subnets
O E1 100.4.0.0 [110/84] via 172.12.123.1, 00:17:28, Serial0/0
O E1 100.5.0.0 [110/84] via 172.12.123.1, 00:17:28, Serial0/0
O E1 100.6.0.0 [110/84] via 172.12.123.1, 00:17:28, Serial0/0
O E1 100.7.0.0 [110/84] via 172.12.123.1, 00:17:28, Serial0/0
O E1 100.1.0.0 [110/84] via 172.12.123.1, 00:17:28, Serial0/0
O E1 100.2.0.0 [110/84] via 172.12.123.1, 00:17:28, Serial0/0
O E1 100.3.0.0 [110/84] via 172.12.123.1, 00:17:28, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/65] via 172.12.123.3, 01:41:40, Serial0/0
172.12.0.0/24 is subnetted, 3 subnets
O IA 172.12.34.0 [110/65] via 172.12.123.3, 01:41:40, Serial0/0
O IA 172.12.15.0 [110/65] via 172.12.123.1, 01:41:40, Serial0/0
172.16.0.0/22 is subnetted, 1 subnets
O IA 172.16.8.0 [110/65] via 172.12.123.1, 00:17:33, Serial0/0
As can be seen the 4 routes have been Summarized into 1 route, but something really needs to be done with those Redistributed routes as those are half the routing table.
That is where “Summary-Address” comes in! It works to summarize routes being brought into OSPF via Route Redistribution, which I will show just the commands performed on R1, then the impact it has on R2 as it is now our only router left with base OSPF configs:
R1(config-router)#summary-address 100.0.0.0 255.248.0.0 <- NOT A WILDCARD MASK!
AND HERE IS HOW R2’S OSPF ROUTE TABLE NOW LOOKS:
R2#show ip route ospf
1.0.0.0/32 is subnetted, 1 subnets
O IA 1.1.1.1 [110/65] via 172.12.123.1, 00:50:10, Serial0/0
100.0.0.0/13 is subnetted, 1 subnets
O E1 100.0.0.0 [110/84] via 172.12.123.1, 00:01:51, Serial0/0
3.0.0.0/32 is subnetted, 1 subnets
O IA 3.3.3.3 [110/65] via 172.12.123.3, 01:55:08, Serial0/0
172.12.0.0/24 is subnetted, 3 subnets
O IA 172.12.34.0 [110/65] via 172.12.123.3, 01:55:08, Serial0/0
O IA 172.12.15.0 [110/65] via 172.12.123.1, 01:55:08, Serial0/0
172.16.0.0/22 is subnetted, 1 subnets
O IA 172.16.8.0 [110/65] via 172.12.123.1, 00:06:49, Serial0/0
KAPOW! WE NOW HAVE A SINGLE SUMMARY ROUTE WITH A NON-REDISTRIBUTE SEED METRIC OF 20 IN OUR ROUTE TABLE ON R2! BUT WAIT A MINUTE, DID I HEAR SANTA’S SLEIGH BELLS JINGLING OVER BY R5, OUR NSSA TOTAL STUB ROUTER:
R5#show ip route ospf
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, + – replicated route
Gateway of last resort is 172.12.15.1 to network 0.0.0.0
O*IA 0.0.0.0/0 [110/2] via 172.12.15.1, 01:58:11, FastEthernet0/1
100.0.0.0/13 is subnetted, 1 subnets
O N1 100.0.0.0 [110/21] via 172.12.15.1, 00:03:24, FastEthernet0/1
WEEE HAAAAAAVE AAAAA TOOOOOOOUUUCHDOOOOOOOWNNNN!!!
To be completely honest, I am not sure how R5 would have received the summary-address for the external routes, as I believe in a previous lab session I made this a Total Stub which should be blocking the Summary Advertisement LSA’s from reaching the router. So I went back onto R1 to re-issue the command in case powering down without doing a ‘wr’ wiped out the config, let’s see what happens:
R1(config-router)#area 15 nssa no-summary
R5#show ip route ospf
Codes: L – local, C – connected, S – static, R – RIP, M – mobile, B – BGP
D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area
N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2
E1 – OSPF external type 1, E2 – OSPF external type 2
i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2
ia – IS-IS inter area, * – candidate default, U – per-user static route
o – ODR, P – periodic downloaded static route, + – replicated route
Gateway of last resort is 172.12.15.1 to network 0.0.0.0
O*IA 0.0.0.0/0 [110/2] via 172.12.15.1, 02:13:38, FastEthernet0/1
100.0.0.0/13 is subnetted, 1 subnets
O N1 100.0.0.0 [110/21] via 172.12.15.1, 00:18:51, FastEthernet0/1
AND WE STILL HAVE THE SUMMARY ROUTE DESPITE JUST MAKING IT A TOTAL STUB.
I verified on R4 (Total Stub Area 34) that it still only has a single default route, so there has to be something either with the type of Not So Stubby part of NSSA, or it has something to do with it being directly connected over a FastEthernet segment. Either way I am completely fried, and that is all I have to say about that (for now).