Category Archives: CCNP ROUTE – OSPF

OSPF: Type 4 LSA’s, who creates them, why they create them, a relatively shorter post for once!

Type4LSA

Apologies for how terrible the Topology is, I took an existing picture and put some purple arrows leading off the ABR’s, indicating that this is actually where Type 4 LSA’s are created.

Now ASBR’s create Type 5 LSA’s which of course are External / Redistributed routes which are shared throughout the entire routing domain across different Area boundaries by ABR’s, however the ASBR does NOT create a Type 4 LSA to go with it, which is the LSA Type that describes how to get back to the ASBR.

Clear as mud? Good. The reason why the ASBR does not send out Type 4 LSA’s is the same concept surround the SPF Tree, that every router worries about its own Area, and let the routers in other Areas make their own dag nab SPF Tree’s.

That being said, when an ASBR is configured to be an ASBR, it flips on a bit in it’s Hello / Update that it is as ASBR with some Type 5 LSA’s, and every router in the Area gets these Type of LSA that is not an ABR will not produce Type 4 LSA’s.

To demonstrate this, I have done “no router ospf 1” on R1 / R2 / R3, and added it back with only the 172.12.123.0 /24 Area 0 network, with R1 doing default-information originate making it an ASBR.

The LSDB from R1 says it all:

R1#sh ip ospf data

            OSPF Router with ID (172.16.11.1) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         294         0x80000002 0x009BDB 1
3.3.3.3         3.3.3.3         207         0x80000002 0x005D11 1
172.16.11.1     172.16.11.1     861         0x80000003 0x003BB8 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
172.12.123.1    172.16.11.1     861         0x80000001 0x00E575

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         172.16.11.1     955         0x80000001 0x005594 1
R1#

Every router in the Area must match this exact table, and I went to R2 and R3 to verify they do have this exact same Database, I found that there is no Type 4 LSA’s because there are no ABR’s.

There is only a single Type 5 LSA and the Advertising router is R1, along with Type 1 and Type 2 LSA’s that also exist within a single Area. There is no LSA describing how to get back to the ASBR, because when R1 became an ASBR it flipped on a bit in it’s Hello / Update that indicated it’s now an ASBR, and all routers in the single Area installed the Type 5 LSA it is advertising with itself as the Advertising router.

If another Area is added to any router in this Area, it will create a Type 4 LSA to flood into that other Area, describing itself as the path back to the ASBR for that Area.

So say we had 5 routers total, this first is the ASBR, and the other 4 go hop by hop downstream to a destination. R1 being the ASBR and R2 being the first ABR in line, R2 will create a Type 4 LSA to flood into the new Area, saying “I am gateway to the ASBR holding X route your looking for.”

So R3 which is the next hop in line creates a Type 4 LSA, which tells the next that he (R3) is the gateway to the ASBR, when all he knows that R2 is saying he is the Gateway to the ASBR.

This goes on and one through different OSPF Areas, and is why ABR’s create the Type 4 LSA, but the ASBR will still have it installed in its Link State Database, because the SPF Tree Algorithm makes sure all OSPF Routers in an Area have matching LSDB’s.

And that, is the mystery unveiled about LSA Type 4’s. Sorry about the crappy Topology example, I figured it was more in the explanation and LSDB once we cleared out all other Areas and made a single Area 0.

I think that might be it for OSPF review, the rest of the material, I think I’ll risk taking a hit on exam day points, as I this stone has got to keep rolling on ūüôā

OSPF: Important details regarding Summarization and Default Routes for exam day, it’s a long but worthwhile read!

OSPF_Base_Topology

OSPF Summarization is done only on ABR and ASBR routers in your OSPF domain, and use two completely different commands, but what if a router is an ABR and an ASBR?

For example, did you know that using the command “default-information originate …” you are telling the router to create a Type 5 LSA to be propagated throughout the network, thus turning that router into an ASBR?

Another very interesting fact I did not know – OSPF will not allow you to redistribute a static default route. It cannot be done.

Being that I have never knew either of these things that seem like fairly good questions for exam day, I wanted to give them a run for their money to see if that they are true:

R1(config)#ip route 0.0.0.0 0.0.0.0 null0
R1(config)#router ospf 1
R1(config-router)#redistribute static subnets
R1(config-router)#
ASR#2
[Resuming connection 2 to r2 … ]

R2#sh ip route

Gateway of last resort is not set

     1.0.0.0/32 is subnetted, 1 subnets
O IA    1.1.1.1 [110/65] via 172.12.123.1, 00:00:11, Serial0/0
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback2
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/65] via 172.12.123.3, 00:00:11, Serial0/0
     172.12.0.0/24 is subnetted, 3 subnets
O IA    172.12.15.0 [110/65] via 172.12.123.1, 00:00:11, Serial0/0
C       172.12.23.0 is directly connected, FastEthernet0/0
C       172.12.123.0 is directly connected, Serial0/0
R2#sh ip ospf data

            OSPF Router with ID (2.2.2.2) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         45          0x80000005 0x00DC9D 1
2.2.2.2         2.2.2.2         1013        0x80000004 0x009AD9 1
3.3.3.3         3.3.3.3         132         0x80000005 0x006008 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
172.12.123.1    1.1.1.1         905         0x80000004 0x0023BE

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         1.1.1.1         1416        0x80000003 0x0043EE
2.2.2.2         2.2.2.2         1013        0x80000003 0x00F633
3.3.3.3         3.3.3.3         321         0x80000001 0x00AE75
172.12.15.0     1.1.1.1         1154        0x80000005 0x0072F9
172.12.23.0     2.2.2.2         696         0x80000001 0x000460
172.12.23.0     3.3.3.3         692         0x80000009 0x00D582

Nothing! I never knew that was a behavior before, so you HAVE to use the default-information originate command to propagate a static route even though it still uses a Type 5 LSA just like redistribution would have!!!

Keep that in mind on exam day, if you see redistribution in ospf of a static default route, that is beyond a red flag.

Now. Back to this about the default-information originate command making a router an ASBR, I don’t really want to assign a default route to the logical trash bin (null0), so I’m just going to add “always” so no static default route is needed:

R1(config)#router ospf 1
R1(config-router)#default-information originate always
R1(config-router)#
ASR#2
[Resuming connection 2 to r2 … ]

R2#sh ip route

Gateway of last resort is 172.12.123.1 to network 0.0.0.0

     1.0.0.0/32 is subnetted, 1 subnets
O IA    1.1.1.1 [110/65] via 172.12.123.1, 00:07:10, Serial0/0
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback2
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/65] via 172.12.123.3, 00:07:10, Serial0/0
     172.12.0.0/24 is subnetted, 3 subnets
O IA    172.12.15.0 [110/65] via 172.12.123.1, 00:07:10, Serial0/0
C       172.12.23.0 is directly connected, FastEthernet0/0
C       172.12.123.0 is directly connected, Serial0/0
O*E2 0.0.0.0/0 [110/1] via 172.12.123.1, 00:00:12, Serial0/0

R2#

There we go, now R2 has a default route, and what appears to be an External Type 5 LSA route so I am guessing when I go back to R1:

R1(config-router)#do sh ip ospf
 Routing Process “ospf 1” with ID 1.1.1.1
 Start time: 00:00:18.800, Time elapsed: 01:39:06.588
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Link-local Signaling (LLS)
 Supports area transit capability
 Event-log enabled, Maximum number of events: 1000, Mode: cyclic
 It is an area border and autonomous system boundary router

 Redistributing External Routes from,
 Router is not originating router-LSAs with maximum metric

The interesting thing here is that I’ve never seen any other protocol leave the “Redistributing External Routes from” field empty, and it sure is both an ABR and an ASBR now.

So can I do both types of Summarization now? Lets break some stuff and find out! To be clear on how real this is getting:

R1(config-if)#do sh ip int bri
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES NVRAM  administratively down down
FastEthernet0/1            172.12.15.1     YES NVRAM  up                    up
Serial0/0/0                172.12.123.1    YES NVRAM  up                    up
Serial0/0/1                100.100.100.1   YES NVRAM  administratively down down
Loopback1                  1.1.1.1         YES NVRAM  up                    up
Loopback8                  172.16.8.1      YES manual up                    up

