cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
745
Views
0
Helpful
0
Comments
Meddane
VIP
VIP

 

Meddane_0-1676927662527.png

Basic configuration:

R1:

ipv uni

!

interface Serial1/0

 ip address 12.0.0.1 255.255.255.0

 ip ospf 1 area 0

 ipv6 address 12::1/64

 ipv6 ospf 1 area 0

!

router ospf 1

 router-id 0.0.0.1

!

ipv6 router ospf 1

 router-id 0.0.0.1

 

R2:

ipv uni

!

interface Serial1/0

 ip address 12.0.0.2 255.255.255.0

 ip ospf 1 area 0

 ipv6 address 12::2/64

 ipv6 ospf 1 area 0

 no sh

!

interface Serial1/1

 ip address 23.0.0.2 255.255.255.0

 ip ospf 1 area 0

 ipv6 address 23::2/64

 ipv6 ospf 1 area 0

 no sh

!

router ospf 1

 router-id 0.0.0.2

!

ipv6 router ospf 1

 router-id 0.0.0.2

 

R3:

ipv uni

!

interface Serial1/0

 ip address 23.0.0.3 255.255.255.0

 ip ospf 1 area 0

 ipv6 address 23::3/64

 ipv6 ospf 1 area 0

 no sh

!

router ospf 1

 router-id 0.0.0.3

!

ipv6 router ospf 1

 router-id 0.0.0.3

 

In OSPFv2 the sh ip ospf neighbor command has some informations that indicate:

 

The Neighbor ID is the router ID of the neighbor router.

The Pri field indicates the priority of the neighbor router.

The State field indicates the functional state of the neighbor router.

The Dead Time field indicates the amount of time remaining that the router waits to receive an OSPF hello packet from the neighbor before declaring the neighbor down

The Address field indicates the IP address of the interface to which this neighbor is directly connected. This is the IP address of the neighbor.

The Interface field indicates the interface on which the OSPF neighbor has formed adjacency.

 

R1#sh ip os nei

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

0.0.0.2           0   FULL/  -        00:00:31    12.0.0.2        Serial1/0

R1#

 

R2#sh ip ospf neighbor

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

0.0.0.3           0   FULL/  -        00:00:33    23.0.0.3        Serial1/1

0.0.0.1           0   FULL/  -        00:00:32    12.0.0.1        Serial1/0

R2#

 

R2#sh ip os nei

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

0.0.0.1           0   FULL/  -        00:00:37    12.0.0.1        Serial1/0

R2#

 

In OSPFv2, the Type-1 LSA describes the Links connected to the router, there are four Links Type.

 

Link Type 1: Point-to-point connection to another router = Neighbor router ID

Link Type 2: Connection to a transit network = DR's interface address

Link Type 3: Connection to a stub network = IP network/subnet number

Link Type 4: Virtual Link = Neighbor router ID

 

The Link Type 1 describes who is connected to me, let's display the Type-1 LSA ' s R1:

The line "Link connected to: another Router (point-to-point)" represents the Link Type 1.

 

"(Link ID) Neighboring Router ID: 0.0.0.2" represents the router ID of R2.

"(Link Data) Router Interface address: 12.0.0.1" represents the IP address of R1 connected to R2.

 

R1# sh ip os data router self

 

            OSPF Router with ID (0.0.0.1) (Process ID 1)

 

                Router Link States (Area 0)

 

  LS age: 1158

  Options: (No TOS-capability, DC)

  LS Type: Router Links

  Link State ID: 0.0.0.1

  Advertising Router: 0.0.0.1

  LS Seq Number: 80000002

  Checksum: 0xBFC6

  Length: 48

  Number of Links: 2

 

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

     (Link ID) Neighboring Router ID: 0.0.0.2

     (Link Data) Router Interface address: 12.0.0.1

      Number of MTID metrics: 0

       TOS 0 Metrics: 64

 

    Link connected to: a Stub Network

     (Link ID) Network/subnet number: 12.0.0.0

     (Link Data) Network Mask: 255.255.255.0

      Number of MTID metrics: 0

       TOS 0 Metrics: 64

 

 

