OSPFv3

ccnp-routing
Learn how OSPFv3 differs from OSPFv2, including the Type 8 and Type 9 LSAs, and configure the address family approach for IPv4 and IPv6 routing.
Published

Dec 11, 2017

Configuration

We have 2 options to configure OSPFv3:

  • OSPFv3 Traditional Configuration
    • No network command
    • No wildcard mask
    • Enable interface configuration mode
  • OSPFv3 Address Family Configuration
    • support the routing of both IPv4 and IPv6 under a single OSPF process
    • I am going to configure this configuration approach later
    • Steps:
      • Step 1: Start the OSPFv3 routing process with the router ospfv3 PID command.
      • Step 2: Create an Address Family for IPv4 and/or IPv6 with the address-family { ipv4 | ipv6 } unicast command.
      • Step 3: Enter interface configuration mode for the interface(s) that you want to participate in the OSPF process, and enter the ospfv3 process-id { ipv4 | ipv6 } area area_number command.
  • Note: Even though the OSPFv3 Address Family configuration approach supports both IPv4 and/or IPv6 networks, it will not peer with a router using an OSPFv2 configuration

image
R1
R1(config)#ipv6 unicast-routing
R1(config)#interface loopback 0
R1(config-if)#ipv6 address 2001::1/128
R1(config-if)#ip address 11.11.11.11 255.255.255.255
R1(config)#interface gigabitEthernet 0/0
R1(config-if)#ipv6 enable
R1(config-if)#ip address 10.10.12.1 255.255.255.252
R1(config-if)#no shutdown
R1(config)#router ospfv3 1
R1(config-router)#router-id 1.1.1.1
R1(config-router)#address-family ipv4 unicast
R1(config-router-af)#exit-address-family
R1(config-router)#address-family ipv6 unicast
R1(config-router-af)#exit-address-family
R1(config)#interface gigabitEthernet 0/0
R1(config-if)#ospfv3 1 ipv4 area 0
R1(config-if)#ospfv3 1 ipv6 area 0
R1(config)#interface loopback 0
R1(config-if)#ospfv3 1 ipv4 area 1
R1(config-if)#ospfv3 1 ipv6 area 1
R2
ipv6 unicast-routing
!
interface Loopback0
 ip address 22.22.22.22 255.255.255.255
 ipv6 address 2001::2/128
 ospfv3 1 ipv4 area 2
 ospfv3 1 ipv6 area 2
end
!
interface GigabitEthernet0/0
 ip address 10.10.12.2 255.255.255.252
 ipv6 enable
 ospfv3 1 ipv6 area 0
 ospfv3 1 ipv4 area 0
end
!
router ospfv3 1
 router-id 2.2.2.2
 !
 address-family ipv4 unicast
 exit-address-family
 !
 address-family ipv6 unicast
 exit-address-family

Note, we will configure Loopback 1 later in the IPv6 Route Redistribution into OSPF section

Verification

R1
R1#show ipv6 interface gigabitEthernet 0/0
GigabitEthernet0/0 is up, line protocol is up
  IPv6 is enabled, link-local address is FE80::207:1AFF:FEB6:600
  No Virtual link-local address(es):
  No global unicast address is configured
  Joined group address(es):
    FF02::1
    FF02::2
    FF02::5
    FF02::6
    FF02::1:FFB6:600
  MTU is 1500 bytes
  ICMP error messages limited to one every 100 milliseconds
  ICMP redirects are enabled
  ICMP unreachables are sent
  ND DAD is enabled, number of DAD attempts: 1
  ND reachable time is 30000 milliseconds (using 30000)
  ND advertised reachable time is 0 (unspecified)
  ND advertised retransmit interval is 0 (unspecified)
  ND router advertisements are sent every 200 seconds
  ND router advertisements live for 1800 seconds
  ND advertised default router preference is Medium
  Hosts use stateless autoconfig for addresses.
R1#show ip protocols
*** IP Routing is NSF aware ***

