Configuring OSPFv3

Overview

Function Introduction

OSPF is an Interior Gateway Protocol (IGP) designed expressly for IP networks, supporting IP subnet ting and tagging of externally derived routing information.

The implementation conforms to the OSPF Version 3, which is described in RFC 5340, expands on OSPF version 2 to support IPv6 routing prefixes. Much of the OSPF for IPv6 feature is the same as in OSPF version 2. Changes between OSPF for IPv4, OSPF Version 2, and OSPF for IPv6 as described herein include the following:

  • Addressing semantics have been removed from OSPFv3 packets and the basic Link State Advertisements (LSAs).

  • OSPFv3 now runs on a per-link basis rather than on a per-IP-subnet basis.

  • Authentication has been removed from the OSPFv3 protocol.

Principle Description

The OSPFv3 module is based on the following RFC: RFC 5340 – OSPF for IPv6

Configuration

Basic OSPFv3 Parameters Configuration

step 1 Enter the configure mode

Switch# configure terminal

step 2 Create OSPFv3 instance

Switch(config)# router ipv6 ospf 100
Switch(config-router) router-id 1.1.1.1
Switch(config-router) exit

image22Use the command “no router ipv6 ospf process-id” in global configure mode to delete the OSPFv3 instance.

step 3 Exit the configure mode

Switch(config)# end

step 4 Validation

Switch# show ipv6 protocols
Routing Protocol is \"OSPFv3 (100)\" with ID 1.1.1.1
Redistributing:
Routing for Networks:
Distance: (default is 110)

Enabling OSPFv3 on an Interface

image

  1. OSPFv3

This example shows the minimum configuration required for enabling OSPFv3 on an interface Switch1 and 2 are two routers in Area 0 connecting to prefix 2004:12:9::/96.

The following configuration should be operated on all switches if the switch ID is not specified.

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enable ipv6 globally

Switch(config)# ipv6 enable

step 3 Create OSPFv3 instance

Configuring Switch1:

Switch(config)# router ipv6 ospf 100
Switch(config-router) router-id 1.1.1.1
Switch(config-router) exit

Configuring Switch2:

Switch(config)# router ipv6 ospf 200
Switch(config-router) router-id 2.2.2.2
Switch(config-router) exit

step 4 Enter the interface configure mode and set the attributes of the interface

Interface configuration for Switch1:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:12:9::1/96
Switch(config-if)# ipv6 router ospf 100 area 0 instance 0
Switch(config-if)# exit

Interface configuration for Switch2:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:12:9::2/96
Switch(config-if)# ipv6 router ospf 200 area 0 instance 0
Switch(config-if)# exit

step 3 Exit the configure mode

Switch(config)# end

step 4 Validation

Display the result on Switch1:

Switch# show ipv6 ospf database
OSPFv3 Router with ID (1.1.1.1) (Process 100)
Link-LSA (Interface eth-0-9)
Link State ID ADV Router Age Seq CkSum Prefix
0.0.0.9 1.1.1.1 614 0x80000001 0x6a40 1
0.0.0.9 2.2.2.2 68 0x80000001 0x4316 1
Router-LSA (Area 0.0.0.0)
Link State ID ADV Router Age Seq CkSum Link
0.0.0.0 1.1.1.1 54 0x80000003 0xb74b 1
0.0.0.0 2.2.2.2 55 0x80000003 0x9965 1
Network-LSA (Area 0.0.0.0)
Link State ID ADV Router Age Seq CkSum
0.0.0.9 1.1.1.1 54 0x80000001 0x3ed1
Intra-Area-Prefix-LSA (Area 0.0.0.0)
Link State ID ADV Router Age Seq CkSum Prefix Reference
0.0.0.2 1.1.1.1 53 0x80000001 0x450a 1 Network-LSA
Switch# show ipv6 ospf neighbor
OSPFv3 Process (100)
Neighbor ID Pri State Dead Time Interface Instance ID
2.2.2.2 1 Full/Backup 00:00:33 eth-0-9 0
Switch# show ipv6 ospf route
OSPFv3 Process (100)
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
E1 - OSPF external type 1, E2 - OSPF external type 2
Destination Metric
Next-hop
C 2004:12:9::/96 1
directly connected, eth-0-9, Area 0.0.0.0

Display the result on Switch2:

Switch# show ipv6 ospf database
OSPFv3 Router with ID (2.2.2.2) (Process 200)
Link-LSA (Interface eth-0-9)
Link State ID ADV Router Age Seq CkSum Prefix
0.0.0.9 1.1.1.1 774 0x80000001 0x6a40 1
0.0.0.9 2.2.2.2 228 0x80000001 0x4316 1
Router-LSA (Area 0.0.0.0)
Link State ID ADV Router Age Seq CkSum Link
0.0.0.0 1.1.1.1 217 0x80000003 0xb74b 1
0.0.0.0 2.2.2.2 214 0x80000003 0x9965 1
Network-LSA (Area 0.0.0.0)
Link State ID ADV Router Age Seq CkSum
0.0.0.9 1.1.1.1 215 0x80000001 0x3ed1
Intra-Area-Prefix-LSA (Area 0.0.0.0)
Link State ID ADV Router Age Seq CkSum Prefix Reference
0.0.0.2 1.1.1.1 214 0x80000001 0x450a 1 Network-LSA
Switch# show ipv6 ospf neighbor
OSPFv3 Process (200)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/DR 00:00:35 eth-0-9 0
Switch# show ipv6 ospf route
OSPFv3 Process (200)
Codes: C - connected, D - Discard, O - OSPF, IA - OSPF inter area
E1 - OSPF external type 1, E2 - OSPF external type 2
Destination Metric
Next-hop
C 2004:12:9::/96 1
directly connected, eth-0-9, Area 0.0.0.0

Configuring Priority

image

  1. OSPFv3 priority

This example shows the configuration for setting the priority for an interface. You can set a high priority for a router to make it the Designated Router (DR). Router Switch3 is configured to have a priority of 10, which is higher than the default priority (default priority is 1) of Switch1 and 2; making it the DR.

The following configuration should be operated on all switches if the switch ID is not specified.

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enable ipv6 globally

Switch(config)# ipv6 enable

step 3 Create OSPFv3 instance

Configuring Switch1:

Switch(config)# router ipv6 ospf 100
Switch(config-router) router-id 1.1.1.1
Switch(config-router) exit

Configuring Switch2:

Switch(config)# router ipv6 ospf 200
Switch(config-router) router-id 2.2.2.2
Switch(config-router) exit

Configuring Switch3:

Switch(config)# router ipv6 ospf 300
Switch(config-router) router-id 3.3.3.3
Switch(config-router) exit

step 4 Enter the interface configure mode and set the attributes of the interface

Interface configuration for Switch1:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:12:9::1/96
Switch(config-if)# ipv6 router ospf 100 area 0 instance 0
Switch(config-if)# exit

Interface configuration for Switch2:

Switch(config)# interface eth-0-17
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:12:9::2/96
Switch(config-if)# ipv6 router ospf 200 area 0 instance 0
Switch(config-if)# exit

Interface configuration for Switch3:

Switch(config)# interface eth-0-13
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:12:9::3/96
Switch(config-if)# ipv6 router ospf 300 area 0 instance 0
Switch(config-if)# ipv6 ospf priority 10
Switch(config-if)# exit

step 5 Exit the configure mode

Switch(config)# end

step 6 Validation

Display the result on Switch1:

Switch# show ipv6 ospf neighbor
OSPFv3 Process (100)
Neighbor ID Pri State Dead Time Interface Instance ID
2.2.2.2 1 Full/Backup 00:00:31 eth-0-9 0
3.3.3.3 10 Full/DR 00:00:36 eth-0-9 0
Switch
Switch# show ipv6
interface isis mif mld mroute mroute-rpf
multicast neighbors ospf pim prefix-list protocols
rip route
Switch# show ipv6 ospf interface
eth-0-9 is up, line protocol is up
Interface ID 9
IPv6 Prefixes
fe80::20e6:7eff:fee2:d400/10 (Link-Local Address)
2004:12:9::1/96
OSPFv3 Process (100), Area 0.0.0.0, Instance ID 0
Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DROther, Priority 1
Designated Router (ID) 3.3.3.3
Interface Address fe80::ba5d:79ff:fe55:ed00
Backup Designated Router (ID) 2.2.2.2
Interface Address fe80::fcc8:7bff:fe3e:ec00
Timer interval configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03
Neighbor Count is 2, Adjacent neighbor count is 2

Display the result on Switch2:

Switch# show ipv6 ospf neighbor
OSPFv3 Process (200)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/DROther 00:00:31 eth-0-17 0
3.3.3.3 10 Full/DR 00:00:37 eth-0-17 0
Switch# show ipv6 ospf interface
eth-0-17 is up, line protocol is up
Interface ID 17
IPv6 Prefixes
fe80::fcc8:7bff:fe3e:ec00/10 (Link-Local Address)
2004:12:9::2/96
OSPFv3 Process (200), Area 0.0.0.0, Instance ID 0
Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State Backup, Priority 1
Designated Router (ID) 3.3.3.3
Interface Address fe80::ba5d:79ff:fe55:ed00
Backup Designated Router (ID) 2.2.2.2
Interface Address fe80::fcc8:7bff:fe3e:ec00
Timer interval configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:07
Neighbor Count is 2, Adjacent neighbor count is 2

Display the result on Switch3:

Switch# show ipv6 ospf neighbor
OSPFv3 Process (300)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/DROther 00:00:40 eth-0-13 0
2.2.2.2 1 Full/Backup 00:00:29 eth-0-13 0
Switch# show ipv6 ospf interface
eth-0-13 is up, line protocol is up
Interface ID 13
IPv6 Prefixes
fe80::ba5d:79ff:fe55:ed00/10 (Link-Local Address)
2004:12:9::3/96
OSPFv3 Process (300), Area 0.0.0.0, Instance ID 0
Router ID 3.3.3.3, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 10
Designated Router (ID) 3.3.3.3
Interface Address fe80::ba5d:79ff:fe55:ed00
Backup Designated Router (ID) 2.2.2.2
Interface Address fe80::fcc8:7bff:fe3e:ec00
Timer interval configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:06
Neighbor Count is 2, Adjacent neighbor count is 2

Configuring OSPFv3 Area Parameters

image

  1. OSPFv3 area

You can optionally configure several OSPFv3 area parameters. These parameters include authentication for password-based protection against unauthorized access to an area and stub areas. Stub areas are areas into which information on external routes is not sent. Instead, the area border router (ABR) generates a default external route into the stub area for destinations outside the autonomous system (AS).

Route summarization is the consolidation of advertised addresses into a single summary route to be advertised by other areas. If network numbers are contiguous, you can use the area range router configuration command to configure the ABR to advertise a summary route that covers all networks in the range.

The following configuration should be operated on all switches if the switch ID is not specified.

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enable ipv6 globally

Switch(config)# ipv6 enable

step 3 Create OSPFv3 instance

Configuring Switch1:

Switch(config)# router ipv6 ospf 100
Switch(config-router) router-id 1.1.1.1
Switch(config-router) exit

Configuring Switch2:

Switch(config)# router ipv6 ospf 200
Switch(config-router) router-id 2.2.2.2
Switch(config-router) exit

Configuring Switch3:

Switch(config)# router ipv6 ospf 300
Switch(config-router) router-id 3.3.3.3
Switch(config-router) exit
Switch(config)# router ipv6 ospf 300
Switch(config-router) area 100 range 2004:4::/32
Switch(config-router) area 100 stub no-summary
Switch(config-router) exit

Configuring Switch4:

Switch(config)# router ipv6 ospf 400
Switch(config-router) router-id 4.4.4.4
Switch(config-router) area 100 stub no-summary
Switch(config-router) exit

step 4 Enter the interface configure mode and set the attributes of the interface

Interface configuration for Switch1:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:12:9::1/96
Switch(config-if)# ipv6 router ospf 100 area 0 instance 0
Switch(config-if)# exit
Switch(config)interface eth-0-13
Switch(config-if)no switchport
Switch(config-if)no shutdown
Switch(config-if)# ipv6 address 2004:13:13::2/96
Switch(config-if)# ipv6 router ospf 100 area 0 instance 0
Switch(config-if)# exit

Interface configuration for Switch2:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:12:9::2/96
Switch(config-if)# ipv6 router ospf 200 area 0 instance 0
Switch(config-if)# exit
Switch(config)interface eth-0-17
Switch(config-if)no switchport
Switch(config-if)no shutdown
Switch(config-if)# ipv6 address 2004:23:17::1/96
Switch(config-if)# ipv6 router ospf 200 area 0 instance 0
Switch(config-if)# exit

Interface configuration for Switch3:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:4:100::1/96
Switch(config-if)# ipv6 router ospf 300 area 100 instance 0
Switch(config-if)# exit
Switch(config)# interface eth-0-13
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:13:13::2/96
Switch(config-if)# ipv6 router ospf 300 area 0 instance 0
Switch(config-if)# exit
Switch(config)# interface eth-0-17
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:23:17::2/96
Switch(config-if)# ipv6 router ospf 300 area 0 instance 0
Switch(config-if)# exit

Interface configuration for Switch4:

Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:4:1::1/96
Switch(config-if)# ipv6 router ospf 400 area 100 instance 0
Switch(config-if)# exit
Switch(config)# interface eth-0-2
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:4:2::1/96
Switch(config-if)# ipv6 router ospf 400 area 100 instance 0
Switch(config-if)# exit
Switch(config)# interface eth-0-3
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:4:3::1/96
Switch(config-if)# ipv6 router ospf 400 area 100 instance 0
Switch(config-if)# exit
Switch(config)# interface eth-0-4
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:4:4::1/96
Switch(config-if)# ipv6 router ospf 400 area 100 instance 0
Switch(config-if)# exit
Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:4:100::2/96
Switch(config-if)# ipv6 router ospf 400 area 100 instance 0
Switch(config-if)# exit

step 5 Exit the configure mode

Switch(config)# end

step 6 Validation

Display the result on Switch1:

Switch# show ipv6 route
IPv6 Routing Table
Codes: C - connected, S - static, R - RIP, I - IS-IS, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Dr - DHCPV6 Relay

| [*] - [AD/Metric]

Timers: Uptime
O IA 2004:4::/32 \[110/3\]
via fe80::c629:f2ff:fe02:3600, eth-0-13, 00:01:00
C 2004:12:9::/96
via ::, eth-0-9, 00:15:56
C 2004:12:9::1/128
via ::1, eth-0-9, 00:15:56
C 2004:13:13::/96
via ::, eth-0-13, 00:15:55
C 2004:13:13::2/128
via ::1, eth-0-13, 00:15:55
O 2004:23:17::/96 \[110/2\]
via fe80::bc22:aeff:fe64:aa00, eth-0-9, 00:08:10
via fe80::c629:f2ff:fe02:3600, eth-0-13, 00:08:10
C fe80::/10
via ::, Null0, 00:15:57

Display the result on Switch2:

Switch# show ipv6 route
IPv6 Routing Table
Codes: C - connected, S - static, R - RIP, I - IS-IS, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Dr - DHCPV6 Relay

| [*] - [AD/Metric]

Timers: Uptime
O IA 2004:4::/32 \[110/3\]
via fe80::c629:f2ff:fe02:3600, eth-0-17, 00:00:57
C 2004:12:9::/96
via ::, eth-0-9, 00:12:24
C 2004:12:9::2/128
via ::1, eth-0-9, 00:12:24
O 2004:13:13::/96 \[110/2\]
via fe80::b242:55ff:fe05:ff00, eth-0-9, 00:07:52
via fe80::c629:f2ff:fe02:3600, eth-0-17, 00:07:52
C 2004:23:17::/96
via ::, eth-0-17, 00:12:24
C 2004:23:17::1/128
via ::1, eth-0-17, 00:12:24
C fe80::/10
via ::, Null0, 00:12:26

Display the result on Switch3:

Switch# show ipv6 route
IPv6 Routing Table
Codes: C - connected, S - static, R - RIP, I - IS-IS, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Dr - DHCPV6 Relay

| [*] - [AD/Metric]

Timers: Uptime
O 2004:4::/32 \[110/0\]
via ::, Null0, 00:08:31
O 2004:4:1::/96 \[110/2\]
via fe80::ee66:91ff:fe45:db00, eth-0-9, 00:01:08
O 2004:4:2::/96 \[110/2\]
via fe80::ee66:91ff:fe45:db00, eth-0-9, 00:01:08
O 2004:4:3::/96 \[110/2\]
via fe80::ee66:91ff:fe45:db00, eth-0-9, 00:01:08
O 2004:4:4::/96 \[110/2\]
via fe80::ee66:91ff:fe45:db00, eth-0-9, 00:01:08
C 2004:4:100::/96
via ::, eth-0-9, 00:08:32
C 2004:4:100::1/128
via ::1, eth-0-9, 00:08:32
O 2004:12:9::/96 \[110/2\]
via fe80::b242:55ff:fe05:ff00, eth-0-13, 00:08:03
via fe80::bc22:aeff:fe64:aa00, eth-0-17, 00:08:03
O 2004:13:13::/96 \[110/1\]
via fe80::b242:55ff:fe05:ff00, eth-0-13, 00:08:18
C 2004:23:17::/96
via ::, eth-0-17, 00:08:32
C 2004:23:17::2/128
via ::1, eth-0-17, 00:08:32
C fe80::/10
via ::, Null0, 00:08:34

Display the result on Switch4:

Switch# show ipv6 route
IPv6 Routing Table
Codes: C - connected, S - static, R - RIP, I - IS-IS, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Dr - DHCPV6 Relay

| [*] - [AD/Metric]

Timers: Uptime
O IA ::/0 \[110/2\]
via fe80::c629:f2ff:fe02:3600, eth-0-9, 00:00:53
C 2004:4:1::/96
via ::, eth-0-1, 00:03:09
C 2004:4:1::1/128
via ::1, eth-0-1, 00:03:09
C 2004:4:2::/96
via ::, eth-0-2, 00:03:08
C 2004:4:2::1/128
via ::1, eth-0-2, 00:03:08
C 2004:4:3::/96
via ::, eth-0-3, 00:03:08
C 2004:4:3::1/128
via ::1, eth-0-3, 00:03:08
C 2004:4:4::/96
via ::, eth-0-4, 00:03:09
C 2004:4:4::1/128
via ::1, eth-0-4, 00:03:09
C 2004:4:100::/96
via ::, eth-0-9, 00:03:09
C 2004:4:100::2/128
via ::1, eth-0-9, 00:03:09
C fe80::/10
via ::, Null0, 00:03:10

Redistributing Routes into OSPFv3

image

  1. OSPFv3 Redistribute

In this example the configuration causes RIPng routes to be imported into the OSPFv3 routing table and advertised as Type 5 External LSAs into Area 0.

The following configuration should be operated on all switches if the switch ID is not specified.

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enable ipv6 globally

Switch(config)# ipv6 enable

step 3 Create OSPFv3 instance

Configuring Switch1:

Switch(config)# router ipv6 ospf 100
Switch(config-router) router-id 1.1.1.1
Switch(config-router) exit

Configuring Switch2:

Switch(config)# router ipv6 ospf 200
Switch(config-router) router-id 2.2.2.2
Switch(config-router) exit

Configuring Switch3:

Switch(config)# router ipv6 ospf 300
Switch(config-router) router-id 3.3.3.3
Switch(config-router) redistribute ripng
Switch(config-router) exit

step 4 Create RIPng instance

Configuring Switch3:

Switch(config)# router ipv6 rip
Switch(config-router) exit

Configuring Switch4:

Switch(config)# router ipv6 rip
Switch(config-router) exit

step 5 Enter the interface configure mode and set the attributes of the interface

Interface configuration for Switch1:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:12:9::1/96
Switch(config-if)# ipv6 router ospf 100 area 0 instance 0
Switch(config-if)# exit
Switch(config)interface eth-0-13
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:13:13::2/96
Switch(config-if)# ipv6 router ospf 100 area 0 instance 0
Switch(config-if)# exit

Interface configuration for Switch2:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:12:9::2/96
Switch(config-if)# ipv6 router ospf 200 area 0 instance 0
Switch(config-if)# exit
Switch(config)interface eth-0-17
Switch(config-if)no switchport
Switch(config-if)no shutdown
Switch(config-if)# ipv6 address 2004:23:17::1/96
Switch(config-if)# ipv6 router ospf 200 area 0 instance 0
Switch(config-if)# exit

Interface configuration for Switch3:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:4:100::1/96
Switch(config-if)# ipv6 router rip
Switch(config-if)# exit
Switch(config)# interface eth-0-13
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:13:13::2/96
Switch(config-if)# ipv6 router ospf 300 area 0 instance 0
Switch(config-if)# exit
Switch(config)# interface eth-0-17
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:23:17::2/96
Switch(config-if)# ipv6 router ospf 300 area 0 instance 0
Switch(config-if)# exit

Interface configuration for Switch4:

Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:4:1::1/96
Switch(config-if)# ipv6 router rip
Switch(config-if)# exit
Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:4:100::2/96
Switch(config-if)# ipv6 router rip
Switch(config-if)# exit

step 6 Exit the configure mode

Switch(config)# end

step 7 Validation

Display the result on Switch1:

Switch# show ipv6 route
IPv6 Routing Table
Codes: C - connected, S - static, R - RIP, I - IS-IS, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Dr - DHCPV6 Relay

| [*] - [AD/Metric]

Timers: Uptime
O E2 2004:4:1::/96 \[110/20\]
via fe80::c629:f2ff:fe02:3600, eth-0-13, 00:00:03
C 2004:12:9::/96
via ::, eth-0-9, 00:34:20
C 2004:12:9::1/128
via ::1, eth-0-9, 00:34:20
C 2004:13:13::/96
via ::, eth-0-13, 00:34:19
C 2004:13:13::2/128
via ::1, eth-0-13, 00:34:19
O 2004:23:17::/96 \[110/2\]
via fe80::bc22:aeff:fe64:aa00, eth-0-9, 00:26:34
via fe80::c629:f2ff:fe02:3600, eth-0-13, 00:26:34
C fe80::/10
via ::, Null0, 00:34:21
Switch# show ipv6 ospf database external
OSPFv3 Router with ID (1.1.1.1) (Process 100)
AS-external-LSA
LS age: 140
LS Type: AS-External-LSA
Link State ID: 0.0.0.1
Advertising Router: 3.3.3.3
LS Seq Number: 0x80000001
Checksum: 0x66F7
Length: 44
Metric Type: 2 (Larger than any link state path)
Metric: 20
Prefix: 2004:4:1::/96
Prefix Options: 0 (\--\|-)
External Route Tag: 0

Display the result on Switch2:

Switch# show ipv6 route
IPv6 Routing Table
Codes: C - connected, S - static, R - RIP, I - IS-IS, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Dr - DHCPV6 Relay

| [*] - [AD/Metric]

Timers: Uptime
O E2 2004:4:1::/96 \[110/20\]
via fe80::c629:f2ff:fe02:3600, eth-0-17, 00:02:43
C 2004:12:9::/96
via ::, eth-0-9, 00:33:31
C 2004:12:9::2/128
via ::1, eth-0-9, 00:33:31
O 2004:13:13::/96 \[110/2\]
via fe80::b242:55ff:fe05:ff00, eth-0-9, 00:28:59
via fe80::c629:f2ff:fe02:3600, eth-0-17, 00:28:59
C 2004:23:17::/96
via ::, eth-0-17, 00:33:31
C 2004:23:17::1/128
via ::1, eth-0-17, 00:33:31
C fe80::/10
via ::, Null0, 00:33:33
Switch# show ipv6 ospf database external
show ipv6 ospf database external
OSPFv3 Router with ID (2.2.2.2) (Process 200)
AS-external-LSA
LS age: 195
LS Type: AS-External-LSA
Link State ID: 0.0.0.1
Advertising Router: 3.3.3.3
LS Seq Number: 0x80000001
Checksum: 0x66F7
Length: 44
Metric Type: 2 (Larger than any link state path)
Metric: 20
Prefix: 2004:4:1::/96
Prefix Options: 0 (\--\|-)
External Route Tag: 0

Display the result on Switch3:

Switch# show ipv6 route
IPv6 Routing Table
Codes: C - connected, S - static, R - RIP, I - IS-IS, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Dr - DHCPV6 Relay

| [*] - [AD/Metric]

Timers: Uptime
R 2004:4:1::/96 \[120/2\]
via fe80::ee66:91ff:fe45:db00, eth-0-9, 00:03:43
C 2004:4:100::/96
via ::, eth-0-9, 00:07:01
C 2004:4:100::1/128
via ::1, eth-0-9, 00:07:01
O 2004:12:9::/96 \[110/2\]
via fe80::b242:55ff:fe05:ff00, eth-0-13, 00:29:57
via fe80::bc22:aeff:fe64:aa00, eth-0-17, 00:29:57
O 2004:13:13::/96 \[110/1\]
via fe80::b242:55ff:fe05:ff00, eth-0-13, 00:30:12
C 2004:23:17::/96
via ::, eth-0-17, 00:30:26
C 2004:23:17::2/128
via ::1, eth-0-17, 00:30:26
C fe80::/10
via ::, Null0, 00:30:28
Switch# show ipv6 ospf database external
show ipv6 ospf database external
OSPFv3 Router with ID (3.3.3.3) (Process 300)
AS-external-LSA
LS age: 250
LS Type: AS-External-LSA
Link State ID: 0.0.0.1
Advertising Router: 3.3.3.3
LS Seq Number: 0x80000001
Checksum: 0x66F7
Length: 44
Metric Type: 2 (Larger than any link state path)
Metric: 20
Prefix: 2004:4:1::/96
Prefix Options: 0 (\--\|-)
External Route Tag: 0

Display the result on Switch4:

Switch# show ipv6 route
IPv6 Routing Table
Codes: C - connected, S - static, R - RIP, I - IS-IS, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Dr - DHCPV6 Relay

| [*] - [AD/Metric]

Timers: Uptime
C 2004:4:1::/96
via ::, eth-0-1, 00:04:48
C 2004:4:1::1/128
via ::1, eth-0-1, 00:04:48
C 2004:4:100::/96
via ::, eth-0-9, 00:06:59
C 2004:4:100::2/128
via ::1, eth-0-9, 00:06:59
C fe80::/10
via ::, Null0, 00:07:00

Configure OSPFv3 Cost

image

  1. OSPFv3 Cost

You can make a route the preferred route by changing its cost. In this example, cost has been configured to make Switch2 the next hop for Switch1.

The default cost on each interface is 1(1000M speed). Interface eth2 on Switch2 has a cost of 100 and interface eth2 on Switch3 has a cost of 150. The total cost to reach(Switch4 network 10.10.14.0) through Switch2 and Switch3:

Switch2: 1+1+100 = 102 Switch3: 1+1+150 = 152

Therefore, Switch1 chooses Switch2 as its next hop for destination Switch4

step 1 Enter the configure mode

Switch# configure terminal

step 2 Enable ipv6 globally

Switch(config)# ipv6 enable

step 3 Create OSPFv3 instance

Configuring Switch1:

Switch(config)# router ipv6 ospf 100
Switch(config-router) router-id 1.1.1.1
Switch(config-router) exit

Configuring Switch2:

Switch(config)# router ipv6 ospf 200
Switch(config-router) router-id 2.2.2.2
Switch(config-router) exit

Configuring Switch3:

Switch(config)# router ipv6 ospf 300
Switch(config-router) router-id 3.3.3.3
Switch(config-router) exit

Configuring Switch4:

Switch(config)# router ipv6 ospf 400
Switch(config-router) router-id 4.4.4.4
Switch(config-router) exit

step 4 Enter the interface configure mode and set the attributes of the interface

Interface configuration for Switch1:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:12:9::1/96
Switch(config-if)# ipv6 router ospf 100 area 0 instance 0
Switch(config-if)# exit
Switch(config)interface eth-0-17
Switch(config-if)no switchport
Switch(config-if)no shutdown
Switch(config-if)# ipv6 address 2004:14:17::1/96
Switch(config-if)# ipv6 router ospf 100 area 0 instance 0
Switch(config-if)# exit

Interface configuration for Switch2:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:12:9::2/96
Switch(config-if)# ipv6 router ospf 200 area 0 instance 0
Switch(config-if)# exit
Switch(config)interface eth-0-17
Switch(config-if)no switchport
Switch(config-if)no shutdown
Switch(config-if)# ipv6 address 2004:23:17::1/96
Switch(config-if)# ipv6 router ospf 200 area 0 instance 0
Switch(config-if)# ipv6 ospf cost 100
Switch(config-if)# exit

Interface configuration for Switch3:

Switch(config)# interface eth-0-1
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:3:1::1/96
Switch(config-if)# ipv6 router ospf 300 area 0 instance 0
Switch(config-if)# exit
Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:34:9::1/96
Switch(config-if)# ipv6 router ospf 300 area 0 instance 0
Switch(config-if)# exit
Switch(config)# interface eth-0-17
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:23:17::2/96
Switch(config-if)# ipv6 router ospf 300 area 0 instance 0
Switch(config-if)# exit

Interface configuration for Switch4:

Switch(config)# interface eth-0-9
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:34:9::2/96
Switch(config-if)# ipv6 router ospf 400 area 0 instance 0
Switch(config-if)# ipv6 ospf cost 150
Switch(config-if)# exit
Switch(config)# interface eth-0-17
Switch(config-if)# no switchport
Switch(config-if)# no shutdown
Switch(config-if)# ipv6 address 2004:14:17::2/96
Switch(config-if)# ipv6 router ospf 400 area 0 instance 0
Switch(config-if)# end

step 5 Exit the configure mode

Switch(config)# end

step 6 Validation

Display the result on Switch1:

Switch# show ipv6 ospf route
IPv6 Routing Table
Codes: C - connected, S - static, R - RIP, I - IS-IS, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Dr - DHCPV6 Relay

| [*] - [AD/Metric]

Timers: Uptime
O 2004:3:1::/96 \[110/102\]
via fe80::bc22:aeff:fe64:aa00, eth-0-9, 00:08:06
C 2004:12:9::/96
via ::, eth-0-9, 01:15:43
C 2004:12:9::1/128
via ::1, eth-0-9, 01:15:43
C 2004:14:17::/96
via ::, eth-0-17, 00:18:38
C 2004:14:17::1/128
via ::1, eth-0-17, 00:18:38
O 2004:23:17::/96 \[110/101\]
via fe80::bc22:aeff:fe64:aa00, eth-0-9, 00:08:06
O 2004:34:9::/96 \[110/102\]
via fe80::bc22:aeff:fe64:aa00, eth-0-9, 00:03:56
C fe80::/10
via ::, Null0, 01:15:44

Display the result on Switch2:

Switch# show ipv6 ospf route
IPv6 Routing Table
Codes: C - connected, S - static, R - RIP, I - IS-IS, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Dr - DHCPV6 Relay

| [*] - [AD/Metric]

Timers: Uptime
O 2004:3:1::/96 \[110/101\]
via fe80::c629:f2ff:fe02:3600, eth-0-17, 00:08:33
C 2004:12:9::/96
via ::, eth-0-9, 01:12:40
C 2004:12:9::2/128
via ::1, eth-0-9, 01:12:40
O 2004:14:17::/96 \[110/2\]
via fe80::b242:55ff:fe05:ff00, eth-0-9, 00:18:43
C 2004:23:17::/96
via ::, eth-0-17, 01:12:40
C 2004:23:17::1/128
via ::1, eth-0-17, 01:12:40
O 2004:34:9::/96 \[110/101\]
via fe80::c629:f2ff:fe02:3600, eth-0-17, 00:04:23
C fe80::/10
via ::, Null0, 01:12:42

Display the result on Switch3:

Switch# show ipv6 ospf route
IPv6 Routing Table
Codes: C - connected, S - static, R - RIP, I - IS-IS, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Dr - DHCPV6 Relay

| [*] - [AD/Metric]

Timers: Uptime
C 2004:3:1::/96
via ::, eth-0-1, 00:13:54
C 2004:3:1::1/128
via ::1, eth-0-1, 00:13:54
O 2004:12:9::/96 \[110/2\]
via fe80::bc22:aeff:fe64:aa00, eth-0-17, 00:19:47
O 2004:14:17::/96 \[110/2\]
via fe80::ee66:91ff:fe45:db00, eth-0-9, 00:02:27
C 2004:23:17::/96
via ::, eth-0-17, 01:09:02
C 2004:23:17::2/128
via ::1, eth-0-17, 01:09:02
C 2004:34:9::/96
via ::, eth-0-9, 00:04:52
C 2004:34:9::1/128
via ::1, eth-0-9, 00:04:52
C fe80::/10
via ::, Null0, 01:09:04

Display the result on Switch4:

Switch# show ipv6 route
IPv6 Routing Table
Codes: C - connected, S - static, R - RIP, I - IS-IS, B - BGP
O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
Dr - DHCPV6 Relay

| [*] - [AD/Metric]

Timers: Uptime
O 2004:3:1::/96 \[110/103\]
via fe80::b242:55ff:fe05:ff00, eth-0-17, 00:02:35
O 2004:12:9::/96 \[110/2\]
via fe80::b242:55ff:fe05:ff00, eth-0-17, 00:02:35
C 2004:14:17::/96
via ::, eth-0-17, 00:04:09
C 2004:14:17::2/128
via ::1, eth-0-17, 00:04:09
O 2004:23:17::/96 \[110/102\]
via fe80::b242:55ff:fe05:ff00, eth-0-17, 00:02:35
C 2004:34:9::/96
via ::, eth-0-9, 00:06:06
C 2004:34:9::2/128
via ::1, eth-0-9, 00:06:06
C fe80::/10
via ::, Null0, 00:44:59

Monitoring OSPFv3

You can display specific statistics such as the contents of IPv6 routing tables, caches, and databases.

Display general information about OSPFv3 routing processes

Switch# show ipv6 ospf
Routing Process \"OSPFv3 (300)\" with ID 3.3.3.3
Process uptime is 3 hours 23 minutes
SPF schedule delay min 0.500 secs, SPF schedule delay max 50.0 secs
Minimum LSA interval 5 secs, Minimum LSA arrival 1 secs
Number of incomming current DD exchange neighbors 0/5
Number of outgoing current DD exchange neighbors 0/5
Number of external LSA 0. Checksum Sum 0x0000
Number of AS-Scoped Unknown LSA 0
Number of LSA originated 6
Number of LSA received 43
Number of areas in this router is 1
Area BACKBONE(0)
Number of interfaces in this area is 1(1)
SPF algorithm executed 14 times
Number of LSA 5. Checksum Sum 0x30DCD
Number of Unknown LSA 0

Display OSPFv3 interface neighbor information

Switch# show ipv6 ospf neighbor
OSPFv3 Process (300)
Neighbor ID Pri State Dead Time Interface Instance ID
1.1.1.1 1 Full/DROther 00:00:39 eth-0-13 0
2.2.2.2 1 Full/Backup 00:00:33 eth-0-13 0

Application cases {application-cases-90}

N/A