R1#

 

Let's verify the Type-LSA ' s R2:

 

"(Link Data) Router Interface address: 12.0.0.2" represents the IP address of R2 connected to R1.

 

R1#sh ip os data router adv 0.0.0.2

 

            OSPF Router with ID (0.0.0.1) (Process ID 1)

 

                Router Link States (Area 0)

 

  LS age: 645

  Options: (No TOS-capability, DC)

  LS Type: Router Links

  Link State ID: 0.0.0.2

  Advertising Router: 0.0.0.2

  LS Seq Number: 80000003

  Checksum: 0x4071

  Length: 72

  Number of Links: 4

 

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

     (Link ID) Neighboring Router ID: 0.0.0.3

     (Link Data) Router Interface address: 23.0.0.2

      Number of MTID metrics: 0

       TOS 0 Metrics: 64

 

    Link connected to: a Stub Network

     (Link ID) Network/subnet number: 23.0.0.0

     (Link Data) Network Mask: 255.255.255.0

      Number of MTID metrics: 0

       TOS 0 Metrics: 64

 

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

     (Link ID) Neighboring Router ID: 0.0.0.1

     (Link Data) Router Interface address: 12.0.0.2

      Number of MTID metrics: 0

       TOS 0 Metrics: 64

 

    Link connected to: a Stub Network

     (Link ID) Network/subnet number: 12.0.0.0

     (Link Data) Network Mask: 255.255.255.0

      Number of MTID metrics: 0

       TOS 0 Metrics: 64

 

 

R1#

 

Since the Type-1 LSA describes through the Link Type 1 the router ID of the neighbor and the IP address connected to this neighbor.

 

The Adjacency table displays the router ID in the neighbor ID field and the IP address of this neighbor in the Address field as shown by the show ip os nei on R1 and R2:

 

R1#sh ip os nei

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

0.0.0.2           0   FULL/  -        00:00:31    12.0.0.2        Serial1/0

R1#

 

R2#sh ip ospf neighbor

 

Neighbor ID     Pri   State           Dead Time   Address         Interface

0.0.0.3           0   FULL/  -        00:00:33    23.0.0.3        Serial1/1

0.0.0.1           0   FULL/  -        00:00:32    12.0.0.1        Serial1/0

R2#

 

What about OSPFv3?

 

Let's verify the adjacency tables of R1 and R2:

 

R2#sh ipv os nei

 

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

 

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface

0.0.0.3           0   FULL/  -        00:00:31    4               Serial1/1

0.0.0.1           0   FULL/  -        00:00:33    4               Serial1/0

R2#

 

The only difference is that the Address field is replaced by the Interface ID, this the Interface ID of the neighbor R2 = 4.

 

R1#sh ipv os nei

 

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

 

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface

0.0.0.2           0   FULL/  -        00:00:38    4               Serial1/0

R1#

 

Per RFC 5340 OSPF for IPv6

 

2.7.  Packet Format Changes

 

The Hello packet now contains no address information at all.

      Rather, it now includes an Interface ID that the originating

      router has assigned to uniquely identify (among its own

      interfaces) its interface to the link.  This Interface ID will be

      used as the network-LSA's Link State ID if the router becomes the

      Designated Router on the link.

 

4.1.2.  The Interface Data Structure

 

   In OSPF for IPv6, an interface connects a router to a link.  The IPv6

   interface structure modifies the IPv4 interface structure (as defined

   in Section 9 of [OSPFV2]) as follows:

 

   Interface ID

      Every interface is assigned an Interface ID, which uniquely

      identifies the interface with the router.  For example, some

      implementations MAY be able to use the MIB-II IfIndex ([INTFMIB])

      as the Interface ID.  The Interface ID appears in Hello packets

      sent out the interface, the link-local-LSA originated by the

      router for the attached link, and the router-LSA originated by the

      router-LSA for the associated area.  It will also serve as the

      Link State ID for the network-LSA that the router will originate

      for the link if the router is elected Designated Router.

      The Interface ID for a virtual link is independent of the

      Interface ID of the outgoing interface it traverses in the transit

      area.7

 

