Sie sind auf Seite 1von 5

OSPF Database

Godspeed /u/whitemamboo

All interface addresses are listed, each router has a loopback in following format R1 = 1.1.1.1, R2 = 2.2.2.2 etc. This
loopback will be selected by OSPF as the router-ID for simplicity and will also be advertised into the OSPF process.

All screenshots will be taken from R3s perspective (the area border router)

LSA Types:

Type 1: "Router link states", generated by each router for every area the router has a link in, these are flooded into
each area only, contains RID and all interface IP's in the area

Type 2: "Network link states", only sent by DRs, confined to the single area, includes information of all the routers
connected to the link

Type 3: "Summary network link states", generated by ABRs, summarising an areas link states into another area
(inter-area routes), these LSAs are NOT sent into total stub areas - type 3 LSAs do not cause the SPF algorithm to be
ran

Type 4: "Summary ASB link states", generated only by ASBR, describing the route to reach the ASBR, not flooded into
total stub areas

Type 5: "External link states", describes links external to the OSPF domain (route redistribution) only created by
ASBRs, and flooded into all areas except stub and total stub areas

Type 7: Generated by ASBRs into a NSSA, these will be converted into a type 5 before it leaves the area
Full output of #show ip ospf database on router 3

Section 1: Shows the router ID selected by the OSPF process (if RID is manually configured, that will be used,
otherwise the highest IP address of all loopback interfaces will be used (as is the case here), if no loopbacks are up
then it will be taken from the highest IP address of non-loopback interfaces)
Section 2: “Router link states”, refer to the LSA types above you will see router link states are type 1 LSAs, which are
generated by each OSPF router for each area they are in, as such on R3 we have received (for area 0) type 1 LSAs
from RIDs 1.1.1.1, 2.2.2.2 and 3.3.3.3 (self). Routers that receive a type 1 LSA will also forward it to all other routers
in the area so all routers have eachothers type 1 LSA. The link ID and ADV router in this instance will be the same
address. The type 1 LSA actually contains more information than displayed in the database output we see here, we
actually get the number of links each router is connected to and their respective interface addresses ( see below).
The age in all examples is the how long ago in seconds the LSA was CREATED (not received). The sequence number is
used to ensure the most up to data LSA is being used, if an LSA is received with an earlier sequence number than
what is already stored it is ignored, if the sequence is higher then the database is updated. The link count is the
amount of links each respective router has in the specified area (note router 3 has 3 links, two in area 0 and one in
area 10)

To get a more in depth view of all the information sent in a type 1 LSA the #show ip ospf database router command
can be used, see below output taken from router 3. This is the type 1 LSA that was received from RID 1.1.1.1
Section 3: “Net link states” as above this is a type 2 LSA. These are only sent by designated routers. Shortest path
algorithm requires the LSDB model to show the topology as routers and links, each link must be between 2 routers,
which causes issues on multiaccess data links (like routers in a single subnet connected to a switch). For these
multiaccess links a DR is elected, and a type 2 LSA created by the DR, all other routers on the link have a connection
to the type 2 LSA in their own type 1 LSAs. The link ID for the LSA is the interface IP of the DR in the subnet. As we
can see here router 1 is the designated router for the subnet and therefore creates a type 2 LSA for the subnet. This
may be out of scope for CCNA but may help give a more complete understanding. To get a full view on these LSAs
use #show ip ospf database net

Section 4: “Summary net link states” these bad boys are generated by area border routers (routers which are
connected to more than 1 area). Advertises a summary of all routes contained in an area to another area, so in this
example we’re looking at area 0, the ADV router is R3 (RID of 3.3.3.3), this makes sense because this is the area
border router between areas 0 and 10. The link ID is the networks which are being advertised into area 0 from area
10, so now a router in area 0 knows if they want to reach 172.16.1.0/30 they send the packet to the ABR, likewise for
4.4.4.4/32.

For the full information contained in a type 3 LSA use command #show ip ospf database summary
Section 5: This last section here is the exact same as above (router link states, net link states etc), but instead of
looking at area 0, its looking at area 10, so this is perspective of a router in area 10, the router link states will be all of
the routers active in area 10, the summary net link states contains all of the networks accessible in area 0.

Das könnte Ihnen auch gefallen