Summary

Build an IPv6 routing table by OSPFv3. This is a configuration example for a normal OSPF process that does not support address-family. Also, it takes an area layout that requires virtual links. The basic concept of a virtual link is the same as OSPFv2 for IPv4.

Network Diagram

Figure OSPFv3 Configuration Example Network diagram

Configuration Condition

  1. In the network diagram shown in the figure, we will use OSPFv3 to enable IPv6 routing. The router ID of each router is X.X.X.X.
  2. Make sure that the Loopback0 prefix of each router is registered in the routing table with a prefix length of /64.
  3. Verify that communication is possible between all IPv6 prefixes.

Initial Configuration

Proceed with the following configuration as the initial configuration for each router.

  • Hostname
  • IPv6 Address

Configuration and Verification

Step1:Enable OSPFv3

Enable OSPFv3 based on the area layout shown in the figure. The router ID of each router will be X.X.X.X. Since it is considered that some routers do not have IPv4 addresses, the router ID is basically configured statically in OSPFv3. Also, to make sure that the Loopback0 prefix is advertised with /64, change the network type to POINT_TO_POINT. The concept is the same as advertising a loopback interface in OSPFv2 for IPv4.

R1

interface Loopback0
 ipv6 ospf network point-to-point
 ipv6 ospf 1 area 0
!
interface FastEthernet0/0
 ipv6 ospf 1 area 0
!
ipv6 router ospf 1
 router-id 1.1.1.1
 log-adjacency-changes

R2

interface Loopback0
 ipv6 ospf network point-to-point
 ipv6 ospf 1 area 0
!
interface FastEthernet0/0
 ipv6 ospf 1 area 0
!
interface FastEthernet1/0
 ipv6 ospf 1 area 0
!

ipv6 router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes

R3

interface Loopback0
 ipv6 ospf network point-to-point
 ipv6 ospf 1 area 1
!
interface FastEthernet0/0
 ipv6 ospf 1 area 0
!
interface FastEthernet1/0
 ipv6 ospf 1 area 1
!
ipv6 router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes

R4

interface Loopback0
 ipv6 ospf network point-to-point
 ipv6 ospf 1 area 1
!
interface FastEthernet0/0
 ipv6 ospf 1 area 1
!
interface FastEthernet1/0
 ipv6 ospf 1 area 1
!
ipv6 router ospf 1
 router-id 4.4.4.4
 log-adjacency-changes

R5

interface Loopback0
 ipv6 ospf network point-to-point
 ipv6 ospf 1 area 1
!
interface FastEthernet0/0
 ipv6 ospf 1 area 1
!
interface FastEthernet1/0
 ipv6 ospf 1 area 2
!
ipv6 router ospf 1
 router-id 5.5.5.5
 log-adjacency-changes

R6

interface Loopback0
 ipv6 ospf network point-to-point
 ipv6 ospf 1 area 2
!
interface FastEthernet0/0
 ipv6 ospf 1 area 2
!
interface FastEthernet1/0
 ipv6 ospf 1 area 2
!
ipv6 router ospf 1
 router-id 6.6.6.6
 log-adjacency-changes

R7

interface Loopback0
 ipv6 ospf network point-to-point
 ipv6 ospf 1 area 2
!
interface FastEthernet0/0
 ipv6 ospf 1 area 2
!
ipv6 router ospf 1
 router-id 7.7.7.7
 log-adjacency-changes

Step2: Verify Neighbor

Verify that OSPFv3 neighbors have been established by using the show ipv6 ospf neighbor command.

R2

R2#show ipv6 ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
3.3.3.3           1   FULL/BDR        00:00:37    3               FastEthernet1/0
1.1.1.1           1   FULL/DR         00:00:37    3               FastEthernet0/0

R4

R4#show ipv6 ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
5.5.5.5           1   FULL/BDR        00:00:31    3               FastEthernet1/0
3.3.3.3           1   FULL/BDR        00:00:30    4               FastEthernet0/0

R6

R6#show ipv6 ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
7.7.7.7           1   FULL/BDR        00:00:32    3               FastEthernet1/0
5.5.5.5           1   FULL/DR         00:00:34    4               FastEthernet0/0

Step3: Verify OSPFv3 routes

Verify whether OSPFv3 routes can be learned by using the show ipv6 route ospf command on R1.

R1

R1#show ipv6 route ospf 
IPv6 Routing Table - 13 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
O   2001:1:1:23::/64 [110/2]
     via FE80::2, FastEthernet0/0
OI  2001:1:1:34::/64 [110/3]
     via FE80::2, FastEthernet0/0
OI  2001:1:1:45::/64 [110/4]
     via FE80::2, FastEthernet0/0
O   2001:100:2::/64 [110/2]
     via FE80::2, FastEthernet0/0
OI  2001:100:3::/64 [110/3]
     via FE80::2, FastEthernet0/0
OI  2001:100:4::/64 [110/4]
     via FE80::2, FastEthernet0/0
OI  2001:100:5::/64 [110/5]
     via FE80::2, FastEthernet0/0

Neighbors have been successfully established, but not all OSPFv3 routes have been learned. You can see that R1 is not able to learn the prefix contained in area 2 with OSPFv3. This is because area 2 is not adjacent to area 0. Similar to OSPFv2, OSPFv3 must have a two-tiered area layout with area 0 as the center.

Step4: Configure Virtual-link

Configure virtual-link between R3 and R5 so that area 2 can be adjacent to area 0.

R3

ipv6 router ospf 1
 area 1 virtual-link 5.5.5.5

R5

ipv6 router ospf 1
 area 1 virtual-link 3.3.3.3

Figure Configuration of virtual-link
Figure Configuration of virtual-link


Step5: Verify Virtual-link

Verify the virtual-link between R3 and R5.

R3

R3#show ipv6 ospf virtual-links 
Virtual Link OSPFv3_VL0 to router 5.5.5.5 is up
  Interface ID 8, IPv6 address 2001:100:5::5
  Run as demand circuit
  DoNotAge LSA allowed.
  Transit area 1, via interface FastEthernet1/0, Cost of using 2
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Adjacency State FULL (Hello suppressed)
    Index 1/2/3, retransmission queue length 0, number of retransmission 0
    First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
    Last retransmission scan length is 0, maximum is 0
    Last retransmission scan time is 0 msec, maximum is 0 msec
R3#show ipv6 ospf interface brief 
Interface    PID   Area            Intf ID    Cost  State Nbrs F/C
VL0          1     0               8          2     P2P   1/1
Fa0/0        1     0               3          1     BDR   1/1
Lo0          1     1               7          1     P2P   0/0
Fa1/0        1     1               4          1     BDR   1/1
R3#show ipv6 ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
5.5.5.5           1   FULL/  -           -        8               OSPFv3_VL0
2.2.2.2           1   FULL/DR         00:00:35    4               FastEthernet0/0
4.4.4.4           1   FULL/DR         00:00:32    3               FastEthernet1/0

Step6: Verify OSPFv3 routes

By configuring virtual-link, routes for the entire OSPFv3 domain should be learned. On R1, enter show ipv6 route ospf command.

R1

R1#show ipv6 route ospf 
IPv6 Routing Table - 19 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
O   2001:1:1:23::/64 [110/2]
     via FE80::2, FastEthernet0/0
OI  2001:1:1:34::/64 [110/3]
     via FE80::2, FastEthernet0/0
OI  2001:1:1:45::/64 [110/4]
     via FE80::2, FastEthernet0/0
OI  2001:1:1:56::/64 [110/5]
     via FE80::2, FastEthernet0/0
OI  2001:1:1:67::/64 [110/6]
     via FE80::2, FastEthernet0/0
O   2001:100:2::/64 [110/2]
     via FE80::2, FastEthernet0/0
OI  2001:100:3::/64 [110/3]
     via FE80::2, FastEthernet0/0
OI  2001:100:3::3/128 [110/2]
     via FE80::2, FastEthernet0/0
OI  2001:100:4::/64 [110/4]
     via FE80::2, FastEthernet0/0
OI  2001:100:5::/64 [110/5]
     via FE80::2, FastEthernet0/0
OI  2001:100:5::5/128 [110/4]
     via FE80::2, FastEthernet0/0
OI  2001:100:6::/64 [110/6]
     via FE80::2, FastEthernet0/0
OI  2001:100:7::/64 [110/7]
     via FE80::2, FastEthernet0/0

The following prefixes in area 2 are also correctly registered in the routing table on R1.

  • 2001:1:1:56::/64
  • 2001:1:1:67::/64
  • 2001:100:6::/64
  • 2001:100:7::/64

In addition, in OSPFv3, the address of the Virtual-link endpoint is advertised as an Intra area prefix of /128. Verify the LSDB for area 1 on R4.

R4

R4#show ipv6 ospf database                          

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

                Router Link States (Area 1)

ADV Router      Age         Seq#        Fragment ID  Link count  Bits
3.3.3.3         1403        0x80000005  0            1           B
4.4.4.4         1358        0x80000007  0            2           None
5.5.5.5         648         0x80000004  0            1           B

                Net Link States (Area 1)

ADV Router      Age         Seq#        Link ID    Rtr count
4.4.4.4         1402        0x80000001  3          2
4.4.4.4         1358        0x80000001  4          2

                Inter Area Prefix Link States (Area 1)