Loopback9                  172.16.9.1      YES manual up                    up

Loopback10                 172.16.10.1     YES manual up                    up

Loopback11                 172.16.11.1     YES manual up                    up

Loopback101                100.1.0.1       YES manual up                    up

Loopback102                100.2.0.1       YES manual up                    up

Loopback103                100.3.0.1       YES manual up                    up

Loopback104                100.4.0.1       YES manual up                    up

Loopback105                100.5.0.1       YES manual up                    up

Loopback106                100.6.0.1       YES manual up                    up

Loopback107                100.7.0.1       YES manual up                    up

Summary Address = 172.16.8.0 /22
Summary Address = 100.0.0.0  /13

Now for the ABR, the routes need to be put in via the “network” command, being that you are specifying the Area containing the routes, so they need to be entered into OSPF in the same Area.

I was actually just cursing looking at that for some reason thinking the Loopback # dictated the Area # or something, but I got it now lets give it a go here:

R1(config-if)#router ospf 1
R1(config-router)#network 100.1.0.0 0.0.255.255 area 100
R1(config-router)#network 100.2.0.0 0.0.255.255 area 100
R1(config-router)#network 100.3.0.0 0.0.255.255 area 100
R1(config-router)#network 100.4.0.0 0.0.255.255 area 100
R1(config-router)#network 100.5.0.0 0.0.255.255 area 100
R1(config-router)#network 100.6.0.0 0.0.255.255 area 100
R1(config-router)#network 100.7.0.0 0.0.255.255 area 100
R1(config-router)#area 100 range 100.0.0.0 255.248.0.0 ?
  advertise      Advertise this range (default)
  cost           User specified metric for this range
  not-advertise  DoNotAdvertise this range
  <cr>

R1(config-router)#area 100 range 100.0.0.0 255.248.0.0
R1(config-router)#

Cost can be defined as a modifier to the command as highlighted in red there, otherwise OSPF will use the best Prefix’s Cost value for the Summary Route which I think should be left alone unless you have a reason to change it.

So lets take a look at R2’s OSPF route table to verify we have one type of summarization at work:

R2#sh 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:43:36, Serial0/0
     100.0.0.0/13 is subnetted, 1 subnets
O IA    100.0.0.0 [110/65] via 172.12.123.1, 00:16:54, 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:43:36, Serial0/0
     172.12.0.0/24 is subnetted, 3 subnets
O IA    172.12.15.0 [110/65] via 172.12.123.1, 00:43:36, Serial0/0
O*E2 0.0.0.0/0 [110/1] via 172.12.123.1, 00:16:49, Serial0/0
R2#sh ip ospf data

            OSPF Router with ID (2.2.2.2) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         750         0x80000006 0x00DA9E 1
2.2.2.2         2.2.2.2         1590        0x80000005 0x0098DA 1
3.3.3.3         3.3.3.3         920         0x80000006 0x005E09 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
172.12.123.1    1.1.1.1         1487        0x80000005 0x0021BF

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         1.1.1.1         1971        0x80000004 0x0041EF
2.2.2.2         2.2.2.2         1590        0x80000004 0x00F434
3.3.3.3         3.3.3.3         920         0x80000002 0x00AC76
100.0.0.0       1.1.1.1         1028        0x80000001 0x00409A
172.12.15.0     1.1.1.1         1730        0x80000006 0x0070FA
172.12.23.0     2.2.2.2         1347        0x80000002 0x000261
172.12.23.0     3.3.3.3         1421        0x8000000A 0x00D383

So it is being advertised as an Inter-Area (Type 3 LSA) route as can be seen both in the IP route table, as it should because this is the ABR way to summarize routes. Ahem.

Also if you want to get granular with how you look at the LSA Database, to see this summary route for example, you can type in as follows:

R2#sh ip ospf data summ 100.0.0.0

            OSPF Router with ID (2.2.2.2) (Process ID 1)

                Summary Net Link States (Area 0)

  Routing Bit Set on this LSA
  LS age: 1347
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 100.0.0.0 (summary Network Number)
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000001
  Checksum: 0x409A
  Length: 28
  Network Mask: /13

        TOS: 0  Metric: 1

This command will give you a ton of output, like the Database itself, except with details which makes it incredibly hard to dig through if you have a decent amount of Areas it is reporting all these details before.

However, I did want you to see, you can verify if a route is a Summary from the LSA Database – And that is a good thing to know. You can also look at sections of it with “sh ip ospf data summ” and so on but I won’t flood the page with all that output.

So all this ABR Summarization is all fine and good you say, but what about ASBR Summarization? I am glad you asked.

I am not sure if it requires the networks to be entered via the “network” command, so I’ll test out whether they need to be added, lets take a look:

R1(config-router)#summary-address 172.16.8.0 255.255.252.0
R1(config-router)#
ASR#2
[Resuming connection 2 to r2 … ]

R2#sh 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:55:55, Serial0/0
     100.0.0.0/13 is subnetted, 1 subnets
O IA    100.0.0.0 [110/65] via 172.12.123.1, 00:29:13, 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:55:55, Serial0/0
     172.12.0.0/24 is subnetted, 3 subnets
O IA    172.12.15.0 [110/65] via 172.12.123.1, 00:55:55, Serial0/0
O*E2 0.0.0.0/0 [110/1] via 172.12.123.1, 00:29:08, Serial0/0
R2#

Well that stinks. Let me add the routes via “network” on R1 and try that again:

R1(config-router)#
R1(config-router)#network 172.16.8.0 0.0.0.255 area 51
R1(config-router)#network 172.16.9.0 0.0.0.255 area 51
R1(config-router)#network 172.16.10.0 0.0.0.255 area 51
R1(config-router)#network 172.16.11.0 0.0.0.255 area 51
R1(config-router)#
ASR#2
[Resuming connection 2 to r2 … ]

R2#sh 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:58:21, Serial0/0
     100.0.0.0/13 is subnetted, 1 subnets
O IA    100.0.0.0 [110/65] via 172.12.123.1, 00:31:40, 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:58:21, Serial0/0
     172.12.0.0/24 is subnetted, 3 subnets
O IA    172.12.15.0 [110/65] via 172.12.123.1, 00:58:21, 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:11, Serial0/0

O IA    172.16.8.1 [110/65] via 172.12.123.1, 00:00:21, Serial0/0

O IA    172.16.11.1 [110/65] via 172.12.123.1, 00:00:01, Serial0/0

O IA    172.16.10.1 [110/65] via 172.12.123.1, 00:00:11, Serial0/0

O*E2 0.0.0.0/0 [110/1] via 172.12.123.1, 00:00:06, Serial0/0
R2#

Now things are getting interesting, because if I remove the summarization R1 is doing as an ABR, will the summarization command as an ASBR kick into action? Lets see:

R1(config-router)#no area 100 range 100.0.0.0 255.248.0.0
R1(config-router)#
ASR#2
[Resuming connection 2 to r2 … ]

R2#sh 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, 01:01:04, Serial0/0
     100.0.0.0/32 is subnetted, 7 subnets
O IA    100.5.0.1 [110/65] via 172.12.123.1, 00:00:12, Serial0/0

O IA    100.4.0.1 [110/65] via 172.12.123.1, 00:00:12, Serial0/0

O IA    100.7.0.1 [110/65] via 172.12.123.1, 00:00:12, Serial0/0

O IA    100.6.0.1 [110/65] via 172.12.123.1, 00:00:12, Serial0/0

O IA    100.1.0.1 [110/65] via 172.12.123.1, 00:00:12, Serial0/0

O IA    100.3.0.1 [110/65] via 172.12.123.1, 00:00:12, Serial0/0

O IA    100.2.0.1 [110/65] via 172.12.123.1, 00:00:12, 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:01:04, Serial0/0
     172.12.0.0/24 is subnetted, 3 subnets
O IA    172.12.15.0 [110/65] via 172.12.123.1, 01:01:04, 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:02:54, Serial0/0

