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

Automatically Generating IPv6 Addresses for an Interface

Problem

You want to enable IPv6 and generate addresses automatically.

Solution

There are two methods for generating IPv6 addresses automatically. The first uses the autoconfig command:

Router1#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#ipv6 unicast-routing
Router1(config)#interface FastEthernet0/0
Router1(config-if)#ipv6 address autoconfig
Router1(config-if)#end
Router1#

The second method uses the EUI-64 method to automatically generate only the host part of the IPv6 address, combined with a defined network portion:

Router1#configure terminal 
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#ipv6 unicast-routing
Router1(config)#interface FastEthernet0/0
Router1(config-if)#ipv6 address AAAA::/64 eui-64
Router1(config-if)#end
Router1#

Discussion

Throughout this chapter you will see the following command frequently:

Router1(config)#ipv6 unicast-routing

By default, the router will not route IPv6 packets. You can configure interfaces with IPv6 addresses, and you can even use IPv6 applications such as PING and TELNET to communicate to and from these routers. And, somewhat confusingly, you can configure static IPv6 routes to allow the routers to do simple IPv6 networking. But without this command, you cannot enable any IPv6 routing protocols. So, even though we are not using any routing protocols in this recipe, we have enabled the ipv6 unicast-routing command ...

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