cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3293
Views
25
Helpful
13
Replies

Clarification on OSFP type 1 and 2 LSAs

SJ K
Level 5
Level 5

Hi all,

Merry xmas.

I have read the following on type1 and type2 LSAs in which they do not cross areas/stay within the same area, but I have some clarifications about them which I hope gurus here and help me out.

Q1) Most study materials show use 2 routers to show a Type1 example, but if I have 3 routers which are all in the same Area 0 as illustrated below

If R1 send a type1 LSA to R2, does R2 forward it (R1 LSA) out to R3 while R2 also send its own LSA?(total 2 LSAs from R2 to R3)

or is it just that R2 will generates it own type1 LSA and send it to R3 ?  (total 1 LSA from R2 to R3)

Q1a) I also realize that when i type "show ip osfp database router"  in any of the Routers (e.g. R1), i can see its own LSA, is it because R2 forward it back to R1 after receiving from R1 or it is "just there" ?

Q2) In a point to point network for just 1 area (e.g. above diagram), is type1 LSA the only LSA being send out ?

Q3) In a multi access network (e.g. ethernet), is type2 LSA the only LSA send out (because i am also seeing type1 LSA -- using show ip ospf database router) ? 

Q4) What is the difference between type2 and type1 LSA in a multi access network ? each DRother will send a type1 to DR and DR will send a type2 to all ?  Does that means that sending a type2 LSA from DR to all the DRothers is less heavy then sending a type1 LSA from DR to DRothers ?

Sorry if i sound totally confused.

Regards,
Noob

2 Accepted Solutions

Accepted Solutions

Richard Burts
Hall of Fame
Hall of Fame

Q1) The answer to this is a bit complicated. The bottom line is that R3 will receive two type 1 LSAs. But it is not quite accurate to say that R2 forwards the LSA received from R1. OSPF uses a flooding mechanism to assure that an LSA generated by any router in the area will be known by all other routers in the area. When R2 receives the LSA from R1 it creates an entry in the Link State Data Base for that data and then it generates a type 1 LSA and sends it to R3 for that data in addition to generating its own type 1.

Q1a It does not need R2 to forward it back. The entry in the LSDB was created when R1 generated the LSA and that is what is show in the command output.

Q2) No type 1 is not the only LSA sent out.

Q3) No in a multi access network both type 1 and type 2 are sent out.

Q4) Every router will send its own type 1 LSA reporting its own data. The DR  generates and sends a type 2 representing the data for that network segment. You need every router to report its own data (using type 1). You only need a single type 2 reporting data for the segment and we achieve this by having it generated by the DR.

HTH

Rick

HTH

Rick

View solution in original post

q1) For definition of intra-area, does it means same area ? and inter-area = across different area ?

Yes, intra-area means within the area, while inter-area would imply moving from one area to another.

q2) The confusion I have in mind is, with a Type1 LSA in a point to point setup, i see routers have no problem knowing remote routes.  Thus why do we need a Type2 LSA in the mutli access segment ?
Can't the DR send Type1 LSA to all the other routers and achieve the same effect ?

A type-2 LSA is generated by the DR of the segment. Take a broadcast segment as an example of a transit network for consideration here. The LSA describes multiple things - the IP address of the DR as a link state ID, the subnet mask, the router ID of the DR and finally the router IDs of all routers/nodes attached. So, the type-2 LSA ties directly into the existence of a DR for a transit network. To that end, let's try and understand the necessity of a DR.

There are two main reasons why the concept of a DR exists within the scope of OSPF - to reduce the amount of traffic within the shared segment and to simplify the SPF calculation as well (a lot of people ignore this reason, but this is actually an equally important, if not more, reason). Suppose you have X number of routers in this shared segment; instead of calculating each routers cost to every other router (which, as you can mathematically imagine, will grow exponentially if the number of routers increases), we simply calculate the path to the DR. This is why a DR exists and in turn, the type-2 LSA to cater to it.

You cannot compare the information contained within different LSAs - it is not correct to say one LSA has more/less information than another LSA. Each LSA caters to very specific parts of the network, with each describing specific things. Think of them as parts of a puzzle; you cannot complete a puzzle if even one part is missing.