How R1 get the Interface ID of R2?

 

Let's verify the Type-LSA 1 's R2:

 

The Type-1 LSA of R2 carries two links, they describe the neighbors connected to R2.

The first link identifies the neighbor ID 0.0.0.3 which is R3.

The second link identifies the neighbor ID 0.0.0.1 which is R1.

 

"Router Interface address" field is no longer present, instead R2 adds two field:

 

The Local Interface ID: 4

The Neighbor Interface ID: 4

 

R1#sh ipv os data router adv 0.0.0.2

 

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

 

                Router Link States (Area 0)

 

  LS age: 1175

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

  LS Type: Router Links

  Link State ID: 0

  Advertising Router: 0.0.0.2

  LS Seq Number: 80000002

  Checksum: 0x4017

  Length: 56

  Number of Links: 2

 

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

      Link Metric: 64

      Local Interface ID: 5

      Neighbor Interface ID: 4

      Neighbor Router ID: 0.0.0.3

 

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

      Link Metric: 64

      Local Interface ID: 4

      Neighbor Interface ID: 4

      Neighbor Router ID: 0.0.0.1

 

 

R1#

 

Where R2 get the Local Interface ID and the Neighbor Interface ID ?

 

In OSPFv3: The LSA Type 8 is used to advertise the link-local address of the router's interface to the routers attached to the link in order to use these link-local addresses for the next-hop,also it informs the routers attached to the link the list of prefixes associated with the link.

The Link State ID is set to the router's Interface ID on Link.

 

Let's see the Type-LSA 8 of R2:, we can see that the Link State ID of the Link LSA 's R2 is 4 (Interface ID).

 

When R2 builds its own Type-LSA 1 it puts the Local Interface ID to 4 (own Interface ID).

 

R1#sh ipv os data link adv 0.0.0.2

 

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

 

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

 

  LS age: 729

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

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

  Link State ID: 4 (Interface ID)

  Advertising Router: 0.0.0.2

  LS Seq Number: 80000002

  Checksum: 0x8308

  Length: 56

  Router Priority: 1

  Link Local Address: FE80::C802:6FF:FECC:8

  Number of Prefixes: 1

  Prefix Address: 12::

  Prefix Length: 64, Options: None

 

R1#

 

The same process is followed by R1, it creates a Type-8 LSA with the Link State ID: 4 (own Interface ID) and puts it as the Local Interface ID in its Type-1 LSA:

 

R1#sh ipv os data link self

 

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

 

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

 

  LS age: 959

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

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

  Link State ID: 4 (Interface ID)

  Advertising Router: 0.0.0.1

  LS Seq Number: 80000003

  Checksum: 0x5C24

  Length: 56

  Router Priority: 1

  Link Local Address: FE80::C801:AFF:FED4:8

  Number of Prefixes: 1

  Prefix Address: 12::

  Prefix Length: 64, Options: None

 

R1#

 

R1#sh ipv os data router self

 

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

 

                Router Link States (Area 0)

 

  LS age: 1072

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

  LS Type: Router Links

  Link State ID: 0

  Advertising Router: 0.0.0.1

  LS Seq Number: 80000003

  Checksum: 0x3B78

  Length: 40

  Number of Links: 1

 

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

      Link Metric: 64

      Local Interface ID: 4

      Neighbor Interface ID: 4

      Neighbor Router ID: 0.0.0.2

 

 

R1#

 

Finally the Interface ID in the Adjacency table of R1 represents the Interface ID = 4 of the neighbor R2, which is the Link State ID of the Type-8 LSA 's R2:

 

R1#sh ipv os nei

 

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

 

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface

0.0.0.2           0   FULL/  -        00:00:38    4               Serial1/0

R1#

 

Let's verify the neighbor table of R3, R3 is adjacent with R2, the Interface ID is 5, this is the Link State ID of the Type-8 LSA's R2:

 

R3#sh ipv os nei

 

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

 

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface

0.0.0.2           0   FULL/  -        00:00:38    5               Serial1/0