O IA    172.16.8.1 [110/65] via 172.12.123.1, 00:03:04, Serial0/0

O IA    172.16.11.1 [110/65] via 172.12.123.1, 00:02:45, Serial0/0

O IA    172.16.10.1 [110/65] via 172.12.123.1, 00:02:55, Serial0/0

O*E2 0.0.0.0/0 [110/1] via 172.12.123.1, 00:00:08, Serial0/0
R2#

No it did not, so I am wondering if perhaps order of commands comes into play here, as I configured the summary-address of routes that weren’t in the OSPF config yet.

So after a lot of failure with trying to redistribute an actual static route to make it an official “ASBR”, remove and re-add commands, I caved and watched the Summarization portion of my training video for summary address and I’ll be damned if this can’t ONLY be done by the ASBR because you redistribute the friggin connected routes! Gah!

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#router ospf 1
R1(config-router)#no network 172.16.8.0 0.0.0.255 area 51
R1(config-router)#no network 172.16.9.0 0.0.0.255 area 51
R1(config-router)#no network 172.16.10.0 0.0.0.255 area 51
R1(config-router)#no network 172.16.11.0 0.0.0.255 area 51
R1(config-router)#redistribute connected subnets
R1(config-router)#area 100 range 100.0.0.0 255.248.0.0
R1(config-router)#summary-address 172.16.8.0 255.255.252.0
R1(config-router)#

Now for the moment of truth (I removed 172.x routes from OSPF):

R2#sh 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, 01:31:24, Serial0/0
     100.0.0.0/13 is subnetted, 1 subnets
O IA    100.0.0.0 [110/65] via 172.12.123.1, 00:01:19, 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:31:24, Serial0/0
     172.12.0.0/24 is subnetted, 3 subnets
O IA    172.12.15.0 [110/65] via 172.12.123.1, 01:31:24, Serial0/0
     172.16.0.0/22 is subnetted, 1 subnets
O E2    172.16.8.0 [110/20] via 172.12.123.1, 00:01:14, Serial0/0
O*E2 0.0.0.0/0 [110/1] via 172.12.123.1, 00:01:14, Serial0/0
R2#

FINALLY!! So that is why summary-address can only be done on the ASBR, because you need to redistribute the sequential routes to be summarized before entering the command to summarize them!

Also we now know that we can issue both commands on R1 as an ABR, and an ASBR with no problems.

HOWEVER WE ARE NOT DONE YET, AS WE HAVEN’T GONE INTO THE SECOND WAY OSPF CAN CREATE A STATIC ROUTE – AND THIS TIME IT AIN’T A TYPE 5 LSA!

The other way is to make an Area a Stub Area. By doing this, the Stub creates a default route for itself out of the network, does not allow LSA Type 5’s into the Area at all actually, so the default route created in this case is a Summary Type 3 LSA.

Lets look at Area 34 quick to wrap this one up:

R3(config-router)#area 34 stub
R3(config-router)#
ASR#4
[Resuming connection 4 to r4 … ]

R4#
R4#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R4(config)#router ospf 1
R4(config-router)#area 34 stub

That is all there is to the stub command, and the default route can be seen here, but there is still a LOT of clutter from Inter-Area routes:

R4(config-router)#do sh ip route ospf

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:00:15, FastEthernet0/1

      1.0.0.0/32 is subnetted, 1 subnets
O IA     1.1.1.1 [110/66] via 172.12.34.3, 00:00:15, FastEthernet0/1
      2.0.0.0/32 is subnetted, 1 subnets
O IA     2.2.2.2 [110/66] via 172.12.34.3, 00:00:15, FastEthernet0/1
      3.0.0.0/32 is subnetted, 1 subnets
O IA     3.3.3.3 [110/2] via 172.12.34.3, 00:00:15, FastEthernet0/1
      100.0.0.0/13 is subnetted, 1 subnets
O IA     100.0.0.0 [110/66] via 172.12.34.3, 00:00:15, FastEthernet0/1
      172.12.0.0/16 is variably subnetted, 5 subnets, 2 masks
O IA     172.12.15.0/24 [110/66] via 172.12.34.3, 00:00:15, FastEthernet0/1
O IA     172.12.23.0/24 [110/2] via 172.12.34.3, 00:00:15, FastEthernet0/1
O IA     172.12.123.0/24 [110/65] via 172.12.34.3, 00:00:15, FastEthernet0/1
R4(config-router)#

In the LSDB under the Area 34 Summary Header we can see the route there as well:

 Summary Net Link States (Area 34)

Link ID         ADV Router      Age         Seq#       Checksum
0.0.0.0         3.3.3.3         320         0x80000001 0x0057DA

1.1.1.1         3.3.3.3         320         0x80000001 0x00AB42
2.2.2.2         3.3.3.3         320         0x80000001 0x007D6C
3.3.3.3         3.3.3.3         320         0x80000001 0x00CC59
100.0.0.0       3.3.3.3         320         0x80000001 0x00A4EF
172.12.15.0     3.3.3.3         320         0x80000001 0x00DE4B
172.12.23.0     3.3.3.3         320         0x80000001 0x00045E
172.12.123.0    3.3.3.3         320         0x80000001 0x002C92

Now the thing that kind of amazes me, is the only verification command I could find outside of “show run” to verify this router is a stub router, was to do “sh ip ospf” and scroll all the way down under the Area 34 Header to find it:

Area 34
        Number of interfaces in this area is 1
        It is a stub area
        Area has no authentication
        SPF algorithm last executed 00:09:14.524 ago
        SPF algorithm executed 4 times
        Area ranges are
        Number of LSA 11. Checksum Sum 0x0528C8
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

So to finish this off, lets make it a total stub, and get rid of those Inter-Area routes all together:

R3(config-router)#no area 34 stub
R3(config-router)#area 34 stub no-summary
R3(config-router)#
ASR#4
[Resuming connection 4 to r4 … ]

*May 19 00:03:42.155: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on FastEthernet0/1 from LOADING to FULL, Loading Done

R4#sh ip route ospf

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:12:49, FastEthernet0/1
R4#

So lets see if waaaay across the Topology R5 can still ping 4.4.4.4:

R5#ping 4.4.4.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
U.U.U
Success rate is 0 percent (0/5)
R5#traceroute 4.4.4.4

Type escape sequence to abort.
Tracing the route to 4.4.4.4

  1 172.12.15.1 0 msec 0 msec 4 msec
  2 172.12.15.1 !H  *  !H
R5#

That was interesting traceroute traffic, upon looking at R1, it does have the network 172.12.34.0 in its Summary Type 3 LSA’s, but no Area 34 or Area 4 at all in its LSDB. However I know what’s going on here, as 4.4.4.4 belong to Area 4 which to Area 34 would be blocked as an Inter-Area route, so if we do this:

R4(config)#router ospf 1
R4(config-router)#no network 4.4.4.4 0.0.0.0 area 4
R4(config-router)#network 4.4.4.4 0.0.0.0 area 34
R4(config-router)#

Then we should now be able to do this:

R5#ping 4.4.4.4

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 4.4.4.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 64/65/69 ms
R5#

There we go, logical thinking isn’t always easy, but it does usually work.

I have one very last thing to add to this and I am done on this topic, seriously.

It has to do with the default-information originate command, because you can actually set it to track a certain route, and if that route goes down OSPF “Poisons” the default route and removes it from route tables / LSDB’s.

Lets take a look at the configuration:

R1#conf t
R1(config)#int lo99
R1(config-if)#ip add 99.99.99.99 255.255.255.255
R1(config)#access-list 99 permit 99.99.99.99
R1(config)#route-map 99bananas permit 10
R1(config-route-map)#match ip add 99
R1(config-route-map)#route-map 99bananas permit 20
R1(config-route-map)#exit
R1(config)#router ospf 1
R1(config-router)#default-information originate always route-map 99bananas

R1(config-router)#

Adding this route-map to it will “track” that route, so if that route or interface goes bye bye, so does our default route! Lets see this in action:

R2#sh ip route

Gateway of last resort is 172.12.123.1 to network 0.0.0.0

     1.0.0.0/32 is subnetted, 1 subnets
