Quick Look Into OSPF Database: Summary LSA

VN:F [1.9.6_1107]
Rating: 3.8/5 (5 votes cast)
By Marko Milivojevic on September 15th, 2010

After exploring Router (Type 1) and Network (Type 2) OSPF LSAs, which we can call “intra-area LSAs”, even though they are not really called that, the time has come to explore what’s happening when information flows between areas in OSPF and how that information can be read and interpreted from the OSPF database. Today, we will explore Summary, or Type 3 LSAs.

Network Configuration

We will, again, use the simple network for this purpose. The diagram below is what we’ll use today, with one small twist. To begin with, we will start with R5′s FastEthernet0/0 disabled.

Diagram

R1:

interface FastEthernet0/0
 ip address 145.145.145.1 255.255.255.0
!
router ospf 1
 network 0.0.0.0 255.255.255.255 area 145
!

R2:

interface Serial0/1/0
 ip address 24.24.24.2 255.255.255.0
 ip ospf network point-to-point
!
interface Serial0/2/0
 ip address 25.25.25.2 255.255.255.0
!
router ospf 1
 network 0.0.0.0 255.255.255.255 area 0
!

R4:

interface FastEthernet0/0
 ip address 145.145.145.4 255.255.255.0
!
interface Serial0/0/0
 ip address 24.24.24.4 255.255.255.0
 encapsulation frame-relay
 ip ospf network point-to-point
!
interface Serial0/1/0
 ip address 45.45.45.4 255.255.255.0
!
router ospf 1
 network 4.4.4.4 0.0.0.0 area 0
 network 24.24.24.4 0.0.0.0 area 0
 network 45.45.45.4 0.0.0.0 area 0
 network 145.145.145.4 0.0.0.0 area 145
!

R5:

interface FastEthernet0/0
 ip address 145.145.145.5 255.255.255.0
 shutdown
!
interface Serial0/0/0
 ip address 45.45.45.5 255.255.255.0
!
interface Serial0/2/0
 ip address 25.25.25.5 255.255.255.0
!
router ospf 1
 network 5.5.5.5 0.0.0.0 area 0
 network 25.25.25.5 0.0.0.0 area 0
 network 45.45.45.5 0.0.0.0 area 0
 network 145.145.145.5 0.0.0.0 area 145
!

From the configuration, we can see that all interfaces on R1 and shared Ethernet segment between R1, R4 and R5 are in area 141, while everything else is area 0. If we examine the route to 1.1.1.1 on R2, we can see it as OSPF inter-area route.

R2:

R2#show ip route 1.1.1.1
Routing entry for 1.1.1.1/32
  Known via "ospf 1", distance 110, metric 66, type inter area
  Last update from 24.24.24.4 on Serial0/1/0, 02:24:09 ago
  Routing Descriptor Blocks:
  * 24.24.24.4, from 4.4.4.4, 02:24:29 ago, via Serial0/1/0
      Route metric is 66, traffic share count is 1

R2#ping 1.1.1.1 source Loopback0

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/13/16 ms

Even the ping works like a charm, but we expected to see that. After all, this is perfeclty fine, working OSPF network.

Let’s take a look at the relevant initial configurations of all the involved routers. Let’s instead take a look into OSPF database on R2. We care about Summary LSAs here, so let’s focus on the appropriate keyword.

R2:

R2#show ip ospf database ?
  adv-router        Advertising Router link states
  asbr-summary      ASBR summary link states
  database-summary  Summary of database
  external          External link states
  network           Network link states
  nssa-external     NSSA External link states
  opaque-area       Opaque Area link states
  opaque-as         Opaque AS link states
  opaque-link       Opaque Link-Local link states
  router            Router link states
  self-originate    Self-originated link states
  summary           Network summary link states
  |                 Output modifiers
  <cr>

So, let’s use this parameter and see what we’ll find in our database on R2.

R2:

R2#show ip ospf database summary

            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: 1385
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 1.1.1.1 (summary Network Number)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000007
  Checksum: 0xEA36
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 2

  Routing Bit Set on this LSA
  LS age: 16
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 145.145.145.0 (summary Network Number)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000001
  Checksum: 0xA2D4
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 1

