2

As i see, there are different packets in OSPF. Hello packets

DBD packets

LSR

LSU

LSA(Acknowledgement)

DB packets contain LS Advertisement, LSR contain LSA ID and Link State Type, LSU contain LS Advertisement and LSAck also contain LSA.

But as far i know, the above 5 packets are used during adjacency formation and only after it is formed, they send LSAs to update routers about change in the network or anything of that sort.

Im also unable to distinguish between LSA used while forming adjacency and LSA types, as in router lsas, network lsas,etc.

If the LSA types are only sent after the adjacency is formed, then how come the different packets used while forming adjacency know about the Link State Advertisements?

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Feb 21, 2018 at 16:21

4 Answers 4

1

In regards to your last comment I'll post as a separate answer because modifying existing answer changes it a bit. Let me break it the following way:

First:

So clear me up on this. If say, Router A needs to form an adjacency with Router B, then it has to exchange it's LSDB summary which is contained in DBD packet.

I'm not sure if this is just your wording "exchange it's LSDB summary" or if you meant Type 3 LSA's, however let us recall that OSPF routers in the same area need to have identical LSDB, by this I mean that they will share all LSA's they know about and which are permitted as per area type (i.e Stub, Totally Stub, NSSA, Totally NSSA).

Second:

And DBD packet contains LSA headers which in turn contains LSA type(Router LSAs or Network LSAs, etc).

This process indeed takes effect with the usage of DBD packets as well as Type 3, 4 and 5 packets. let's see what each one contains:

  • Database description - Type 2

    • OSPF Header
    • Sequence Number
    • LSA Header
  • Link-state request - Type 3

    • OSPF Header
    • Link-state type
    • Link-State ID
    • Advertising Router
  • Link-state update - Type 4

    • OSPF Header
    • Number of Advertisements
    • Link-State Advertisements
  • Link-state acknowledgement - Type 5

    • OSPF Header
    • List of LSA Headers

Third:

So if A and B routers are exchanging DBD ,then isn't the LS type always Type 1 or Type 2 as 2 routers from different area cannot communicate with each other directly.

Remember that each LSA has a flooding scope, in the case of Router LSA (Type 1) and Network LSA (Type 2) they have an Area scope, this means they are not flooded across an area boundary. For this matter a Summary LSA (Type 3) will be used to represent those LSA's into other areas.

From the previous answer you can see the information that uniquely identifies the LSA Header which is carried in the DBD packet.

Forth:

And also, when we say Router A sends router LSA to Router B, does that mean only the Routers Link state info or does it send the LSA it has received from other router?

Router LSA consists of the standard LSA header plus the following below (I will purposefully omit some which don't matter in regards the concern):

  • Number of links
  • Link ID
  • Link data
  • Link type
  • Metric

Strictly speaking LSA T1 has only area scope so say for example routers in A0 will all eventually receive the Router LSA, now for that information to be carried to other area like A1 you would need a T3.

1

It is in the Exchange state that the Database Descriptor (DBD) packets are exchanged. Before the two routers can become fully adjacent, their LSA DB needs to be fully in sync.

So Router-A would send a list of all the LSAs it had received previously from other routers [and are installed in it's LSDB] via DBD packets to Router-B. Now Router-B sends LSRs to request the LSA it doesn't have. These LSAs are the same what you call "LSA types". The LSA "types" is just a field in the LSA header. So a couple of the LSAs requested from Router-A could be router-LSAs, network-LSAs etc.

Now after the adjacency is formed (i.e after fully sync'd), any LSA advertised by a router would go to all routers (unless the LSA type prevents it).

1
  • What about the directly connected networks? If Router A has only directly connected networks in the database and hasn't received any LSAs from other routers, then how can it send the received LSAs to the other connected router, say Router B. Any by sending LSAs to the other router, it it the whole packet it sends to the router which it has received from the other routers? Please clear my doubts even though it may sound kiddish.
    – RRHS
    Jan 3, 2018 at 14:49
1

Correct, OSPF uses five packet types:

  • Hello - Type 1
  • Database description - Type 2
  • Link-state request - Type 3
  • Link-state update - Type 4
  • Link-state acknowledgement - Type 5

Seven adjacency states are required:

  1. Down
  2. Init
  3. 2Way

Up to here you have Bidirectional communication: "The Hello Protocol is responsible for establishing and maintaining neighbor relationships. It also ensures that communication between neighbors is bidirectional."

  1. Exstart
  2. Exchange
  3. Loading
  4. Full

Remember that at the Exchange step the DBD packet has the OSPF header plus the LSA header, the latter consists of the following:

  • LS age
  • Options
  • LS Type
  • LS ID
  • Advertising Router
  • LS sequence number
  • LS checksum
  • Length

"Im also unable to distinguish between LSA used while forming adjacency and LSA types, as in router lsas, network lsas,etc. If the LSA types are only sent after the adjacency is formed, then how come the different packets used while forming adjacency know about the Link State Advertisements?"

A/ Basically dissect the headers. Database description through LS type from the LSA header and Link-State request packet field LS type, both specify (example: router lsa, summary lsa, nssa).

"If Router A has only directly connected networks in the database and hasn't received any LSAs from other routers, then how can it send the received LSAs to the other connected router, say Router B."

A/ I'll elaborate with what I think is your doubt, if not please correct.

"The router-LSA then describes the router's working connections (i.e., interfaces or links) to the area. Each link is typed according to the kind of attached network." pag127

Basically there are 4 Link Type's:

  • Point-to-point
  • Transit
  • Stub
  • Virtual Link

For a network that is directly connected to the router (LAN) and not learned from a neighbor, you would need to add the interface from that network as passive in the configuration for advertising, this happens via router-lsa.

From Advance Junos Service Provider Routing, Chapter 2-19, "A router advertises a stub network whena subnet does not connect to any OSPF neighbors. Advertising a stub network occurs for the loopback interface and any passive interfaces."

3
  • So clear me up on this. If say, Router A needs to form an adjacency with Router B, then it has to exchange it's LSDB summary which is contained in DBD packet. And DBD packet contains LSA headers which in turn contains LSA type(Router LSAs or Network LSAs, etc). So if A and B routers are exchanging DBD ,then isn't the LS type always Type 1 or Type 2 as 2 routers from different area cannot communicate with each other directly. And also, when we say Router A sends router LSA to Router B, does that mean only the Routers Link state info or does it send the LSA it has received from other router?
    – RRHS
    Jan 7, 2018 at 8:05
  • @RRHS let me know if you have further doubts
    – DRP
    Jan 11, 2018 at 2:16
  • Please correct me if i am in my understanding. Lets consider Router A and Router B are connected and OSPF is enabled. Router A has only 10.0.0.0 network connected to it. Then during the DBD exchange state, the LSA header in the DBD packet will have Router A as Advertising router and also LS ID and LS type as Router LSA(Area 1). And then, during loading state Router B request for the Router A's links and connections in the form of Link State Request and thats when the Router A sends Link State Update which consists of 10.0.0.0 network,the cost and the type which is the router lsa.
    – RRHS
    Jan 15, 2018 at 7:00
1

Hopefully another way of understanding in regards to your comment:

So clear me up on this. If say, Router A needs to form an adjacency with Router B, then it has to exchange it's LSDB summary which is contained in DBD packet. And DBD packet contains LSA headers which in turn contains LSA type(Router LSAs or Network LSAs, etc). So if A and B routers are exchanging DBD ,then isn't the LS type always Type 1 or Type 2 as 2 routers from different area cannot communicate with each other directly. And also, when we say Router A sends router LSA to Router B, does that mean only the Routers Link state info or does it send the LSA it has received from other router?

Remember that there is a fundamental rule in OSPF, there must always be a leg in the backbone area(A0). A router that connects to the BB area and a different area is considered an ABR (Area Border Router). Depending on how many areas hence the amount of ABR's

The scenario you are putting needs to be in a context, for example you could have R1--a0--R2 in this case only T1 and T2 would be enough.

If you have R1--a0--R2--a1--R3 and the new adjacency is between router R2 and R3 in area 1, the R2 is considered ABR as it has a leg in the two areas. Now, if you recall Summary LSA (Type 3) it describes networks external to the area, so basically a T1 from a different area would be described as a T3.

So R2 knows about R1&R3 in their respective areas, but R1 and R3 don't know each other, hence T3. "In a link-state routing protocol, each router maintains a database describing the Autonomous System's topology. This database is referred to as the link-state database. Each participating router has an identical database."

HTH

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.