OSPFv3 Link-State Database In-Depth Lecture


Basic configuration of all routers:

R1:

ipv6 unicast-routing

!

interface FastEthernet0/0

 ipv6 address 2012:12::1/64

 ipv6 enable

 ospfv3 1 ipv6 area 0

 no shut

router ospfv3 1

 !

 address-family ipv6 unicast

  router-id 2.2.2.2

 exit-address-family

R2:

ipv6 unicast-routing

!

interface FastEthernet0/0

 ipv6 address 2012:12::2/64

 ipv6 enable

 ospfv3 1 ipv6 area 0

 no shut

!

interface Serial1/0

 ipv6 address 2023:23::2/64

 ipv6 enable

 ospfv3 1 ipv6 area 23

 no shut

!  

router ospfv3 1

 !

 address-family ipv6 unicast

  router-id 2.2.2.2

 exit-address-family

R3:

ipv6 unicast-routing

!

interface Serial1/0

 ipv6 address 2023:23::3/64

 ipv6 enable

 ospfv3 1 ipv6 area 23

 no shut

!

interface Serial1/1

 ipv6 address 2023:23::3/64

 ipv6 enable

 ipv6 rip RIP enable

 no shut

!

ipv6 router rip RIP

 redistribute ospf 1 metric 5 include-connected

!

router ospfv3 1

 !

 address-family ipv6 unicast

  router-id 3.3.3.3

  redistribute rip RIP include-connected

 exit-address-family

R3 is an ASBR and redistributes between RIPng and OSPFv3.

R2 is an ABR.

To advertise external routes into OSPF, the ASBR creates two LSAs Type 5 to describe a path to a prefixes external 2004:4::/64 and 2034:34::/64 :

The Link State ID of an LSA 5 does not list the ipv6 addresses unlike with OSPFv2,instead this LSID represent the number of the instance,it is used to distinguish multiple external LSAs that are originated by the same ASBR.

In this case ,since we have two LSA 5 ,we have two instances:LSID=0 for the the LSA’s prefix 2004:4::/64,the LSID=1 for the LSA 5’s prefix 2034:34::/64.

The prefixes 2004:4::/64 and 2034:34::/64 are described in the “PrefixLength” and “Prefix Address” fields:

R2#show ipv6 ospf database external

            OSPFv3 Router with ID (2.2.2.2) (Process ID 1)

                Type-5 AS External Link States

  Routing Bit Set on this LSA

  LS age: 392

  LS Type: AS External Link

  Link State ID: 0

  Advertising Router: 3.3.3.3

  LS Seq Number: 80000001

  Checksum: 0x6F19

  Length: 36

  Prefix Address: 2004:4::

  Prefix Length: 64, Options: None

  Metric Type: 2 (Larger than any link state path)

  Metric: 20

  Routing Bit Set on this LSA

  LS age: 344

  LS Type: AS External Link

  Link State ID: 1

  Advertising Router: 3.3.3.3

  LS Seq Number: 80000001

  Checksum: 0x4ADC

  Length: 36

  Prefix Address: 2034:34::

  Prefix Length: 64, Options: None

  Metric Type: 2 (Larger than any link state path)

  Metric: 20

R2#

At the end ,in OSPFv3 ‘s LSA Type 5,the Forward Address does not appear because it is now optional.The forwarding address is present in the AS-external-LSA if and only if the AS-external-LSA’s bit F is set.

To ensure the reachability of an ASBR into other areas, the ABR R2 creates an LSA Type 4 renamed “inter-area router LSA” (on OSPFv2 ,the LSA 4 is called : ASBR-summary LSA):

-The Link State ID of an inter-area router LSA is no longer the router-ID of the ASBR ,this field represents an instance and it is used to distinguish multiple inter- area router LSAs that are originated by the same ABR.  The Router-ID of the ASBR is displayed at the end of the LSA 4,in the “Destination Router ID” field.

-“Metric: 64” is the ABR’s cost to reach the ASBR.

R2#show ipv6 ospf database inter-area router

            OSPFv3 Router with ID (2.2.2.2) (Process ID 1)

                Inter Area Router Link States (Area 0)

  LS age: 1939

  Options: (V6-Bit, E-Bit, R-bit, DC-Bit)

  LS Type: Inter Area Router Links

  Link State ID: 50529027

  Advertising Router: 2.2.2.2

  LS Seq Number: 80000001

  Checksum: 0x277F

  Length: 32

  Metric: 64

  Destination Router ID: 3.3.3.3

R2#

R1 examines the external LSAs. It first examines the external LSAs Type 5 created by the ASBR R3 for the prefixes 2004:4::/64 and 2034:34::/64,then it calculates how to reach the ASBR. R1 examines the inter-area router LSA Type 4 to reach R3, this LSA Type 4 is created by the ABR R2. After doing so, R1 knows that the ASBR R3 is reachable through the ABR R2. Therefore, R1 installs a routes toward 2004:4::/64 and 2034:34::/64 its routing table as an E1 routes so the metric for is R1’s metric to reach the ABR R2 which is 1 as shown by the show ip ospf border-routers, plus the ABR’s metric to reach the ASBR R3 which is listed in the inter-area router LSA 4 =64 , plus the metric of the external LSA which 20 listed in the LSA Type 5 advertised by the ASBR R3,in other word: 1+64+20=85,as shown by the show ipv6 route ospf:

R1#show ipv6 ospf border-routers

            OSPFv3 Router with ID (1.1.1.1) (Process ID 1)

Codes: i – Intra-area route, I – Inter-area route

i 2.2.2.2 [1] via FE80::C801:19FF:FE0C:8, FastEthernet0/0, ABR, Area 0, SPF 9

I 3.3.3.3 [65] via FE80::C801:19FF:FE0C:8, FastEthernet0/0, ASBR, Area 0, SPF 9

R1#

R1#show ipv6 route ospf

IPv6 Routing Table – default – 6 entries

Codes: C – Connected, L – Local, S – Static, U – Per-user Static route

       B – BGP, R – RIP, H – NHRP, I1 – ISIS L1

       I2 – ISIS L2, IA – ISIS interarea, IS – ISIS summary, D – EIGRP

       EX – EIGRP external, ND – ND Default, NDp – ND Prefix, DCE – Destination

       NDr – Redirect, O – OSPF Intra, OI – OSPF Inter, OE1 – OSPF ext 1

       OE2 – OSPF ext 2, ON1 – OSPF NSSA ext 1, ON2 – OSPF NSSA ext 2, l – LISP

OE1 2004:4::/64 [110/85]

     via FE80::C801:19FF:FE0C:8, FastEthernet0/0

OI  2023:23::/64 [110/65]

     via FE80::C801:19FF:FE0C:8, FastEthernet0/0

OE1 2034:34::/64 [110/85]

     via FE80::C801:19FF:FE0C:8, FastEthernet0/

R1#

Let’s see the Router LSA-1:

The line “Area Border Router” in the LSA Type 1 of R2 means that the Bit B is set in this LSA indicating that this router R2 is an ABR:

R2#show ipv ospf data router self-originate | begin Area 23

                Router Link States (Area 23)

  LS age: 145

  Options: (V6-Bit, E-Bit, R-bit, DC-Bit)

  LS Type: Router Links

  Link State ID: 0

  Advertising Router: 2.2.2.2

  LS Seq Number: 80000006

  Checksum: 0xBAE4

  Length: 40

  Area Border Router

  Number of Links: 1

    Link connected to: another Router (point-to-point)

      Link Metric: 64

      Local Interface ID: 4

      Neighbor Interface ID: 3

      Neighbor Router ID: 3.3.3.3

R2#

The line “AS Boundary Router” in the LSA Type 1 of R3 means that the Bit E is set in this LSA indicating that this router R3 originates external LSAs:

R2#show ipv6 ospf database router adv-router 3.3.3.3

            OSPFv3 Router with ID (2.2.2.2) (Process ID 1)

                Router Link States (Area 23)

  Routing Bit Set on this LSA

  LS age: 1386

  Options: (V6-Bit, E-Bit, R-bit, DC-Bit)

  LS Type: Router Links

  Link State ID: 0

  Advertising Router: 3.3.3.3

  LS Seq Number: 80000004

  Checksum: 0x554B

  Length: 40

  AS Boundary Router

  Number of Links: 1

    Link connected to: another Router (point-to-point)

      Link Metric: 64

      Local Interface ID: 3

      Neighbor Interface ID: 4

      Neighbor Router ID: 2.2.2.2

R2#

-In both LSAs 1 the Link State ID = 0 represents the first fragment ,if we add another router and connect this router to R2 in area 23 then R2 originates a separate router LSA 1 with a different Link State ID (Link State ID = 1) to describe the connection to link shared with this router.

-On OSPFv3 the Router LSAs 1 have no address or prefixe informations and routes for stub networks does not appear in the LSA Type 1.Rather, they are included in intra-area prefix LSAs called LSA Type 9.

In the LSA 1 of R2 :

-Local Interface ID: 4 is R2’s Interface ID for the link R2–R3

-Neighbor Interface ID: 3 is R3 ‘s Interface ID for the link R2–R3

In the LSA 1 of R3 :

-Local Interface ID: 3 is R3’s Interface ID for the link R2–R3

-Neighbor Interface ID: 4 is R2 ‘s Interface ID for the link R2–R3

The new LSAs Type 8 called Link-LSAs provide the router’s link-local address to all other routers attached to the link(because the link-local address is used as the next-hop for ospf routes).

And they inform other routers attached to the link of a list of IPv6 prefixes associated with the link.

Let’s examine the LSA Type 8 created by R2 in area 23:

-“The “Link State ID: 4” represents the R2’s Interface ID for the link R2–R3 listed in the LSA Type 1’R2.

-“Link Local Address: FE80::C801:19FF:FE0C:8” represents the Link-local address of s1/1’R2 which will be used as the next-hop by R3 for all routes learned from R2.

-“Prefix Address: 2023:23::” represents the prefix attached to its interface in area 23 with the Prefix Length: 64.

R2#show ipv6 ospf database link Self-originate | begin Area 23

                Link (Type-8) Link States (Area 23)

  LS age: 1260

  Options: (V6-Bit, E-Bit, R-bit, DC-Bit)

  LS Type: Link-LSA (Interface: Serial1/0)

  Link State ID: 4 (Interface ID)

  Advertising Router: 2.2.2.2

  LS Seq Number: 80000005

  Checksum: 0x23B9

  Length: 56

  Router Priority: 1

  Link Local Address: FE80::C801:19FF:FE0C:8

  Number of Prefixes: 1

  Prefix Address: 2023:23::

  Prefix Length: 64, Options: None

R2#

Let’s examine the LSA Type 8 created by R3 in area 23:

-The “Link State ID: 3” represents the R3’s Interface ID for the link R2–R3 listed in the LSA Type 1’R3.

-Link Local Address: FE80::C802:16FF:FE60:0 represents the Link-local address of s1/1’R3 which will be used as the next-hop by R2 for all routes learned from R3.

-Prefix Address: 2023:23:: represents the prefix attached to its interface in area 23 with the Prefix Length: 64.

R3#show ipv6 ospf database link self-originate

            OSPFv3 Router with ID (3.3.3.3) (Process ID 1)

                Link (Type-8) Link States (Area 23)

  LS age: 1638

  Options: (V6-Bit, E-Bit, R-bit, DC-Bit)

  LS Type: Link-LSA (Interface: Serial1/0)

  Link State ID: 3 (Interface ID)

  Advertising Router: 3.3.3.3

  LS Seq Number: 80000005

  Checksum: 0xD1BD

  Length: 56

  Router Priority: 1

  Link Local Address: FE80::C802:16FF:FE60:0

  Number of Prefixes: 1

  Prefix Address: 2023:23::

  Prefix Length: 64, Options: None

R3#

Let’s see the Network LSA Type-2:

In the Link R1—R2 , R2 is the DR and originates an LSA Type 2 (Network LSA) :

-The Link State ID is set to the Interface ID of the Designated Router on the link rather than the address of Designated Router on OSPFv2.

-In OSPFv3 the LSA Type 2 does not contain a Network Mask unlike on OSPFv2. All prefix informations are carried over the intra-Area Prefix LSAs (LSA Type 9) originated by the Designated Router in the Link.