q3) What the main reason for having all these different LSAs, is it to reduce network communication ?  If that is the core idea behind, how do I decide which segment stay in the same area and which area not to ?

I have  a main office connected to 4 branches, should i put them all in the same area 0 ?

Unfortunately, I am not very experienced with OSPF design so I would urge some of the more experienced engineers to add their insight here. Here's what I can tell you though. With OSPF, there are several factors you must take into consideration - one of the most important, from my perspective, would be the flooding of LSAs within an area. Type-1 and type-2 LSAs, as per design, are flooded throughout the area. As the number of routers that you have in an area increases, the number of type-1 (and possibly type-2 LSAs would also increase). This means a bigger LSDB and more work for the SPF algorithm (which takes a hit on the CPU). 

To that end, many network engineers like to design their hierarchy geographically, so that would lead you to a design with your HQ as the backbone (area 0) with your branch offices in different areas, each connecting back to the backbone.

Maybe you can read some of the books from the design track (CCDA/CCDP/CCDE) - they have some great chapters on designing OSPF.

Regards,

Aninda

View solution in original post

13 Replies 13

Richard Burts
Hall of Fame
Hall of Fame

Q1) The answer to this is a bit complicated. The bottom line is that R3 will receive two type 1 LSAs. But it is not quite accurate to say that R2 forwards the LSA received from R1. OSPF uses a flooding mechanism to assure that an LSA generated by any router in the area will be known by all other routers in the area. When R2 receives the LSA from R1 it creates an entry in the Link State Data Base for that data and then it generates a type 1 LSA and sends it to R3 for that data in addition to generating its own type 1.

Q1a It does not need R2 to forward it back. The entry in the LSDB was created when R1 generated the LSA and that is what is show in the command output.

Q2) No type 1 is not the only LSA sent out.

Q3) No in a multi access network both type 1 and type 2 are sent out.

Q4) Every router will send its own type 1 LSA reporting its own data. The DR  generates and sends a type 2 representing the data for that network segment. You need every router to report its own data (using type 1). You only need a single type 2 reporting data for the segment and we achieve this by having it generated by the DR.

HTH

Rick

HTH

Rick

Hi Richard,

Thank you so much for your reply and clarifications!
I do not have the necessary equipment  to test out the behavior and hence is using PT to try.

With regards to

Q2) I tried connecting the earlier above 3 routers with R3 then connected to a switch then to R4

(all configured to be in the same area)

R1 -> R2 -> R3 -> switch -> R4  to simulate a multi access segment on (R3-R4) , Turns out when i type "show ip ospf database network" , i see type2 LSA in all the Rs's LSDB. Is it correct or is it just PT's behavior ?

============

Q2a) With regards to the above, can i say the following (for the same area)

 point to point network, contain only Type1 LSA unless of one of its router is connected to a Multi access network which will then populate all the Rs with type2 LSA.

Q2b) I just want to be sure the entries we see when we issue

show ip ospf database router - > type1 lsa
show ip ospf database network -> type2 lsa

right ?

============

Q4)  I am trying to understand the reason for the different LSA types and i believe it is to reduce the amount of network communication right ? (something like limiting the broadcast domain)

In a point to point topology earlier, with just type1 LSAs, each routers is also able to know the each of the remote networks available.  So I am thinking type1 LSA does contain the amount of "right" information to inform the routers on the network topology.

As you said, in a multi access network, all type 1 LSAs are send to the DR and the DR then send a single type2 LSA for the whole segment.   

Does that means type2 LSA is "lighter"  compared to type1 since type1 LSA does contain all the "necessary information", why does the DR send a type2 instead of 1 ?

============


Q5) When designing OSPF,  what should be the factor that is limiting me to put all segments in the same backbone area0 ?   (is it bandwidth ?)

e.g. i have 5 sites all connected via L3MPLS (assume ospf is allowed over the mpls network). Each site has its own amount of subnets/networks. Why should be the reason that i put each site in its own area VS all sites in just 1 area ?

Really looking forward to hear from you.

Thanks once again.

Regards,
Noob

Hi,

Let me try and clarify some things here. With OSPF being a link-state protocol, the intention behind its workings is to have all routers within an area have the information for all other routers within the area. Once all routers have the same information, each router can independently run the SPF algorithm to find the best path to the other routers within the area. Remember that the point of SPF is to find the shortest path to the nodes (routers) and not the networks/routes themselves - the logic behind this is that if you find the shortest path to a node, you automatically have found the shortest path to the networks/routes owned by that node.

To that end, type-1 and type-2 LSAs essentially define intra-area routes, where a type-2 LSA specifically describes a transit network (such as a multi-access segment, as you have built in your topology above). If type-2 LSA were not flooded through an area, then routers in the area would have no knowledge of the transit network that is described by the type-2 LSA, thus breaking the internal working of OSPF. So, to answer your question, yes, you should see the type-2 LSA in the LSDB of all the routers in the area.

Regarding the need for different LSAs - different LSAs define different aspects of the network. Let's consider, as an example, what LSAs type 1 through 5 describe.

type-1 and type-2 LSAs describe intra-area routes.

type-3 LSAs describe inter-area routes.

type-4 and type-5 LSAs describe external routes (to be more specific, type-4 helps a node understand how to reach the ASBR that injected the external route into the OSFP domain, while the type-5 LSA actually describes the external route itself).

As you can see, different LSAs are there to build the entire picture for a node, both within its area and outside its area.

Hi Aninda,

Thanks for your reply and a happy new year to you.

q1) For definition of intra-area, does it means same area ? and inter-area = across different area ?

q2) The confusion I have in mind is, with a Type1 LSA in a point to point setup, i see routers have no problem knowing remote routes.  Thus why do we need a Type2 LSA in the mutli access segment ?
Can't the DR send Type1 LSA to all the other routers and achieve the same effect ?


If the reason is to reduce network congestion, does i mean a Type2 LSA has less information compare to a Type1 LSA ?

q3) What the main reason for having all these different LSAs, is it to reduce network communication ?  If that is the core idea behind, how do I decide which segment stay in the same area and which area not to ?

I have  a main office connected to 4 branches, should i put them all in the same area 0 ?

Regards,
Noob

q1) For definition of intra-area, does it means same area ? and inter-area = across different area ?

Yes, intra-area means within the area, while inter-area would imply moving from one area to another.

q2) The confusion I have in mind is, with a Type1 LSA in a point to point setup, i see routers have no problem knowing remote routes.  Thus why do we need a Type2 LSA in the mutli access segment ?
Can't the DR send Type1 LSA to all the other routers and achieve the same effect ?

A type-2 LSA is generated by the DR of the segment. Take a broadcast segment as an example of a transit network for consideration here. The LSA describes multiple things - the IP address of the DR as a link state ID, the subnet mask, the router ID of the DR and finally the router IDs of all routers/nodes attached. So, the type-2 LSA ties directly into the existence of a DR for a transit network. To that end, let's try and understand the necessity of a DR.

There are two main reasons why the concept of a DR exists within the scope of OSPF - to reduce the amount of traffic within the shared segment and to simplify the SPF calculation as well (a lot of people ignore this reason, but this is actually an equally important, if not more, reason). Suppose you have X number of routers in this shared segment; instead of calculating each routers cost to every other router (which, as you can mathematically imagine, will grow exponentially if the number of routers increases), we simply calculate the path to the DR. This is why a DR exists and in turn, the type-2 LSA to cater to it.

You cannot compare the information contained within different LSAs - it is not correct to say one LSA has more/less information than another LSA. Each LSA caters to very specific parts of the network, with each describing specific things. Think of them as parts of a puzzle; you cannot complete a puzzle if even one part is missing.

q3) What the main reason for having all these different LSAs, is it to reduce network communication ?  If that is the core idea behind, how do I decide which segment stay in the same area and which area not to ?

I have  a main office connected to 4 branches, should i put them all in the same area 0 ?

Unfortunately, I am not very experienced with OSPF design so I would urge some of the more experienced engineers to add their insight here. Here's what I can tell you though. With OSPF, there are several factors you must take into consideration - one of the most important, from my perspective, would be the flooding of LSAs within an area. Type-1 and type-2 LSAs, as per design, are flooded throughout the area. As the number of routers that you have in an area increases, the number of type-1 (and possibly type-2 LSAs would also increase). This means a bigger LSDB and more work for the SPF algorithm (which takes a hit on the CPU). 

To that end, many network engineers like to design their hierarchy geographically, so that would lead you to a design with your HQ as the backbone (area 0) with your branch offices in different areas, each connecting back to the backbone.

Maybe you can read some of the books from the design track (CCDA/CCDP/CCDE) - they have some great chapters on designing OSPF.

Regards,

Aninda

Hi Anida, Richard,

Thanks for all the replies and sorry for the late response. I hope you are still in this thread.

Lastly, it is mentioned that OSPF cost/metric calculation is done using the interface bandwidth; however, a path/segment is between 2 interfaces -> if i have different bandwidth set between the 2 interfaces, what will be the cost then ?

int a (bandwidth set as 10Mbps) <--- (cost?)----> int b (bandwidth set as 100Mbps)

Regards,
Noob

Still in the thread. Each router calculates the cost using the configured bandwidth of its own interface (and has no knowledge of the bandwidth of the other router). So in your example the router with int a will calculate the OSPF cost of received routes using 10 and the router with int b will calculate the OSPF cost of received routes using 100. I believe that your point may be that this introduces inconsistency. And that is correct. But OSPF will still work. Router a will consider the learned routes as a bit less attractive and router B will consider the learned routes as a bit more attractive. But both routers are learning the routes advertised by the peer and puts those routes into the routing table.

HTH

Rick

HTH

Rick

I believe that your point may be that this introduces inconsistency. And that is correct.

As Rick notes, often such would indeed be an inconsistency, but I did want to add that sometimes you have logical bandwidth limits and may have valid asymmetrical OSPF metrics for the same link.  You might also have policy reasons for having different metrics for the same bandwidth.

Each router calculates the cost using the configured bandwidth of its own interface . . .

I also want to note, Cisco does, but other vendors might not automatically base OSPF cost on interface bandwidth.  (OSPF cost, per RFC, isn't tied to anything.)  Also, Cisco routers can configure what bandwidth is considered a cost of 1 (it's 100 Mbps, by default) and other vendors, if they do use bandwidth, often use a different base bandwidth for a cost of 1.

Hi Joseph,

Thanks for your reply and sharing more insight on OSPF..

However, it seems to me like OSPF is a larger and much complicated IGP routing protocol then compared with EIGRP...

Not very confident to implement it now after knowing all these =(

Regards,
Noob

It probably seems that way if you're unfamiliar with it.

OSPF can have a simple configuration for simple topologies.

As to comparing OSPF to EIGRP complexity, try understanding all the attributes of EIGRP metric that no one normally every changes, or variance, or feasible successor, or ...   ;)

Hey Rick,

Thanks for the detailed clarification. This is gold! So sorry for the late reply and thank you so much for clarifying this point!

Regards,

Noob

Noob

You are welcome. I am glad that my responses were helpful in clarifying these aspects of OSPF.

HTH

Rick

HTH

Rick

If that is the core idea behind, how do I decide which segment stay in the same area and which area not to ?

I have  a main office connected to 4 branches, should i put them all in the same area 0?

As Aninda explained, there are books just on OSPF design because there's much that can be involved. However, even OSPF design books don't often address all the information that can impact real world designs, such as the quality of the vendor's OSPF implementation or vendor enhancements which don't violate the RFCs.

In brief, OSPF supports a two level area topology for scalability, knowing when and how to use it is an extensive subject.

Fortunately (?), many real world designs work "good enough" w/o knowing everything there's to know especially on current gen equipment.  So, for example, if you just had four branches, each small, and your central site didn't have a large topology either, a single area design would likely be okay.  However, that said, if your branches had very little bandwidth to them, or links to them were unstable, or were on-demand links, or etc., a multi-area design might be needed.

BTW, although a multi-area design stops flooding of some LSA types, others LSAs can still be flooded by default.  For example, by default, each "normal" area would receive LSAs for other area network prefixes.  The latter might be addressed by having "special" non-zero areas and/or by summarizing address blocks.

Review Cisco Networking for a $25 gift card