Combined with everyone’s least favourite LSA, the Type 4 LSA!
The Type 3 (Summary) LSA is originated by Area Border Routers into one area to describe links in another area. That doesn’t sound complicated does it? Good, because it isn’t.
The Type 4 (ASBR Summary) LSA is also originated by an ABR, but it is used to describe an ASBR in one area to routers in another area.
If you care to read through RFC 2328 section 14.4.3 you’ll actually stumble upon a rather long, involved decision process on how a router selects routes that are in its RIB as candidates to be advertised as a Type 3 LSA. I’m not going to go into any real detail about that, but I thought I’d mention it since it’s worth your time to quickly glance through it.
Another note about the RFC is that it actually groups both Type 3 and Type 4 LSA’s into the same category of “Summary” LSA’s. There is of course the distinction of types, but since all the fields are the same with only a slight variance in meaning on the LSID field these two LSA’s are essentially the same.
And this is why I’m grouping these two LSA’s together here.
I’m going to first walk through a Type 3 LSA, and then we’ll look at a Type 4 LSA. Here’s the Type 3:
Routing Bit Set on this LSA
LS age: 1721
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
Link State ID: 10.0.23.0 (summary Network Number)
Advertising Router: 2.2.2.2
LS Seq Number: 80000002
Checksum: 0x4D85
Length: 28
Network Mask: /24
TOS: 0 Metric: 64
I’m sure you know what’s next. If not go read the previous posts! They’re that good!
Routing Bit Set on this LSA
LS age: 1721
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(Network)
I should just start skipping this line eh? At least there’s a new one here. Regardless, the options are for another post.
LS Type: Summary Links(Network)Right. This was expected.
Link State ID: 10.0.23.0 (summary Network Number)Again, this fields we’ve seen before, however, the LSID meaning has again changed. This time the LSID represents the prefix being described.
Advertising Router: 2.2.2.2This is the same as usual. As a point of interest this will always be the RID of an ABR since Type 3 LSA’s are always originated by an ABR.
LS Seq Number: 80000002These fields we’ve also seen before and there’s nothing new to say on them.
Checksum: 0x4D85
Length: 28
Network Mask: /24Here’s our prefix length. We now have a defined range for our network.
TOS: 0 Metric: 64Yup. This is the Legacy TOS showing up again, and our metric for the link in question. What’s important here is that this is the metric of the ABR to the destination (if the ABR has multiple routes this will be the cost of the lowest cost route). It does not include any links between the router the LSA is observed on and the ABR. That value is derived from the Type 1 and 2 LSA’s contained in the OSPF database and added to this value to obtain the ultimate cost to the destination.
I told you this wasn’t complicated.
Now let’s look at a Type 4 LSA and see what the difference is.
Routing Bit Set on this LSAIt certainly looks pretty close…
LS age: 2
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 3.3.3.3 (AS Boundary Router address)
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0x37B0
Length: 28
Network Mask: /0
TOS: 0 Metric: 64
Routing Bit Set on this LSABlah blah blah…
LS age: 2
Options: (No TOS-capability, DC, Upward)
Link State ID: 3.3.3.3 (AS Boundary Router address)Here we see that the LSID is the RID of the ASBR that this LSA is describing. This differs from the prefix that was described in the Type 3.
Advertising Router: 2.2.2.2Again, this is always going to be an ABR as only ABR’s originate Type 4 LSA’a.
LS Seq Number: 80000001More blah blah blah…
Checksum: 0x37B0
Length: 28
Network Mask: /0Huh? What? /0? Yup, /0.
Here’s the kicker. In reading section 12.4.3 of RFC 2328 in its entirety there is no mention of a prefix length (or mask) at all. The example LSA’s used don’t even have a prefix length included! What gives? Well, this is why you need to read things all the way through. If you skip down to A.4.4 where the the packet structure is examined you will see that there is indeed a prefix length field (subnet mask) and that there is also the following paragraph providing guidance:
Network MaskThere you have it! Mystery solved.
For Type 3 summary-LSAs, this indicates the destination
network's IP address mask. For example, when advertising the
location of a class A network the value 0xff000000 would be
used. This field is not meaningful and must be zero for Type 4
summary-LSAs.
TOS: 0 Metric: 64Finally our last line is one we’re familiar with. And again, this metric is from the advertising router to the ASBR. If the ABR has multiple routes this will reflect the lowest cost route (the route currently in the RIB).
There’s a few other oddities about the Type 4 out there. I might do up a post on them at a later time, but for now I’m going to link over to Packetlife.net and a great post Stretch did on the topic.
http://packetlife.net/blog/2008/apr/21/where-are-type-4-lsas-generated/
I would encourage you to read the comments as well as they fill in a couple gaps that Stretch didn’t elaborate on.
That’s Summary LSA’s. Coming soon, Type 5!
The complete list of OSPF LSA breakdowns:
http://blog.brokennetwork.ca/2012/10/ospf-router-lsa-type-1.html
http://blog.brokennetwork.ca/2012/10/ospf-network-lsa-type-2.html
http://blog.brokennetwork.ca/2012/10/ospf-summary-lsas-type-3-4.html
http://blog.brokennetwork.ca/2012/11/ospf-external-lsa-type-5.html
http://blog.brokennetwork.ca/2012/11/ospf-nssa-external-lsa-type-7.html
Thanks a LOT this is really useful pain English,
ReplyDeleteI've been reading a book on OSPF and only just has the penny dropped.
Glad to hear it.
DeleteAppreciate your effort, thank you!
ReplyDelete