O IA    1.1.1.1 [110/65] via 172.12.123.1, 02:13:02, Serial0/0
     2.0.0.0/32 is subnetted, 1 subnets
C       2.2.2.2 is directly connected, Loopback2
     100.0.0.0/13 is subnetted, 1 subnets
O IA    100.0.0.0 [110/65] via 172.12.123.1, 00:42:57, Serial0/0
     3.0.0.0/32 is subnetted, 1 subnets
O IA    3.3.3.3 [110/65] via 172.12.123.3, 02:13:02, Serial0/0
     4.0.0.0/32 is subnetted, 1 subnets
O IA    4.4.4.4 [110/66] via 172.12.123.3, 00:09:41, Serial0/0
     99.0.0.0/32 is subnetted, 1 subnets
O E2    99.99.99.99 [110/20] via 172.12.123.1, 00:05:35, Serial0/0

     172.12.0.0/24 is subnetted, 4 subnets
O IA    172.12.34.0 [110/65] via 172.12.123.3, 00:18:17, Serial0/0
O IA    172.12.15.0 [110/65] via 172.12.123.1, 02:13:06, Serial0/0
C       172.12.23.0 is directly connected, FastEthernet0/0
C       172.12.123.0 is directly connected, Serial0/0
     172.16.0.0/22 is subnetted, 1 subnets
O E2    172.16.8.0 [110/20] via 172.12.123.1, 00:09:38, Serial0/0
O*E2 0.0.0.0/0 [110/1] via 172.12.123.1, 00:01:02, Serial0/0

R2#

Now lets remove the loopback and see the havoc it wreaks:

R1(config)#no int lo99
R1(config)#
*May 19 01:32:13.539: %LINK-5-CHANGED: Interface Loopback99, changed state to administratively down
*May 19 01:32:14.539: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback99, changed state to down
R1(config)#
ASR#2
[Resuming connection 2 to r2 … ]

R2#sh ip route

Gateway of last resort is not set

So that is something excellent to know for exam day and the real world, that your default routes can have dependencies or be conditional upon other routes being available.

Pretty cool stuff. Ok this post has gone on way too long, that its for these topics!

OSPF: Route filtering between Areas (Inter-Area) configured and explained!

OSPF_Filter_List_Top

For those who have forgotten how LSA’s work between Area’s, let us refresh your memory:

  • Type 1 and 2 LSA’s live within their own Areas to create the SPF Tree
  • ABR’s extract the Network / Subnet Mask information to create a Type 3 LSA which it then floods into the other Area (Summary LSA in Database)

We cannot filter routes within an Area because that breaks the SPF Tree rule that all OSPF routers in an Area must match the LSDB’s, however, there is a way to keep routes from propagating out of the Area via ABR’s creating type 3 LSA’s which is a Filter-List.

Now I’ve already written about Distribute-List vs Filter-List, but I’ll demonstrate both again quickly to do a quick refresher.

A distribute-list will allow the ABR to create the Type 3 LSA, but not create a route for it in its IP route table, while a filter-list will stop the Type 3 LSA from being created at all.

We will pick on 3.3.3.3 shown here when I issue the command “sh ip ospf data” and filter out a LOT of output from other Area’s and their Summary advertisements:

R1#sh ip ospf data

 Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         1.1.1.1         1795        0x80000001 0x0047EC
2.2.2.2         2.2.2.2         1460        0x80000001 0x00FA31
3.3.3.3         3.3.3.3         1514        0x80000001 0x00AE75
172.12.15.0     1.1.1.1         1532        0x80000003 0x0076F7
172.12.23.0     2.2.2.2         1406        0x80000003 0x00FF62
172.12.23.0     3.3.3.3         1461        0x80000003 0x00E17C

Also, the “sh ip route ospf” to verify its a route:

R1#sh ip route ospf

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
O IA     2.2.2.2 [110/65] via 172.12.123.2, 00:23:47, Serial0/0/0
      3.0.0.0/32 is subnetted, 1 subnets
O IA     3.3.3.3 [110/65] via 172.12.123.3, 00:25:51, Serial0/0/0
      172.12.0.0/16 is variably subnetted, 5 subnets, 2 masks
O IA     172.12.23.0/24 [110/65] via 172.12.123.3, 00:25:51, Serial0/0/0
                        [110/65] via 172.12.123.2, 00:23:47, Serial0/0/0
R1#

So lets get to work. First I will demonstrate it learning the Type 3 LSA but not creating a route, and then I will move onto it not creating the Type 3 (Summary) LSA at all.

Note in the exam, you may be asked to filter a route so the router DOES NOT KNOW ABOUT IT AT ALL, and for this you will use filter-list or the router will know about the route via the Type 3 LSA.

That being said, lets get cookin:

R1#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#ip prefix-list KillTheWabbit seq 10 deny 3.3.3.3/32
R1(config)#ip prefix-list KillTheWabbit seq 20 permit 0.0.0.0/0
R1(config)#router ospf 1
R1(config-router)#distribute-list prefix KillTheWabbit in
R1(config-router)#do sh ip route ospf

Gateway of last resort is not set

R1(config-router)#

Well, that is not what I was expecting, let me try adjusting my prefix-list here a bit:

R1(config-router)#exit
R1(config)#no ip prefix-list KillTheWabbit seq 20 permit 0.0.0.0/0
R1(config)#ip prefix-list KillTheWabbit seq 20 permit 0.0.0.0/0 le 32
R1(config)#do sh ip route ospf

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
O IA     2.2.2.2 [110/65] via 172.12.123.2, 00:00:14, Serial0/0/0
      172.12.0.0/16 is variably subnetted, 5 subnets, 2 masks
O IA     172.12.23.0/24 [110/65] via 172.12.123.3, 00:00:14, Serial0/0/0
                        [110/65] via 172.12.123.2, 00:00:14, Serial0/0/0
R1(config)#

Much better, just had to indicate that my default route is “less than or equal to any”, which still kind of confuses me with prefix-lists but with all the information I’ve been absorbing over the last few months its hard to keep anything straight.

So what about our Summary LSA’s for Area 0, I expect we still have that:

 Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         1.1.1.1         566         0x80000002 0x0045ED
2.2.2.2         2.2.2.2         216         0x80000002 0x00F832
3.3.3.3         3.3.3.3         269         0x80000002 0x00AC76
172.12.15.0     1.1.1.1         308         0x80000004 0x0074F8
172.12.23.0     2.2.2.2         216         0x80000004 0x00FD63
172.12.23.0     3.3.3.3         269         0x80000004 0x00DF7D

We sure do, so lets get that out of the Summary list on R1, but first I want to show you my mistake when configuring the Filter-List:

R1(config)#router ospf 1
R1(config-router)#no distribute-list prefix KillTheWabbit in
R1(config-router)#filter-list prefix KillTheWabbit in
                  ^
% Invalid input detected at ‘^’ marker.

It needs “Area # …” to prepend the command, to make it more difficult to remember the syntax, because Cisco is out to get me. Anyways I got the correct syntax here, and lets take a look if I struck gold:

R1(config-router)#area 0 filter-list prefix KillTheWabbit in
R1(config-router)#do sh ip route ospf

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
O IA     2.2.2.2 [110/65] via 172.12.123.2, 00:03:11, Serial0/0/0
      3.0.0.0/32 is subnetted, 1 subnets
O IA     3.3.3.3 [110/65] via 172.12.123.3, 00:03:11, Serial0/0/0
      172.12.0.0/16 is variably subnetted, 5 subnets, 2 masks
O IA     172.12.23.0/24 [110/65] via 172.12.123.3, 00:03:11, Serial0/0/0
                        [110/65] via 172.12.123.2, 00:03:11, Serial0/0/0
R1(config-router)#

Siiiiiiiiigh. This tells me immediately it has that Type 3 LSA, I don’t even need to look. So I know OSPF has some odd directional behaviors when typing in or out like “in”to an Area or “out” to an Area, so let me take this command one step at a time:

R1(config-router)#area 0 filter-list ?
  prefix  Filter prefixes between OSPF areas

R1(config-router)#area 0 filter-list prefix ?
  WORD  Name of an IP prefix-list

R1(config-router)#area 0 filter-list prefix KillTheWabbit ?
  in   Filter networks sent to this area
  out  Filter networks sent from this area

Ok I see here, this router is acting as the filter into other Areas, but cannot filter it from being in Area 0. So that being said, lets see how R5 feels about never knowing 3.3.3.3 existed! :

R5#sh ip route ospf
     1.0.0.0/32 is subnetted, 1 subnets
O IA    1.1.1.1 [110/2] via 172.12.15.1, 00:51:34, FastEthernet0/1
     2.0.0.0/32 is subnetted, 1 subnets
O IA    2.2.2.2 [110/66] via 172.12.15.1, 00:16:53, FastEthernet0/1
     172.12.0.0/24 is subnetted, 3 subnets
O IA    172.12.23.0 [110/66] via 172.12.15.1, 00:16:53, FastEthernet0/1
O IA    172.12.123.0 [110/65] via 172.12.15.1, 00:51:34, FastEthernet0/1
R5#sh ip ospf data

            OSPF Router with ID (5.5.5.5) (Process ID 1)

                Router Link States (Area 15)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         1191        0x80000006 0x001182 1
5.5.5.5         5.5.5.5         1109        0x80000004 0x001959 1

                Net Link States (Area 15)

Link ID         ADV Router      Age         Seq#       Checksum
172.12.15.1     1.1.1.1         1191        0x80000002 0x0097BC

                Summary Net Link States (Area 15)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         1.1.1.1         1449        0x80000002 0x0045ED
2.2.2.2         1.1.1.1         1028        0x80000001 0x009B54
172.12.23.0     1.1.1.1         1028        0x80000001 0x00A483
172.12.123.0    1.1.1.1         1449        0x80000002 0x00487B
R5#

Now this is odd, not a trace of 3.3.3.3, but I filtered out on Area 0, let me look at R1 again:

R1(config-router)#do sh ip ospf data

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         1298        0x80000003 0x00DAA3 1
2.2.2.2         2.2.2.2         1206        0x80000003 0x009CD8 1
3.3.3.3         3.3.3.3         1258        0x80000003 0x005E0E 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
172.12.123.1    1.1.1.1         1052        0x80000003 0x0025BD

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         1.1.1.1         1556        0x80000002 0x0045ED
2.2.2.2         2.2.2.2         1206        0x80000002 0x00F832
3.3.3.3         3.3.3.3         1258        0x80000002 0x00AC76
172.12.15.0     1.1.1.1         1298        0x80000004 0x0074F8
172.12.23.0     2.2.2.2         1206        0x80000004 0x00FD63
172.12.23.0     3.3.3.3         1258        0x80000004 0x00DF7D

                Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         1556        0x80000002 0x00D152 1

                Summary Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
2.2.2.2         1.1.1.1         1135        0x80000001 0x009B54
172.12.15.0     1.1.1.1         1298        0x80000004 0x0074F8
172.12.23.0     1.1.1.1         1135        0x80000001 0x00A483
172.12.123.0    1.1.1.1         1556        0x80000002 0x00487B

                Router Link States (Area 15)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         1298        0x80000006 0x001182 1
5.5.5.5         5.5.5.5         1218        0x80000004 0x001959 1

                Net Link States (Area 15)

Link ID         ADV Router      Age         Seq#       Checksum
172.12.15.1     1.1.1.1         1298        0x80000002 0x0097BC

                Summary Net Link States (Area 15)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         1.1.1.1         1556        0x80000002 0x0045ED
2.2.2.2         1.1.1.1         1135        0x80000001 0x009B54
172.12.23.0     1.1.1.1         1135        0x80000001 0x00A483
172.12.123.0    1.1.1.1         1556        0x80000002 0x00487B
R1(config-router)#

Ooooook, now I get it, it doesn’t prevent it from creating the route, but it prevents it from creating Type 3 LSA’s in any other Area’s as seen above under “Summary”.

So what happens then if I put “in” at the end, anything? I’ll spare the output, but it did nothing at all, I assume this would need to be configured on the source R3 so lets go do that quick to prove beyond reasonable doubt and so I can keep my sanity:

R3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#ip prefix-list KillTheRoute seq 10 deny 3.3.3.3/32
R3(config)#ip prefix-list KillTheRoute seq 20 permit 0.0.0.0/0 le 32
R3(config)#router ospf 1
R3(config-router)#area 0 filter-list prefix KillTheRoute out
R3(config-router)#
ASR#1
[Resuming connection 1 to r1 … ]

R1(config)#do sh ip ospf data

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         1725        0x80000003 0x00DAA3 1
2.2.2.2         2.2.2.2         1633        0x80000003 0x009CD8 1
3.3.3.3         3.3.3.3         1686        0x80000003 0x005E0E 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
172.12.123.1    1.1.1.1         1479        0x80000003 0x0025BD

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         1.1.1.1         1983        0x80000002 0x0045ED
2.2.2.2         2.2.2.2         1633        0x80000002 0x00F832
3.3.3.3         3.3.3.3         1686        0x80000002 0x00AC76 <- WTF
172.12.15.0     1.1.1.1         1725        0x80000004 0x0074F8
172.12.23.0     2.2.2.2         1633        0x80000004 0x00FD63
172.12.23.0     3.3.3.3         1686        0x80000004 0x00DF7D

OOoooooh:

R1(config-router)#area 0 filter-list prefix KillTheWabbit ?
  in   Filter networks sent to this area
  out  Filter networks sent from this area

So lets try one more time from R3:

R3(config-router)#no area 0 filter-list prefix KillTheRoute out
R3(config-router)#area 3 filter-list prefix KillTheRoute out
R3(config-router)#
ASR#1
[Resuming connection 1 to r1 … ]

R1(config)#do sh ip ospf data

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         1945        0x80000003 0x00DAA3 1
2.2.2.2         2.2.2.2         1853        0x80000003 0x009CD8 1
3.3.3.3         3.3.3.3         1906        0x80000003 0x005E0E 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
172.12.123.1    1.1.1.1         1700        0x80000003 0x0025BD

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         1.1.1.1         215         0x80000003 0x0043EE
2.2.2.2         2.2.2.2         1853        0x80000002 0x00F832
172.12.15.0     1.1.1.1         1945        0x80000004 0x0074F8
172.12.23.0     2.2.2.2         1853        0x80000004 0x00FD63
172.12.23.0     3.3.3.3         1906        0x80000004 0x00DF7D

                Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         215         0x80000003 0x00CF53 1

                Summary Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
2.2.2.2         1.1.1.1         1782        0x80000001 0x009B54
172.12.15.0     1.1.1.1         1945        0x80000004 0x0074F8
172.12.23.0     1.1.1.1         1782        0x80000001 0x00A483
172.12.123.0    1.1.1.1         215         0x80000003 0x00467C

                Router Link States (Area 15)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         1945        0x80000006 0x001182 1
5.5.5.5         5.5.5.5         1865        0x80000004 0x001959 1

                Net Link States (Area 15)

Link ID         ADV Router      Age         Seq#       Checksum
¬†–More–

Tadaaaaa!

So for Filter-Lists and defining the Area, “in” means to filter any Type 3 LSA’s being sent from the local router to other Areas attached if its an ABR, where as “out” you will want to define the Area on which the route resides in, and of course that means on that local Router.

It will still populate the Type 1 LSA’s within its Area, nothing stops that, not even the Terminator from Part 2 when he has the mini-gun, but it will stop it from Propagating the Type 3 LSA throughout other networks.

That is all I have to say about that, as I have a lot of ground to cover to finish OSPF tonight and move onto… everything else!

OSPF: Metric (Cost) Calculation for both Intra-Area and Inter-Area explained, and Metric fine tuning for path selection!

OSPF_Base_Topology

To calculate the best path to a route, first the router builds an LSDB that is then run against the SPF Algorithm, which then comes up with its best paths to subnets.

Ultimately what makes it into the IP Route Table is decided by CEF, which views all protocols different tables to decide the best path to a destination, but for the OSPF Route Table it uses the SPF Algorithm and its LSDB.

