OSPF type 1 LSA difference vs type 2 LSA

FrankGuthrieFrankGuthrie Member Posts: 245
So basically, what is is the difference between a LSA1 and a LSA type 2.

Dont they both contain the same information?? If a Router send its connected networks in a LSA 1, what is the LSA 2 used for.

Do routers only send LSA type 1 to the DR and from there the DR sends those network in LSA type 2's to the its NON-DR neighbors??

Comments

  • siggnationsiggnation Member Posts: 182
    So basically, what is is the difference between a LSA1 and a LSA type 2.

    Dont they both contain the same information?? If a Router send its connected networks in a LSA 1, what is the LSA 2 used for.

    Do routers only send LSA type 1 to the DR and from there the DR sends those network in LSA type 2's to the its NON-DR neighbors??

    Hey Frank--

    A type 1 LSA you will find a list of directly connected links of the router, like a point to point connection to another router.

    With a type 2 LSA, flooded by a DR (contains IP of the DR), you will find information about the transit network, created for each multi-access network. Imagine a few routers all connected and separated from each other via a switch, or something like that.

    That is how I envision it.
    Currently Reading:

    CCIE Routing and Switching Written Exam v. 5.1
    CCIE Routing and Switching 5.0 OCG, Vol. I
    Cisco Lan Switching
  • FrankGuthrieFrankGuthrie Member Posts: 245
    Won't LSA 1's have stub network?
  • fredrikjjfredrikjj Member Posts: 879
    Won't LSA 1's have stub network?

    Yeah. Type 1 LSA contains information about two things: 1) p2p links to other routers and to the DR pseudonode if broadcast networks exist and 2) prefixes attached to the router, unless the prefix is part of a type 2 LSA. The links between the routers is "topology information" because it is used by OSPF to create the shortest path tree. The stub networks/prefixes are just attached to each router and isn't part of the actual topology (it's sometimes called "reachability information", or if you want to get even fancier, network layer reachability information - NLRI).

    So you basically have two unrelated things in one LSA which is slightly inefficient because if a stub network goes down, a new type 1 LSA is flooded and an SPF recalculation is triggered even though it's not really needed because the new tree will be identical to the old tree. This is fixed in OSPFv3 where the type 1 LSA only contains topology information. Prefix information (the "stub networks" in the OSPFv2 LSA) is in a separate LSA called the intra-area prefix lsa. However, modern CPUs and the incremental SPF feature makes this inefficiency in OSPFv2 pretty irrelevant I believe.
  • FrankGuthrieFrankGuthrie Member Posts: 245
    To summarize:
    OSPFv2 LSA1
    Connected Routers
    Stubnet works
    OSPFv2 LSA2
    All Non-DR routers connected to DR (this info might overlap with LSS1 info)


    OSPFv3 LSA1
    Connected Routers
    OSPFv3 LSA2
    All Non-DR router connected to DR (this info might overlap with LSS1 info)
    OSPFv3 LSA 9
    Stubnet works

    Is my understanding correct?
  • powmiapowmia Users Awaiting Email Confirmation Posts: 322
    Type-2 LSAs don't technically overlap with Type-1. It does represent information that would be in a type-1 on a point-to-point network, but with a network type of broadcast the information of both LSAs combine to provide the full picture.

    A type-1 advertises the link and cost to the pseudonode, the Type-2 advertises the link and a cost of 0 to the DROTHERs on behalf of the pseudonode. That's why Type-2s are inefficient; if you have a network of nothing but ptp ethernet, you have added an additional LSA for every link that doesn't need to be there. It doesn't have to do with the SPF algorithm, it primarily has to do with memory. CPU only comes into play if you have a large enough network that you are having issues pulling bulk updates out of your inbound queues due to the excess amount of LSAs (uncommon).
  • Debug allDebug all Member Posts: 15 ■□□□□□□□□□
    Actually, Type-2 LSA concept has nothing to do with Designated Router concept. DRs are designed to suppress the number of required adjacencies for a multi-access segment, and thus to decrease a number of LSAs exchanged between the routers.

    Type-2 LSA origin relies on a core mechanism of Link State protocols. Any Link State routing protocol builds a mathematical representation of the network, so called Graph. Nodes of the graph are routers, edges are links between them. This mathematical model assumes that any link from a node can go directly to a single node on the remote end. So there is no way to represent mathematically the multi-access segment in its actual view (imagine a Mersedes Benz logo with three routers on the circle. Its center is our multi-access segment). That is why Type-2 was inserted. It represents a pseudo-node, that is directly connected to all other routers in this segment (now there is one more pseudo-router in the center of MB logo :)). So you have just transformed your network representation to apply existing mathematical model.
  • powmiapowmia Users Awaiting Email Confirmation Posts: 322
    A Type-2 LSA represents a pseudonode, advertised by the DR... yet the Type-2 LSA concept has nothing to do with Designated Router concept?
  • Debug allDebug all Member Posts: 15 ■□□□□□□□□□
    A Type-2 LSA represents a pseudonode, advertised by the DR...
    A Type-2 LSA concept, not the LSA Type-2 itself.
    Type-2 LSA is designed to represent a pseudonode. DR is designed to decrease a number of full-adjacencies for the multi-access segment.
    DR advertises Type-2 LSA, of course. But if we were to have no DR concept for the OSPF at all, we would advertise these LSAs for the multi-access segment anyway. Am I wrong here?
  • powmiapowmia Users Awaiting Email Confirmation Posts: 322
    pseudonode = DR

    A Type-2 without a DR represents nothing.

    A DR without a Type-2 is a DR that nobody learns about.

    Pseudonodes without a DR would mean that all routers on a multi-access segment would flood the pseudonode LSA (this defeates the purpose; hence, pseudonode = DR)

    With no DR, we have no pseudonode for efficiently reducing flooding and would have no need for a Type-2. Information on this "multi-access" segment would be flooded in Type-1s (refer to point-to-multipoint network types for this).

    This is not a "link-state" fundamental thing (with regards to graph building). It is simply an efficiency mechanism added to the protocol, the same as was done for IS-IS with a DIS and pseudonode LSPs.
  • Debug allDebug all Member Posts: 15 ■□□□□□□□□□
    pseudonode = DR

    A Type-2 without a DR represents nothing.

    As per RFC 2328:

    "12.4.2. Network-LSAs

    A network-LSA is generated for every transit broadcast or
    NBMA network. (A transit network is a network having two or
    more attached routers). The network-LSA describes all the
    routers that are attached to the network."

    DR from this perspective defines the mechanism of LSA Type-2 distribution.
    But Type-2 topology information is a "network with attached routers", regardless of an originator of this LSA (which is DR, with no options).

    Here is one more example from RFC (section 2.1. Representation of routers and networks):

    "When multiple routers are attached to a broadcast network, the
    link-state database graph shows all routers bidirectionally
    connected to the network vertex."

    As long as LSA Type-2 is a Network-LSA, the pseudnode is a Network.
    This is "N2" in the figure above.
    DR simply originates this LSAs on behalf of the pseudonode:
    Every broadcast and NBMA network has a Designated Router. The
    Designated Router performs two main functions for the routing
    protocol:

    o The Designated Router originates a network-LSA on behalf of
    the network. This LSA lists the set of routers (including
    the Designated Router itself) currently attached to the
    network. The Link State ID for this LSA (see Section
    12.1.4) is the IP interface address of the Designated
    Router. The IP network number can then be obtained by using
    the network's subnet/network mask.

    o The Designated Router becomes adjacent to all other routers
    on the network. Since the link state databases are
    synchronized across adjacencies (through adjacency bring-up
    and then the flooding procedure), the Designated Router
    plays a central part in the synchronization process.
Sign In or Register to comment.