R3#

 

Let's verify the Type-8 LSA 's R2 using the sh ipv os data link adv 0.0.0.2 command, the Link State ID is = 5 (Interface ID):

 

Note: in OSPFv3, each router creates a single Type-8 LSA for each Link, each Type-8 LSA has a unique Link State ID.

The Type-8 LSA 's R2 in Link R1--R2 has a Link State ID: 4.

The Type-8 LSA 's R2 in Link R2--R3 has a Link State ID: 5.

 

R3#sh ipv os data link adv 0.0.0.2

 

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

 

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

 

  LS age: 499

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

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

  Link State ID: 5 (Interface ID)

  Advertising Router: 0.0.0.2

  LS Seq Number: 80000003

  Checksum: 0x99DE

  Length: 56

  Router Priority: 1

  Link Local Address: FE80::C802:6FF:FECC:8

  Number of Prefixes: 1

  Prefix Address: 23::

  Prefix Length: 64, Options: None

 

R3#

 

The Type-1 LSA 's R2 lists the Local Interface ID: 5 (the Link State ID ot its Type-8 LSA) in the Link Type 1 that describes the connection to another router, R3 in this case:

 

R3#sh ipv os data router adv 0.0.0.2

 

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

 

                Router Link States (Area 0)

 

  LS age: 478

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

  LS Type: Router Links

  Link State ID: 0

  Advertising Router: 0.0.0.2

  LS Seq Number: 80000003

  Checksum: 0x3E18

  Length: 56

  Number of Links: 2

 

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

      Link Metric: 64

      Local Interface ID: 5

      Neighbor Interface ID: 4

      Neighbor Router ID: 0.0.0.3

 

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

      Link Metric: 64

      Local Interface ID: 4

      Neighbor Interface ID: 4

      Neighbor Router ID: 0.0.0.1

 

 

R3#

 

R3 creates a Type-1 LSA and sets the Neighbor Interface ID: 5, this is the Link State ID of the Type-8 LSA 's R2 and sees R2 as the neighbor:

 

R3#sh ipv os data router self

 

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

 

                Router Link States (Area 0)

 

  LS age: 326

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

  LS Type: Router Links

  Link State ID: 0

  Advertising Router: 0.0.0.3

  LS Seq Number: 80000003

  Checksum: 0x416F

  Length: 40

  Number of Links: 1

 

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

      Link Metric: 64

      Local Interface ID: 4

      Neighbor Interface ID: 5

      Neighbor Router ID: 0.0.0.2

 

 

R3#

 

Finally R3 creates one Type-8 LSA with a Link State ID: 4, this the Interface ID that R2 displays in the Adjacency table:

 

R3#sh ipv os data link self

 

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

 

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

 

  LS age: 383

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

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

  Link State ID: 4 (Interface ID)

  Advertising Router: 0.0.0.3

  LS Seq Number: 80000003

  Checksum: 0x93F0

  Length: 56

  Router Priority: 1

  Link Local Address: FE80::C803:DFF:FEB8:8

  Number of Prefixes: 1

  Prefix Address: 23::

  Prefix Length: 64, Options: None

 

R3#

 

The Adjacency table of R2 shown:

1-The Interface ID: 4 (the Link State ID of the Type-8 LSA 's R3) for the entry 0.0.0.3.

1-The Interface ID: 4 (the Link State ID of the Type-8 LSA 's R2) for the entry 0.0.0.1.

 

R2#sh ipv os nei

 

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

 

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface

0.0.0.3           0   FULL/  -        00:00:31    4               Serial1/1

0.0.0.1           0   FULL/  -        00:00:33    4               Serial1/0

R2#

 

Finally:

 

1-In OSPFv2: The "Address" field indicates the IP address of the interface to which this neighbor is directly connected. This is the IP address of the neighbor.

2-In OSPFv3: There is no "Address" field, instead OSPFv3 replaces it with the "Interface ID", it indicates the "Link State ID" of the Type-8 LSA advertised by the neighbor. In other words the "Local Interface ID" of the Type-1 LSA originated by the neighbor.

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: