Enabling and Configuring OSPFv3

Enabling and Configuring OSPFv3
Enabling OSPFv3 on a Cisco router is straightforward if you have a good grasp of OSPFv2. Once
basic IPv6 addressing and reachability are configured and working, the OSPFv3 configuration
process includes these steps:
Step 1 Identify the desired links connected to each OSPFv3 router.
Step 2 Determine the OSPF area design and the area to which each router link
(interface) should belong.
Step 3 Identify any special OSPF routing requirements, such as stub areas, address
summarization, LSA filtering, and virtual links.
Step 4 Configure OSPF on the interfaces.
Step 5 Configure routing process commands, including a router ID on IPv6-only routers.
Step 6 Verify OSPF configuration, routing tables, and reachability.
Figure 20-5 shows the network layout for this basic OSPFv3 routing example. Configuration
details follow in Example 20-9 and Example 20-10.
Figure 20-5 Topology for Basic OSPFv3 Routing Configuration Examples 20-9 Through 20-12
Example 20-9 Configuring OSPFv3 on Router R3
R3# show run
Building configuration...
! Lines omitted for brevity
!
! IPv6 unicast routing must be enabled to configure IPv6 features:
ipv6 unicast-routing
ipv6 cef
!
interface Loopback0
Frame
Relay
Lo0
3001:0:4:0::/64
Lo0
3001:0:3:0::/64
Lo2
3001:0:4:2::/64
Se0/0
2001::/64
Se0/0
2001::/64 Lo2
3001:0:3:2::/64
Lo4
3001:0:3:4::/64
Fa0/0
2001:0:4:0::/64
Fa0/0
R3
Area 77
R4C
DLCI 708
DLCI 807
Area 66
Area 704
Area 0
OSPFv3 773
no ip address
! IPv6 addresses are assigned to each OSPFv3 interface:
ipv6 address 3001:0:3::/64 eui-64
! Next OSPFv3 is enabled on the interface and the interface is assigned to an area:
ipv6 ospf 1 area 704
! IPv6 OSPFv3 draws its router ID from the IPv4 loopback address on
! interface Loopback 1:
interface Loopback1
ip address 10.3.3.6 255.255.255.0
!
interface Loopback2
no ip address
ipv6 address 3001:0:3:2::/64 eui-64
! Like IPv4, setting the network type of a loopback address to point-to-point
! makes the route to this loopback appear in R4C’s routing table as a /64
! network rather than as a /128 network (a host route):
ipv6 ospf network point-to-point
ipv6 ospf 1 area 0
! Note that interface Loopback 4 will be added later. Its use will be covered
! in another example later in this chapter.
!
interface FastEthernet0/0
no ip address
speed auto
! Assign an IPv6 address and perform OSPFv3 configuration on
! the interface:
ipv6 address 2001:0:3::/64 eui-64
ipv6 ospf 1 area 704
!
interface Serial0/0
bandwidth 128
no ip address
encapsulation frame-relay
! On the serial interface, first configure the IPv6 address:
ipv6 address 2001::/64 eui-64
! Next must specify a neighbor, because the interface is
! NBMA (frame relay in this case).
! Like OSPFv2, OSPFv3 in Cisco IOS requires a neighbor statement at
! only one end of the link:
ipv6 ospf neighbor FE80::207:85FF:FE80:71B8
ipv6 ospf 1 area 0
clock rate 128000
no fair-queue
cdp enable
! Because this is a frame-relay interface, map the link-local address of
! the next hop. This allows OSPFv3 neighbors to form:
frame-relay map ipv6 FE80::207:85FF:FE80:71B8 807 broadcast
Example 20-9 Configuring OSPFv3 on Router R3 (Continued)
continues
774 Chapter 20: IP Version 6
! Next, add a frame-relay map statement to the unicast address of
! the next hop on the serial link so that unicast IPv6 packets will
! reach their destination:
frame-relay map ipv6 2001::207:85FF:FE80:71B8 807
! The ipv6 router ospf 1 global commands are created when OSPFv3 is
! enabled on the first interface:
ipv6 router ospf 1
log-adjacency-changes
!
! Lines omitted for brevity
R3#
Example 20-10 Configuring OSPFv3 on Router R4C
R4C# show run
Building configuration...
! Lines omitted for brevity
!
ipv6 unicast-routing
ipv6 cef
!
!
interface Loopback0
no ip address
ipv6 address 3001:0:4::/64 eui-64
ipv6 ospf 1 area 66
!
interface Loopback2
no ip address
ipv6 address 3001:0:4:2::/64 eui-64
! Like IPv4, setting the network type of a loopback address to point-to-point
! makes the route to this loopback appear in R3’s routing table as a /64
! network rather than as a /128 network (a host route):
ipv6 ospf network point-to-point
ipv6 ospf 1 area 0
!
interface FastEthernet0/0
no ip address
speed 100
full-duplex
ipv6 address 2001:0:4::/64 eui-64
ipv6 ospf 1 area 77
!
interface Serial0/0
bandwidth 128
no ip address
encapsulation frame-relay
Example 20-9 Configuring OSPFv3 on Router R3 (Continued)
OSPFv3 775
Note that this example configures several OSPF areas, so both intra-area and inter-area routes
appear in the OSPFv3 routing tables. Routes with different network sizes and metrics will also be
present. Example 20-11 confirms the OSPFv3 routing configuration by using show commands
and ping tests.
! Because the other neighbor has the neighbor statement, this side doesn’t need one.
ipv6 address 2001::/64 eui-64
ipv6 ospf 1 area 0
clock rate 128000
no fair-queue
cdp enable
! Here again, two frame-relay map statements are required:
frame-relay map ipv6 FE80::207:85FF:FE80:7208 708 broadcast
frame-relay map ipv6 2001::207:85FF:FE80:7208 708
!
ipv6 router ospf 1
! Here, we must specify the OSPFv3 router ID, because
! this router has no IPv4 interfaces:
router-id 99.99.99.99
log-adjacency-changes
!
! Lines omitted for brevity
R4C#
Example 20-11 Verifying OSPFv3 Configuration and Reachability
! The show ipv6 interface brief command displays both
! the unicast and link-local addresses,
! which is useful during ping and traceroute testing:
R3# show ipv6 interface brief
FastEthernet0/0 [up/up]
FE80::207:85FF:FE80:7208
2001:0:3:0:207:85FF:FE80:7208
Serial0/0 [up/up]
FE80::207:85FF:FE80:7208
2001::207:85FF:FE80:7208
Loopback0 [up/up]
FE80::207:85FF:FE80:7208
3001:0:3:0:207:85FF:FE80:7208
Loopback1 [up/up]
Loopback2 [up/up]
FE80::207:85FF:FE80:7208
3001:0:3:2:207:85FF:FE80:7208
Loopback4 [up/up]
FE80::207:85FF:FE80:7208
3001:0:3:4:207:85FF:FE80:7208
Example 20-10 Configuring OSPFv3 on Router R4C (Continued)
continues
776 Chapter 20: IP Version 6
R3#
! The show ipv6 protocols command gives the best summary of
! OSPFv3 configuration by interface and OSPF area:
R3# show ipv6 protocols
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "static"
IPv6 Routing Protocol is "ospf 1"
Interfaces (Area 0):
Loopback2
Serial0/0
Interfaces (Area 704):
Loopback0
FastEthernet0/0
R3#
! Next we’ll look at the OSPFv3 interfaces in more
! detail to view the corresponding settings:
R3# show ipv6 ospf interface
Loopback2 is up, line protocol is up
Link Local Address FE80::207:85FF:FE80:7208, Interface ID 10
Area 0, Process ID 1, Instance ID 0, Router ID 10.3.3.6
Network Type POINT_TO_POINT, Cost: 1
Transmit Delay is 1 sec, State POINT_TO_POINT,
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Index 1/1/4, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 0
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
Serial0/0 is up, line protocol is up
Link Local Address FE80::207:85FF:FE80:7208, Interface ID 3
Area 0, Process ID 1, Instance ID 0, Router ID 10.3.3.6
Network Type NON_BROADCAST, Cost: 781
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 10.3.3.6, local address FE80::207:85FF:FE80:7208
Backup Designated router (ID) 99.99.99.99, local address
FE80::207:85FF:FE80:71B8
Timer intervals configured, Hello 30, Dead 120, Wait 120, Retransmit 5
Hello due in 00:00:05
Index 1/3/3, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 6
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 99.99.99.99 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
Loopback0 is up, line protocol is up
Example 20-11 Verifying OSPFv3 Configuration and Reachability (Continued)
OSPFv3 777
Link Local Address FE80::207:85FF:FE80:7208, Interface ID 8
Area 704, Process ID 1, Instance ID 0, Router ID 10.3.3.6
Network Type LOOPBACK, Cost: 1
Loopback interface is treated as a stub Host
FastEthernet0/0 is up, line protocol is up
Link Local Address FE80::207:85FF:FE80:7208, Interface ID 2
Area 704, Process ID 1, Instance ID 0, Router ID 10.3.3.6
Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1
Designated Router (ID) 10.3.3.6, local address FE80::207:85FF:FE80:7208
No backup designated router on this network
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:06
Index 1/1/1, flood queue length 0
Next 0x0(0)/0x0(0)/0x0(0)
Last flood scan length is 0, maximum is 0
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 0, Adjacent neighbor count is 0
Suppress hello for 0 neighbor(s)
R3#
! Now let’s take a look at the IPv6 routing table’s OSPF routes.
! Note the presence of two inter-area routes and one intra-area route.
! The intra-area route points to Loopback 0 on R4C, which is a /128 (host)
! route because LO0 has the default network type for a loopback interface.
! The others are /64 routes because of their network types.
R3# show ipv6 route ospf
IPv6 Routing Table - 15 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
D - EIGRP, EX - EIGRP external
OI 2001:0:4::/64 [110/782]
via FE80::207:85FF:FE80:71B8, Serial0/0
OI 3001:0:4::/64 [110/782]
via FE80::207:85FF:FE80:71B8, Serial0/0
O 3001:0:4:2:207:85FF:FE80:71B8/128 [110/781]
via FE80::207:85FF:FE80:71B8, Serial0/0
R3#
! A ping test proves reachability to an address on an inter-area route:
R3# ping 3001:0:4:2:207:85FF:FE80:71B8
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3001:0:4:2:207:85FF:FE80:71B8,
timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/32 ms
R3#
Example 20-11 Verifying OSPFv3 Configuration and Reachability (Continued)
778 Chapter 20: IP Version 6
Next, Example 20-12 shows redistributing a new loopback interface into OSPFv3 on R3, filtered
through a route map, to see the effect on R4C’s routing table. Note the similarity in command
syntax and output to OSPFv2.
Example 20-12 Redistributing a Connected Interface into OSPFv3
! First create the Loopback 4 interface on R3:
R3# conf t
R3(config)# interface Loopback4
R3(config-if)# ipv6 address 3001:0:3:4::/64 eui-64
! Next, create a route map to select only this new
! loopback interface for redistribution:
R3(config-if)# route-map Con2OSPFv3
R3(config-route-map)# route-map Con2OSPFv3 permit 10
R3(config-route-map)# match interface loopback 4
R3(config-route-map)# exit
R3(config)# ipv6 router ospf 1
R3(config-rtr)# redistribute connected route-map Con2OSPFv3
R3(config-rtr)# end
R3# show ipv6 protocols
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "static"
IPv6 Routing Protocol is "ospf 1"
Interfaces (Area 0):
Loopback2
Serial0/0
Interfaces (Area 704):
Loopback0
FastEthernet0/0
Redistribution:
Redistributing protocol connected route-map Con2OSPFv3
R3#
! On R4 the new redistributed route on R3 appears as an OE2 route, because
! type E2 is the default for redistributed routes, and the default
! metric is 20, as in OSPFv2.
R4C# show ipv6 route ospf
IPv6 Routing Table - 14 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
D - EIGRP, EX - EIGRP external
OI 2001:0:3::/64 [110/782]
via FE80::207:85FF:FE80:7208, Serial0/0
OI 3001:0:3:0:207:85FF:FE80:7208/128 [110/781]
via FE80::207:85FF:FE80:7208, Serial0/0
O 3001:0:3:2::/64 [110/782]
via FE80::207:85FF:FE80:7208, Serial0/0
OE2 3001:0:3:4::/64 [110/20]
via FE80::207:85FF:FE80:7208, Serial0/0
R4C#
! Finally, verify reachability to the redistributed loopback interface:
R4C# ping 3001:0:3:4:207:85FF:FE80:7208
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30
001:0:3:4:207:85FF:FE80:7208,
timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/29/33 ms
R4C#