O'Reilly logo

Cisco IOS Cookbook, 2nd Edition by Ian Brown, Kevin Dooley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using OSPF for IPv6

Problem

You want to distribute your IPv6 routing information using OSPF Version 3.

Solution

Configuring OSPF for IPv6 is similar to the IPv4 configuration:

Router1#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#ip cef
Router1(config)#ipv6 cef
Router1(config)#ipv6 unicast-routing
Router1(config)#ipv6 router ospf 1
Router1(config-rtr)#router-id 1.0.0.1
Router1(config-rtr)#area 0 range AAAA:5::/64
Router1(config-rtr)#exit
Router1(config)#interface FastEthernet0/0
Router1(config-if)#ipv6 address AAAA:5::1/64
Router1(config-if)#ipv6 ospf 1 area 0
Router1(config-if)#exit
Router1(config)#end
Router1#

Discussion

OSPF Version 3 is a set of relatively straightforward extensions to the existing OSPF Version 2 protocol. These extensions are used purely to allow IPv6 support. The basic operation of OSPF, with its Link State Advertisement (LSA) packets, its strict two-level hierarchy of areas, flooding, Designated Routers, and so forth are exactly the same as what we previously saw for IPv4 in Chapter 8.

OSPFv3 is defined in RFC 2740.

Configuring OSPF for IPv6 has a few more steps than configuring RIP. In particular, CEF must be enabled for both IPv4 and IPv6:

Router1(config)#ip cef
Router1(config)#ipv6 cef

You then define an OSPF process:

Router1(config)#ipv6 router ospf 1
Router1(config-rtr)#router-id 1.0.0.1
Router1(config-rtr)#area 0range AAAA:5::/64

Note that OSPF requires a router ID for every router, and that this ID is always a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required