Cost is OSPF’s Metric, and it is calculated by the available Bandwidth on a link, which the higher the bandwidth speed the lower the cost will be – Lowest cost is always preferred.

Cost is determined by the “egress” interface or the interface the data will be taking outbound from a router, and to see that interfaces cost you can type “sh ip ospf int X”

Intra-Area routes

As said cost is derived by OSPF calculating the cost of every single link, along every single path, to the destination network. So if you are asked to find the cost of a path, you always start with the first hops interface cost, and end with the last interfaces hop to that network. Also if you don’t know, and you should, Intra-Area means within your Area and Inter-Area means from other Areas into your Area.

Speaking of Costs, here is a quick breakdown of them:

  • 10Gig/1Gig/FastEthernet (100mbps) = 1
  • Ethernet = 10
  • Serial = 64

There are other serial speeds that cost more, but they are not worth committing to memory, if you remember those 3 you should be good. The 10G/1G/100MBPS all equaling 1 I believe was due to the fact that when this algorithm was created, it was not thought that speeds would ever exceed FastEthernet, much like we never thought we’d need more storage space than a Floppy Disk provided ūüôā

Inter-Area routes

Intra-Area routes can be manually calculated easily because we (or OSPF) has the link speeds and can quickly find the least cost path, whereas Inter-Area routes are learned from Type 3 LSA’s with do not provide link types / speeds in its Topology information.

That is essentially with Type 3 LSA’s are referred to as a Summary LSA, because the ABR is basically flooding the routes into the other Area, only telling them they can reach a specific route through them and that’s it for information.

This give the ABR a LOT of control over telling routers in one Area how to get to routes in another Area. This also gives the network administrator the ability to manipulate the costs from one Area into another, if you prefer that perhaps a less used but slower link is preferred for your Daily Backups of a Server while you prefer the faster link for work load data transmission.

So essentially the Cost from one Area is passed down to an ABR, which makes a Type 3 LSA, and the Intra-Area has to decide its best path via Cost to that ABR and trust the ABR does truly have the lowest Cost preferred path.

Metric Fine Tuning

Before we fine tune any paths, we better know the order they are preferred:

  • Intra-Area
  • Inter-Area
  • External

Type 1 and 2 LSA’s mean a route is an Intra-Area Route, a type 3 LSA indicates an Inter-Area Route, and type 5 LSA’s (or type 7 in NSSA Areas) indicate a route has been Redistributed from another protocol, or routing domain such as a connected or static route.

Type 1 and 2 LSA’s trigger a recalculation within the entire Area of its SPF Tree for best Paths to a route, whereas a change in a Type 3 LSA does not, because they don’t describe the Topology or Tree in this Area – They have their own Area to do all that calculation in!

To see the # of SPF calculations in the local routers Areas that it is connected to, and a lot of other good info I’ll highlight, use the command “sh ip ospf” :

R1#sh ip ospf
 Routing Process “ospf 1” with ID 1.1.1.1
 Start time: 00:00:18.784, Time elapsed: 06:04:12.980
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 Supports Link-local Signaling (LLS)
 Supports area transit capability
 Event-log enabled, Maximum number of events: 1000, Mode: cyclic
 It is an area border router
 Router is not originating router-LSAs with maximum metric
 Initial SPF schedule delay 5000 msecs
 Minimum hold time between two consecutive SPFs 10000 msecs
 Maximum wait time between two consecutive SPFs 10000 msecs
 Incremental-SPF disabled
 Minimum LSA interval 5 secs
 Minimum LSA arrival 1000 msecs
 LSA group pacing timer 240 secs
 Interface flood pacing timer 33 msecs
 Retransmission pacing timer 66 msecs
 Number of external LSA 0. Checksum Sum 0x000000
 Number of opaque AS LSA 0. Checksum Sum 0x000000
 Number of DCbitless external and opaque AS LSA 0
 Number of DoNotAge external and opaque AS LSA 0
 Number of areas in this router is 3. 3 normal 0 stub 0 nssa

 Number of areas transit capable is 0
 External flood list length 0
 IETF NSF helper support enabled
 Cisco NSF helper support enabled
 Reference bandwidth unit is 100 mbps
    Area BACKBONE(0)
        Number of interfaces in this area is 1
        Area has no authentication
        SPF algorithm last executed 04:14:00.828 ago
        SPF algorithm executed 6 times

        Area ranges are
        Number of LSA 9. Checksum Sum 0x05AC1E
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0
    Area 1
        Number of interfaces in this area is 1 (1 loopback)
        Area has no authentication
        SPF algorithm last executed 04:14:00.828 ago
        SPF algorithm executed 4 times

        Area ranges are
        Number of LSA 6. Checksum Sum 0x0267B6
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0
    Area 15
        Number of interfaces in this area is 1

        Area has no authentication

        SPF algorithm last executed 03:35:46.956 ago

        SPF algorithm executed 6 times

        Area ranges are
        Number of LSA 8. Checksum Sum 0x027C73
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

R1#

It’s hard not to highlight a majority of the information, I shut down a lot of Areas to make the output readable at full length, but as an ABR this shows how long its been since SPF Calculation / SPF executions / Authentication / # of LSA’s / # of interfaces in Area (How many interfaces this local router has in that Area) / It’s RID / Its route type / What types of Areas it knows of and how many.

TLDR – “sh ip ospf” has a lot of good information.

Back to changing the Metric, there are 3 ways to accomplish this configuration:

  • Changing the reference bandwidth (configured in OSPF router config mode)
  • Setting the bandwidth on the interface
  • Configuring the cost directly (on the interface)

The default “reference bandwidth” for OSPF is 100MBPS, which is why 10gig/1gig/FastEthernet(100mbps) all cost 1, because whoever originally came up with this thought we would never see speeds beyond 100MBPS, so that is the lowest cost that can be assigned for an interface – Fortunately this is only by default.

Lets change things up since I’m running the lab anyways, and see how to do it this way:

R1(config)#router ospf 1
R1(config-router)#auto
R1(config-router)#auto-cost ref
R1(config-router)#auto-cost reference-bandwidth ?
  <1-4294967>  The reference bandwidth in terms of Mbits per second

This is locally significant only, but should be adjusted across all OSPF routers under our administration, so all costs are consistent with each other.

Setting the bandwidth directly on the interface, which I’ve discussed before, is just a bad decision and sloppy way to perform path manipulation as we saw in EIGRP offset-lists. It effects QoS and whatever else may be depending on the interfaces bandwidth value.

However, the configuration is locally significant to that interface, and is configured with:

R1(config)#int fa0/1
R1(config-if)#bandwidth ?
  <1-10000000>  Bandwidth in kilobits
  inherit       Specify that bandwidth is inherited
  receive       Specify receive-side bandwidth

This is measured in kilobits here, so watch that on exam day, and unless asked to tinker with on exam don’t mess with the interfaces bandwidth – There’s always a better way!

The third and final way of changing the cost, is also done on the interface, and is very simple to configure:

R1(config-if)#ip ospf cost ?
  <1-65535>  Cost

So I could make all my Serial links that are a cost of 64 look like they are FastEthernet links with a Cost of 1, but on my lab that would serve no purpose as the links aren’t actually any faster… or are they?

Lets test it out:

R1(config-if)#int s0/0/0
R1(config-if)#ip ospf cost 1
R1(config-if)#
ASR#2
[Resuming connection 2 to r2 … ]

*Mar 31 01:32:22.661: %SYS-5-CONFIG_I: Configured from console by console[OK]
R2#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R2(config)#int s0/0
R2(config-if)#ip ospf cost 1
R2(config-if)#
ASR#3
[Resuming connection 3 to r3 … ]

*Mar 31 22:41:18.954: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet0/1 from FULL to DOWN, Neighbor Down: Dead timer expired
*Mar 31 22:41:18.990: %OSPF-5-ADJCHG: Process 1, Nbr 4.4.4.4 on FastEthernet0/1 from LOADING to FULL, Loading Done
R3#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
R3(config)#int s0/2
R3(config-if)#ip ospf cost 1

Now, when I do “clear ip ospf proc” on R1, it is like pulling teeth waiting for the Adjacencies to R2 and R3 to reform. Lets see if this speeds things up:

R1#clear ip ospf proc
Reset ALL OSPF processes? [no]: yes
R1#
*May 18 03:26:26.398: %OSPF-5-ADJCHG: Process 1, Nbr 2.2.2.2 on Serial0/0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*May 18 03:26:26.398: %OSPF-5-ADJCHG: Process 1, Nbr 3.3.3.3 on Serial0/0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*May 18 03:26:26.470: %OSPF-5-ADJCHG: Process 1, Nbr 5.5.5.5 on FastEthernet0/1 from FULL to DOWN, Neighbor Down: Interface down or detached
R1#
*May 18 03:26:30.254: %OSPF-5-ADJCHG: Process 1, Nbr 5.5.5.5 on FastEthernet0/1 from LOADING to FULL, Loading Done
R1#

After waiting for about 5-10 seconds, I realized I had not found the key to making a Serial link the speed of Fast Ethernet, however it does influence the Total Cost to a destination network, for example from R1 to R4… well I’ll just show you the OSPF Route Table now:

R1#sh ip route ospf

Gateway of last resort is not set

      2.0.0.0/32 is subnetted, 1 subnets
O IA     2.2.2.2 [110/2] via 172.12.123.2, 00:00:40, Serial0/0/0
      3.0.0.0/32 is subnetted, 1 subnets
O IA     3.3.3.3 [110/2] via 172.12.123.3, 00:00:40, Serial0/0/0
      172.12.0.0/16 is variably subnetted, 5 subnets, 2 masks
O IA     172.12.34.0/24 [110/2] via 172.12.123.3, 00:00:40, Serial0/0/0
R1#

Over Serial Links I have the bandwidth speed Cost of 1, so if I had 20 routers in a line connected via Serial Links and issued this same command, the destination network at the end would have a cost of 20 but take about a light year to transmit (1 light year = True path Cost of 1,260).

So once more, to verify path cost on an interface, you should have the default of 1, 10, 64 burned into your memory but you can also use “sh ip ospf int X” or “sh ip ospf bri X” which is actually a much faster command to get a glance at your OSPF interfaces:

R1#sh ip ospf int bri
Interface    PID   Area            IP Address/Mask    Cost  State Nbrs F/C
Se0/0/0      1     0               172.12.123.1/24    64    DR    2/2
Lo1          1     1               1.1.1.1/32         1     LOOP  0/0
Fa0/1        1     15              172.12.15.1/24     1     BDR   1/1
R1#

That is all I have in me for tonight, I will be pumping these out until maybe for about another week, so after tomorrow will probably be misc topics like NTP, IP SLA, and a good deal more BGP review before exam day.

OSPF: Database Exchange Process including messages, neighbor states, and all things neighbor forming related!

OSPF_Base_Topology

Sticking with this Topology in case I need to lab something for demonstration, it is clear what routers are where.

To begin, every router within any given Area should have an identical copy of the LSDB, and that only Type 1 and Type 2 LSA’s are flooded only within the Area they originated.

The Database exchange uses several messages and process to build a neighbor relationship, and only after it has made it through the correct amount of processes, are then LSA’s flooded to that neighbor.

There are 5 types of OSPF messages that will come from an OSPF enabled router:

  • Hello
  • DBD (Database Descriptor)
  • Link-State Request
  • Link-State Update
  • Link-State Acknowledgement

Hello packets are what begin to form the neighbor relationship, it “triggers” the formation, and the exchange of DBD’s is what is crucial because it contains all of the parameters that must be agreed upon and met to actually form a neighbor relationship.

Once a neighbor relationship can be formed, Link-State Request / Updates / Acks are exchanged by neighbors to make sure they have accurate matching LSDB’s.

Now to go through the stages of forming a neighbor relationship, starting from the beginning:

Down – This is technically a state, but you will never see a neighbor as “Down” in “sh ip ospf nei”, but you will see it in console messages and logs

Attempt – This state is seen when “static” OSPF neighbors are configured on a Non-Broadcast Multi-Access network type, Attempt means “I statically configured you and am trying to say Hello to you, but have not heard anything back yet”

**To note the ATTEMPT / DROTHER state is always present on my OSPF NBMA because it is Hub and Spoke, and there is no need for a DR / BDR election across it, so I configure the routers with Priority 0 to suppress their attempts to participate in said election**

Init – This means the local router has received a Hello packet from it’s potential neighbor, that contains the links of the other neighbors it knows about, except for you. This indicates that you share common neighbors but are not yet formally acquainted!

2way – The opposite of an “Init” is a Hello packet the DOES include the local routers link, like an acknowledgement to the Init sent, like a receipt that it got the initial Hello. This state also determines who the DR and BDR will be if a neighborship is formed in their segment, if that type of segment allows for DR’s and BDR’s.

Unless you are a DR, or a BDR, routers do not get past this 2way state (which explains the behavior of 4 OSPF routers on a segment where the DROTHERS saw each other as 2way/DROTHER). Only the DR or BDR will see these neighbors as FULL, but any DROTHER router will see another DROTHER router in 2way and their neighborship only forms to the point of knowing each other but not flooding LSA’s to each other.

ExStart – This is the state that comes after a DR / BDR is agreed upon, or agreed that no DR / BDR can exist in this type of connection, and attempt to exchange what are called either DBD’s or DD’s (Database Descriptors) – I have seen the same thing used with both acronyms.

This state exchanges an empty (of Data) DBD with your IP and RID, and exchanges those with the neighbor to come up with who will be the Slave and Master of the neighborship. Once this is determined, the Master will set the sequence number of exchanging information, and begin the exchange (much alike TCP).

Exchange – The state after a Slave / Master is elected, the neighbors now multicast DBD’s that are now populated with LSA Headers, and finding out what LSA’s are missing from each others LSDB.

Loading – This is the state where all those missing LSA’s are requesting by the neighbor in the form of a Link-State Request packet, to which the neighbor response with s Link-State Update (LSU) packet, and finally the original neighbor sends back a Link-State Acknowledgement packet.

Full – When you and your neighbor are fully synchronized and all Link State packets have been exchanged and received.

Now that the Database is fully populated from our new Neighbors, SPF steps in to calculate the best paths it has to each network in the LSDB, both and all OSPF routers do this.

The DR and BDR’s Perspective

Communication to these is multicast to the 224.0.0.6 address, and the full range of states is gone through with both the DR and BDR, but not to any other DROTHER’s if you are a DROTHER router type.

DROTHERS stay in a state of 2way, and are only “FULL” from the DR / BDR’s perspective because those are the only routers it has gotten to the Full OSPF State with.

DR and BDR’s multicast updates back to DROTHERS on 224.0.0.5, the same address they communicate to each other on.

LSA Flooding information

OSPF re-floods each LSA every 30 minutes based on it’s variable age in the LSDB, which counts up from 0 (starting when it was created), and if no changes occur to the LSA when it hits the age of 30 minutes the originating router increments the sequence number / re-floods the LSA / changes the timer back to 0.

This is the Periodic Flooding OSPF does.

To verify, use the “sh ip ospf database” command and you can see these timers and sequence numbers in action:

R1#sh ip ospf data

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         398         0x8000000A 0x00CCAA 1
2.2.2.2         2.2.2.2         745         0x8000000E 0x0086E3 1
3.3.3.3         3.3.3.3         492         0x8000000A 0x005015 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
172.12.123.1    1.1.1.1         398         0x8000000A 0x0017C4

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         1.1.1.1         657         0x80000009 0x0037F4
2.2.2.2         2.2.2.2         257         0x8000000C 0x00E43C
3.3.3.3         3.3.3.3         492         0x80000009 0x009E7D
172.12.15.0     1.1.1.1         1888        0x8000000A 0x0068FE
172.12.34.0     3.3.3.3         492         0x8000000D 0x0054F4
¬†–More–

I had actually wondered what on Earth those were, so that is good new OSPF material that I will forget in precisely 2 weeks (after passing the exam).

When the router needs to remove an LSA from the LSDB or “Poison” it, it sets the MaxAge to 3600.

That will complete this section of OSPF with LSA types and all of that sort, I’ve spent my time digging through these, if you are reading this to learn more I highly recommend reading the sticky post with my collection of links of the 3 Part deep dive into LSA types and OSPF Router types!

OSPF: LSA Type 1 (why it’s unique), explanation of SPF Tree, and a handy show command for exam day!

OSPF_Base_Topology

When you first configure a router in an Area via an OSPF instance, you are creating a Link State Database, that already contains entries for different LSA Types.

Each router considers itself to be the Root of what is called the “Shortest Path First Tree”, which is a mapping via LSA’s from neighbor routers, which are run against the SPF or Shortest Path First Algorithm to make sure all routers are synchronized.

This operation also is the reason where there are rules regarding route filtering, and where summarization can and cannot be done.

Before we start, LSA’s are transported by LSU’s, AKA Link State Update packets.

LSA Type 1 – Known as “Router LSA” – Each router creates a Type 1 LSA for itself and floods it through the same OSPF Area that it is in. It is unique in the way it creates a single LSA for the connected OSPF interface links, and won’t flood multiple LSA’s for each individual link.

This type of LSA cannot be filtered or Summarized, as it is the core of the local Routers own Link State Database, and will stay in it’s own Area as it isn’t concerned with building other Areas SPF Tree – It only cares about it’s own Areas Tree.

The LSA Type 1 will always keep it’s own RID no matter how far it travels, so an OSPF router even 10 hops away knows that X router owns the links being advertised.

Speaking of which, if you want to see the LSA’s for a particular router from your LS DB, type in the command “sh ip ospf database router x.x.x.x” where x.x.x.x is the remote RID and it will show you the links learned from that remote neighbor only.

I will stop here, I’ve stickied a post that has a 3 part link to a complete explanation of all LSA’s, and I highly advise myself (and yourself if you’re studying for the exam) to give it a once over before walking into the exam room!

 

A collection of IMPORTANT links to review and know for exam day, then a quick overview of LSA Types / OSPF Router Types!

(This post will be replacing the subnetting post in my sticky threads up top the blog)

I pulled this topology from my older posts when I took a deep dive into the world of LSA’s, how to read the Topology table like a laundry list and under stand it, and what type of routers did what.

First I want to list links that are absolutely vital to read and understand for exam day, as you will run into questions regarding these in some fashion or another, and then I will sticky this post up top so the links are available there as well:

LSA Part 1 – https://loopedback.com/2017/04/24/part-1-ospf-lsa-deep-dive-starting-with-lsa-types-1-2-3-and-an-intro-to-all-lsa-types-and-ospf-routers-types/

LSA Part 2 – https://loopedback.com/2017/04/25/part-2-ospf-lsa-deep-dive-lsa-types-4-5-and-turn-area-15-to-an-nssa-to-see-what-happens-with-the-ls-database/

LSA Part 3 – https://loopedback.com/2017/04/25/part-3-ospf-lsa-deep-dive-lsa-type-7-deep-dive-into-every-type-of-ospf-stub-area-and-how-it-impacts-lsas/

VPN types and Tunnel Modes – https://loopedback.com/2017/04/28/vpn-deep-dive-into-different-vpn-packet-types-differences-in-security-and-differences-in-modes-between-them/

OSPF Distribute-List vs Filter-List – https://loopedback.com/2017/04/27/ospf-deep-dive-distribute-list-vs-filter-list-in-and-reviewing-prefix-lists-as-they-filter-lists-use-prefixes-to-filter/

Quick methods to Subnet – https://loopedback.com/2017/05/09/important-subnetting-review-to-quickly-find-network-address-ranges-and-a-great-cheat-sheet-for-exam-day/

IPv6 Migration Strategies – https://loopedback.com/2017/03/11/ipv6-migration-strategies-from-ipv4-networks-need-to-know-details-for-exam-day-explained/comment-page-1/#comment-56

Identifying IPv6 Address Types – https://loopedback.com/2017/05/08/ipv6-quick-tips-on-some-good-to-knows-and-need-to-knows-for-ipv6-on-exam-day-may-be-adding-info-to-this-in-the-future/

EIGRP Distribute-List / Prefix-List configuration – https://loopedback.com/2017/05/10/eigrp-deep-dive-into-prefix-list-configurations-access-list-vs-prefix-list-using-prefix-lists-to-filter-eigrp-routes-with-distribute-lists/

I could keep adding posts to that list all day, as they are pretty important, but you need to have a solid understanding of VPN Types and Tunnel Modes (and what they do), LSA Types and Database understanding, the IPv6 material and knowing how to configure and apply Prefix-Lists, etc. I’d say read all my posts, but I wrote them and my mind still slips on the materials!

Now I pulled this explanation of the LSA types from an older post where I summarized them using the Topology above, so I will paste these into this post, and sticky this thread up top for visibility and move on to the next topic for review!

So first, I will start with a description of each LSA type of the 7 of them:

  • LSA Type 1 ‚ÄúRouter‚ÄĚ ‚Äď ‚ÄúRouter Link States‚ÄĚ will be its header in the LSA DB, and the name is self explanatory, these LSA‚Äôs are generated by each router with updates on its local Link States, all router types generate and flood this LSA Type.
  • LSA Type 2 ‚ÄúNetwork‚ÄĚ ‚Äď ‚ÄúNet Link States‚ÄĚ are only generated and sent by DR‚Äôs and BDR‚Äôs to routers in the Same Area, that are also on the same multi-access network type, LSA type stays within its own Area, only seen in NON-Point-to-Point network types
  • LSA Type 3 ‚ÄúSummary‚ÄĚ ‚Äď ‚ÄúSummary Net Link States‚ÄĚ has nothing to do with summarization, but floods its summary of networks from one Area into others except for the Area it is part of ‚Äď Not flooded into Total-Stub‚Äôd Areas (Stub or NSSA)
  • LSA Type 4 ‚ÄúSummary ASB‚ÄĚ ‚Äď ‚ÄúSummary ASB Link States‚ÄĚ LSA type is only created by ABR‚Äôs back to the ASBR, so when redistribution is configured on the ASBR Router it flips a bit in its ‚ÄúRouter LSA‚ÄĚ (Type 1!), and the ABR(s) then create LSA type 4‚Äôs to pass along throughout the network giving OSPF neighbors the path back to the ASBR ‚Äď Not flooded into Stub Areas.
  • LSA Type 5 ‚ÄúAutonomous System External Link State‚ÄĚ ‚Äď or ‚ÄúAS External Link States‚ÄĚ in the OSPF LSA DB, these are your ‚ÄúO E1‚ÄĚ and ‚ÄúO E2‚Ä̬† Redistributed routes, generated from the ASBR itself OUTSIDE an NSSA Area ‚Äď Not flooded into Stub Areas.
  • LSA Type 6 ‚Äď Not needed for the CCNP ROUTE, but it is for Multicast Extensions of OSPF (MOSPF), but again is not referenced in the the ROUTE exam, just wanted to mention for the sake of thoroughness
  • LSA Type 7 ‚ÄúNSSA LSA‚Äôs‚ÄĚ ‚Äď This type of LSA is generated by the ASBR INSIDE an NSSA Area does Redistribution, as Type 5 Redistribution LSA‚Äôs cannot enter an NSSA Area

Phew. So to cover what type of routers create which type of LSA’s ONE MORE TIME:

  • Type 1 ‚Äď All Routers
  • Type 2 ‚Äď All DR‚Äôs
  • Type 3, 4 ‚Äď All ABR‚Äôs
  • Type 5 ‚Äď ASBR‚Äôs OUTSIDE the NSSA Areas (NSSA‚Äôs don‚Äôt allow LSA type 5)
  • Type 6 ‚Äď Reserved for MOSPF
  • Type 7 ‚Äď ASBR‚Äôs INSIDE the NSSA Areas (Type 7 LSA‚Äôs [N1, N2 in route table])

 

If you don’t fully understand LSA’s, please review Part 1, 2, and 3 of the OSPF LSA posts linked above as this is crucial to exam success if you get some OSPF questions!