R2#show ipv6 ospf database network

            OSPFv3 Router with ID (2.2.2.2) (Process ID 1)

                Net Link States (Area 0)

  LS age: 465

  Options: (V6-Bit, E-Bit, R-bit, DC-Bit)

  LS Type: Network Links

  Link State ID: 2 (Interface ID of Designated Router)

  Advertising Router: 2.2.2.2

  LS Seq Number: 80000003

  Checksum: 0x13DD

  Length: 32

        Attached Router: 2.2.2.2

        Attached Router: 1.1.1.1

The new LSA Type 9 (intra-Area Prefix LSA) is used to associate a list of IPv6 address prefixes with a transit network link by referencing the LSA Type 2(Network LSAs) and a list of IPv6 address prefixes with a router by referencing the LSA Type 1 (Router LSA).

Let’s examine the LSAs Type 9 on R2:

-The LSA Type 9 created in area 0 lists the Referenced Link State ID: 2 which is the Link State ID of the LSA Type 2 created by the DR R2 and the  Referenced LSA Type: 2002 which the network LSA 2.

-The LSA Type 9 created in area 23 lists the Referenced Link State ID: 0 which is the Link State ID of the LSA Type 1 created by R2 and the Referenced LSA Type: 2001 which is the router LSA 1.

R2#show ipv6 ospf database prefix self-originate

            OSPFv3 Router with ID (2.2.2.2) (Process ID 1)

                Intra Area Prefix Link States (Area 0)

  Routing Bit Set on this LSA

  LS age: 121

  LS Type: Intra-Area-Prefix-LSA

  Link State ID: 2048

  Advertising Router: 2.2.2.2

  LS Seq Number: 80000003

  Checksum: 0x2144

  Length: 44

  Referenced LSA Type: 2002

  Referenced Link State ID: 2

  Referenced Advertising Router: 2.2.2.2

  Number of Prefixes: 1

  Prefix Address: 2012:12::

  Prefix Length: 64, Options: None, Metric: 0

                Intra Area Prefix Link States (Area 23)

  Routing Bit Set on this LSA

  LS age: 379

  LS Type: Intra-Area-Prefix-LSA

  Link State ID: 0

  Advertising Router: 2.2.2.2

  LS Seq Number: 80000005

  Checksum: 0xAC5F

  Length: 44

  Referenced LSA Type: 2001

  Referenced Link State ID: 0

  Referenced Advertising Router: 2.2.2.2

  Number of Prefixes: 1

  Prefix Address: 2023:23::

  Prefix Length: 64, Options: None, Metric: 64

R2#

Analysing the LSA Type 9 created for area 0:

-In the LSA Type 9 created in area 0 where a Designated Router is elected,the DR R2 originates an intra-area-prefix LSA-9 to advertise the link’s prefixes throughout the area. 
-For a link R1–R2, the DR R2 builds an intra-area-prefix-LSA in order to indicate the prefixes associated with the Link, the fields Referenced LSA Type, Referenced Link State ID, and Referenced Advertising Router are set to the corresponding fields of the Network LSA Type 2 (Link State ID,and Advertising Router respectively) created by the DR R2 and shown earlier. 
-This means that the Referenced LS Type is set to 0x2002 (Network LSA-2), the Referenced Link State ID is set to the Interface ID of the Designated Router on the Link which is 2 ,and the Referenced Advertising Router is set to the Router ID of Designated Router 2.2.2.2

Analysing the LSA Type 9 created for area 23:

-In the LSA Type 9 created in area 23 where there is no DR, R2 builds an intra-area prefix LSA-9 to advertise prefixes for its attached stub links, loopback interfaces and hosts.
-This LSA 9 is created in order to indicate the prefixes are to be associated with the Router R2 itself,R2 sets the Referenced LS Type to 0x2001 (Router LSA), the Referenced Link State ID to 0 which is the LSID of the its LSA Type 1 shown earlier , and the Referenced Advertising Router to its own router-ID 2.2.2.2

-On OSPFv2,the SPF calculations are triggered by the LSA Type 1 and the LSA Type 2 when a change occurs.
-Since on OSPFv3 the LSA Type 1 and Type 2 do not carry the prefix informations :adding or removing the subnets in the OSPF does not trigger SPF calculation like what we have learned about OSPFv2,so the purpose of separating the prefix information from the LSA Type 1 and Type 2 and adding two LSAs Type 8 and Type 9 to carry these prefixes is to optimize the convergence of OSPFv3.

Categories: OSPF Routing Protocol

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: