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
Router1(config-if)#
FastEthernet0/0
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
Router1(config-if)#
FastEthernet0/0
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 ...
Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.