Routing Protocol is "application"
  Sending updates every 0 seconds
  Invalid after 0 seconds, hold down 0, flushed after 0
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Maximum path: 32
  Routing for Networks:
  Routing Information Sources:
    Gateway         Distance      Last Update
  Distance: (default is 4)

Routing Protocol is "ospfv3 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  Router ID 1.1.1.1
  Area border router
  Number of areas: 2 normal, 0 stub, 0 nssa
  Interfaces (Area 0):
    GigabitEthernet0/0
  Interfaces (Area 1):
    Loopback0
  Maximum path: 4
  Routing Information Sources:
    Gateway         Distance      Last Update
    2.2.2.2              110      00:14:03
  Distance: (default is 110)
R1#show ipv6 protocols
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "application"
IPv6 Routing Protocol is "ND"
IPv6 Routing Protocol is "ospf 1"
  Router ID 1.1.1.1
  Area border router
  Number of areas: 2 normal, 0 stub, 0 nssa
  Interfaces (Area 0):
    GigabitEthernet0/0
  Interfaces (Area 1):
    Loopback0
  Redistribution:
    None
R1#show ip route ospfv3
Gateway of last resort is not set

      22.0.0.0/32 is subnetted, 1 subnets
O IA     22.22.22.22 [110/1] via 10.10.12.2, 00:11:34, GigabitEthernet0/0
R1#show ipv6 route ospf
OI  2001::2/128 [110/1]
     via FE80::207:1AFF:FEEE:3C00, GigabitEthernet0/0
R1#clear ospfv3 process
Reset selected OSPFv3 processes? [no]: yes
R1#
*Dec 12 23:56:01.987: %OSPFv3-5-ADJCHG: Process 1, IPv4, Nbr 2.2.2.2 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Dec 12 23:56:01.994: %OSPFv3-5-ADJCHG: Process 1, IPv6, Nbr 2.2.2.2 on GigabitEthernet0/0 from FULL to DOWN, Neighbor Down: Interface down or detached
*Dec 12 23:56:02.145: %OSPFv3-5-ADJCHG: Process 1, IPv4, Nbr 2.2.2.2 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
*Dec 12 23:56:02.150: %OSPFv3-5-ADJCHG: Process 1, IPv6, Nbr 2.2.2.2 on GigabitEthernet0/0 from LOADING to FULL, Loading Done
R1#show ipv6 ospf neighbor

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

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
2.2.2.2           1   FULL/DR         00:00:30    2               GigabitEthernet0/0
Type 8 and Type 9 LSAs are bolded in the show ipv6 ospf database below
R1#show ipv6 ospf database

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

        Router Link States (Area 0)

ADV Router       Age         Seq#        Fragment ID  Link count  Bits
 1.1.1.1         78          0x80000005  0            1           B
 2.2.2.2         79          0x80000008  0            1           B

        Net Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Rtr count
 2.2.2.2         79          0x80000001  2          2

        Inter Area Prefix Link States (Area 0)

ADV Router       Age         Seq#        Prefix
 1.1.1.1         69          0x80000001  2001::1/128
 2.2.2.2         1309        0x80000001  2001::2/128

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

ADV Router       Age         Seq#        Link ID    Interface
 1.1.1.1         74          0x80000003  2          Gi0/0
 2.2.2.2         1304        0x80000003  2          Gi0/0

        Router Link States (Area 1)

ADV Router       Age         Seq#        Fragment ID  Link count  Bits
 1.1.1.1         78          0x80000003  0            0           B

        Inter Area Prefix Link States (Area 1)

ADV Router       Age         Seq#        Prefix
 1.1.1.1         69          0x80000001  2001::2/128

        Intra Area Prefix Link States (Area 1)

ADV Router       Age         Seq#        Link ID    Ref-lstype  Ref-LSID
 1.1.1.1         78          0x80000001  0          0x2001      0