Highlighted yellow, we can see the actual “subnets coming from another area”. Clearly, we have two – 1.1.1.1/32 and 145.145.145/24. Followed by that and highlighted cyan, we have the information about the router which is advertising this LSA. Take note that in case of both, it’s 4.4.4.4, which is our R4. Now, let’s take a look at R4 briefly.

R4:

R4#show ip ospf database

            OSPF Router with ID (4.4.4.4) (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         151         0x80000012 0x0083F8 5
4.4.4.4         4.4.4.4         1833        0x8000001E 0x007A68 5
5.5.5.5         5.5.5.5         1724        0x80000015 0x00924A 5

                Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
1.1.1.1         4.4.4.4         1833        0x80000007 0x00EA36
145.145.145.0   4.4.4.4         464         0x80000001 0x00A2D4

                Router Link States (Area 145)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         1921        0x80000006 0x00782D 2
4.4.4.4         4.4.4.4         1833        0x80000007 0x00128B 1
5.5.5.5         5.5.5.5         1843        0x80000005 0x00D7BE 1

                Net Link States (Area 145)

Link ID         ADV Router      Age         Seq#       Checksum
145.145.145.1   1.1.1.1         1693        0x80000007 0x00DD88

                Summary Net Link States (Area 145)

Link ID         ADV Router      Age         Seq#       Checksum
2.2.2.2         4.4.4.4         1834        0x80000006 0x0037A7
2.2.2.2         5.5.5.5         1845        0x80000005 0x001BC0
4.4.4.4         4.4.4.4         1834        0x80000006 0x0058BE
4.4.4.4         5.5.5.5         1845        0x80000005 0x00BE15
5.5.5.5         4.4.4.4         1834        0x80000005 0x00AE25
5.5.5.5         5.5.5.5         1845        0x80000005 0x000E02
24.24.24.0      4.4.4.4         1834        0x80000006 0x002679
24.24.24.0      5.5.5.5         1845        0x80000005 0x008CCF
25.25.25.0      4.4.4.4         1834        0x80000006 0x0084D7
25.25.25.0      5.5.5.5         1845        0x80000005 0x00E5B3
45.45.45.0      4.4.4.4         1834        0x80000007 0x002D32
45.45.45.0      5.5.5.5         1845        0x80000005 0x00134A

First of all, we can see that the database is a little bit different. That’s perfectly OK, as R4 is Area Border Router (ABR) between areas 0 and 145. It has Type 1 & 2 LSAs for both of these areas. So, there we can see Type 1 LSA originated by R1, as well as Type 2 for 145.145.145.0/24, also originated by R1. Learning from the previous article on Type 2, we should deduce that R1 is the DR on the segment. Fair enough. So, who generates Type 3 LSA for these two, as seen on R2? We see them coming from R4 on R2, but how does R4 see them?

We should be able to answer this from a strictly theoretical point of view. It should be the same, as within area, database information needs to be identical. Let’s prove that. We could use the command “show ip ospf database summary self-originate”, but that will produce a lot of output we don’t need right now – all the information about summaries injected to area 145 from the backbone area. Instead, we’ll use specific commands for networks we care about.

R4:

R4#show ip ospf database summary 1.1.1.1

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

                Summary Net Link States (Area 0)

  LS age: 85
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 1.1.1.1 (summary Network Number)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000008
  Checksum: 0xE837
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 2

R4#show ip ospf database summary 145.145.145.0

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

                Summary Net Link States (Area 0)

  LS age: 772
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 145.145.145.0 (summary Network Number)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000001
  Checksum: 0xA2D4
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 1

We can see the information is the same as it was on R1 when we looked at it, which is exactly what we wanted to see. Those of you with sharp eyes would have noticed that metric, highlighted magenta is exactly the same on both. What’s up with that? Well, this is not “end-to-end” metric, rather metric from ABR to the destination being advertised in Type 3 LSA. If we take a look at the routing table for 1.1.1.1 on R4, we can see this clearly.

R4:

R4#show ip route 1.1.1.1
Routing entry for 1.1.1.1/32
  Known via "ospf 1", distance 110, metric 2, type intra area
  Last update from 145.145.145.1 on FastEthernet0/0, 00:24:33 ago
  Routing Descriptor Blocks:
  * 145.145.145.1, from 1.1.1.1, 00:24:33 ago, via FastEthernet0/0
      Route metric is 2, traffic share count is 1

Routers receiving Type 3 LSA will ad their own cost to advertising ABR when calculating end-to-end metric to the network. Examining routing table on R2, shows us this, as well. Not so clearly, but it does.

R2:

R2#show ip route 4.4.4.4
Routing entry for 4.4.4.4/32
  Known via "ospf 1", distance 110, metric 65, type intra area
  Last update from 24.24.24.4 on Serial0/1/0, 03:03:19 ago
  Routing Descriptor Blocks:
  * 24.24.24.4, from 4.4.4.4, 03:03:19 ago, via Serial0/1/0
      Route metric is 65, traffic share count is 1

R2#show ip route 1.1.1.1
Routing entry for 1.1.1.1/32
  Known via "ospf 1", distance 110, metric 66, type inter area
  Last update from 24.24.24.4 on Serial0/1/0, 03:03:05 ago
  Routing Descriptor Blocks:
  * 24.24.24.4, from 4.4.4.4, 03:03:25 ago, via Serial0/1/0
      Route metric is 66, traffic share count is 1

We can see the cost to reach R4 is 65. The cost to reach R1 is 66. This is where things get just a little bit confusing. 65+2, clearly don’t make 66. They don’t, but remember that Router ID in OSPF is not an interface! It’s just a number. Here we looked at the cost to reach Loopback0 on R4, but not the R4 itself. What is then the cost to reach R4, which we need here? Well, since R4 is directly connected over Serial0/1/0, we need to examine that cost. Let’s take a look into that.

R2:

R2#show ip ospf interface Serial0/1/0 | include Cost
  Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 64

Now, that’s more like it. 64+2 is and always was, 66. But am I correct? Nothing simpler to verify. Let’s make the cost to 1.1.1.1 be 80.

R2:

interface Serial0/1/0
 ip ospf cost 78
!
R2#show ip route 1.1.1.1
Routing entry for 1.1.1.1/32
  Known via "ospf 1", distance 110, metric 80, type inter area
  Last update from 24.24.24.4 on Serial0/1/0, 00:00:09 ago
  Routing Descriptor Blocks:
  * 24.24.24.4, from 4.4.4.4, 00:00:09 ago, via Serial0/1/0
      Route metric is 80, traffic share count is 1

Multiple Area Border Routers

When we have multiple ABRs, which one of them will advertise the summary? Let’s bring up the FastEthernet0/0 on R5 and take a look.

R5:

interface FastEthernet0/0
 no shutdown
!

R2:

R2#show ip ospf database summary

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

                Summary Net Link States (Area 0)

  LS age: 1651
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 1.1.1.1 (summary Network Number)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000008
  Checksum: 0xE837
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 2 

  Routing Bit Set on this LSA
  LS age: 45
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 1.1.1.1 (summary Network Number)
  Advertising Router: 5.5.5.5
  LS Seq Number: 80000001
  Checksum: 0xD84A
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 2 

  LS age: 399
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 145.145.145.0 (summary Network Number)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000002
  Checksum: 0xA0D5
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 1 

  Routing Bit Set on this LSA
  LS age: 57
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 145.145.145.0 (summary Network Number)
  Advertising Router: 5.5.5.5
  LS Seq Number: 80000001
  Checksum: 0x84EE
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 1 

In the output shown, we can plainly see that both R4 and R5 are advertising both 1.1.1.1/32 and 145.145.145.0/24 networks. If we look for Routing Bit, we can even see that information from R5 is being used for routing. The reason for this being, of course, lower metric to reach the ABR – remember that we tweaked interface cost to R4 just earlier:

R2:

R2#show ip route ospf
     1.0.0.0/32 is subnetted, 1 subnets
O IA    1.1.1.1 [110/66] via 25.25.25.5, 00:03:34, Serial0/2/0
     4.0.0.0/32 is subnetted, 1 subnets
O       4.4.4.4 [110/79] via 24.24.24.4, 00:08:22, Serial0/1/0
     5.0.0.0/32 is subnetted, 1 subnets
O       5.5.5.5 [110/65] via 25.25.25.5, 03:18:27, Serial0/2/0
     145.145.0.0/24 is subnetted, 1 subnets
O IA    145.145.145.0 [110/65] via 25.25.25.5, 00:03:43, Serial0/2/0
     45.0.0.0/24 is subnetted, 1 subnets
O       45.45.45.0 [110/128] via 25.25.25.5, 03:18:27, Serial0/2/0

Let’s return the interface to its default cost and examine what database and routing tables say about 1.1.1.1/32.

R2:

interface Serial0/1/0
 default ip ospf cost
!
R2#show ip ospf database summary 1.1.1.1

            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: 1993
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 1.1.1.1 (summary Network Number)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000008
  Checksum: 0xE837
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 2 

  Routing Bit Set on this LSA
  LS age: 387
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 1.1.1.1 (summary Network Number)
  Advertising Router: 5.5.5.5
  LS Seq Number: 80000001
  Checksum: 0xD84A
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 2

R2#show ip route 1.1.1.1
Routing entry for 1.1.1.1/32
  Known via "ospf 1", distance 110, metric 66, type inter area
  Last update from 24.24.24.4 on Serial0/1/0, 00:00:32 ago
  Routing Descriptor Blocks:
  * 25.25.25.5, from 5.5.5.5, 00:06:47 ago, via Serial0/2/0
      Route metric is 66, traffic share count is 1
    24.24.24.4, from 4.4.4.4, 00:00:32 ago, via Serial0/1/0
      Route metric is 66, traffic share count is 1

We can here see that R2 is load-sharing the traffic to R1 via R4 and R5, as well as that both ABRs are sending the same information all the time.

Summarization

One of the features of OSPF is that it can summarize between areas. Address summarization, as we know, can be performed only on ABRs (and ASBRs, but that’s the subject for next time). How are summarized networks different from “regular” summaries? Well, time to check that out. I will summarize 1.1.1.1/32 as 1.1.1.0/24 on R4 when advertising it into area 0.

R4:

router ospf 1
 area 145 range 1.1.1.0 255.255.255.0
!

Router R5 is still advertising 1.1.1.1/32, so we have nice comparison point.

R2:

R2#show ip ospf database summary 1.1.1.1

            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: 740
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 1.1.1.1 (summary Network Number)
  Advertising Router: 5.5.5.5
  LS Seq Number: 80000001
  Checksum: 0xD84A
  Length: 28
  Network Mask: /32
        TOS: 0  Metric: 2

R2#show ip ospf database summary 1.1.1.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: 72
  Options: (No TOS-capability, DC, Upward)
  LS Type: Summary Links(Network)
  Link State ID: 1.1.1.0 (summary Network Number)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000001
  Checksum: 0x127
  Length: 28
  Network Mask: /24
        TOS: 0  Metric: 2

Other than mask and metric, which is by default 1 for summarized addresses, these two are virtually identical. In other words, instead of originating LSA for 1.1.1.1/32, R4 is now generating Type 3 LSA for new 1.1.1.0/24 prefix. By just looking into the database, we cannot really tell whether there was address summarization performed or not.

I hope you enjoyed this article. Happy studies!


Marko Milivojevic – CCIE #18427
Senior Technical Instructor – IPexpert
Join our Online Study List

Quick Look Into OSPF Database: Summary LSA, 3.8 out of 5 based on 5 ratings
Share and Enjoy:
  • RSS
  • Twitter
  • Facebook
  • Google Bookmarks
  • Digg
  • Print
  • Technorati
  • Slashdot
  • LinkedIn
  • del.icio.us
  • Reddit
  • Sphinn
  • Mixx
  • Blogplay
  • Netvibes
  • NewsVine
  • Live
  • Ping.fm
  • MySpace
  • Yahoo! Bookmarks
  • Yahoo! Buzz

Tags: ,

4 Responses to “Quick Look Into OSPF Database: Summary LSA”

  1. Vignesh says:

    Thanks Marko for an such a good article.

    VA:F [1.9.6_1107]
    Rating: 0.0/5 (0 votes cast)
  2. sebastan says:

    Hi Marko,

    It would be great if we could get a link to download your posts as pdf so that we can read them offline or whenever we get time without needing to be connected on internet and looking through many pages of the blog.

    Just my two cents.

    Regards

    Sebastan

    VA:F [1.9.6_1107]
    Rating: 4.0/5 (1 vote cast)
  3. Jason Wang says:

    great article! very insightful

    VA:F [1.9.6_1107]
    Rating: 0.0/5 (0 votes cast)

Leave a Reply