ADV Router      Age         Seq#        Prefix
3.3.3.3         1443        0x80000001  2001:1:1:23::/64
3.3.3.3         1408        0x80000001  2001:100:1::/64
3.3.3.3         1408        0x80000001  2001:100:2::/64
3.3.3.3         1408        0x80000001  2001:1:1:12::/64
3.3.3.3         633         0x80000001  2001:1:1:56::/64
3.3.3.3         636         0x80000001  2001:1:1:67::/64
3.3.3.3         636         0x80000001  2001:100:7::/64
3.3.3.3         636         0x80000001  2001:100:6::/64
5.5.5.5         651         0x80000001  2001:100:6::/64
5.5.5.5         651         0x80000001  2001:100:7::/64
5.5.5.5         651         0x80000001  2001:1:1:67::/64
5.5.5.5         651         0x80000001  2001:1:1:56::/64
5.5.5.5         641         0x80000001  2001:100:1::/64
5.5.5.5         641         0x80000001  2001:100:2::/64
5.5.5.5         641         0x80000001  2001:1:1:23::/64
5.5.5.5         641         0x80000001  2001:1:1:12::/64

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

ADV Router      Age         Seq#        Link ID    Interface
4.4.4.4         1463        0x80000001  7          Lo0
4.4.4.4         1434        0x80000002  4          Fa1/0
5.5.5.5         1393        0x80000002  3          Fa1/0
3.3.3.3         1445        0x80000002  4          Fa0/0
4.4.4.4         1438        0x80000002  3          Fa0/0

                Intra Area Prefix Link States (Area 1)
          
ADV Router      Age         Seq#        Link ID    Ref-lstype  Ref-LSID
3.3.3.3         694         0x80000004  0          0x2001      0
4.4.4.4         1371        0x80000005  0          0x2001      0
4.4.4.4         1414        0x80000001  3072       0x2002      3
4.4.4.4         1371        0x80000001  4096       0x2002      4
5.5.5.5         661         0x80000004  0          0x2001      0
R4#show ipv6 ospf database prefix adv-router 3.3.3.3

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

                Intra Area Prefix Link States (Area 1)

  Routing Bit Set on this LSA
  LS age: 754
  LS Type: Intra-Area-Prefix-LSA
  Link State ID: 0
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000004
  Checksum: 0xCB9
  Length: 64
  Referenced LSA Type: 2001
  Referenced Link State ID: 0
  Referenced Advertising Router: 3.3.3.3
  Number of Prefixes: 2
  Prefix Address: 2001:100:3::
  Prefix Length: 64, Options: None, Metric: 1
  Prefix Address: 2001:100:3::3
  Prefix Length: 128, Options: LA , Metric: 0

R4#show ipv6 ospf database prefix adv-router 5.5.5.5

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

                Intra Area Prefix Link States (Area 1)

  Routing Bit Set on this LSA
  LS age: 715
  LS Type: Intra-Area-Prefix-LSA
  Link State ID: 0
  Advertising Router: 5.5.5.5
  LS Seq Number: 80000004
  Checksum: 0x9A6
  Length: 64
  Referenced LSA Type: 2001
  Referenced Link State ID: 0
  Referenced Advertising Router: 5.5.5.5
  Number of Prefixes: 2
  Prefix Address: 2001:100:5::
  Prefix Length: 64, Options: None, Metric: 1
  Prefix Address: 2001:100:5::5
  Prefix Length: 128, Options: LA , Metric: 0

Not only the /64 but also the /128 prefix is registered in the routing table as the Loopback0 prefix for R3 and R5. If you display only the rows that contain “2001:100:” in the routing table on R4, you will see the following

R4

R4#show ipv6 route ospf | include 2001:100:
OI  2001:100:1::/64 [110/4]
OI  2001:100:2::/64 [110/3]
O   2001:100:3::/64 [110/2]
O   2001:100:3::3/128 [110/1]
O   2001:100:5::/64 [110/2]
O   2001:100:5::5/128 [110/1]
OI  2001:100:6::/64 [110/3]
OI  2001:100:7::/64 [110/4]

R4

R4#show ipv6 route ospf | include 2001:100:
OI  2001:100:1::/64 [110/4]
OI  2001:100:2::/64 [110/3]
O   2001:100:3::/64 [110/2]
O   2001:100:3::3/128 [110/1]
O   2001:100:5::/64 [110/2]
O   2001:100:5::5/128 [110/1]
OI  2001:100:6::/64 [110/3]
OI  2001:100:7::/64 [110/4]

Not only R4, but also other routers have both /64 and /128 as the prefix for Loopback0 on R3 and R5 in their routing tables.

How the OSPF works