Let us open a type 9 LSA. Notice that 2001::1 is global unicast prefix information not a link-local information
R1#show ipv6 ospf database prefix

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

        Intra Area Prefix Link States (Area 1)

  LS age: 1055
  LS Type: Intra-Area-Prefix-LSA
  Link State ID: 0
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000001
  Checksum: 0x82CF
  Length: 52
  Referenced LSA Type: 2001
  Referenced Link State ID: 0
  Referenced Advertising Router: 1.1.1.1
  Number of Prefixes: 1
  Prefix Address: 2001::1
  Prefix Length: 128, Options: LA, Metric: 0
Link-local LSA is stored in type 8 LSA
R1#show ipv6 ospf database link

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

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

  LS age: 1218
  Options: (V6-Bit, E-Bit, R-Bit, DC-Bit)
  LS Type: Link-LSA (Interface: GigabitEthernet0/0)
  Link State ID: 2 (Interface ID)
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000003
  Checksum: 0x5C53
  Length: 44
  Router Priority: 1
  Link Local Address: FE80::207:1AFF:FEB6:600
  Number of Prefixes: 0

  LS age: 458
  Options: (V6-Bit, E-Bit, R-Bit, DC-Bit)
  LS Type: Link-LSA (Interface: GigabitEthernet0/0)
  Link State ID: 2 (Interface ID)
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000004
  Checksum: 0x1329
  Length: 44
  Router Priority: 1
  Link Local Address: FE80::207:1AFF:FEEE:3C00
  Number of Prefixes: 0

IPv6 Route Redistribution into OSPF

Requirements:

  • Configure R2’s Loopback 1 interface with the address 2001:db9::2/128
  • Redistribute Loopback 1’s IPv6 address into OSPFv3 area 0
R2(config)#interface loopback 1
R2(config-if)#ipv6 add 2001:db9::2/128
R2(config)#router ospfv3 1
R2(config-router)#address-family ipv6 unicast
R2(config-router-af)#redistribute connected ?
  metric       Metric for redistributed routes
  metric-type  OSPF/IS-IS exterior metric type for redistributed routes
  nssa-only    Limit redistributed routes to NSSA areas
  route-map    Route map reference
  tag          Set tag for routes redistributed into OSPF
  
Notice that there is no subnets keyword, because IPv6 is a classless protocol. So putting a subnet keyword here would be redundant. Let us continue with the configuration
R2(config-router-af)#redistribute connected
R2(config-router-af)#exit-address-family

Verification

R2#show ipv6 ospf database

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

        Router Link States (Area 0)

ADV Router       Age         Seq#        Fragment ID  Link count  Bits
 1.1.1.1         1110        0x80000007  0            1           B
 2.2.2.2         91          0x8000000B  0            1           B E

        Net Link States (Area 0)

ADV Router       Age         Seq#        Link ID    Rtr count
 2.2.2.2         902         0x80000003  2          2

        Inter Area Prefix Link States (Area 0)

ADV Router       Age         Seq#        Prefix
 1.1.1.1         870         0x80000003  2001::1/128
 2.2.2.2         149         0x80000004  2001::2/128

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

ADV Router       Age         Seq#        Link ID    Interface
 1.1.1.1         1110        0x80000005  2          Gi0/0
 2.2.2.2         149         0x80000006  2          Gi0/0

        Router Link States (Area 2)

ADV Router       Age         Seq#        Fragment ID  Link count  Bits
 2.2.2.2         91          0x80000007  0            0           B E

        Inter Area Prefix Link States (Area 2)

ADV Router       Age         Seq#        Prefix
 2.2.2.2         902         0x80000005  2001::1/128

        Intra Area Prefix Link States (Area 2)

ADV Router       Age         Seq#        Link ID    Ref-lstype  Ref-LSID
 2.2.2.2         149         0x80000004  0          0x2001      0

        Type-5 AS External Link States

ADV Router       Age         Seq#        Prefix
 2.2.2.2         90          0x80000001  2001:DB9::2/128
R1#show ipv6 route ospf
IPv6 Routing Table - default - 4 entries

OI  2001::2/128 [110/1]
     via FE80::207:1AFF:FEEE:3C00, GigabitEthernet0/0
OE2 2001:DB9::2/128 [110/20]
     via FE80::207:1AFF:FEEE:3C00, GigabitEthernet0/0
Back to top